From 9128314cb83aa1f97a1372d599e34770085bfa2e Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 22 Jul 2017 17:43:42 -0400 Subject: [PATCH 01/85] Basilisk II compiles on Xcode 8, as a 64-bit Mac app SDL 1.x is used for display, rather than Mac OS X specific backend. If time permits, I'll port it to SDL 2, if only to reduce Basilisk's overall code foot-print. Lots of features are apt to be disabled, as many 'dummy' backends were used. Video-depths other than 1-bit or 32-bit are untested, and in some cases (4-bit, at least) are currently non-functional. This is due to a partial re-write of the SDL backend's blitting code, which was non-functional when low-bit-depths were used. The SDL backend was also rewired, on OSX, to not attempt to align the display buffer on page-boundaries. So far, this doesn't seem to cause any notice-able problems, however, that's only using limited knowledge and testing (System 7.5.x does boot and display at 640x480, though!). The original display-buffer allocation code was failing to run, in some cases. Preferences are, on Mac, currently hardcoded to be accessed at /tmp/BasiliskII/BasiliskII_Prefs. The folder, "/tmp/BasiliskII/", may be a symbolic link to elsewhere, though. --- .gitignore | 24 + BasiliskII/src/CrossPlatform/sigsegv.cpp | 2 - BasiliskII/src/CrossPlatform/vm_alloc.cpp | 2 - .../AppIcon.appiconset/Contents.json | 58 + .../BasiliskII.xcodeproj/project.pbxproj | 936 + .../contents.xcworkspacedata | 7 + BasiliskII/src/MacOSX/config.h | 813 + BasiliskII/src/SDL/video_sdl.cpp | 52 +- BasiliskII/src/Unix/bincue_unix.cpp | 2 + BasiliskII/src/Unix/main_unix.cpp | 4 + BasiliskII/src/Unix/timer_unix.cpp | 2 +- BasiliskII/src/dummy/prefs_dummy.cpp | 9 +- BasiliskII/src/dummy/user_strings_dummy.cpp | 4 +- BasiliskII/src/include/video.h | 3 + BasiliskII/src/uae_cpu/cpuemu.cpp | 45296 ++++++++++++++++ BasiliskII/src/uae_cpu/cpuemu_nf.cpp | 2 + BasiliskII/src/uae_cpu/cpustbl.cpp | 8720 +++ BasiliskII/src/uae_cpu/cpustbl_nf.cpp | 2 + BasiliskII/src/uae_cpu/cputbl.h | 4322 ++ BasiliskII/src/uae_cpu/defs68k.c | 185 + BasiliskII/src/uae_cpu/gencpu.c | 4 +- BasiliskII/src/uae_cpu/osx_generate_files.sh | 22 + BasiliskII/src/video.cpp | 17 + 23 files changed, 60476 insertions(+), 12 deletions(-) create mode 100644 BasiliskII/src/MacOSX/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj create mode 100644 BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 BasiliskII/src/MacOSX/config.h create mode 100644 BasiliskII/src/uae_cpu/cpuemu.cpp create mode 100644 BasiliskII/src/uae_cpu/cpuemu_nf.cpp create mode 100644 BasiliskII/src/uae_cpu/cpustbl.cpp create mode 100644 BasiliskII/src/uae_cpu/cpustbl_nf.cpp create mode 100644 BasiliskII/src/uae_cpu/cputbl.h create mode 100644 BasiliskII/src/uae_cpu/defs68k.c create mode 100755 BasiliskII/src/uae_cpu/osx_generate_files.sh diff --git a/.gitignore b/.gitignore index 2a6e2f0c..8a9e32bb 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,27 @@ # Mac OS X metadata *.DS_Store + +# +# Xcode gitignore settings are from https://github.com/github/gitignore/blob/master/Global/Xcode.gitignore +# + +## Xcode, Build generated +build/ +DerivedData/ + +## Xcode, Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Xcode, Other +*.moved-aside +*.xccheckout +*.xcscmblueprint diff --git a/BasiliskII/src/CrossPlatform/sigsegv.cpp b/BasiliskII/src/CrossPlatform/sigsegv.cpp index 570058c2..72658a9f 100644 --- a/BasiliskII/src/CrossPlatform/sigsegv.cpp +++ b/BasiliskII/src/CrossPlatform/sigsegv.cpp @@ -31,9 +31,7 @@ #include #endif -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include #include diff --git a/BasiliskII/src/CrossPlatform/vm_alloc.cpp b/BasiliskII/src/CrossPlatform/vm_alloc.cpp index 005cb727..a797579c 100644 --- a/BasiliskII/src/CrossPlatform/vm_alloc.cpp +++ b/BasiliskII/src/CrossPlatform/vm_alloc.cpp @@ -19,9 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #ifdef HAVE_FCNTL_H #include diff --git a/BasiliskII/src/MacOSX/Assets.xcassets/AppIcon.appiconset/Contents.json b/BasiliskII/src/MacOSX/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..2db2b1c7 --- /dev/null +++ b/BasiliskII/src/MacOSX/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj new file mode 100644 index 00000000..02e9485d --- /dev/null +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -0,0 +1,936 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 7539DFBF1F23B17E006B2DF2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7539DFBE1F23B17E006B2DF2 /* Assets.xcassets */; }; + 7539E1251F23B25A006B2DF2 /* adb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFC91F23B25A006B2DF2 /* adb.cpp */; }; + 7539E1261F23B25A006B2DF2 /* audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFCA1F23B25A006B2DF2 /* audio.cpp */; }; + 7539E1271F23B25A006B2DF2 /* cdrom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFCB1F23B25A006B2DF2 /* cdrom.cpp */; }; + 7539E1281F23B25A006B2DF2 /* sigsegv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFCD1F23B25A006B2DF2 /* sigsegv.cpp */; }; + 7539E1291F23B25A006B2DF2 /* video_blit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFCF1F23B25A006B2DF2 /* video_blit.cpp */; }; + 7539E12A1F23B25A006B2DF2 /* vm_alloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFD21F23B25A006B2DF2 /* vm_alloc.cpp */; }; + 7539E12B1F23B25A006B2DF2 /* disk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFD41F23B25A006B2DF2 /* disk.cpp */; }; + 7539E12C1F23B25A006B2DF2 /* emul_op.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFD51F23B25A006B2DF2 /* emul_op.cpp */; }; + 7539E12D1F23B25A006B2DF2 /* ether.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFD61F23B25A006B2DF2 /* ether.cpp */; }; + 7539E12E1F23B25A006B2DF2 /* extfs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFD71F23B25A006B2DF2 /* extfs.cpp */; }; + 7539E12F1F23B25A006B2DF2 /* macos_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFF81F23B25A006B2DF2 /* macos_util.cpp */; }; + 7539E1301F23B25A006B2DF2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7539DFFA1F23B25A006B2DF2 /* Assets.xcassets */; }; + 7539E1341F23B25A006B2DF2 /* BasiliskII.icns in Resources */ = {isa = PBXBuildFile; fileRef = 7539E0021F23B25A006B2DF2 /* BasiliskII.icns */; }; + 7539E1381F23B25A006B2DF2 /* Credits.html in Resources */ = {isa = PBXBuildFile; fileRef = 7539E00A1F23B25A006B2DF2 /* Credits.html */; }; + 7539E13B1F23B25A006B2DF2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7539E00F1F23B25A006B2DF2 /* InfoPlist.strings */; }; + 7539E13E1F23B25A006B2DF2 /* HowTo.html in Resources */ = {isa = PBXBuildFile; fileRef = 7539E0141F23B25A006B2DF2 /* HowTo.html */; }; + 7539E14B1F23B25A006B2DF2 /* ToDo.html in Resources */ = {isa = PBXBuildFile; fileRef = 7539E02B1F23B25A006B2DF2 /* ToDo.html */; }; + 7539E14D1F23B25A006B2DF2 /* Versions.html in Resources */ = {isa = PBXBuildFile; fileRef = 7539E02E1F23B25A006B2DF2 /* Versions.html */; }; + 7539E16C1F23B25A006B2DF2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0651F23B25A006B2DF2 /* main.cpp */; }; + 7539E16D1F23B25A006B2DF2 /* pict.c in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0681F23B25A006B2DF2 /* pict.c */; }; + 7539E16F1F23B25A006B2DF2 /* prefs_items.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E06C1F23B25A006B2DF2 /* prefs_items.cpp */; }; + 7539E1701F23B25A006B2DF2 /* prefs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E06D1F23B25A006B2DF2 /* prefs.cpp */; }; + 7539E1711F23B25A006B2DF2 /* rom_patches.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E06E1F23B25A006B2DF2 /* rom_patches.cpp */; }; + 7539E1721F23B25A006B2DF2 /* rsrc_patches.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E06F1F23B25A006B2DF2 /* rsrc_patches.cpp */; }; + 7539E1731F23B25A006B2DF2 /* scsi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0701F23B25A006B2DF2 /* scsi.cpp */; }; + 7539E1741F23B25A006B2DF2 /* audio_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0721F23B25A006B2DF2 /* audio_sdl.cpp */; }; + 7539E1751F23B25A006B2DF2 /* keycodes in Resources */ = {isa = PBXBuildFile; fileRef = 7539E0731F23B25A006B2DF2 /* keycodes */; }; + 7539E1761F23B25A006B2DF2 /* SDLMain.m in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0751F23B25A006B2DF2 /* SDLMain.m */; }; + 7539E1771F23B25A006B2DF2 /* video_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0761F23B25A006B2DF2 /* video_sdl.cpp */; }; + 7539E1781F23B25A006B2DF2 /* serial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0771F23B25A006B2DF2 /* serial.cpp */; }; + 7539E18D1F23B25A006B2DF2 /* slot_rom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0A21F23B25A006B2DF2 /* slot_rom.cpp */; }; + 7539E18E1F23B25A006B2DF2 /* sony.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0A31F23B25A006B2DF2 /* sony.cpp */; }; + 7539E18F1F23B25A006B2DF2 /* timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0A41F23B25A006B2DF2 /* timer.cpp */; }; + 7539E1901F23B25A006B2DF2 /* basilisk_glue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0A61F23B25A006B2DF2 /* basilisk_glue.cpp */; }; + 7539E1981F23B25A006B2DF2 /* exceptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0B51F23B25A006B2DF2 /* exceptions.cpp */; }; + 7539E1991F23B25A006B2DF2 /* flags.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0B71F23B25A006B2DF2 /* flags.cpp */; }; + 7539E19D1F23B25A006B2DF2 /* mathlib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0C21F23B25A006B2DF2 /* mathlib.cpp */; }; + 7539E19E1F23B25A006B2DF2 /* rounding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0C41F23B25A006B2DF2 /* rounding.cpp */; }; + 7539E1A01F23B25A006B2DF2 /* memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0C91F23B25A006B2DF2 /* memory.cpp */; }; + 7539E1A21F23B25A006B2DF2 /* readcpu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0CE1F23B25A006B2DF2 /* readcpu.cpp */; }; + 7539E1A31F23B25A006B2DF2 /* table68k in Resources */ = {isa = PBXBuildFile; fileRef = 7539E0D11F23B25A006B2DF2 /* table68k */; }; + 7539E1E11F23B25A006B2DF2 /* user_strings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E1221F23B25A006B2DF2 /* user_strings.cpp */; }; + 7539E1E21F23B25A006B2DF2 /* video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E1231F23B25A006B2DF2 /* video.cpp */; }; + 7539E1E31F23B25A006B2DF2 /* xpram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E1241F23B25A006B2DF2 /* xpram.cpp */; }; + 7539E23F1F23B32A006B2DF2 /* bincue_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E1F01F23B329006B2DF2 /* bincue_unix.cpp */; }; + 7539E2451F23B32A006B2DF2 /* gtk-osx.patch in Resources */ = {isa = PBXBuildFile; fileRef = 7539E1F81F23B329006B2DF2 /* gtk-osx.patch */; }; + 7539E2471F23B32A006B2DF2 /* mkstandalone in Resources */ = {isa = PBXBuildFile; fileRef = 7539E1FA1F23B32A006B2DF2 /* mkstandalone */; }; + 7539E2491F23B32A006B2DF2 /* testlmem.sh in Resources */ = {isa = PBXBuildFile; fileRef = 7539E1FC1F23B32A006B2DF2 /* testlmem.sh */; }; + 7539E24A1F23B32A006B2DF2 /* disk_sparsebundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E1FD1F23B32A006B2DF2 /* disk_sparsebundle.cpp */; }; + 7539E24C1F23B32A006B2DF2 /* extfs_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2001F23B32A006B2DF2 /* extfs_unix.cpp */; }; + 7539E24D1F23B32A006B2DF2 /* fbdevices in Resources */ = {isa = PBXBuildFile; fileRef = 7539E2011F23B32A006B2DF2 /* fbdevices */; }; + 7539E2501F23B32A006B2DF2 /* install-sh in Resources */ = {isa = PBXBuildFile; fileRef = 7539E2051F23B32A006B2DF2 /* install-sh */; }; + 7539E2541F23B32A006B2DF2 /* keycodes in Resources */ = {isa = PBXBuildFile; fileRef = 7539E20A1F23B32A006B2DF2 /* keycodes */; }; + 7539E2551F23B32A006B2DF2 /* freebsd-i386.ld in Resources */ = {isa = PBXBuildFile; fileRef = 7539E20C1F23B32A006B2DF2 /* freebsd-i386.ld */; }; + 7539E2561F23B32A006B2DF2 /* linux-i386.ld in Resources */ = {isa = PBXBuildFile; fileRef = 7539E20D1F23B32A006B2DF2 /* linux-i386.ld */; }; + 7539E2571F23B32A006B2DF2 /* linux-ppc.ld in Resources */ = {isa = PBXBuildFile; fileRef = 7539E20E1F23B32A006B2DF2 /* linux-ppc.ld */; }; + 7539E2581F23B32A006B2DF2 /* linux-x86_64.ld in Resources */ = {isa = PBXBuildFile; fileRef = 7539E20F1F23B32A006B2DF2 /* linux-x86_64.ld */; }; + 7539E25D1F23B32A006B2DF2 /* egrep.m4 in Resources */ = {isa = PBXBuildFile; fileRef = 7539E2181F23B32A006B2DF2 /* egrep.m4 */; }; + 7539E25E1F23B32A006B2DF2 /* esd.m4 in Resources */ = {isa = PBXBuildFile; fileRef = 7539E2191F23B32A006B2DF2 /* esd.m4 */; }; + 7539E25F1F23B32A006B2DF2 /* gettext.m4 in Resources */ = {isa = PBXBuildFile; fileRef = 7539E21A1F23B32A006B2DF2 /* gettext.m4 */; }; + 7539E2601F23B32A006B2DF2 /* gtk-2.0.m4 in Resources */ = {isa = PBXBuildFile; fileRef = 7539E21B1F23B32A006B2DF2 /* gtk-2.0.m4 */; }; + 7539E2611F23B32A006B2DF2 /* gtk.m4 in Resources */ = {isa = PBXBuildFile; fileRef = 7539E21C1F23B32A006B2DF2 /* gtk.m4 */; }; + 7539E2631F23B32A006B2DF2 /* Makefile.in in Resources */ = {isa = PBXBuildFile; fileRef = 7539E21E1F23B32A006B2DF2 /* Makefile.in */; }; + 7539E2641F23B32A006B2DF2 /* mkinstalldirs in Resources */ = {isa = PBXBuildFile; fileRef = 7539E21F1F23B32A006B2DF2 /* mkinstalldirs */; }; + 7539E2681F23B32A006B2DF2 /* rpc_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2241F23B32A006B2DF2 /* rpc_unix.cpp */; }; + 7539E26C1F23B32A006B2DF2 /* sshpty.c in Sources */ = {isa = PBXBuildFile; fileRef = 7539E22A1F23B32A006B2DF2 /* sshpty.c */; }; + 7539E26D1F23B32A006B2DF2 /* strlcpy.c in Sources */ = {isa = PBXBuildFile; fileRef = 7539E22C1F23B32A006B2DF2 /* strlcpy.c */; }; + 7539E26E1F23B32A006B2DF2 /* sys_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E22E1F23B32A006B2DF2 /* sys_unix.cpp */; }; + 7539E26F1F23B32A006B2DF2 /* timer_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2301F23B32A006B2DF2 /* timer_unix.cpp */; }; + 7539E2701F23B32A006B2DF2 /* tinyxml2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2311F23B32A006B2DF2 /* tinyxml2.cpp */; }; + 7539E2711F23B32A006B2DF2 /* tunconfig in Resources */ = {isa = PBXBuildFile; fileRef = 7539E2331F23B32A006B2DF2 /* tunconfig */; }; + 7539E27B1F23B488006B2DF2 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7539E2771F23B469006B2DF2 /* SDL.framework */; }; + 7539E27C1F23B488006B2DF2 /* SDL.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7539E2771F23B469006B2DF2 /* SDL.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 7539E2801F23C4CA006B2DF2 /* main_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E27F1F23C4CA006B2DF2 /* main_unix.cpp */; }; + 7539E28E1F23C56F006B2DF2 /* clip_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2851F23C56F006B2DF2 /* clip_dummy.cpp */; }; + 7539E28F1F23C56F006B2DF2 /* ether_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2861F23C56F006B2DF2 /* ether_dummy.cpp */; }; + 7539E2901F23C56F006B2DF2 /* prefs_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2871F23C56F006B2DF2 /* prefs_dummy.cpp */; }; + 7539E2911F23C56F006B2DF2 /* prefs_editor_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2881F23C56F006B2DF2 /* prefs_editor_dummy.cpp */; }; + 7539E2921F23C56F006B2DF2 /* scsi_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2891F23C56F006B2DF2 /* scsi_dummy.cpp */; }; + 7539E2931F23C56F006B2DF2 /* serial_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E28A1F23C56F006B2DF2 /* serial_dummy.cpp */; }; + 7539E2941F23C56F006B2DF2 /* user_strings_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E28B1F23C56F006B2DF2 /* user_strings_dummy.cpp */; }; + 7539E2951F23C56F006B2DF2 /* xpram_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E28C1F23C56F006B2DF2 /* xpram_dummy.cpp */; }; + 7539E2971F23C5FD006B2DF2 /* newcpu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2961F23C5FD006B2DF2 /* newcpu.cpp */; }; + 7539E29D1F23C83F006B2DF2 /* sys_darwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E29C1F23C83F006B2DF2 /* sys_darwin.cpp */; }; + 7539E29F1F23C939006B2DF2 /* fpu_uae.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E29E1F23C939006B2DF2 /* fpu_uae.cpp */; }; + 7539E2A51F23CB9B006B2DF2 /* cpuemu_nf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2A01F23CB9B006B2DF2 /* cpuemu_nf.cpp */; }; + 7539E2A61F23CB9B006B2DF2 /* cpuemu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2A11F23CB9B006B2DF2 /* cpuemu.cpp */; }; + 7539E2A71F23CB9B006B2DF2 /* cpustbl_nf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2A21F23CB9B006B2DF2 /* cpustbl_nf.cpp */; }; + 7539E2A81F23CB9B006B2DF2 /* cpustbl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2A31F23CB9B006B2DF2 /* cpustbl.cpp */; }; + 7539E2A91F23CB9B006B2DF2 /* defs68k.c in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2A41F23CB9B006B2DF2 /* defs68k.c */; }; + 7539E2AB1F23CDB7006B2DF2 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 7539E2AA1F23CDB7006B2DF2 /* Info.plist */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 7539E27D1F23B489006B2DF2 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 7539E27C1F23B488006B2DF2 /* SDL.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 7539DFB21F23B17E006B2DF2 /* BasiliskII.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BasiliskII.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7539DFBE1F23B17E006B2DF2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 7539DFC91F23B25A006B2DF2 /* adb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = adb.cpp; path = ../adb.cpp; sourceTree = ""; }; + 7539DFCA1F23B25A006B2DF2 /* audio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = audio.cpp; path = ../audio.cpp; sourceTree = ""; }; + 7539DFCB1F23B25A006B2DF2 /* cdrom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cdrom.cpp; path = ../cdrom.cpp; sourceTree = ""; }; + 7539DFCD1F23B25A006B2DF2 /* sigsegv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sigsegv.cpp; sourceTree = ""; }; + 7539DFCE1F23B25A006B2DF2 /* sigsegv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sigsegv.h; sourceTree = ""; }; + 7539DFCF1F23B25A006B2DF2 /* video_blit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = video_blit.cpp; sourceTree = ""; }; + 7539DFD01F23B25A006B2DF2 /* video_blit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = video_blit.h; sourceTree = ""; }; + 7539DFD11F23B25A006B2DF2 /* video_vosf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = video_vosf.h; sourceTree = ""; }; + 7539DFD21F23B25A006B2DF2 /* vm_alloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vm_alloc.cpp; sourceTree = ""; }; + 7539DFD31F23B25A006B2DF2 /* vm_alloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vm_alloc.h; sourceTree = ""; }; + 7539DFD41F23B25A006B2DF2 /* disk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = disk.cpp; path = ../disk.cpp; sourceTree = ""; }; + 7539DFD51F23B25A006B2DF2 /* emul_op.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = emul_op.cpp; path = ../emul_op.cpp; sourceTree = ""; }; + 7539DFD61F23B25A006B2DF2 /* ether.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ether.cpp; path = ../ether.cpp; sourceTree = ""; }; + 7539DFD71F23B25A006B2DF2 /* extfs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = extfs.cpp; path = ../extfs.cpp; sourceTree = ""; }; + 7539DFD91F23B25A006B2DF2 /* adb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = adb.h; sourceTree = ""; }; + 7539DFDA1F23B25A006B2DF2 /* audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audio.h; sourceTree = ""; }; + 7539DFDB1F23B25A006B2DF2 /* audio_defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audio_defs.h; sourceTree = ""; }; + 7539DFDC1F23B25A006B2DF2 /* cdrom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cdrom.h; sourceTree = ""; }; + 7539DFDD1F23B25A006B2DF2 /* clip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = clip.h; sourceTree = ""; }; + 7539DFDE1F23B25A006B2DF2 /* debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = debug.h; sourceTree = ""; }; + 7539DFDF1F23B25A006B2DF2 /* disk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = disk.h; sourceTree = ""; }; + 7539DFE01F23B25A006B2DF2 /* emul_op.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = emul_op.h; sourceTree = ""; }; + 7539DFE11F23B25A006B2DF2 /* ether.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ether.h; sourceTree = ""; }; + 7539DFE21F23B25A006B2DF2 /* ether_defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ether_defs.h; sourceTree = ""; }; + 7539DFE31F23B25A006B2DF2 /* extfs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = extfs.h; sourceTree = ""; }; + 7539DFE41F23B25A006B2DF2 /* extfs_defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = extfs_defs.h; sourceTree = ""; }; + 7539DFE51F23B25A006B2DF2 /* macos_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = macos_util.h; sourceTree = ""; }; + 7539DFE61F23B25A006B2DF2 /* main.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = main.h; sourceTree = ""; }; + 7539DFE71F23B25A006B2DF2 /* pict.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pict.h; sourceTree = ""; }; + 7539DFE81F23B25A006B2DF2 /* prefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prefs.h; sourceTree = ""; }; + 7539DFE91F23B25A006B2DF2 /* prefs_editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prefs_editor.h; sourceTree = ""; }; + 7539DFEA1F23B25A006B2DF2 /* rom_patches.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rom_patches.h; sourceTree = ""; }; + 7539DFEB1F23B25A006B2DF2 /* rsrc_patches.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rsrc_patches.h; sourceTree = ""; }; + 7539DFEC1F23B25A006B2DF2 /* scsi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scsi.h; sourceTree = ""; }; + 7539DFED1F23B25A006B2DF2 /* serial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = serial.h; sourceTree = ""; }; + 7539DFEE1F23B25A006B2DF2 /* serial_defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = serial_defs.h; sourceTree = ""; }; + 7539DFEF1F23B25A006B2DF2 /* slot_rom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = slot_rom.h; sourceTree = ""; }; + 7539DFF01F23B25A006B2DF2 /* sony.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sony.h; sourceTree = ""; }; + 7539DFF11F23B25A006B2DF2 /* sys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sys.h; sourceTree = ""; }; + 7539DFF21F23B25A006B2DF2 /* timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timer.h; sourceTree = ""; }; + 7539DFF31F23B25A006B2DF2 /* user_strings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = user_strings.h; sourceTree = ""; }; + 7539DFF41F23B25A006B2DF2 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = ""; }; + 7539DFF51F23B25A006B2DF2 /* video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = video.h; sourceTree = ""; }; + 7539DFF61F23B25A006B2DF2 /* video_defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = video_defs.h; sourceTree = ""; }; + 7539DFF71F23B25A006B2DF2 /* xpram.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xpram.h; sourceTree = ""; }; + 7539DFF81F23B25A006B2DF2 /* macos_util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = macos_util.cpp; path = ../macos_util.cpp; sourceTree = ""; }; + 7539DFFA1F23B25A006B2DF2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 7539DFFB1F23B25A006B2DF2 /* audio_defs_macosx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audio_defs_macosx.h; sourceTree = ""; }; + 7539E0021F23B25A006B2DF2 /* BasiliskII.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = BasiliskII.icns; sourceTree = ""; }; + 7539E0031F23B25A006B2DF2 /* BasiliskII.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = BasiliskII.xcodeproj; sourceTree = ""; }; + 7539E00A1F23B25A006B2DF2 /* Credits.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = Credits.html; sourceTree = ""; }; + 7539E0101F23B25A006B2DF2 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 7539E0141F23B25A006B2DF2 /* HowTo.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = HowTo.html; sourceTree = ""; }; + 7539E02B1F23B25A006B2DF2 /* ToDo.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = ToDo.html; sourceTree = ""; }; + 7539E02E1F23B25A006B2DF2 /* Versions.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = Versions.html; sourceTree = ""; }; + 7539E0651F23B25A006B2DF2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../main.cpp; sourceTree = ""; }; + 7539E0681F23B25A006B2DF2 /* pict.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pict.c; path = ../pict.c; sourceTree = ""; }; + 7539E06C1F23B25A006B2DF2 /* prefs_items.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = prefs_items.cpp; path = ../prefs_items.cpp; sourceTree = ""; }; + 7539E06D1F23B25A006B2DF2 /* prefs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = prefs.cpp; path = ../prefs.cpp; sourceTree = ""; }; + 7539E06E1F23B25A006B2DF2 /* rom_patches.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = rom_patches.cpp; path = ../rom_patches.cpp; sourceTree = ""; }; + 7539E06F1F23B25A006B2DF2 /* rsrc_patches.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = rsrc_patches.cpp; path = ../rsrc_patches.cpp; sourceTree = ""; }; + 7539E0701F23B25A006B2DF2 /* scsi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = scsi.cpp; path = ../scsi.cpp; sourceTree = ""; }; + 7539E0721F23B25A006B2DF2 /* audio_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audio_sdl.cpp; sourceTree = ""; }; + 7539E0731F23B25A006B2DF2 /* keycodes */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = keycodes; sourceTree = ""; }; + 7539E0741F23B25A006B2DF2 /* SDLMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLMain.h; sourceTree = ""; }; + 7539E0751F23B25A006B2DF2 /* SDLMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLMain.m; sourceTree = ""; }; + 7539E0761F23B25A006B2DF2 /* video_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = video_sdl.cpp; sourceTree = ""; }; + 7539E0771F23B25A006B2DF2 /* serial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = serial.cpp; path = ../serial.cpp; sourceTree = ""; }; + 7539E0A21F23B25A006B2DF2 /* slot_rom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = slot_rom.cpp; path = ../slot_rom.cpp; sourceTree = ""; }; + 7539E0A31F23B25A006B2DF2 /* sony.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sony.cpp; path = ../sony.cpp; sourceTree = ""; }; + 7539E0A41F23B25A006B2DF2 /* timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = timer.cpp; path = ../timer.cpp; sourceTree = ""; }; + 7539E0A61F23B25A006B2DF2 /* basilisk_glue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = basilisk_glue.cpp; sourceTree = ""; }; + 7539E0AB1F23B25A006B2DF2 /* compemu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = compemu.h; sourceTree = ""; }; + 7539E0AE1F23B25A006B2DF2 /* flags_x86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = flags_x86.h; sourceTree = ""; }; + 7539E0B11F23B25A006B2DF2 /* cpu_emulation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpu_emulation.h; sourceTree = ""; }; + 7539E0B41F23B25A006B2DF2 /* core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = core.h; sourceTree = ""; }; + 7539E0B51F23B25A006B2DF2 /* exceptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = exceptions.cpp; sourceTree = ""; }; + 7539E0B61F23B25A006B2DF2 /* exceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = exceptions.h; sourceTree = ""; }; + 7539E0B71F23B25A006B2DF2 /* flags.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = flags.cpp; sourceTree = ""; }; + 7539E0B81F23B25A006B2DF2 /* flags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = flags.h; sourceTree = ""; }; + 7539E0B91F23B25A006B2DF2 /* fpu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fpu.h; sourceTree = ""; }; + 7539E0BB1F23B25A006B2DF2 /* fpu_ieee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fpu_ieee.h; sourceTree = ""; }; + 7539E0BD1F23B25A006B2DF2 /* fpu_uae.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fpu_uae.h; sourceTree = ""; }; + 7539E0BF1F23B25A006B2DF2 /* fpu_x86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fpu_x86.h; sourceTree = ""; }; + 7539E0C01F23B25A006B2DF2 /* fpu_x86_asm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fpu_x86_asm.h; sourceTree = ""; }; + 7539E0C11F23B25A006B2DF2 /* impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = impl.h; sourceTree = ""; }; + 7539E0C21F23B25A006B2DF2 /* mathlib.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mathlib.cpp; sourceTree = ""; }; + 7539E0C31F23B25A006B2DF2 /* mathlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mathlib.h; sourceTree = ""; }; + 7539E0C41F23B25A006B2DF2 /* rounding.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rounding.cpp; sourceTree = ""; }; + 7539E0C51F23B25A006B2DF2 /* rounding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rounding.h; sourceTree = ""; }; + 7539E0C61F23B25A006B2DF2 /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = ""; }; + 7539E0C81F23B25A006B2DF2 /* m68k.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = m68k.h; sourceTree = ""; }; + 7539E0C91F23B25A006B2DF2 /* memory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = memory.cpp; sourceTree = ""; }; + 7539E0CA1F23B25A006B2DF2 /* memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memory.h; sourceTree = ""; }; + 7539E0CC1F23B25A006B2DF2 /* newcpu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = newcpu.h; sourceTree = ""; }; + 7539E0CD1F23B25A006B2DF2 /* noflags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = noflags.h; sourceTree = ""; }; + 7539E0CE1F23B25A006B2DF2 /* readcpu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = readcpu.cpp; sourceTree = ""; }; + 7539E0CF1F23B25A006B2DF2 /* readcpu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = readcpu.h; sourceTree = ""; }; + 7539E0D01F23B25A006B2DF2 /* spcflags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spcflags.h; sourceTree = ""; }; + 7539E0D11F23B25A006B2DF2 /* table68k */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = table68k; sourceTree = ""; }; + 7539E1221F23B25A006B2DF2 /* user_strings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = user_strings.cpp; path = ../user_strings.cpp; sourceTree = ""; }; + 7539E1231F23B25A006B2DF2 /* video.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = video.cpp; path = ../video.cpp; sourceTree = ""; }; + 7539E1241F23B25A006B2DF2 /* xpram.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = xpram.cpp; path = ../xpram.cpp; sourceTree = ""; }; + 7539E1E51F23B288006B2DF2 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = /Library/Frameworks/SDL2.framework; sourceTree = ""; }; + 7539E1F01F23B329006B2DF2 /* bincue_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bincue_unix.cpp; sourceTree = ""; }; + 7539E1F11F23B329006B2DF2 /* bincue_unix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bincue_unix.h; sourceTree = ""; }; + 7539E1F81F23B329006B2DF2 /* gtk-osx.patch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "gtk-osx.patch"; sourceTree = ""; }; + 7539E1FA1F23B32A006B2DF2 /* mkstandalone */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = mkstandalone; sourceTree = ""; }; + 7539E1FC1F23B32A006B2DF2 /* testlmem.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = testlmem.sh; sourceTree = ""; }; + 7539E1FD1F23B32A006B2DF2 /* disk_sparsebundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = disk_sparsebundle.cpp; sourceTree = ""; }; + 7539E1FE1F23B32A006B2DF2 /* disk_unix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = disk_unix.h; sourceTree = ""; }; + 7539E2001F23B32A006B2DF2 /* extfs_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = extfs_unix.cpp; sourceTree = ""; }; + 7539E2011F23B32A006B2DF2 /* fbdevices */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = fbdevices; sourceTree = ""; }; + 7539E2051F23B32A006B2DF2 /* install-sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "install-sh"; sourceTree = ""; }; + 7539E20A1F23B32A006B2DF2 /* keycodes */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = keycodes; sourceTree = ""; }; + 7539E20C1F23B32A006B2DF2 /* freebsd-i386.ld */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "freebsd-i386.ld"; sourceTree = ""; }; + 7539E20D1F23B32A006B2DF2 /* linux-i386.ld */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "linux-i386.ld"; sourceTree = ""; }; + 7539E20E1F23B32A006B2DF2 /* linux-ppc.ld */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "linux-ppc.ld"; sourceTree = ""; }; + 7539E20F1F23B32A006B2DF2 /* linux-x86_64.ld */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "linux-x86_64.ld"; sourceTree = ""; }; + 7539E2181F23B32A006B2DF2 /* egrep.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = egrep.m4; sourceTree = ""; }; + 7539E2191F23B32A006B2DF2 /* esd.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = esd.m4; sourceTree = ""; }; + 7539E21A1F23B32A006B2DF2 /* gettext.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gettext.m4; sourceTree = ""; }; + 7539E21B1F23B32A006B2DF2 /* gtk-2.0.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "gtk-2.0.m4"; sourceTree = ""; }; + 7539E21C1F23B32A006B2DF2 /* gtk.m4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = gtk.m4; sourceTree = ""; }; + 7539E21E1F23B32A006B2DF2 /* Makefile.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Makefile.in; sourceTree = ""; }; + 7539E21F1F23B32A006B2DF2 /* mkinstalldirs */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = mkinstalldirs; sourceTree = ""; }; + 7539E2231F23B32A006B2DF2 /* rpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rpc.h; sourceTree = ""; }; + 7539E2241F23B32A006B2DF2 /* rpc_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rpc_unix.cpp; sourceTree = ""; }; + 7539E2251F23B32A006B2DF2 /* semaphore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = semaphore.h; sourceTree = ""; }; + 7539E22A1F23B32A006B2DF2 /* sshpty.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sshpty.c; sourceTree = ""; }; + 7539E22B1F23B32A006B2DF2 /* sshpty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sshpty.h; sourceTree = ""; }; + 7539E22C1F23B32A006B2DF2 /* strlcpy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = strlcpy.c; sourceTree = ""; }; + 7539E22D1F23B32A006B2DF2 /* strlcpy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strlcpy.h; sourceTree = ""; }; + 7539E22E1F23B32A006B2DF2 /* sys_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sys_unix.cpp; sourceTree = ""; }; + 7539E22F1F23B32A006B2DF2 /* sysdeps.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sysdeps.h; sourceTree = ""; }; + 7539E2301F23B32A006B2DF2 /* timer_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = timer_unix.cpp; sourceTree = ""; }; + 7539E2311F23B32A006B2DF2 /* tinyxml2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tinyxml2.cpp; sourceTree = ""; }; + 7539E2321F23B32A006B2DF2 /* tinyxml2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tinyxml2.h; sourceTree = ""; }; + 7539E2331F23B32A006B2DF2 /* tunconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = tunconfig; sourceTree = ""; }; + 7539E2351F23B32A006B2DF2 /* user_strings_unix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = user_strings_unix.h; sourceTree = ""; }; + 7539E2771F23B469006B2DF2 /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = /Library/Frameworks/SDL.framework; sourceTree = ""; }; + 7539E27E1F23BEB4006B2DF2 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; }; + 7539E27F1F23C4CA006B2DF2 /* main_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main_unix.cpp; sourceTree = ""; }; + 7539E2851F23C56F006B2DF2 /* clip_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = clip_dummy.cpp; sourceTree = ""; }; + 7539E2861F23C56F006B2DF2 /* ether_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ether_dummy.cpp; sourceTree = ""; }; + 7539E2871F23C56F006B2DF2 /* prefs_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = prefs_dummy.cpp; sourceTree = ""; }; + 7539E2881F23C56F006B2DF2 /* prefs_editor_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = prefs_editor_dummy.cpp; sourceTree = ""; }; + 7539E2891F23C56F006B2DF2 /* scsi_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = scsi_dummy.cpp; sourceTree = ""; }; + 7539E28A1F23C56F006B2DF2 /* serial_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = serial_dummy.cpp; sourceTree = ""; }; + 7539E28B1F23C56F006B2DF2 /* user_strings_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = user_strings_dummy.cpp; sourceTree = ""; }; + 7539E28C1F23C56F006B2DF2 /* xpram_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xpram_dummy.cpp; sourceTree = ""; }; + 7539E2961F23C5FD006B2DF2 /* newcpu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = newcpu.cpp; sourceTree = ""; }; + 7539E29C1F23C83F006B2DF2 /* sys_darwin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sys_darwin.cpp; sourceTree = ""; }; + 7539E29E1F23C939006B2DF2 /* fpu_uae.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fpu_uae.cpp; sourceTree = ""; }; + 7539E2A01F23CB9B006B2DF2 /* cpuemu_nf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cpuemu_nf.cpp; sourceTree = ""; }; + 7539E2A11F23CB9B006B2DF2 /* cpuemu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cpuemu.cpp; sourceTree = ""; }; + 7539E2A21F23CB9B006B2DF2 /* cpustbl_nf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cpustbl_nf.cpp; sourceTree = ""; }; + 7539E2A31F23CB9B006B2DF2 /* cpustbl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cpustbl.cpp; sourceTree = ""; }; + 7539E2A41F23CB9B006B2DF2 /* defs68k.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = defs68k.c; sourceTree = ""; }; + 7539E2AA1F23CDB7006B2DF2 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7539DFAF1F23B17E006B2DF2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7539E27B1F23B488006B2DF2 /* SDL.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7539DFA91F23B17E006B2DF2 = { + isa = PBXGroup; + children = ( + 7539E1E41F23B25E006B2DF2 /* src */, + 7539DFB41F23B17E006B2DF2 /* Assets */, + 7539DFB31F23B17E006B2DF2 /* Products */, + 7539E2771F23B469006B2DF2 /* SDL.framework */, + 7539E1E51F23B288006B2DF2 /* SDL2.framework */, + ); + sourceTree = ""; + }; + 7539DFB31F23B17E006B2DF2 /* Products */ = { + isa = PBXGroup; + children = ( + 7539DFB21F23B17E006B2DF2 /* BasiliskII.app */, + ); + name = Products; + sourceTree = ""; + }; + 7539DFB41F23B17E006B2DF2 /* Assets */ = { + isa = PBXGroup; + children = ( + 7539DFBE1F23B17E006B2DF2 /* Assets.xcassets */, + ); + name = Assets; + path = BasiliskII; + sourceTree = ""; + }; + 7539DFCC1F23B25A006B2DF2 /* CrossPlatform */ = { + isa = PBXGroup; + children = ( + 7539DFCD1F23B25A006B2DF2 /* sigsegv.cpp */, + 7539DFCE1F23B25A006B2DF2 /* sigsegv.h */, + 7539DFCF1F23B25A006B2DF2 /* video_blit.cpp */, + 7539DFD01F23B25A006B2DF2 /* video_blit.h */, + 7539DFD11F23B25A006B2DF2 /* video_vosf.h */, + 7539DFD21F23B25A006B2DF2 /* vm_alloc.cpp */, + 7539DFD31F23B25A006B2DF2 /* vm_alloc.h */, + ); + name = CrossPlatform; + path = ../CrossPlatform; + sourceTree = ""; + }; + 7539DFD81F23B25A006B2DF2 /* include */ = { + isa = PBXGroup; + children = ( + 7539DFD91F23B25A006B2DF2 /* adb.h */, + 7539DFDA1F23B25A006B2DF2 /* audio.h */, + 7539DFDB1F23B25A006B2DF2 /* audio_defs.h */, + 7539DFDC1F23B25A006B2DF2 /* cdrom.h */, + 7539DFDD1F23B25A006B2DF2 /* clip.h */, + 7539DFDE1F23B25A006B2DF2 /* debug.h */, + 7539DFDF1F23B25A006B2DF2 /* disk.h */, + 7539DFE01F23B25A006B2DF2 /* emul_op.h */, + 7539DFE11F23B25A006B2DF2 /* ether.h */, + 7539DFE21F23B25A006B2DF2 /* ether_defs.h */, + 7539DFE31F23B25A006B2DF2 /* extfs.h */, + 7539DFE41F23B25A006B2DF2 /* extfs_defs.h */, + 7539DFE51F23B25A006B2DF2 /* macos_util.h */, + 7539DFE61F23B25A006B2DF2 /* main.h */, + 7539DFE71F23B25A006B2DF2 /* pict.h */, + 7539DFE81F23B25A006B2DF2 /* prefs.h */, + 7539DFE91F23B25A006B2DF2 /* prefs_editor.h */, + 7539DFEA1F23B25A006B2DF2 /* rom_patches.h */, + 7539DFEB1F23B25A006B2DF2 /* rsrc_patches.h */, + 7539DFEC1F23B25A006B2DF2 /* scsi.h */, + 7539DFED1F23B25A006B2DF2 /* serial.h */, + 7539DFEE1F23B25A006B2DF2 /* serial_defs.h */, + 7539DFEF1F23B25A006B2DF2 /* slot_rom.h */, + 7539DFF01F23B25A006B2DF2 /* sony.h */, + 7539DFF11F23B25A006B2DF2 /* sys.h */, + 7539DFF21F23B25A006B2DF2 /* timer.h */, + 7539DFF31F23B25A006B2DF2 /* user_strings.h */, + 7539DFF41F23B25A006B2DF2 /* version.h */, + 7539DFF51F23B25A006B2DF2 /* video.h */, + 7539DFF61F23B25A006B2DF2 /* video_defs.h */, + 7539DFF71F23B25A006B2DF2 /* xpram.h */, + ); + name = include; + path = ../include; + sourceTree = ""; + }; + 7539DFF91F23B25A006B2DF2 /* MacOSX */ = { + isa = PBXGroup; + children = ( + 7539E2AA1F23CDB7006B2DF2 /* Info.plist */, + 7539E27E1F23BEB4006B2DF2 /* config.h */, + 7539DFFA1F23B25A006B2DF2 /* Assets.xcassets */, + 7539DFFB1F23B25A006B2DF2 /* audio_defs_macosx.h */, + 7539E0021F23B25A006B2DF2 /* BasiliskII.icns */, + 7539E0031F23B25A006B2DF2 /* BasiliskII.xcodeproj */, + 7539E00A1F23B25A006B2DF2 /* Credits.html */, + 7539E00F1F23B25A006B2DF2 /* InfoPlist.strings */, + 7539E0141F23B25A006B2DF2 /* HowTo.html */, + 7539E29C1F23C83F006B2DF2 /* sys_darwin.cpp */, + 7539E02B1F23B25A006B2DF2 /* ToDo.html */, + 7539E02E1F23B25A006B2DF2 /* Versions.html */, + ); + name = MacOSX; + sourceTree = ""; + }; + 7539E0041F23B25A006B2DF2 /* Products */ = { + isa = PBXGroup; + name = Products; + sourceTree = ""; + }; + 7539E0711F23B25A006B2DF2 /* SDL */ = { + isa = PBXGroup; + children = ( + 7539E0721F23B25A006B2DF2 /* audio_sdl.cpp */, + 7539E0731F23B25A006B2DF2 /* keycodes */, + 7539E0741F23B25A006B2DF2 /* SDLMain.h */, + 7539E0751F23B25A006B2DF2 /* SDLMain.m */, + 7539E0761F23B25A006B2DF2 /* video_sdl.cpp */, + ); + name = SDL; + path = ../SDL; + sourceTree = ""; + }; + 7539E0A51F23B25A006B2DF2 /* uae_cpu */ = { + isa = PBXGroup; + children = ( + 7539E0A61F23B25A006B2DF2 /* basilisk_glue.cpp */, + 7539E0A81F23B25A006B2DF2 /* compiler */, + 7539E0B11F23B25A006B2DF2 /* cpu_emulation.h */, + 7539E2A01F23CB9B006B2DF2 /* cpuemu_nf.cpp */, + 7539E2A11F23CB9B006B2DF2 /* cpuemu.cpp */, + 7539E2A21F23CB9B006B2DF2 /* cpustbl_nf.cpp */, + 7539E2A31F23CB9B006B2DF2 /* cpustbl.cpp */, + 7539E2A41F23CB9B006B2DF2 /* defs68k.c */, + 7539E0B31F23B25A006B2DF2 /* fpu */, + 7539E0C81F23B25A006B2DF2 /* m68k.h */, + 7539E0C91F23B25A006B2DF2 /* memory.cpp */, + 7539E0CA1F23B25A006B2DF2 /* memory.h */, + 7539E2961F23C5FD006B2DF2 /* newcpu.cpp */, + 7539E0CC1F23B25A006B2DF2 /* newcpu.h */, + 7539E0CD1F23B25A006B2DF2 /* noflags.h */, + 7539E0CE1F23B25A006B2DF2 /* readcpu.cpp */, + 7539E0CF1F23B25A006B2DF2 /* readcpu.h */, + 7539E0D01F23B25A006B2DF2 /* spcflags.h */, + 7539E0D11F23B25A006B2DF2 /* table68k */, + ); + name = uae_cpu; + path = ../uae_cpu; + sourceTree = ""; + }; + 7539E0A81F23B25A006B2DF2 /* compiler */ = { + isa = PBXGroup; + children = ( + 7539E0AB1F23B25A006B2DF2 /* compemu.h */, + 7539E0AE1F23B25A006B2DF2 /* flags_x86.h */, + ); + path = compiler; + sourceTree = ""; + }; + 7539E0B31F23B25A006B2DF2 /* fpu */ = { + isa = PBXGroup; + children = ( + 7539E29E1F23C939006B2DF2 /* fpu_uae.cpp */, + 7539E0B41F23B25A006B2DF2 /* core.h */, + 7539E0B51F23B25A006B2DF2 /* exceptions.cpp */, + 7539E0B61F23B25A006B2DF2 /* exceptions.h */, + 7539E0B71F23B25A006B2DF2 /* flags.cpp */, + 7539E0B81F23B25A006B2DF2 /* flags.h */, + 7539E0B91F23B25A006B2DF2 /* fpu.h */, + 7539E0BB1F23B25A006B2DF2 /* fpu_ieee.h */, + 7539E0BD1F23B25A006B2DF2 /* fpu_uae.h */, + 7539E0BF1F23B25A006B2DF2 /* fpu_x86.h */, + 7539E0C01F23B25A006B2DF2 /* fpu_x86_asm.h */, + 7539E0C11F23B25A006B2DF2 /* impl.h */, + 7539E0C21F23B25A006B2DF2 /* mathlib.cpp */, + 7539E0C31F23B25A006B2DF2 /* mathlib.h */, + 7539E0C41F23B25A006B2DF2 /* rounding.cpp */, + 7539E0C51F23B25A006B2DF2 /* rounding.h */, + 7539E0C61F23B25A006B2DF2 /* types.h */, + ); + path = fpu; + sourceTree = ""; + }; + 7539E1E41F23B25E006B2DF2 /* src */ = { + isa = PBXGroup; + children = ( + 7539DFC91F23B25A006B2DF2 /* adb.cpp */, + 7539DFCA1F23B25A006B2DF2 /* audio.cpp */, + 7539DFCB1F23B25A006B2DF2 /* cdrom.cpp */, + 7539DFCC1F23B25A006B2DF2 /* CrossPlatform */, + 7539DFD41F23B25A006B2DF2 /* disk.cpp */, + 7539E2811F23C52C006B2DF2 /* dummy */, + 7539DFD51F23B25A006B2DF2 /* emul_op.cpp */, + 7539DFD61F23B25A006B2DF2 /* ether.cpp */, + 7539DFD71F23B25A006B2DF2 /* extfs.cpp */, + 7539DFD81F23B25A006B2DF2 /* include */, + 7539DFF81F23B25A006B2DF2 /* macos_util.cpp */, + 7539DFF91F23B25A006B2DF2 /* MacOSX */, + 7539E0651F23B25A006B2DF2 /* main.cpp */, + 7539E0681F23B25A006B2DF2 /* pict.c */, + 7539E06C1F23B25A006B2DF2 /* prefs_items.cpp */, + 7539E06D1F23B25A006B2DF2 /* prefs.cpp */, + 7539E06E1F23B25A006B2DF2 /* rom_patches.cpp */, + 7539E06F1F23B25A006B2DF2 /* rsrc_patches.cpp */, + 7539E0701F23B25A006B2DF2 /* scsi.cpp */, + 7539E0711F23B25A006B2DF2 /* SDL */, + 7539E0771F23B25A006B2DF2 /* serial.cpp */, + 7539E0A21F23B25A006B2DF2 /* slot_rom.cpp */, + 7539E0A31F23B25A006B2DF2 /* sony.cpp */, + 7539E0A41F23B25A006B2DF2 /* timer.cpp */, + 7539E0A51F23B25A006B2DF2 /* uae_cpu */, + 7539E1E91F23B329006B2DF2 /* Unix */, + 7539E1221F23B25A006B2DF2 /* user_strings.cpp */, + 7539E1231F23B25A006B2DF2 /* video.cpp */, + 7539E1241F23B25A006B2DF2 /* xpram.cpp */, + ); + name = src; + sourceTree = ""; + }; + 7539E1E91F23B329006B2DF2 /* Unix */ = { + isa = PBXGroup; + children = ( + 7539E1F01F23B329006B2DF2 /* bincue_unix.cpp */, + 7539E1F11F23B329006B2DF2 /* bincue_unix.h */, + 7539E1F71F23B329006B2DF2 /* Darwin */, + 7539E1FD1F23B32A006B2DF2 /* disk_sparsebundle.cpp */, + 7539E1FE1F23B32A006B2DF2 /* disk_unix.h */, + 7539E2001F23B32A006B2DF2 /* extfs_unix.cpp */, + 7539E2011F23B32A006B2DF2 /* fbdevices */, + 7539E2051F23B32A006B2DF2 /* install-sh */, + 7539E20A1F23B32A006B2DF2 /* keycodes */, + 7539E20B1F23B32A006B2DF2 /* ldscripts */, + 7539E2171F23B32A006B2DF2 /* m4 */, + 7539E27F1F23C4CA006B2DF2 /* main_unix.cpp */, + 7539E21E1F23B32A006B2DF2 /* Makefile.in */, + 7539E21F1F23B32A006B2DF2 /* mkinstalldirs */, + 7539E2231F23B32A006B2DF2 /* rpc.h */, + 7539E2241F23B32A006B2DF2 /* rpc_unix.cpp */, + 7539E2251F23B32A006B2DF2 /* semaphore.h */, + 7539E22A1F23B32A006B2DF2 /* sshpty.c */, + 7539E22B1F23B32A006B2DF2 /* sshpty.h */, + 7539E22C1F23B32A006B2DF2 /* strlcpy.c */, + 7539E22D1F23B32A006B2DF2 /* strlcpy.h */, + 7539E22E1F23B32A006B2DF2 /* sys_unix.cpp */, + 7539E22F1F23B32A006B2DF2 /* sysdeps.h */, + 7539E2301F23B32A006B2DF2 /* timer_unix.cpp */, + 7539E2311F23B32A006B2DF2 /* tinyxml2.cpp */, + 7539E2321F23B32A006B2DF2 /* tinyxml2.h */, + 7539E2331F23B32A006B2DF2 /* tunconfig */, + 7539E2351F23B32A006B2DF2 /* user_strings_unix.h */, + ); + name = Unix; + path = ../Unix; + sourceTree = ""; + }; + 7539E1F71F23B329006B2DF2 /* Darwin */ = { + isa = PBXGroup; + children = ( + 7539E1F81F23B329006B2DF2 /* gtk-osx.patch */, + 7539E1FA1F23B32A006B2DF2 /* mkstandalone */, + 7539E1FC1F23B32A006B2DF2 /* testlmem.sh */, + ); + path = Darwin; + sourceTree = ""; + }; + 7539E20B1F23B32A006B2DF2 /* ldscripts */ = { + isa = PBXGroup; + children = ( + 7539E20C1F23B32A006B2DF2 /* freebsd-i386.ld */, + 7539E20D1F23B32A006B2DF2 /* linux-i386.ld */, + 7539E20E1F23B32A006B2DF2 /* linux-ppc.ld */, + 7539E20F1F23B32A006B2DF2 /* linux-x86_64.ld */, + ); + path = ldscripts; + sourceTree = ""; + }; + 7539E2171F23B32A006B2DF2 /* m4 */ = { + isa = PBXGroup; + children = ( + 7539E2181F23B32A006B2DF2 /* egrep.m4 */, + 7539E2191F23B32A006B2DF2 /* esd.m4 */, + 7539E21A1F23B32A006B2DF2 /* gettext.m4 */, + 7539E21B1F23B32A006B2DF2 /* gtk-2.0.m4 */, + 7539E21C1F23B32A006B2DF2 /* gtk.m4 */, + ); + path = m4; + sourceTree = ""; + }; + 7539E2811F23C52C006B2DF2 /* dummy */ = { + isa = PBXGroup; + children = ( + 7539E2851F23C56F006B2DF2 /* clip_dummy.cpp */, + 7539E2861F23C56F006B2DF2 /* ether_dummy.cpp */, + 7539E2871F23C56F006B2DF2 /* prefs_dummy.cpp */, + 7539E2881F23C56F006B2DF2 /* prefs_editor_dummy.cpp */, + 7539E2891F23C56F006B2DF2 /* scsi_dummy.cpp */, + 7539E28A1F23C56F006B2DF2 /* serial_dummy.cpp */, + 7539E28B1F23C56F006B2DF2 /* user_strings_dummy.cpp */, + 7539E28C1F23C56F006B2DF2 /* xpram_dummy.cpp */, + ); + name = dummy; + path = ../dummy; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 7539DFB11F23B17E006B2DF2 /* BasiliskII */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7539DFC61F23B17E006B2DF2 /* Build configuration list for PBXNativeTarget "BasiliskII" */; + buildPhases = ( + 7539DFAE1F23B17E006B2DF2 /* Sources */, + 7539DFAF1F23B17E006B2DF2 /* Frameworks */, + 7539DFB01F23B17E006B2DF2 /* Resources */, + 7539E27D1F23B489006B2DF2 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = BasiliskII; + productName = BasiliskII; + productReference = 7539DFB21F23B17E006B2DF2 /* BasiliskII.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7539DFAA1F23B17E006B2DF2 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0830; + TargetAttributes = { + 7539DFB11F23B17E006B2DF2 = { + CreatedOnToolsVersion = 8.3.3; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 7539DFAD1F23B17E006B2DF2 /* Build configuration list for PBXProject "BasiliskII" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + English, + ); + mainGroup = 7539DFA91F23B17E006B2DF2; + productRefGroup = 7539DFB31F23B17E006B2DF2 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 7539E0041F23B25A006B2DF2 /* Products */; + ProjectRef = 7539E0031F23B25A006B2DF2 /* BasiliskII.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 7539DFB11F23B17E006B2DF2 /* BasiliskII */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 7539DFB01F23B17E006B2DF2 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7539E25D1F23B32A006B2DF2 /* egrep.m4 in Resources */, + 7539E1A31F23B25A006B2DF2 /* table68k in Resources */, + 7539E1341F23B25A006B2DF2 /* BasiliskII.icns in Resources */, + 7539E2601F23B32A006B2DF2 /* gtk-2.0.m4 in Resources */, + 7539E2541F23B32A006B2DF2 /* keycodes in Resources */, + 7539E1381F23B25A006B2DF2 /* Credits.html in Resources */, + 7539E25E1F23B32A006B2DF2 /* esd.m4 in Resources */, + 7539E2631F23B32A006B2DF2 /* Makefile.in in Resources */, + 7539E2571F23B32A006B2DF2 /* linux-ppc.ld in Resources */, + 7539E24D1F23B32A006B2DF2 /* fbdevices in Resources */, + 7539E2501F23B32A006B2DF2 /* install-sh in Resources */, + 7539E1301F23B25A006B2DF2 /* Assets.xcassets in Resources */, + 7539E2641F23B32A006B2DF2 /* mkinstalldirs in Resources */, + 7539DFBF1F23B17E006B2DF2 /* Assets.xcassets in Resources */, + 7539E2581F23B32A006B2DF2 /* linux-x86_64.ld in Resources */, + 7539E2451F23B32A006B2DF2 /* gtk-osx.patch in Resources */, + 7539E2AB1F23CDB7006B2DF2 /* Info.plist in Resources */, + 7539E2471F23B32A006B2DF2 /* mkstandalone in Resources */, + 7539E14B1F23B25A006B2DF2 /* ToDo.html in Resources */, + 7539E13E1F23B25A006B2DF2 /* HowTo.html in Resources */, + 7539E1751F23B25A006B2DF2 /* keycodes in Resources */, + 7539E14D1F23B25A006B2DF2 /* Versions.html in Resources */, + 7539E2711F23B32A006B2DF2 /* tunconfig in Resources */, + 7539E2561F23B32A006B2DF2 /* linux-i386.ld in Resources */, + 7539E2551F23B32A006B2DF2 /* freebsd-i386.ld in Resources */, + 7539E13B1F23B25A006B2DF2 /* InfoPlist.strings in Resources */, + 7539E25F1F23B32A006B2DF2 /* gettext.m4 in Resources */, + 7539E2491F23B32A006B2DF2 /* testlmem.sh in Resources */, + 7539E2611F23B32A006B2DF2 /* gtk.m4 in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7539DFAE1F23B17E006B2DF2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7539E19E1F23B25A006B2DF2 /* rounding.cpp in Sources */, + 7539E29D1F23C83F006B2DF2 /* sys_darwin.cpp in Sources */, + 7539E1291F23B25A006B2DF2 /* video_blit.cpp in Sources */, + 7539E28E1F23C56F006B2DF2 /* clip_dummy.cpp in Sources */, + 7539E1A01F23B25A006B2DF2 /* memory.cpp in Sources */, + 7539E1741F23B25A006B2DF2 /* audio_sdl.cpp in Sources */, + 7539E1771F23B25A006B2DF2 /* video_sdl.cpp in Sources */, + 7539E29F1F23C939006B2DF2 /* fpu_uae.cpp in Sources */, + 7539E2A81F23CB9B006B2DF2 /* cpustbl.cpp in Sources */, + 7539E1E21F23B25A006B2DF2 /* video.cpp in Sources */, + 7539E18F1F23B25A006B2DF2 /* timer.cpp in Sources */, + 7539E2A71F23CB9B006B2DF2 /* cpustbl_nf.cpp in Sources */, + 7539E1711F23B25A006B2DF2 /* rom_patches.cpp in Sources */, + 7539E1281F23B25A006B2DF2 /* sigsegv.cpp in Sources */, + 7539E1761F23B25A006B2DF2 /* SDLMain.m in Sources */, + 7539E1A21F23B25A006B2DF2 /* readcpu.cpp in Sources */, + 7539E2701F23B32A006B2DF2 /* tinyxml2.cpp in Sources */, + 7539E28F1F23C56F006B2DF2 /* ether_dummy.cpp in Sources */, + 7539E1721F23B25A006B2DF2 /* rsrc_patches.cpp in Sources */, + 7539E2931F23C56F006B2DF2 /* serial_dummy.cpp in Sources */, + 7539E1981F23B25A006B2DF2 /* exceptions.cpp in Sources */, + 7539E1901F23B25A006B2DF2 /* basilisk_glue.cpp in Sources */, + 7539E2801F23C4CA006B2DF2 /* main_unix.cpp in Sources */, + 7539E2A61F23CB9B006B2DF2 /* cpuemu.cpp in Sources */, + 7539E1E11F23B25A006B2DF2 /* user_strings.cpp in Sources */, + 7539E2A51F23CB9B006B2DF2 /* cpuemu_nf.cpp in Sources */, + 7539E2971F23C5FD006B2DF2 /* newcpu.cpp in Sources */, + 7539E12A1F23B25A006B2DF2 /* vm_alloc.cpp in Sources */, + 7539E16C1F23B25A006B2DF2 /* main.cpp in Sources */, + 7539E2901F23C56F006B2DF2 /* prefs_dummy.cpp in Sources */, + 7539E26D1F23B32A006B2DF2 /* strlcpy.c in Sources */, + 7539E26E1F23B32A006B2DF2 /* sys_unix.cpp in Sources */, + 7539E1271F23B25A006B2DF2 /* cdrom.cpp in Sources */, + 7539E1261F23B25A006B2DF2 /* audio.cpp in Sources */, + 7539E1701F23B25A006B2DF2 /* prefs.cpp in Sources */, + 7539E12D1F23B25A006B2DF2 /* ether.cpp in Sources */, + 7539E26C1F23B32A006B2DF2 /* sshpty.c in Sources */, + 7539E1781F23B25A006B2DF2 /* serial.cpp in Sources */, + 7539E1991F23B25A006B2DF2 /* flags.cpp in Sources */, + 7539E2921F23C56F006B2DF2 /* scsi_dummy.cpp in Sources */, + 7539E16F1F23B25A006B2DF2 /* prefs_items.cpp in Sources */, + 7539E18E1F23B25A006B2DF2 /* sony.cpp in Sources */, + 7539E2951F23C56F006B2DF2 /* xpram_dummy.cpp in Sources */, + 7539E2941F23C56F006B2DF2 /* user_strings_dummy.cpp in Sources */, + 7539E26F1F23B32A006B2DF2 /* timer_unix.cpp in Sources */, + 7539E2A91F23CB9B006B2DF2 /* defs68k.c in Sources */, + 7539E12E1F23B25A006B2DF2 /* extfs.cpp in Sources */, + 7539E23F1F23B32A006B2DF2 /* bincue_unix.cpp in Sources */, + 7539E12C1F23B25A006B2DF2 /* emul_op.cpp in Sources */, + 7539E19D1F23B25A006B2DF2 /* mathlib.cpp in Sources */, + 7539E16D1F23B25A006B2DF2 /* pict.c in Sources */, + 7539E1251F23B25A006B2DF2 /* adb.cpp in Sources */, + 7539E12F1F23B25A006B2DF2 /* macos_util.cpp in Sources */, + 7539E24A1F23B32A006B2DF2 /* disk_sparsebundle.cpp in Sources */, + 7539E18D1F23B25A006B2DF2 /* slot_rom.cpp in Sources */, + 7539E1731F23B25A006B2DF2 /* scsi.cpp in Sources */, + 7539E12B1F23B25A006B2DF2 /* disk.cpp in Sources */, + 7539E1E31F23B25A006B2DF2 /* xpram.cpp in Sources */, + 7539E24C1F23B32A006B2DF2 /* extfs_unix.cpp in Sources */, + 7539E2681F23B32A006B2DF2 /* rpc_unix.cpp in Sources */, + 7539E2911F23C56F006B2DF2 /* prefs_editor_dummy.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 7539E00F1F23B25A006B2DF2 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 7539E0101F23B25A006B2DF2 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 7539DFC41F23B17E006B2DF2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + /Library/Frameworks/SDL.framework/Headers, + ../UNIX, + ../include, + ., + ../uae_cpu, + ); + MACOSX_DEPLOYMENT_TARGET = 10.12; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 7539DFC51F23B17E006B2DF2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + /Library/Frameworks/SDL.framework/Headers, + ../UNIX, + ../include, + ., + ../uae_cpu, + ); + MACOSX_DEPLOYMENT_TARGET = 10.12; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + }; + name = Release; + }; + 7539DFC71F23B17E006B2DF2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(LOCAL_LIBRARY_DIR)/Frameworks", + ); + INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.basiliskii.BasiliskII; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 7539DFC81F23B17E006B2DF2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(LOCAL_LIBRARY_DIR)/Frameworks", + ); + INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.basiliskii.BasiliskII; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7539DFAD1F23B17E006B2DF2 /* Build configuration list for PBXProject "BasiliskII" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7539DFC41F23B17E006B2DF2 /* Debug */, + 7539DFC51F23B17E006B2DF2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7539DFC61F23B17E006B2DF2 /* Build configuration list for PBXNativeTarget "BasiliskII" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7539DFC71F23B17E006B2DF2 /* Debug */, + 7539DFC81F23B17E006B2DF2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7539DFAA1F23B17E006B2DF2 /* Project object */; +} diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..8c36dd88 --- /dev/null +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/BasiliskII/src/MacOSX/config.h b/BasiliskII/src/MacOSX/config.h new file mode 100644 index 00000000..e88fee35 --- /dev/null +++ b/BasiliskII/src/MacOSX/config.h @@ -0,0 +1,813 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define is using ESD. */ +/* #undef ENABLE_ESD */ + +/* Define if using DGA with framebuffer device. */ +/* #define ENABLE_FBDEV_DGA 1 */ + +/* Define if using GTK. */ +/* #undef ENABLE_GTK */ + +/* Define if using "mon". */ +/* #undef ENABLE_MON */ + +/* Define if using native 68k mode. */ +/* #undef ENABLE_NATIVE_M68K */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* Define if your system supports TUN/TAP devices. */ +/* #undef ENABLE_TUNTAP */ + +/* Define if using video enabled on SEGV signals. */ +/* #undef ENABLE_VOSF */ + +/* Define if using XFree86 DGA extension. */ +/* #undef ENABLE_XF86_DGA */ + +/* Define if using XFree86 DGA extension. */ +/* #define ENABLE_XF86_VIDMODE 1 */ + +/* Define to 1 if you have the `acoshl' function. */ +#define HAVE_ACOSHL 1 + +/* Define to 1 if you have the `acosl' function. */ +#define HAVE_ACOSL 1 + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#define HAVE_ALLOCA_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ARGZ_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the `asinhl' function. */ +#define HAVE_ASINHL 1 + +/* Define to 1 if you have the `asinl' function. */ +#define HAVE_ASINL 1 + +/* Define if your system has header. */ +/* #undef HAVE_ASM_UCONTEXT */ + +/* Define to 1 if you have the `asprintf' function. */ +#define HAVE_ASPRINTF 1 + +/* Define to 1 if you have the `atanh' function. */ +#define HAVE_ATANH 1 + +/* Define to 1 if you have the `atanhl' function. */ +#define HAVE_ATANHL 1 + +/* Define to 1 if you have the `atanl' function. */ +#define HAVE_ATANL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_AVAILABILITYMACROS_H 1 + +/* Define to 1 if the system has the type `caddr_t'. */ +#define HAVE_CADDR_T 1 + +/* Define to 1 if you have the `ceill' function. */ +#define HAVE_CEILL 1 + +/* Define to 1 if you have the `cfmakeraw' function. */ +#define HAVE_CFMAKERAW 1 + +/* Define to 1 if you have the `clock_gettime' function. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the `coshl' function. */ +#define HAVE_COSHL 1 + +/* Define to 1 if you have the `cosl' function. */ +#define HAVE_COSL 1 + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_FEOF_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FGETS_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_GETC_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you + don't. */ +#define HAVE_DECL__SNPRINTF 0 + +/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you + don't. */ +#define HAVE_DECL__SNWPRINTF 0 + +/* Define if you have /dev/ptmx */ +/* #undef HAVE_DEV_PTMX */ + +/* Define if you have /dev/ptc */ +/* #undef HAVE_DEV_PTS_AND_PTC */ + +/* Define to 1 if you have the `expl' function. */ +#define HAVE_EXPL 1 + +/* Define to 1 if you have the `fabsl' function. */ +#define HAVE_FABSL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `finite' function. */ +#define HAVE_FINITE 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FLOATINGPOINT_H */ + +/* Define to 1 if you have the `floorl' function. */ +#define HAVE_FLOORL 1 + +/* Define if framework AppKit is available. */ +#define HAVE_FRAMEWORK_APPKIT 1 + +/* Define if framework Carbon is available. */ +#define HAVE_FRAMEWORK_CARBON 1 + +/* Define if framework CoreFoundation is available. */ +#define HAVE_FRAMEWORK_COREFOUNDATION 1 + +/* Define if framework IOKit is available. */ +#define HAVE_FRAMEWORK_IOKIT 1 + +/* Define if framework SDL is available. */ +/* #undef HAVE_FRAMEWORK_SDL */ + +/* Define to 1 if you have the `fwprintf' function. */ +#define HAVE_FWPRINTF 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getegid' function. */ +#define HAVE_GETEGID 1 + +/* Define to 1 if you have the `geteuid' function. */ +#define HAVE_GETEUID 1 + +/* Define to 1 if you have the `getgid' function. */ +#define HAVE_GETGID 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define to 1 if you have the `getuid' function. */ +#define HAVE_GETUID 1 + +/* Define if libgnomeui is available. */ +/* #undef HAVE_GNOMEUI */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_HISTORY_H */ + +/* Define if you have the iconv() function. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IEEE754_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IEEEFP_H */ + +/* Define to 1 if you have the `inet_aton' function. */ +#define HAVE_INET_ATON 1 + +/* Define if you have the 'intmax_t' type in or . */ +#define HAVE_INTMAX_T 1 + +/* Define if exists and doesn't clash with . */ +#define HAVE_INTTYPES_H 1 + +/* Define if exists, doesn't clash with , and + declares uintmax_t. */ +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 + +/* Define to 1 if you have the header + file. */ +#define HAVE_IOKIT_STORAGE_IOBLOCKSTORAGEDEVICE_H 1 + +/* Define to 1 if you have the `isinf' function. */ +#define HAVE_ISINF 1 + +/* Define to 1 if you have the `isinfl' function. */ +/* #undef HAVE_ISINFL */ + +/* Define to 1 if you have the `isnan' function. */ +#define HAVE_ISNAN 1 + +/* Define to 1 if you have the `isnanl' function. */ +/* #undef HAVE_ISNANL */ + +/* Define to 1 if you have the `isnormal' function. */ +/* #undef HAVE_ISNORMAL */ + +/* Define if you have and nl_langinfo(CODESET). */ +#define HAVE_LANGINFO_CODESET 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the `curses' library (-lcurses). */ +/* #undef HAVE_LIBCURSES */ + +/* Define to 1 if you have the `Hcurses' library (-lHcurses). */ +/* #undef HAVE_LIBHCURSES */ + +/* Define to 1 if you have the `m' library (-lm). */ +#define HAVE_LIBM 1 + +/* Define to 1 if you have the `ncurses' library (-lncurses). */ +/* #undef HAVE_LIBNCURSES */ + +/* Define to 1 if you have the `posix4' library (-lposix4). */ +/* #undef HAVE_LIBPOSIX4 */ + +/* Define to 1 if you have the `readline' library (-lreadline). */ +/* #undef HAVE_LIBREADLINE */ + +/* Define to 1 if you have the `rt' library (-lrt). */ +/* #undef HAVE_LIBRT */ + +/* Define to 1 if you have the `termcap' library (-ltermcap). */ +/* #undef HAVE_LIBTERMCAP */ + +/* Define to 1 if you have the `terminfo' library (-lterminfo). */ +/* #undef HAVE_LIBTERMINFO */ + +/* Define to 1 if you have the `termlib' library (-ltermlib). */ +/* #undef HAVE_LIBTERMLIB */ + +/* Define to 1 if you have the `vhd' library (-lvhd). */ +/* #undef HAVE_LIBVHD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if there is a linker script to relocate the executable above + 0x70000000. */ +/* #undef HAVE_LINKER_SCRIPT */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_IF_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_IF_TUN_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if the system has the type `loff_t'. */ +/* #undef HAVE_LOFF_T */ + +/* Define to 1 if you have the `log10l' function. */ +#define HAVE_LOG10L 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LOGIN_H */ + +/* Define to 1 if you have the `logl' function. */ +#define HAVE_LOGL 1 + +/* Define if you have the 'long double' type. */ +#define HAVE_LONG_DOUBLE 1 + +/* Define if you have the 'long long' type. */ +#define HAVE_LONG_LONG 1 + +/* Define if your system supports Mach exceptions. */ +#define HAVE_MACH_EXCEPTIONS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MACH_MACH_H 1 + +/* Define to 1 if you have the `mach_task_self' function. */ +#define HAVE_MACH_TASK_SELF 1 + +/* Define if your system has a working vm_allocate()-based memory allocator. + */ +#define HAVE_MACH_VM 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MALLOC_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mempcpy' function. */ +/* #undef HAVE_MEMPCPY */ + +/* Define to 1 if you have the `mmap' function. */ +#define HAVE_MMAP 1 + +/* Define if defines MAP_ANON and mmap()'ing with MAP_ANON works. + */ +/* #undef HAVE_MMAP_ANON */ + +/* Define if defines MAP_ANONYMOUS and mmap()'ing with + MAP_ANONYMOUS works. */ +/* #undef HAVE_MMAP_ANONYMOUS */ + +/* Define if your system has a working mmap()-based memory allocator. */ +/* #undef HAVE_MMAP_VM */ + +/* Define to 1 if you have the `mprotect' function. */ +#define HAVE_MPROTECT 1 + +/* Define to 1 if you have the `munmap' function. */ +#define HAVE_MUNMAP 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NAN_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_IF_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NET_IF_TUN_H */ + +/* Define if you are on NEWS-OS (additions from openssh-3.2.2p1, for + sshpty.c). */ +/* #undef HAVE_NEWS4 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_NL_TYPES_H 1 + +/* Define to 1 if you have the `poll' function. */ +#define HAVE_POLL 1 + +/* Define if your printf() function supports format strings with positions. */ +#define HAVE_POSIX_PRINTF 1 + +/* Define to 1 if you have the `powl' function. */ +#define HAVE_POWL 1 + +/* Define if pthreads are available. */ +#define HAVE_PTHREADS 1 + +/* Define to 1 if you have the `pthread_cancel' function. */ +#define HAVE_PTHREAD_CANCEL 1 + +/* Define to 1 if you have the `pthread_cond_init' function. */ +#define HAVE_PTHREAD_COND_INIT 1 + +/* Define to 1 if you have the `pthread_mutexattr_setprotocol' function. */ +#define HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL 1 + +/* Define to 1 if you have the `pthread_mutexattr_setpshared' function. */ +#define HAVE_PTHREAD_MUTEXATTR_SETPSHARED 1 + +/* Define to 1 if you have the `pthread_mutexattr_settype' function. */ +#define HAVE_PTHREAD_MUTEXATTR_SETTYPE 1 + +/* Define to 1 if you have the `pthread_testcancel' function. */ +#define HAVE_PTHREAD_TESTCANCEL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PTY_H */ + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_READLINE_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_READLINE_HISTORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_READLINE_READLINE_H 1 + +/* Define to 1 if you have the `sem_init' function. */ +#define HAVE_SEM_INIT 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Define if we know a hack to replace siginfo_t->si_addr member. */ +/* #undef HAVE_SIGCONTEXT_SUBTERFUGE */ + +/* Define if your system supports extended signals. */ +/* #undef HAVE_SIGINFO_T */ +//#define HAVE_SIGINFO_T 1 + +/* Define to 1 if you have the `signal' function. */ +#define HAVE_SIGNAL 1 + +/* Define to 1 if you have the `signbit' function. */ +/* #undef HAVE_SIGNBIT */ + +/* Define if we can ignore the fault (instruction skipping in SIGSEGV + handler). */ +#define HAVE_SIGSEGV_SKIP_INSTRUCTION 1 + +/* Define to 1 if you have the `sinhl' function. */ +#define HAVE_SINHL 1 + +/* Define to 1 if you have the `sinl' function. */ +#define HAVE_SINL 1 + +/* Define if slirp library is supported */ +/* #define HAVE_SLIRP 1 */ + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the `sqrtl' function. */ +#define HAVE_SQRTL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDDEF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define if exists, doesn't clash with , and declares + uintmax_t. */ +#define HAVE_STDINT_H_WITH_UINTMAX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `stpcpy' function. */ +#define HAVE_STPCPY 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STROPTS_H */ + +/* Define to 1 if you have the `strtoul' function. */ +#define HAVE_STRTOUL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BITYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BSDTTY_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_POLL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_STROPTS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the `tanhl' function. */ +#define HAVE_TANHL 1 + +/* Define to 1 if you have the `tanl' function. */ +#define HAVE_TANL 1 + +/* Define to 1 if you have the `task_self' function. */ +/* #undef HAVE_TASK_SELF */ + +/* Define to 1 if you have the `timer_create' function. */ +/* #undef HAVE_TIMER_CREATE */ + +/* Define to 1 if you have the `tsearch' function. */ +#define HAVE_TSEARCH 1 + +/* Define if you have the 'uintmax_t' type in or . */ +#define HAVE_UINTMAX_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if you have the 'unsigned long long' type. */ +#define HAVE_UNSIGNED_LONG_LONG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UTIL_H 1 + +/* Define to 1 if you have the `vhangup' function. */ +/* #undef HAVE_VHANGUP */ + +/* Define to 1 if you have the `vm_allocate' function. */ +#define HAVE_VM_ALLOCATE 1 + +/* Define to 1 if you have the `vm_deallocate' function. */ +#define HAVE_VM_DEALLOCATE 1 + +/* Define to 1 if you have the `vm_protect' function. */ +#define HAVE_VM_PROTECT 1 + +/* Define if you have the 'wchar_t' type. */ +#define HAVE_WCHAR_T 1 + +/* Define to 1 if you have the `wcslen' function. */ +#define HAVE_WCSLEN 1 + +/* Define if your system supports Windows exceptions. */ +/* #undef HAVE_WIN32_EXCEPTIONS */ + +/* Define if you have the 'wint_t' type. */ +#define HAVE_WINT_T 1 + +/* Define to 1 if you have the `_getpty' function. */ +/* #undef HAVE__GETPTY */ + +/* Define to 1 if you have the `__argz_count' function. */ +/* #undef HAVE___ARGZ_COUNT */ + +/* Define to 1 if you have the `__argz_next' function. */ +/* #undef HAVE___ARGZ_NEXT */ + +/* Define to 1 if you have the `__argz_stringify' function. */ +/* #undef HAVE___ARGZ_STRINGIFY */ + +/* Define to 1 if you have the `__fsetlocking' function. */ +/* #undef HAVE___FSETLOCKING */ + +/* Define to the floating point format of the host machine. */ +#define HOST_FLOAT_FORMAT IEEE_FLOAT_FORMAT + +/* Define to 1 if the host machine stores floating point numbers in memory + with the word containing the sign bit at the lowest address, or to 0 if it + does it the other way around. This macro should not be defined if the + ordering is the same as for multi-word integers. */ +/* #undef HOST_FLOAT_WORDS_BIG_ENDIAN */ + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + +/* Define if integer division by zero raises signal SIGFPE. */ +#define INTDIV0_RAISES_SIGFPE 0 + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +/* #undef NO_MINUS_C_MINUS_O */ + +/* Define this program name. */ +#define PACKAGE "Basilisk II" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "Christian.Bauer@uni-mainz.de" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "Basilisk II" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "Basilisk II 1.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "BasiliskII" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.0" + +/* Define if the __PAGEZERO Mach-O Low Memory Globals hack works on this + system. */ +/* #undef PAGEZERO_HACK */ + +/* Define if exists and defines unusable PRI* macros. */ +/* #undef PRI_MACROS_BROKEN */ + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* Define if your system requires sigactions to be reinstalled. */ +/* #undef SIGACTION_NEED_REINSTALL */ + +/* Define if your system requires signals to be reinstalled. */ +/* #undef SIGNAL_NEED_REINSTALL */ + +/* The size of `double', as computed by sizeof. */ +#define SIZEOF_DOUBLE 8 + +/* The size of `float', as computed by sizeof. */ +#define SIZEOF_FLOAT 4 + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long double', as computed by sizeof. */ +#define SIZEOF_LONG_DOUBLE 16 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `short', as computed by sizeof. */ +#define SIZEOF_SHORT 2 + +/* The size of `void *', as computed by sizeof. */ +#define SIZEOF_VOID_P 8 + +/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +/* #undef SIZE_MAX */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Define if BSD-style non-blocking I/O is to be used */ +/* #undef USE_FIONBIO */ + +/* Define to enble SDL support */ +#define USE_SDL 1 + +/* Define to enable SDL audio support */ +#define USE_SDL_AUDIO 1 + +/* Define to enable SDL video graphics support */ +#define USE_SDL_VIDEO 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Define this program version. */ +#define VERSION "1.0" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to 1 if the X Window System is missing or not being used. */ +/* #undef X_DISPLAY_MISSING */ + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define as the type of the result of subtracting two pointers, if the system + doesn't define it. */ +/* #undef ptrdiff_t */ + +/* Define to empty if the C compiler doesn't support this keyword. */ +/* #undef signed */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to 'int' if doesn't define. */ +/* #undef socklen_t */ + +/* Define to unsigned long or unsigned long long if and + don't define. */ +/* #undef uintmax_t */ + +#define FPU_UAE 1 +//#define FPU_IMPLEMENTATION 1 + diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 798ed8e8..99f3bfa6 100644 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -51,7 +51,7 @@ #include /* alloca() */ #endif -#include "cpu_emulation.h" +#include #include "main.h" #include "adb.h" #include "macos_util.h" @@ -87,6 +87,8 @@ static int display_type = DISPLAY_WINDOW; // See enum above // Constants #ifdef WIN32 const char KEYCODE_FILE_NAME[] = "BasiliskII_keycodes"; +#elif __MACOSX__ +const char KEYCODE_FILE_NAME[] = "BasiliskII_keycodes"; #else const char KEYCODE_FILE_NAME[] = DATADIR "/keycodes"; #endif @@ -195,6 +197,9 @@ extern void SysMountFirstFloppy(void); static void *vm_acquire_framebuffer(uint32 size) { +#if __MACOSX__ + return calloc(1, size); +#else // always try to reallocate framebuffer at the same address static void *fb = VM_MAP_FAILED; if (fb != VM_MAP_FAILED) { @@ -208,11 +213,16 @@ static void *vm_acquire_framebuffer(uint32 size) if (fb == VM_MAP_FAILED) fb = vm_acquire(size, VM_MAP_DEFAULT | VM_MAP_32BIT); return fb; +#endif } static inline void vm_release_framebuffer(void *fb, uint32 size) { +#if __MACOSX__ + free(fb); +#else vm_release(fb, size); +#endif } static inline int get_customized_color_depth(int default_depth) @@ -1841,6 +1851,43 @@ static void handle_events(void) // Static display update (fixed frame rate, but incremental) static void update_display_static(driver_base *drv) { + // Lock surface, if required + if (SDL_MUSTLOCK(drv->s)) + SDL_LockSurface(drv->s); + + const VIDEO_MODE &mode = drv->mode; + + memcpy(the_buffer_copy, the_buffer, the_buffer_size); + + // HACK: Create a temporary surface, with which to use in color conversion + SDL_Surface * mid_surface = NULL; + switch (mode.depth) { + case VDEPTH_1BIT: { + const int pixels_per_byte = VIDEO_MODE_X / VIDEO_MODE_ROW_BYTES; + mid_surface = SDL_CreateRGBSurfaceFrom(the_buffer_copy, VIDEO_MODE_X, VIDEO_MODE_Y, 1, (VIDEO_MODE_X / pixels_per_byte), 1, 1, 1, 0); + } break; + + // Consider using Screen_blit, for other depths + + default: { + printf("WARNING: Unhandled depth mode in SDL backend: %s\n", NameOfDepth(mode.depth)); + } break; + } + + // Blit to screen surface + if (mid_surface) { + SDL_BlitSurface(mid_surface, NULL, drv->s, NULL); + SDL_FreeSurface(mid_surface); + } + + // Unlock surface, if required + if (SDL_MUSTLOCK(drv->s)) + SDL_UnlockSurface(drv->s); + + // Refresh display + SDL_UpdateRect(drv->s, 0, 0, 0, 0); + +/* // Incremental update code int wide = 0, high = 0; uint32 x1, x2, y1, y2; @@ -1984,6 +2031,7 @@ static void update_display_static(driver_base *drv) } } } + */ } // Static display update (fixed frame rate, bounding boxes based) @@ -2044,7 +2092,7 @@ static void update_display_static_bbox(driver_base *drv) // Refresh display if (nr_boxes) SDL_UpdateRects(drv->s, nr_boxes, boxes); -} + } // We suggest the compiler to inline the next two functions so that it diff --git a/BasiliskII/src/Unix/bincue_unix.cpp b/BasiliskII/src/Unix/bincue_unix.cpp index b20b8543..612cf790 100644 --- a/BasiliskII/src/Unix/bincue_unix.cpp +++ b/BasiliskII/src/Unix/bincue_unix.cpp @@ -526,6 +526,7 @@ loff_t size_bincue(void *fh) if (fh) { return ((CueSheet *)fh)->length * COOKED_SECTOR_SIZE; } + return 0; } bool readtoc_bincue(void *fh, unsigned char *toc) @@ -564,6 +565,7 @@ bool readtoc_bincue(void *fh, unsigned char *toc) *toc++ = toc_size & 0xff; return true; } + return false; } bool GetPosition_bincue(void *fh, uint8 *pos) diff --git a/BasiliskII/src/Unix/main_unix.cpp b/BasiliskII/src/Unix/main_unix.cpp index 3505335e..1f03b9a0 100644 --- a/BasiliskII/src/Unix/main_unix.cpp +++ b/BasiliskII/src/Unix/main_unix.cpp @@ -426,6 +426,10 @@ int main(int argc, char **argv) } else if (strcmp(argv[i], "--rominfo") == 0) { argv[i] = NULL; PrintROMInfo = true; + } else if (strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0) { + // HACK: prevent Basilisk from exiting, when run via Xcode 8, which + // passes in a '-NSDocumentRevisionsDebugMode' option. + argv[i] = NULL; } } diff --git a/BasiliskII/src/Unix/timer_unix.cpp b/BasiliskII/src/Unix/timer_unix.cpp index 9e227d02..ea197e51 100644 --- a/BasiliskII/src/Unix/timer_unix.cpp +++ b/BasiliskII/src/Unix/timer_unix.cpp @@ -45,7 +45,7 @@ static inline void mach_current_time(tm_time_t &t) { host_clock_inited = true; } - clock_get_time(host_clock, &t); + clock_get_time(host_clock, (mach_timespec_t *)&t); } #endif diff --git a/BasiliskII/src/dummy/prefs_dummy.cpp b/BasiliskII/src/dummy/prefs_dummy.cpp index 84dd31ec..1b33489c 100644 --- a/BasiliskII/src/dummy/prefs_dummy.cpp +++ b/BasiliskII/src/dummy/prefs_dummy.cpp @@ -22,6 +22,7 @@ #include #include +#include #include "prefs.h" @@ -33,14 +34,20 @@ prefs_desc platform_prefs_items[] = { // Prefs file name and path +#if defined(__APPLE__) && defined(__MACH__) +const char PREFS_FILE_NAME[] = "/tmp/BasiliskII/BasiliskII_Prefs"; // HACK: for now, just load stuff from a fixed dir, inside /tmp +#else const char PREFS_FILE_NAME[] = "BasiliskII_Prefs"; +#endif + +std::string UserPrefsPath; /* * Load preferences from settings file */ -void LoadPrefs(void) +void LoadPrefs(const char * vmdir) // TODO: load prefs from 'vmdir' { // Read preferences from settings file FILE *f = fopen(PREFS_FILE_NAME, "r"); diff --git a/BasiliskII/src/dummy/user_strings_dummy.cpp b/BasiliskII/src/dummy/user_strings_dummy.cpp index 5f97823d..2ff2ead7 100644 --- a/BasiliskII/src/dummy/user_strings_dummy.cpp +++ b/BasiliskII/src/dummy/user_strings_dummy.cpp @@ -23,7 +23,7 @@ // Platform-specific string definitions -const user_string_def platform_strings[] = { +user_string_def platform_strings[] = { {-1, NULL} // End marker }; @@ -32,7 +32,7 @@ const user_string_def platform_strings[] = { * Fetch pointer to string, given the string number */ -char *GetString(int num) +const char *GetString(int num) { // First search for platform-specific string int i = 0; diff --git a/BasiliskII/src/include/video.h b/BasiliskII/src/include/video.h index 78526e67..208881ba 100644 --- a/BasiliskII/src/include/video.h +++ b/BasiliskII/src/include/video.h @@ -76,6 +76,9 @@ inline video_depth DepthModeForPixelDepth(int depth) } } +// Returns the name of a video_depth, or an empty string if the depth is unknown +const char * NameOfDepth(video_depth depth); + // Return a bytes-per-row value (assuming no padding) for the specified depth and pixel width inline uint32 TrivialBytesPerRow(uint32 width, video_depth depth) { diff --git a/BasiliskII/src/uae_cpu/cpuemu.cpp b/BasiliskII/src/uae_cpu/cpuemu.cpp new file mode 100644 index 00000000..52a0dc9c --- /dev/null +++ b/BasiliskII/src/uae_cpu/cpuemu.cpp @@ -0,0 +1,45296 @@ +#include "sysdeps.h" +#include "m68k.h" +#include "memory.h" +#include "readcpu.h" +#include "newcpu.h" +#include "compiler/compemu.h" +#include "fpu/fpu.h" +#include "cputbl.h" +#define SET_CFLG_ALWAYS(x) SET_CFLG(x) +#define SET_NFLG_ALWAYS(x) SET_NFLG(x) +#define CPUFUNC_FF(x) x##_ff +#define CPUFUNC_NF(x) x##_nf +#define CPUFUNC(x) CPUFUNC_FF(x) +#ifdef NOFLAGS +# include "noflags.h" +#endif + +#ifdef _MSC_VER +#pragma warning(disable:4102) /* unreferenced label */ +#endif + +#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) +#define PART_1 1 +#define PART_2 1 +#define PART_3 1 +#define PART_4 1 +#define PART_5 1 +#define PART_6 1 +#define PART_7 1 +#define PART_8 1 +#endif + +#ifdef PART_1 +void REGPARAM2 CPUFUNC(op_0_0)(uae_u32 opcode) /* OR.B #.B,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10_0)(uae_u32 opcode) /* OR.B #.B,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_18_0)(uae_u32 opcode) /* OR.B #.B,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20_0)(uae_u32 opcode) /* OR.B #.B,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_28_0)(uae_u32 opcode) /* OR.B #.B,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30_0)(uae_u32 opcode) /* OR.B #.B,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_38_0)(uae_u32 opcode) /* OR.B #.B,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_39_0)(uae_u32 opcode) /* OR.B #.B,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s8 dst = get_byte(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3c_0)(uae_u32 opcode) /* ORSR.B #.W */ +{ + cpuop_begin(); +{ MakeSR(); +{ uae_s16 src = get_iword(2); + src &= 0xFF; + regs.sr |= src; + MakeFromSR(); +}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_40_0)(uae_u32 opcode) /* OR.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_50_0)(uae_u32 opcode) /* OR.W #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_58_0)(uae_u32 opcode) /* OR.W #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_60_0)(uae_u32 opcode) /* OR.W #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_68_0)(uae_u32 opcode) /* OR.W #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_70_0)(uae_u32 opcode) /* OR.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 dst = get_word(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_78_0)(uae_u32 opcode) /* OR.W #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_79_0)(uae_u32 opcode) /* OR.W #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s16 dst = get_word(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_7c_0)(uae_u32 opcode) /* ORSR.W #.W */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel18; } +{ MakeSR(); +{ uae_s16 src = get_iword(2); + regs.sr |= src; + MakeFromSR(); +}}}m68k_incpc(4); +endlabel18: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80_0)(uae_u32 opcode) /* OR.L #.L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_90_0)(uae_u32 opcode) /* OR.L #.L,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_98_0)(uae_u32 opcode) /* OR.L #.L,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a0_0)(uae_u32 opcode) /* OR.L #.L,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a8_0)(uae_u32 opcode) /* OR.L #.L,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 dst = get_long(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0_0)(uae_u32 opcode) /* OR.L #.L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{m68k_incpc(6); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b8_0)(uae_u32 opcode) /* OR.L #.L,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 dst = get_long(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b9_0)(uae_u32 opcode) /* OR.L #.L,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = get_ilong(6); +{ uae_s32 dst = get_long(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(10); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d0_0)(uae_u32 opcode) /* CHK2.B #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1); + if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg; + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel27; } +} +}}}m68k_incpc(4); +endlabel27: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e8_0)(uae_u32 opcode) /* CHK2.B #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1); + if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg; + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel28; } +} +}}}m68k_incpc(6); +endlabel28: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_f0_0)(uae_u32 opcode) /* CHK2.B #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1); + if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg; + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel29; } +} +}}}}endlabel29: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_f8_0)(uae_u32 opcode) /* CHK2.B #.W,(xxx).W */ +{ + cpuop_begin(); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1); + if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg; + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel30; } +} +}}}m68k_incpc(6); +endlabel30: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_f9_0)(uae_u32 opcode) /* CHK2.B #.W,(xxx).L */ +{ + cpuop_begin(); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = get_ilong(4); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1); + if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg; + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel31; } +} +}}}m68k_incpc(8); +endlabel31: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_fa_0)(uae_u32 opcode) /* CHK2.B #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_getpc () + 4; + dsta += (uae_s32)(uae_s16)get_iword(4); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1); + if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg; + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel32; } +} +}}}m68k_incpc(6); +endlabel32: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_fb_0)(uae_u32 opcode) /* CHK2.B #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1); + if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg; + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel33; } +} +}}}}endlabel33: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_100_0)(uae_u32 opcode) /* BTST.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= 31; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}m68k_incpc(2); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_108_0)(uae_u32 opcode) /* MVPMR.W (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr memp = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_u16 val = (get_byte(memp) << 8) + get_byte(memp + 2); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_110_0)(uae_u32 opcode) /* BTST.B Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_118_0)(uae_u32 opcode) /* BTST.B Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_120_0)(uae_u32 opcode) /* BTST.B Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_128_0)(uae_u32 opcode) /* BTST.B Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_130_0)(uae_u32 opcode) /* BTST.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_138_0)(uae_u32 opcode) /* BTST.B Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_139_0)(uae_u32 opcode) /* BTST.B Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13a_0)(uae_u32 opcode) /* BTST.B Dn,(d16,PC) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif + uae_u32 dstreg = 2; +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_getpc () + 2; + dsta += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13b_0)(uae_u32 opcode) /* BTST.B Dn,(d8,PC,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif + uae_u32 dstreg = 3; +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13c_0)(uae_u32 opcode) /* BTST.B Dn,#.B */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_s8 dst = get_ibyte(2); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_140_0)(uae_u32 opcode) /* BCHG.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= 31; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + m68k_dreg(regs, dstreg) = (dst); +}}}m68k_incpc(2); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_148_0)(uae_u32 opcode) /* MVPMR.L (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr memp = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_u32 val = (get_byte(memp) << 24) + (get_byte(memp + 2) << 16) + + (get_byte(memp + 4) << 8) + get_byte(memp + 6); + m68k_dreg(regs, dstreg) = (val); +}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_150_0)(uae_u32 opcode) /* BCHG.B Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_158_0)(uae_u32 opcode) /* BCHG.B Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_160_0)(uae_u32 opcode) /* BCHG.B Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_168_0)(uae_u32 opcode) /* BCHG.B Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_170_0)(uae_u32 opcode) /* BCHG.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_178_0)(uae_u32 opcode) /* BCHG.B Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_179_0)(uae_u32 opcode) /* BCHG.B Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_17a_0)(uae_u32 opcode) /* BCHG.B Dn,(d16,PC) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif + uae_u32 dstreg = 2; +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_getpc () + 2; + dsta += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_17b_0)(uae_u32 opcode) /* BCHG.B Dn,(d8,PC,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif + uae_u32 dstreg = 3; +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_180_0)(uae_u32 opcode) /* BCLR.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= 31; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + m68k_dreg(regs, dstreg) = (dst); +}}}m68k_incpc(2); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_188_0)(uae_u32 opcode) /* MVPRM.W Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); + uaecptr memp = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + put_byte(memp, src >> 8); put_byte(memp + 2, src); +}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_190_0)(uae_u32 opcode) /* BCLR.B Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_198_0)(uae_u32 opcode) /* BCLR.B Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1a0_0)(uae_u32 opcode) /* BCLR.B Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1a8_0)(uae_u32 opcode) /* BCLR.B Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1b0_0)(uae_u32 opcode) /* BCLR.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1b8_0)(uae_u32 opcode) /* BCLR.B Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1b9_0)(uae_u32 opcode) /* BCLR.B Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1ba_0)(uae_u32 opcode) /* BCLR.B Dn,(d16,PC) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif + uae_u32 dstreg = 2; +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_getpc () + 2; + dsta += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1bb_0)(uae_u32 opcode) /* BCLR.B Dn,(d8,PC,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif + uae_u32 dstreg = 3; +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1c0_0)(uae_u32 opcode) /* BSET.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= 31; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + m68k_dreg(regs, dstreg) = (dst); +}}}m68k_incpc(2); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_1c8_0)(uae_u32 opcode) /* MVPRM.L Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); + uaecptr memp = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + put_byte(memp, src >> 24); put_byte(memp + 2, src >> 16); + put_byte(memp + 4, src >> 8); put_byte(memp + 6, src); +}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_1d0_0)(uae_u32 opcode) /* BSET.B Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1d8_0)(uae_u32 opcode) /* BSET.B Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1e0_0)(uae_u32 opcode) /* BSET.B Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1e8_0)(uae_u32 opcode) /* BSET.B Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1f0_0)(uae_u32 opcode) /* BSET.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1f8_0)(uae_u32 opcode) /* BSET.B Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1f9_0)(uae_u32 opcode) /* BSET.B Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1fa_0)(uae_u32 opcode) /* BSET.B Dn,(d16,PC) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif + uae_u32 dstreg = 2; +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_getpc () + 2; + dsta += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1fb_0)(uae_u32 opcode) /* BSET.B Dn,(d8,PC,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif + uae_u32 dstreg = 3; +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_200_0)(uae_u32 opcode) /* AND.B #.B,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_210_0)(uae_u32 opcode) /* AND.B #.B,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_218_0)(uae_u32 opcode) /* AND.B #.B,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_220_0)(uae_u32 opcode) /* AND.B #.B,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_228_0)(uae_u32 opcode) /* AND.B #.B,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_230_0)(uae_u32 opcode) /* AND.B #.B,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_238_0)(uae_u32 opcode) /* AND.B #.B,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_239_0)(uae_u32 opcode) /* AND.B #.B,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s8 dst = get_byte(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23c_0)(uae_u32 opcode) /* ANDSR.B #.W */ +{ + cpuop_begin(); +{ MakeSR(); +{ uae_s16 src = get_iword(2); + src |= 0xFF00; + regs.sr &= src; + MakeFromSR(); +}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_240_0)(uae_u32 opcode) /* AND.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_250_0)(uae_u32 opcode) /* AND.W #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_258_0)(uae_u32 opcode) /* AND.W #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_260_0)(uae_u32 opcode) /* AND.W #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_268_0)(uae_u32 opcode) /* AND.W #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_270_0)(uae_u32 opcode) /* AND.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 dst = get_word(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_278_0)(uae_u32 opcode) /* AND.W #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_279_0)(uae_u32 opcode) /* AND.W #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s16 dst = get_word(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_27c_0)(uae_u32 opcode) /* ANDSR.W #.W */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel96; } +{ MakeSR(); +{ uae_s16 src = get_iword(2); + regs.sr &= src; + MakeFromSR(); +}}}m68k_incpc(4); +endlabel96: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_280_0)(uae_u32 opcode) /* AND.L #.L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_290_0)(uae_u32 opcode) /* AND.L #.L,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_298_0)(uae_u32 opcode) /* AND.L #.L,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2a0_0)(uae_u32 opcode) /* AND.L #.L,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2a8_0)(uae_u32 opcode) /* AND.L #.L,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 dst = get_long(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2b0_0)(uae_u32 opcode) /* AND.L #.L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{m68k_incpc(6); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2b8_0)(uae_u32 opcode) /* AND.L #.L,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 dst = get_long(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2b9_0)(uae_u32 opcode) /* AND.L #.L,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = get_ilong(6); +{ uae_s32 dst = get_long(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(10); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2d0_0)(uae_u32 opcode) /* CHK2.W #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2); + if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg; + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel105; } +} +}}}m68k_incpc(4); +endlabel105: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2e8_0)(uae_u32 opcode) /* CHK2.W #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2); + if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg; + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel106; } +} +}}}m68k_incpc(6); +endlabel106: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2f0_0)(uae_u32 opcode) /* CHK2.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2); + if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg; + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel107; } +} +}}}}endlabel107: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2f8_0)(uae_u32 opcode) /* CHK2.W #.W,(xxx).W */ +{ + cpuop_begin(); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2); + if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg; + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel108; } +} +}}}m68k_incpc(6); +endlabel108: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2f9_0)(uae_u32 opcode) /* CHK2.W #.W,(xxx).L */ +{ + cpuop_begin(); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = get_ilong(4); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2); + if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg; + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel109; } +} +}}}m68k_incpc(8); +endlabel109: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2fa_0)(uae_u32 opcode) /* CHK2.W #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_getpc () + 4; + dsta += (uae_s32)(uae_s16)get_iword(4); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2); + if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg; + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel110; } +} +}}}m68k_incpc(6); +endlabel110: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2fb_0)(uae_u32 opcode) /* CHK2.W #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2); + if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg; + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel111; } +} +}}}}endlabel111: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_400_0)(uae_u32 opcode) /* SUB.B #.B,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_410_0)(uae_u32 opcode) /* SUB.B #.B,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_418_0)(uae_u32 opcode) /* SUB.B #.B,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_420_0)(uae_u32 opcode) /* SUB.B #.B,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_428_0)(uae_u32 opcode) /* SUB.B #.B,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_430_0)(uae_u32 opcode) /* SUB.B #.B,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_438_0)(uae_u32 opcode) /* SUB.B #.B,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_439_0)(uae_u32 opcode) /* SUB.B #.B,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_440_0)(uae_u32 opcode) /* SUB.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_450_0)(uae_u32 opcode) /* SUB.W #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_458_0)(uae_u32 opcode) /* SUB.W #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_460_0)(uae_u32 opcode) /* SUB.W #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_468_0)(uae_u32 opcode) /* SUB.W #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_470_0)(uae_u32 opcode) /* SUB.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_478_0)(uae_u32 opcode) /* SUB.W #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_479_0)(uae_u32 opcode) /* SUB.W #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_480_0)(uae_u32 opcode) /* SUB.L #.L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_490_0)(uae_u32 opcode) /* SUB.L #.L,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_498_0)(uae_u32 opcode) /* SUB.L #.L,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a0_0)(uae_u32 opcode) /* SUB.L #.L,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a8_0)(uae_u32 opcode) /* SUB.L #.L,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4b0_0)(uae_u32 opcode) /* SUB.L #.L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{m68k_incpc(6); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4b8_0)(uae_u32 opcode) /* SUB.L #.L,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4b9_0)(uae_u32 opcode) /* SUB.L #.L,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = get_ilong(6); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(10); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4d0_0)(uae_u32 opcode) /* CHK2.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=get_long(dsta); upper = get_long(dsta+4); + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel136; } +} +}}}m68k_incpc(4); +endlabel136: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4e8_0)(uae_u32 opcode) /* CHK2.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=get_long(dsta); upper = get_long(dsta+4); + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel137; } +} +}}}m68k_incpc(6); +endlabel137: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4f0_0)(uae_u32 opcode) /* CHK2.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=get_long(dsta); upper = get_long(dsta+4); + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel138; } +} +}}}}endlabel138: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4f8_0)(uae_u32 opcode) /* CHK2.L #.W,(xxx).W */ +{ + cpuop_begin(); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=get_long(dsta); upper = get_long(dsta+4); + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel139; } +} +}}}m68k_incpc(6); +endlabel139: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4f9_0)(uae_u32 opcode) /* CHK2.L #.W,(xxx).L */ +{ + cpuop_begin(); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = get_ilong(4); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=get_long(dsta); upper = get_long(dsta+4); + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel140; } +} +}}}m68k_incpc(8); +endlabel140: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4fa_0)(uae_u32 opcode) /* CHK2.L #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_getpc () + 4; + dsta += (uae_s32)(uae_s16)get_iword(4); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=get_long(dsta); upper = get_long(dsta+4); + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel141; } +} +}}}m68k_incpc(6); +endlabel141: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4fb_0)(uae_u32 opcode) /* CHK2.L #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); + {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; + lower=get_long(dsta); upper = get_long(dsta+4); + SET_ZFLG (upper == reg || lower == reg); + SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); + if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel142; } +} +}}}}endlabel142: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_600_0)(uae_u32 opcode) /* ADD.B #.B,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_610_0)(uae_u32 opcode) /* ADD.B #.B,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_618_0)(uae_u32 opcode) /* ADD.B #.B,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_620_0)(uae_u32 opcode) /* ADD.B #.B,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_628_0)(uae_u32 opcode) /* ADD.B #.B,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_630_0)(uae_u32 opcode) /* ADD.B #.B,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_638_0)(uae_u32 opcode) /* ADD.B #.B,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_639_0)(uae_u32 opcode) /* ADD.B #.B,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_640_0)(uae_u32 opcode) /* ADD.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_650_0)(uae_u32 opcode) /* ADD.W #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_658_0)(uae_u32 opcode) /* ADD.W #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_660_0)(uae_u32 opcode) /* ADD.W #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_668_0)(uae_u32 opcode) /* ADD.W #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_670_0)(uae_u32 opcode) /* ADD.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_678_0)(uae_u32 opcode) /* ADD.W #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_679_0)(uae_u32 opcode) /* ADD.W #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_680_0)(uae_u32 opcode) /* ADD.L #.L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_690_0)(uae_u32 opcode) /* ADD.L #.L,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_698_0)(uae_u32 opcode) /* ADD.L #.L,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_6a0_0)(uae_u32 opcode) /* ADD.L #.L,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_6a8_0)(uae_u32 opcode) /* ADD.L #.L,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_6b0_0)(uae_u32 opcode) /* ADD.L #.L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{m68k_incpc(6); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_6b8_0)(uae_u32 opcode) /* ADD.L #.L,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_6b9_0)(uae_u32 opcode) /* ADD.L #.L,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = get_ilong(6); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(10); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_6c0_0)(uae_u32 opcode) /* RTM.L Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{m68k_incpc(2); + op_illg(opcode); +} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_6c8_0)(uae_u32 opcode) /* RTM.L An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{m68k_incpc(2); + op_illg(opcode); +} cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6d0_0)(uae_u32 opcode) /* CALLM.L (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{m68k_incpc(2); + op_illg(opcode); +} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6e8_0)(uae_u32 opcode) /* CALLM.L (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{m68k_incpc(2); + op_illg(opcode); +} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6f0_0)(uae_u32 opcode) /* CALLM.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{m68k_incpc(2); + op_illg(opcode); +} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6f8_0)(uae_u32 opcode) /* CALLM.L (xxx).W */ +{ + cpuop_begin(); +{m68k_incpc(2); + op_illg(opcode); +} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6f9_0)(uae_u32 opcode) /* CALLM.L (xxx).L */ +{ + cpuop_begin(); +{m68k_incpc(2); + op_illg(opcode); +} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6fa_0)(uae_u32 opcode) /* CALLM.L (d16,PC) */ +{ + cpuop_begin(); +{m68k_incpc(2); + op_illg(opcode); +} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6fb_0)(uae_u32 opcode) /* CALLM.L (d8,PC,Xn) */ +{ + cpuop_begin(); +{m68k_incpc(2); + op_illg(opcode); +} cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_800_0)(uae_u32 opcode) /* BTST.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= 31; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_810_0)(uae_u32 opcode) /* BTST.B #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_818_0)(uae_u32 opcode) /* BTST.B #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_820_0)(uae_u32 opcode) /* BTST.B #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_828_0)(uae_u32 opcode) /* BTST.B #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_830_0)(uae_u32 opcode) /* BTST.B #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_838_0)(uae_u32 opcode) /* BTST.B #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_839_0)(uae_u32 opcode) /* BTST.B #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_83a_0)(uae_u32 opcode) /* BTST.B #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_getpc () + 4; + dsta += (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_83b_0)(uae_u32 opcode) /* BTST.B #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_83c_0)(uae_u32 opcode) /* BTST.B #.W,#.B */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uae_s8 dst = get_ibyte(4); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_840_0)(uae_u32 opcode) /* BCHG.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= 31; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + m68k_dreg(regs, dstreg) = (dst); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_850_0)(uae_u32 opcode) /* BCHG.B #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_858_0)(uae_u32 opcode) /* BCHG.B #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_860_0)(uae_u32 opcode) /* BCHG.B #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_868_0)(uae_u32 opcode) /* BCHG.B #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_870_0)(uae_u32 opcode) /* BCHG.B #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_878_0)(uae_u32 opcode) /* BCHG.B #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_879_0)(uae_u32 opcode) /* BCHG.B #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_87a_0)(uae_u32 opcode) /* BCHG.B #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_getpc () + 4; + dsta += (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_87b_0)(uae_u32 opcode) /* BCHG.B #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_880_0)(uae_u32 opcode) /* BCLR.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= 31; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + m68k_dreg(regs, dstreg) = (dst); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_890_0)(uae_u32 opcode) /* BCLR.B #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_898_0)(uae_u32 opcode) /* BCLR.B #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8a0_0)(uae_u32 opcode) /* BCLR.B #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8a8_0)(uae_u32 opcode) /* BCLR.B #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8b0_0)(uae_u32 opcode) /* BCLR.B #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8b8_0)(uae_u32 opcode) /* BCLR.B #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8b9_0)(uae_u32 opcode) /* BCLR.B #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8ba_0)(uae_u32 opcode) /* BCLR.B #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_getpc () + 4; + dsta += (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8bb_0)(uae_u32 opcode) /* BCLR.B #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8c0_0)(uae_u32 opcode) /* BSET.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= 31; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + m68k_dreg(regs, dstreg) = (dst); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8d0_0)(uae_u32 opcode) /* BSET.B #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8d8_0)(uae_u32 opcode) /* BSET.B #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8e0_0)(uae_u32 opcode) /* BSET.B #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8e8_0)(uae_u32 opcode) /* BSET.B #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8f0_0)(uae_u32 opcode) /* BSET.B #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8f8_0)(uae_u32 opcode) /* BSET.B #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8f9_0)(uae_u32 opcode) /* BSET.B #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8fa_0)(uae_u32 opcode) /* BSET.B #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_getpc () + 4; + dsta += (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8fb_0)(uae_u32 opcode) /* BSET.B #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a00_0)(uae_u32 opcode) /* EOR.B #.B,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a10_0)(uae_u32 opcode) /* EOR.B #.B,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a18_0)(uae_u32 opcode) /* EOR.B #.B,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a20_0)(uae_u32 opcode) /* EOR.B #.B,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a28_0)(uae_u32 opcode) /* EOR.B #.B,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a30_0)(uae_u32 opcode) /* EOR.B #.B,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a38_0)(uae_u32 opcode) /* EOR.B #.B,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a39_0)(uae_u32 opcode) /* EOR.B #.B,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s8 dst = get_byte(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a3c_0)(uae_u32 opcode) /* EORSR.B #.W */ +{ + cpuop_begin(); +{ MakeSR(); +{ uae_s16 src = get_iword(2); + src &= 0xFF; + regs.sr ^= src; + MakeFromSR(); +}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a40_0)(uae_u32 opcode) /* EOR.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a50_0)(uae_u32 opcode) /* EOR.W #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a58_0)(uae_u32 opcode) /* EOR.W #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a60_0)(uae_u32 opcode) /* EOR.W #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a68_0)(uae_u32 opcode) /* EOR.W #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a70_0)(uae_u32 opcode) /* EOR.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 dst = get_word(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a78_0)(uae_u32 opcode) /* EOR.W #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a79_0)(uae_u32 opcode) /* EOR.W #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s16 dst = get_word(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +#endif + +#ifdef PART_2 +void REGPARAM2 CPUFUNC(op_a7c_0)(uae_u32 opcode) /* EORSR.W #.W */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel234; } +{ MakeSR(); +{ uae_s16 src = get_iword(2); + regs.sr ^= src; + MakeFromSR(); +}}}m68k_incpc(4); +endlabel234: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a80_0)(uae_u32 opcode) /* EOR.L #.L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a90_0)(uae_u32 opcode) /* EOR.L #.L,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a98_0)(uae_u32 opcode) /* EOR.L #.L,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_aa0_0)(uae_u32 opcode) /* EOR.L #.L,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_aa8_0)(uae_u32 opcode) /* EOR.L #.L,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 dst = get_long(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ab0_0)(uae_u32 opcode) /* EOR.L #.L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{m68k_incpc(6); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ab8_0)(uae_u32 opcode) /* EOR.L #.L,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 dst = get_long(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ab9_0)(uae_u32 opcode) /* EOR.L #.L,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = get_ilong(6); +{ uae_s32 dst = get_long(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(10); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ad0_0)(uae_u32 opcode) /* CAS.B #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s8)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(m68k_dreg(regs, rc))) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_byte(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ad8_0)(uae_u32 opcode) /* CAS.B #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s8)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(m68k_dreg(regs, rc))) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_byte(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ae0_0)(uae_u32 opcode) /* CAS.B #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s8)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(m68k_dreg(regs, rc))) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_byte(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ae8_0)(uae_u32 opcode) /* CAS.B #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s8)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(m68k_dreg(regs, rc))) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_byte(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_af0_0)(uae_u32 opcode) /* CAS.B #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s8)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(m68k_dreg(regs, rc))) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_byte(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_af8_0)(uae_u32 opcode) /* CAS.B #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s8)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(m68k_dreg(regs, rc))) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_byte(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_af9_0)(uae_u32 opcode) /* CAS.B #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s8 dst = get_byte(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s8)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(m68k_dreg(regs, rc))) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_byte(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c00_0)(uae_u32 opcode) /* CMP.B #.B,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c10_0)(uae_u32 opcode) /* CMP.B #.B,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c18_0)(uae_u32 opcode) /* CMP.B #.B,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c20_0)(uae_u32 opcode) /* CMP.B #.B,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c28_0)(uae_u32 opcode) /* CMP.B #.B,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c30_0)(uae_u32 opcode) /* CMP.B #.B,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c38_0)(uae_u32 opcode) /* CMP.B #.B,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c39_0)(uae_u32 opcode) /* CMP.B #.B,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c3a_0)(uae_u32 opcode) /* CMP.B #.B,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_getpc () + 4; + dsta += (uae_s32)(uae_s16)get_iword(4); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c3b_0)(uae_u32 opcode) /* CMP.B #.B,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s8 src = get_ibyte(2); +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c40_0)(uae_u32 opcode) /* CMP.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c50_0)(uae_u32 opcode) /* CMP.W #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c58_0)(uae_u32 opcode) /* CMP.W #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c60_0)(uae_u32 opcode) /* CMP.W #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c68_0)(uae_u32 opcode) /* CMP.W #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c70_0)(uae_u32 opcode) /* CMP.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c78_0)(uae_u32 opcode) /* CMP.W #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c79_0)(uae_u32 opcode) /* CMP.W #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c7a_0)(uae_u32 opcode) /* CMP.W #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_getpc () + 4; + dsta += (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c7b_0)(uae_u32 opcode) /* CMP.W #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c80_0)(uae_u32 opcode) /* CMP.L #.L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c90_0)(uae_u32 opcode) /* CMP.L #.L,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c98_0)(uae_u32 opcode) /* CMP.L #.L,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ca0_0)(uae_u32 opcode) /* CMP.L #.L,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ca8_0)(uae_u32 opcode) /* CMP.L #.L,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_cb0_0)(uae_u32 opcode) /* CMP.L #.L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{m68k_incpc(6); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_cb8_0)(uae_u32 opcode) /* CMP.L #.L,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_cb9_0)(uae_u32 opcode) /* CMP.L #.L,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = get_ilong(6); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(10); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_cba_0)(uae_u32 opcode) /* CMP.L #.L,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_getpc () + 6; + dsta += (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_cbb_0)(uae_u32 opcode) /* CMP.L #.L,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s32 src = get_ilong(2); +{m68k_incpc(6); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_cd0_0)(uae_u32 opcode) /* CAS.W #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s16)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(m68k_dreg(regs, rc))) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_word(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_cd8_0)(uae_u32 opcode) /* CAS.W #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s16)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(m68k_dreg(regs, rc))) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_word(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ce0_0)(uae_u32 opcode) /* CAS.W #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s16)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(m68k_dreg(regs, rc))) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_word(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ce8_0)(uae_u32 opcode) /* CAS.W #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s16)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(m68k_dreg(regs, rc))) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_word(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_cf0_0)(uae_u32 opcode) /* CAS.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 dst = get_word(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s16)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(m68k_dreg(regs, rc))) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_word(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_cf8_0)(uae_u32 opcode) /* CAS.W #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s16 dst = get_word(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s16)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(m68k_dreg(regs, rc))) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_word(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_cf9_0)(uae_u32 opcode) /* CAS.W #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s16 dst = get_word(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s16)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(m68k_dreg(regs, rc))) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_word(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_cfc_0)(uae_u32 opcode) /* CAS2.W #.L */ +{ + cpuop_begin(); +{{ uae_s32 extra = get_ilong(2); + uae_u32 rn1 = regs.regs[(extra >> 28) & 15]; + uae_u32 rn2 = regs.regs[(extra >> 12) & 15]; + uae_u16 dst1 = get_word(rn1), dst2 = get_word(rn2); +{uae_u32 newv = ((uae_s16)(dst1)) - ((uae_s16)(m68k_dreg(regs, (extra >> 16) & 7))); +{ int flgs = ((uae_s16)(m68k_dreg(regs, (extra >> 16) & 7))) < 0; + int flgo = ((uae_s16)(dst1)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(m68k_dreg(regs, (extra >> 16) & 7))) > ((uae_u16)(dst1))); + SET_NFLG (flgn != 0); + if (GET_ZFLG) { +{uae_u32 newv = ((uae_s16)(dst2)) - ((uae_s16)(m68k_dreg(regs, extra & 7))); +{ int flgs = ((uae_s16)(m68k_dreg(regs, extra & 7))) < 0; + int flgo = ((uae_s16)(dst2)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(m68k_dreg(regs, extra & 7))) > ((uae_u16)(dst2))); + SET_NFLG (flgn != 0); + if (GET_ZFLG) { + put_word(rn1, m68k_dreg(regs, (extra >> 22) & 7)); + put_word(rn1, m68k_dreg(regs, (extra >> 6) & 7)); + }} +}}}} if (! GET_ZFLG) { + m68k_dreg(regs, (extra >> 22) & 7) = (m68k_dreg(regs, (extra >> 22) & 7) & ~0xffff) | (dst1 & 0xffff); + m68k_dreg(regs, (extra >> 6) & 7) = (m68k_dreg(regs, (extra >> 6) & 7) & ~0xffff) | (dst2 & 0xffff); + } +}}m68k_incpc(6); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e10_0)(uae_u32 opcode) /* MOVES.B #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel288; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = m68k_areg(regs, dstreg); + put_byte(dsta,src); +}}else{{ uaecptr srca = m68k_areg(regs, dstreg); +{ uae_s8 src = get_byte(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xff) | ((src) & 0xff); + } +}}}}}}m68k_incpc(4); +endlabel288: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e18_0)(uae_u32 opcode) /* MOVES.B #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel289; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + put_byte(dsta,src); +}}else{{ uaecptr srca = m68k_areg(regs, dstreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xff) | ((src) & 0xff); + } +}}}}}}m68k_incpc(4); +endlabel289: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e20_0)(uae_u32 opcode) /* MOVES.B #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel290; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; + m68k_areg (regs, dstreg) = dsta; + put_byte(dsta,src); +}}else{{ uaecptr srca = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, dstreg) = srca; + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xff) | ((src) & 0xff); + } +}}}}}}m68k_incpc(4); +endlabel290: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e28_0)(uae_u32 opcode) /* MOVES.B #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel291; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + put_byte(dsta,src); +}}else{{ uaecptr srca = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); +{ uae_s8 src = get_byte(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xff) | ((src) & 0xff); + } +}}}}}}m68k_incpc(8); +endlabel291: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e30_0)(uae_u32 opcode) /* MOVES.B #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel292; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + put_byte(dsta,src); +}}}else{{{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 src = get_byte(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xff) | ((src) & 0xff); + } +}}}}}}}endlabel292: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e38_0)(uae_u32 opcode) /* MOVES.B #.W,(xxx).W */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel293; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + put_byte(dsta,src); +}}else{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(6); +{ uae_s8 src = get_byte(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xff) | ((src) & 0xff); + } +}}}}}}m68k_incpc(8); +endlabel293: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e39_0)(uae_u32 opcode) /* MOVES.B #.W,(xxx).L */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel294; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = get_ilong(4); + put_byte(dsta,src); +}}else{{ uaecptr srca = get_ilong(8); +{ uae_s8 src = get_byte(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xff) | ((src) & 0xff); + } +}}}}}}m68k_incpc(12); +endlabel294: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e50_0)(uae_u32 opcode) /* MOVES.W #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel295; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = m68k_areg(regs, dstreg); + put_word(dsta,src); +}}else{{ uaecptr srca = m68k_areg(regs, dstreg); +{ uae_s16 src = get_word(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xffff) | ((src) & 0xffff); + } +}}}}}}m68k_incpc(4); +endlabel295: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e58_0)(uae_u32 opcode) /* MOVES.W #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel296; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + put_word(dsta,src); +}}else{{ uaecptr srca = m68k_areg(regs, dstreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, dstreg) += 2; + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xffff) | ((src) & 0xffff); + } +}}}}}}m68k_incpc(4); +endlabel296: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e60_0)(uae_u32 opcode) /* MOVES.W #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel297; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + put_word(dsta,src); +}}else{{ uaecptr srca = m68k_areg(regs, dstreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, dstreg) = srca; + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xffff) | ((src) & 0xffff); + } +}}}}}}m68k_incpc(4); +endlabel297: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e68_0)(uae_u32 opcode) /* MOVES.W #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel298; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + put_word(dsta,src); +}}else{{ uaecptr srca = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); +{ uae_s16 src = get_word(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xffff) | ((src) & 0xffff); + } +}}}}}}m68k_incpc(8); +endlabel298: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e70_0)(uae_u32 opcode) /* MOVES.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel299; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + put_word(dsta,src); +}}}else{{{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 src = get_word(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xffff) | ((src) & 0xffff); + } +}}}}}}}endlabel299: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e78_0)(uae_u32 opcode) /* MOVES.W #.W,(xxx).W */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel300; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + put_word(dsta,src); +}}else{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(6); +{ uae_s16 src = get_word(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xffff) | ((src) & 0xffff); + } +}}}}}}m68k_incpc(8); +endlabel300: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e79_0)(uae_u32 opcode) /* MOVES.W #.W,(xxx).L */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel301; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = get_ilong(4); + put_word(dsta,src); +}}else{{ uaecptr srca = get_ilong(8); +{ uae_s16 src = get_word(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xffff) | ((src) & 0xffff); + } +}}}}}}m68k_incpc(12); +endlabel301: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e90_0)(uae_u32 opcode) /* MOVES.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel302; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = m68k_areg(regs, dstreg); + put_long(dsta,src); +}}else{{ uaecptr srca = m68k_areg(regs, dstreg); +{ uae_s32 src = get_long(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (src); + } +}}}}}}m68k_incpc(4); +endlabel302: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_e98_0)(uae_u32 opcode) /* MOVES.L #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel303; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + put_long(dsta,src); +}}else{{ uaecptr srca = m68k_areg(regs, dstreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, dstreg) += 4; + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (src); + } +}}}}}}m68k_incpc(4); +endlabel303: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_ea0_0)(uae_u32 opcode) /* MOVES.L #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel304; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + put_long(dsta,src); +}}else{{ uaecptr srca = m68k_areg(regs, dstreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, dstreg) = srca; + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (src); + } +}}}}}}m68k_incpc(4); +endlabel304: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_ea8_0)(uae_u32 opcode) /* MOVES.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel305; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + put_long(dsta,src); +}}else{{ uaecptr srca = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 src = get_long(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (src); + } +}}}}}}m68k_incpc(8); +endlabel305: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_eb0_0)(uae_u32 opcode) /* MOVES.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel306; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + put_long(dsta,src); +}}}else{{{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 src = get_long(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (src); + } +}}}}}}}endlabel306: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_eb8_0)(uae_u32 opcode) /* MOVES.L #.W,(xxx).W */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel307; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + put_long(dsta,src); +}}else{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(6); +{ uae_s32 src = get_long(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (src); + } +}}}}}}m68k_incpc(8); +endlabel307: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_eb9_0)(uae_u32 opcode) /* MOVES.L #.W,(xxx).L */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel308; } +{{ uae_s16 extra = get_iword(2); + if (extra & 0x800) +{ uae_u32 src = regs.regs[(extra >> 12) & 15]; +{ uaecptr dsta = get_ilong(4); + put_long(dsta,src); +}}else{{ uaecptr srca = get_ilong(8); +{ uae_s32 src = get_long(srca); + if (extra & 0x8000) { + m68k_areg(regs, (extra >> 12) & 7) = src; + } else { + m68k_dreg(regs, (extra >> 12) & 7) = (src); + } +}}}}}}m68k_incpc(12); +endlabel308: ; + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_ed0_0)(uae_u32 opcode) /* CAS.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s32)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(m68k_dreg(regs, rc))) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_long(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ed8_0)(uae_u32 opcode) /* CAS.L #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s32)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(m68k_dreg(regs, rc))) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_long(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ee0_0)(uae_u32 opcode) /* CAS.L #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s32)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(m68k_dreg(regs, rc))) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_long(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ee8_0)(uae_u32 opcode) /* CAS.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 dst = get_long(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s32)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(m68k_dreg(regs, rc))) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_long(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ef0_0)(uae_u32 opcode) /* CAS.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s32)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(m68k_dreg(regs, rc))) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_long(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ef8_0)(uae_u32 opcode) /* CAS.L #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 dst = get_long(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s32)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(m68k_dreg(regs, rc))) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_long(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ef9_0)(uae_u32 opcode) /* CAS.L #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s32 dst = get_long(dsta); +{ int ru = (src >> 6) & 7; + int rc = src & 7; +{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(m68k_dreg(regs, rc))); +{ int flgs = ((uae_s32)(m68k_dreg(regs, rc))) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(m68k_dreg(regs, rc))) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); + if (GET_ZFLG){ put_long(dsta,(m68k_dreg(regs, ru))); +}else{m68k_dreg(regs, rc) = dst; +}}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_efc_0)(uae_u32 opcode) /* CAS2.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 extra = get_ilong(2); + uae_u32 rn1 = regs.regs[(extra >> 28) & 15]; + uae_u32 rn2 = regs.regs[(extra >> 12) & 15]; + uae_u32 dst1 = get_long(rn1), dst2 = get_long(rn2); +{uae_u32 newv = ((uae_s32)(dst1)) - ((uae_s32)(m68k_dreg(regs, (extra >> 16) & 7))); +{ int flgs = ((uae_s32)(m68k_dreg(regs, (extra >> 16) & 7))) < 0; + int flgo = ((uae_s32)(dst1)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(m68k_dreg(regs, (extra >> 16) & 7))) > ((uae_u32)(dst1))); + SET_NFLG (flgn != 0); + if (GET_ZFLG) { +{uae_u32 newv = ((uae_s32)(dst2)) - ((uae_s32)(m68k_dreg(regs, extra & 7))); +{ int flgs = ((uae_s32)(m68k_dreg(regs, extra & 7))) < 0; + int flgo = ((uae_s32)(dst2)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(m68k_dreg(regs, extra & 7))) > ((uae_u32)(dst2))); + SET_NFLG (flgn != 0); + if (GET_ZFLG) { + put_long(rn1, m68k_dreg(regs, (extra >> 22) & 7)); + put_long(rn1, m68k_dreg(regs, (extra >> 6) & 7)); + }} +}}}} if (! GET_ZFLG) { + m68k_dreg(regs, (extra >> 22) & 7) = dst1; + m68k_dreg(regs, (extra >> 6) & 7) = dst2; + } +}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1000_0)(uae_u32 opcode) /* MOVE.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1010_0)(uae_u32 opcode) /* MOVE.B (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1018_0)(uae_u32 opcode) /* MOVE.B (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1020_0)(uae_u32 opcode) /* MOVE.B -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1028_0)(uae_u32 opcode) /* MOVE.B (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1030_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1038_0)(uae_u32 opcode) /* MOVE.B (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1039_0)(uae_u32 opcode) /* MOVE.B (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_103a_0)(uae_u32 opcode) /* MOVE.B (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_103b_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 src = get_byte(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_103c_0)(uae_u32 opcode) /* MOVE.B #.B,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1080_0)(uae_u32 opcode) /* MOVE.B Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1090_0)(uae_u32 opcode) /* MOVE.B (An),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1098_0)(uae_u32 opcode) /* MOVE.B (An)+,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10a0_0)(uae_u32 opcode) /* MOVE.B -(An),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10a8_0)(uae_u32 opcode) /* MOVE.B (d16,An),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10b0_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10b8_0)(uae_u32 opcode) /* MOVE.B (xxx).W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10b9_0)(uae_u32 opcode) /* MOVE.B (xxx).L,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10ba_0)(uae_u32 opcode) /* MOVE.B (d16,PC),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10bb_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10bc_0)(uae_u32 opcode) /* MOVE.B #.B,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10c0_0)(uae_u32 opcode) /* MOVE.B Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10d0_0)(uae_u32 opcode) /* MOVE.B (An),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10d8_0)(uae_u32 opcode) /* MOVE.B (An)+,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10e0_0)(uae_u32 opcode) /* MOVE.B -(An),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10e8_0)(uae_u32 opcode) /* MOVE.B (d16,An),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10f0_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10f8_0)(uae_u32 opcode) /* MOVE.B (xxx).W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10f9_0)(uae_u32 opcode) /* MOVE.B (xxx).L,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10fa_0)(uae_u32 opcode) /* MOVE.B (d16,PC),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10fb_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10fc_0)(uae_u32 opcode) /* MOVE.B #.B,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1100_0)(uae_u32 opcode) /* MOVE.B Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1110_0)(uae_u32 opcode) /* MOVE.B (An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1118_0)(uae_u32 opcode) /* MOVE.B (An)+,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1120_0)(uae_u32 opcode) /* MOVE.B -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1128_0)(uae_u32 opcode) /* MOVE.B (d16,An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1130_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1138_0)(uae_u32 opcode) /* MOVE.B (xxx).W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1139_0)(uae_u32 opcode) /* MOVE.B (xxx).L,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_113a_0)(uae_u32 opcode) /* MOVE.B (d16,PC),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_113b_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_113c_0)(uae_u32 opcode) /* MOVE.B #.B,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1140_0)(uae_u32 opcode) /* MOVE.B Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1150_0)(uae_u32 opcode) /* MOVE.B (An),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1158_0)(uae_u32 opcode) /* MOVE.B (An)+,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1160_0)(uae_u32 opcode) /* MOVE.B -(An),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1168_0)(uae_u32 opcode) /* MOVE.B (d16,An),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1170_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1178_0)(uae_u32 opcode) /* MOVE.B (xxx).W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1179_0)(uae_u32 opcode) /* MOVE.B (xxx).L,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_117a_0)(uae_u32 opcode) /* MOVE.B (d16,PC),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_117b_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_117c_0)(uae_u32 opcode) /* MOVE.B #.B,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1180_0)(uae_u32 opcode) /* MOVE.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1190_0)(uae_u32 opcode) /* MOVE.B (An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1198_0)(uae_u32 opcode) /* MOVE.B (An)+,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11a0_0)(uae_u32 opcode) /* MOVE.B -(An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11a8_0)(uae_u32 opcode) /* MOVE.B (d16,An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11b0_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11b8_0)(uae_u32 opcode) /* MOVE.B (xxx).W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11b9_0)(uae_u32 opcode) /* MOVE.B (xxx).L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{m68k_incpc(6); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11ba_0)(uae_u32 opcode) /* MOVE.B (d16,PC),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11bb_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 src = get_byte(srca); +{{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11bc_0)(uae_u32 opcode) /* MOVE.B #.B,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11c0_0)(uae_u32 opcode) /* MOVE.B Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11d0_0)(uae_u32 opcode) /* MOVE.B (An),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11d8_0)(uae_u32 opcode) /* MOVE.B (An)+,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11e0_0)(uae_u32 opcode) /* MOVE.B -(An),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11e8_0)(uae_u32 opcode) /* MOVE.B (d16,An),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11f0_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11f8_0)(uae_u32 opcode) /* MOVE.B (xxx).W,(xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11f9_0)(uae_u32 opcode) /* MOVE.B (xxx).L,(xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11fa_0)(uae_u32 opcode) /* MOVE.B (d16,PC),(xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11fb_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(xxx).W */ +{ + cpuop_begin(); +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11fc_0)(uae_u32 opcode) /* MOVE.B #.B,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13c0_0)(uae_u32 opcode) /* MOVE.B Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13d0_0)(uae_u32 opcode) /* MOVE.B (An),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13d8_0)(uae_u32 opcode) /* MOVE.B (An)+,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uaecptr dsta = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13e0_0)(uae_u32 opcode) /* MOVE.B -(An),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13e8_0)(uae_u32 opcode) /* MOVE.B (d16,An),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13f0_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_ilong(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13f8_0)(uae_u32 opcode) /* MOVE.B (xxx).W,(xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13f9_0)(uae_u32 opcode) /* MOVE.B (xxx).L,(xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_ilong(6); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(10); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13fa_0)(uae_u32 opcode) /* MOVE.B (d16,PC),(xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13fb_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(xxx).L */ +{ + cpuop_begin(); +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_ilong(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13fc_0)(uae_u32 opcode) /* MOVE.B #.B,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2000_0)(uae_u32 opcode) /* MOVE.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2008_0)(uae_u32 opcode) /* MOVE.L An,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2010_0)(uae_u32 opcode) /* MOVE.L (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2018_0)(uae_u32 opcode) /* MOVE.L (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2020_0)(uae_u32 opcode) /* MOVE.L -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2028_0)(uae_u32 opcode) /* MOVE.L (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2030_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2038_0)(uae_u32 opcode) /* MOVE.L (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2039_0)(uae_u32 opcode) /* MOVE.L (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_203a_0)(uae_u32 opcode) /* MOVE.L (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_203b_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_203c_0)(uae_u32 opcode) /* MOVE.L #.L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}m68k_incpc(6); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_2040_0)(uae_u32 opcode) /* MOVEA.L Dn,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_u32 val = src; + m68k_areg(regs, dstreg) = (val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_2048_0)(uae_u32 opcode) /* MOVEA.L An,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uae_u32 val = src; + m68k_areg(regs, dstreg) = (val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_2050_0)(uae_u32 opcode) /* MOVEA.L (An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uae_u32 val = src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_2058_0)(uae_u32 opcode) /* MOVEA.L (An)+,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uae_u32 val = src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_2060_0)(uae_u32 opcode) /* MOVEA.L -(An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_u32 val = src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_2068_0)(uae_u32 opcode) /* MOVEA.L (d16,An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_u32 val = src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_2070_0)(uae_u32 opcode) /* MOVEA.L (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_u32 val = src; + m68k_areg(regs, dstreg) = (val); +}}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_2078_0)(uae_u32 opcode) /* MOVEA.L (xxx).W,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_u32 val = src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_2079_0)(uae_u32 opcode) /* MOVEA.L (xxx).L,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uae_u32 val = src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_207a_0)(uae_u32 opcode) /* MOVEA.L (d16,PC),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_u32 val = src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_207b_0)(uae_u32 opcode) /* MOVEA.L (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_u32 val = src; + m68k_areg(regs, dstreg) = (val); +}}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_207c_0)(uae_u32 opcode) /* MOVEA.L #.L,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_u32 val = src; + m68k_areg(regs, dstreg) = (val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_2080_0)(uae_u32 opcode) /* MOVE.L Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2088_0)(uae_u32 opcode) /* MOVE.L An,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2090_0)(uae_u32 opcode) /* MOVE.L (An),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2098_0)(uae_u32 opcode) /* MOVE.L (An)+,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20a0_0)(uae_u32 opcode) /* MOVE.L -(An),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20a8_0)(uae_u32 opcode) /* MOVE.L (d16,An),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20b0_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20b8_0)(uae_u32 opcode) /* MOVE.L (xxx).W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20b9_0)(uae_u32 opcode) /* MOVE.L (xxx).L,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20ba_0)(uae_u32 opcode) /* MOVE.L (d16,PC),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20bb_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20bc_0)(uae_u32 opcode) /* MOVE.L #.L,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20c0_0)(uae_u32 opcode) /* MOVE.L Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20c8_0)(uae_u32 opcode) /* MOVE.L An,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20d0_0)(uae_u32 opcode) /* MOVE.L (An),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20d8_0)(uae_u32 opcode) /* MOVE.L (An)+,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20e0_0)(uae_u32 opcode) /* MOVE.L -(An),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20e8_0)(uae_u32 opcode) /* MOVE.L (d16,An),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20f0_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20f8_0)(uae_u32 opcode) /* MOVE.L (xxx).W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20f9_0)(uae_u32 opcode) /* MOVE.L (xxx).L,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20fa_0)(uae_u32 opcode) /* MOVE.L (d16,PC),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20fb_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20fc_0)(uae_u32 opcode) /* MOVE.L #.L,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2100_0)(uae_u32 opcode) /* MOVE.L Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2108_0)(uae_u32 opcode) /* MOVE.L An,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2110_0)(uae_u32 opcode) /* MOVE.L (An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2118_0)(uae_u32 opcode) /* MOVE.L (An)+,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2120_0)(uae_u32 opcode) /* MOVE.L -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2128_0)(uae_u32 opcode) /* MOVE.L (d16,An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2130_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2138_0)(uae_u32 opcode) /* MOVE.L (xxx).W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2139_0)(uae_u32 opcode) /* MOVE.L (xxx).L,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_213a_0)(uae_u32 opcode) /* MOVE.L (d16,PC),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_213b_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_213c_0)(uae_u32 opcode) /* MOVE.L #.L,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2140_0)(uae_u32 opcode) /* MOVE.L Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2148_0)(uae_u32 opcode) /* MOVE.L An,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2150_0)(uae_u32 opcode) /* MOVE.L (An),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +#endif + +#ifdef PART_3 +void REGPARAM2 CPUFUNC(op_2158_0)(uae_u32 opcode) /* MOVE.L (An)+,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2160_0)(uae_u32 opcode) /* MOVE.L -(An),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2168_0)(uae_u32 opcode) /* MOVE.L (d16,An),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2170_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2178_0)(uae_u32 opcode) /* MOVE.L (xxx).W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2179_0)(uae_u32 opcode) /* MOVE.L (xxx).L,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_217a_0)(uae_u32 opcode) /* MOVE.L (d16,PC),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_217b_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_217c_0)(uae_u32 opcode) /* MOVE.L #.L,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2180_0)(uae_u32 opcode) /* MOVE.L Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2188_0)(uae_u32 opcode) /* MOVE.L An,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2190_0)(uae_u32 opcode) /* MOVE.L (An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2198_0)(uae_u32 opcode) /* MOVE.L (An)+,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21a0_0)(uae_u32 opcode) /* MOVE.L -(An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21a8_0)(uae_u32 opcode) /* MOVE.L (d16,An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21b0_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21b8_0)(uae_u32 opcode) /* MOVE.L (xxx).W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21b9_0)(uae_u32 opcode) /* MOVE.L (xxx).L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{m68k_incpc(6); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21ba_0)(uae_u32 opcode) /* MOVE.L (d16,PC),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21bb_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21bc_0)(uae_u32 opcode) /* MOVE.L #.L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{m68k_incpc(6); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21c0_0)(uae_u32 opcode) /* MOVE.L Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21c8_0)(uae_u32 opcode) /* MOVE.L An,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21d0_0)(uae_u32 opcode) /* MOVE.L (An),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21d8_0)(uae_u32 opcode) /* MOVE.L (An)+,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21e0_0)(uae_u32 opcode) /* MOVE.L -(An),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21e8_0)(uae_u32 opcode) /* MOVE.L (d16,An),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21f0_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21f8_0)(uae_u32 opcode) /* MOVE.L (xxx).W,(xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21f9_0)(uae_u32 opcode) /* MOVE.L (xxx).L,(xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21fa_0)(uae_u32 opcode) /* MOVE.L (d16,PC),(xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21fb_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(xxx).W */ +{ + cpuop_begin(); +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21fc_0)(uae_u32 opcode) /* MOVE.L #.L,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23c0_0)(uae_u32 opcode) /* MOVE.L Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23c8_0)(uae_u32 opcode) /* MOVE.L An,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23d0_0)(uae_u32 opcode) /* MOVE.L (An),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23d8_0)(uae_u32 opcode) /* MOVE.L (An)+,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uaecptr dsta = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23e0_0)(uae_u32 opcode) /* MOVE.L -(An),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23e8_0)(uae_u32 opcode) /* MOVE.L (d16,An),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23f0_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_ilong(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23f8_0)(uae_u32 opcode) /* MOVE.L (xxx).W,(xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23f9_0)(uae_u32 opcode) /* MOVE.L (xxx).L,(xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_ilong(6); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(10); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23fa_0)(uae_u32 opcode) /* MOVE.L (d16,PC),(xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23fb_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(xxx).L */ +{ + cpuop_begin(); +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_ilong(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23fc_0)(uae_u32 opcode) /* MOVE.L #.L,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = get_ilong(6); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(10); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3000_0)(uae_u32 opcode) /* MOVE.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3008_0)(uae_u32 opcode) /* MOVE.W An,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3010_0)(uae_u32 opcode) /* MOVE.W (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3018_0)(uae_u32 opcode) /* MOVE.W (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3020_0)(uae_u32 opcode) /* MOVE.W -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3028_0)(uae_u32 opcode) /* MOVE.W (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3030_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3038_0)(uae_u32 opcode) /* MOVE.W (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3039_0)(uae_u32 opcode) /* MOVE.W (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_303a_0)(uae_u32 opcode) /* MOVE.W (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_303b_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_303c_0)(uae_u32 opcode) /* MOVE.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}m68k_incpc(4); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_3040_0)(uae_u32 opcode) /* MOVEA.W Dn,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_u32 val = (uae_s32)(uae_s16)src; + m68k_areg(regs, dstreg) = (val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_3048_0)(uae_u32 opcode) /* MOVEA.W An,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ uae_u32 val = (uae_s32)(uae_s16)src; + m68k_areg(regs, dstreg) = (val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_3050_0)(uae_u32 opcode) /* MOVEA.W (An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_u32 val = (uae_s32)(uae_s16)src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_3058_0)(uae_u32 opcode) /* MOVEA.W (An)+,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_u32 val = (uae_s32)(uae_s16)src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_3060_0)(uae_u32 opcode) /* MOVEA.W -(An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_u32 val = (uae_s32)(uae_s16)src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_3068_0)(uae_u32 opcode) /* MOVEA.W (d16,An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_u32 val = (uae_s32)(uae_s16)src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_3070_0)(uae_u32 opcode) /* MOVEA.W (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_u32 val = (uae_s32)(uae_s16)src; + m68k_areg(regs, dstreg) = (val); +}}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_3078_0)(uae_u32 opcode) /* MOVEA.W (xxx).W,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_u32 val = (uae_s32)(uae_s16)src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_3079_0)(uae_u32 opcode) /* MOVEA.W (xxx).L,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_u32 val = (uae_s32)(uae_s16)src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_307a_0)(uae_u32 opcode) /* MOVEA.W (d16,PC),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_u32 val = (uae_s32)(uae_s16)src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_307b_0)(uae_u32 opcode) /* MOVEA.W (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_u32 val = (uae_s32)(uae_s16)src; + m68k_areg(regs, dstreg) = (val); +}}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_307c_0)(uae_u32 opcode) /* MOVEA.W #.W,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_u32 val = (uae_s32)(uae_s16)src; + m68k_areg(regs, dstreg) = (val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_3080_0)(uae_u32 opcode) /* MOVE.W Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3088_0)(uae_u32 opcode) /* MOVE.W An,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3090_0)(uae_u32 opcode) /* MOVE.W (An),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3098_0)(uae_u32 opcode) /* MOVE.W (An)+,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30a0_0)(uae_u32 opcode) /* MOVE.W -(An),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30a8_0)(uae_u32 opcode) /* MOVE.W (d16,An),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30b0_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30b8_0)(uae_u32 opcode) /* MOVE.W (xxx).W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30b9_0)(uae_u32 opcode) /* MOVE.W (xxx).L,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30ba_0)(uae_u32 opcode) /* MOVE.W (d16,PC),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30bb_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30bc_0)(uae_u32 opcode) /* MOVE.W #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30c0_0)(uae_u32 opcode) /* MOVE.W Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30c8_0)(uae_u32 opcode) /* MOVE.W An,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30d0_0)(uae_u32 opcode) /* MOVE.W (An),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30d8_0)(uae_u32 opcode) /* MOVE.W (An)+,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30e0_0)(uae_u32 opcode) /* MOVE.W -(An),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30e8_0)(uae_u32 opcode) /* MOVE.W (d16,An),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30f0_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30f8_0)(uae_u32 opcode) /* MOVE.W (xxx).W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30f9_0)(uae_u32 opcode) /* MOVE.W (xxx).L,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30fa_0)(uae_u32 opcode) /* MOVE.W (d16,PC),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30fb_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30fc_0)(uae_u32 opcode) /* MOVE.W #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3100_0)(uae_u32 opcode) /* MOVE.W Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3108_0)(uae_u32 opcode) /* MOVE.W An,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3110_0)(uae_u32 opcode) /* MOVE.W (An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3118_0)(uae_u32 opcode) /* MOVE.W (An)+,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3120_0)(uae_u32 opcode) /* MOVE.W -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3128_0)(uae_u32 opcode) /* MOVE.W (d16,An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3130_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3138_0)(uae_u32 opcode) /* MOVE.W (xxx).W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3139_0)(uae_u32 opcode) /* MOVE.W (xxx).L,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_313a_0)(uae_u32 opcode) /* MOVE.W (d16,PC),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_313b_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_313c_0)(uae_u32 opcode) /* MOVE.W #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3140_0)(uae_u32 opcode) /* MOVE.W Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3148_0)(uae_u32 opcode) /* MOVE.W An,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3150_0)(uae_u32 opcode) /* MOVE.W (An),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3158_0)(uae_u32 opcode) /* MOVE.W (An)+,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3160_0)(uae_u32 opcode) /* MOVE.W -(An),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3168_0)(uae_u32 opcode) /* MOVE.W (d16,An),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3170_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3178_0)(uae_u32 opcode) /* MOVE.W (xxx).W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3179_0)(uae_u32 opcode) /* MOVE.W (xxx).L,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_317a_0)(uae_u32 opcode) /* MOVE.W (d16,PC),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_317b_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_317c_0)(uae_u32 opcode) /* MOVE.W #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3180_0)(uae_u32 opcode) /* MOVE.W Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3188_0)(uae_u32 opcode) /* MOVE.W An,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3190_0)(uae_u32 opcode) /* MOVE.W (An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3198_0)(uae_u32 opcode) /* MOVE.W (An)+,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31a0_0)(uae_u32 opcode) /* MOVE.W -(An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31a8_0)(uae_u32 opcode) /* MOVE.W (d16,An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31b0_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31b8_0)(uae_u32 opcode) /* MOVE.W (xxx).W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31b9_0)(uae_u32 opcode) /* MOVE.W (xxx).L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{m68k_incpc(6); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31ba_0)(uae_u32 opcode) /* MOVE.W (d16,PC),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31bb_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31bc_0)(uae_u32 opcode) /* MOVE.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31c0_0)(uae_u32 opcode) /* MOVE.W Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31c8_0)(uae_u32 opcode) /* MOVE.W An,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31d0_0)(uae_u32 opcode) /* MOVE.W (An),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31d8_0)(uae_u32 opcode) /* MOVE.W (An)+,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31e0_0)(uae_u32 opcode) /* MOVE.W -(An),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31e8_0)(uae_u32 opcode) /* MOVE.W (d16,An),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31f0_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31f8_0)(uae_u32 opcode) /* MOVE.W (xxx).W,(xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31f9_0)(uae_u32 opcode) /* MOVE.W (xxx).L,(xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31fa_0)(uae_u32 opcode) /* MOVE.W (d16,PC),(xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31fb_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(xxx).W */ +{ + cpuop_begin(); +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31fc_0)(uae_u32 opcode) /* MOVE.W #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_33c0_0)(uae_u32 opcode) /* MOVE.W Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_33c8_0)(uae_u32 opcode) /* MOVE.W An,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_33d0_0)(uae_u32 opcode) /* MOVE.W (An),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_33d8_0)(uae_u32 opcode) /* MOVE.W (An)+,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uaecptr dsta = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_33e0_0)(uae_u32 opcode) /* MOVE.W -(An),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_33e8_0)(uae_u32 opcode) /* MOVE.W (d16,An),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_33f0_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_ilong(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_33f8_0)(uae_u32 opcode) /* MOVE.W (xxx).W,(xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_33f9_0)(uae_u32 opcode) /* MOVE.W (xxx).L,(xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_ilong(6); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(10); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_33fa_0)(uae_u32 opcode) /* MOVE.W (d16,PC),(xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_33fb_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(xxx).L */ +{ + cpuop_begin(); +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_ilong(0); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_33fc_0)(uae_u32 opcode) /* MOVE.W #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4000_0)(uae_u32 opcode) /* NEGX.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((newv) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4010_0)(uae_u32 opcode) /* NEGX.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4018_0)(uae_u32 opcode) /* NEGX.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4020_0)(uae_u32 opcode) /* NEGX.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4028_0)(uae_u32 opcode) /* NEGX.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4030_0)(uae_u32 opcode) /* NEGX.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4038_0)(uae_u32 opcode) /* NEGX.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4039_0)(uae_u32 opcode) /* NEGX.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4040_0)(uae_u32 opcode) /* NEGX.W Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); + SET_NFLG (((uae_s16)(newv)) < 0); + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((newv) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4050_0)(uae_u32 opcode) /* NEGX.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); + SET_NFLG (((uae_s16)(newv)) < 0); + put_word(srca,newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4058_0)(uae_u32 opcode) /* NEGX.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); + SET_NFLG (((uae_s16)(newv)) < 0); + put_word(srca,newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4060_0)(uae_u32 opcode) /* NEGX.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); + SET_NFLG (((uae_s16)(newv)) < 0); + put_word(srca,newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4068_0)(uae_u32 opcode) /* NEGX.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); + SET_NFLG (((uae_s16)(newv)) < 0); + put_word(srca,newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4070_0)(uae_u32 opcode) /* NEGX.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); + SET_NFLG (((uae_s16)(newv)) < 0); + put_word(srca,newv); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4078_0)(uae_u32 opcode) /* NEGX.W (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); + SET_NFLG (((uae_s16)(newv)) < 0); + put_word(srca,newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4079_0)(uae_u32 opcode) /* NEGX.W (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); + SET_NFLG (((uae_s16)(newv)) < 0); + put_word(srca,newv); +}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4080_0)(uae_u32 opcode) /* NEGX.L Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, srcreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4090_0)(uae_u32 opcode) /* NEGX.L (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); + SET_NFLG (((uae_s32)(newv)) < 0); + put_long(srca,newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4098_0)(uae_u32 opcode) /* NEGX.L (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); + SET_NFLG (((uae_s32)(newv)) < 0); + put_long(srca,newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_40a0_0)(uae_u32 opcode) /* NEGX.L -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); + SET_NFLG (((uae_s32)(newv)) < 0); + put_long(srca,newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_40a8_0)(uae_u32 opcode) /* NEGX.L (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); + SET_NFLG (((uae_s32)(newv)) < 0); + put_long(srca,newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_40b0_0)(uae_u32 opcode) /* NEGX.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); + SET_NFLG (((uae_s32)(newv)) < 0); + put_long(srca,newv); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_40b8_0)(uae_u32 opcode) /* NEGX.L (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); + SET_NFLG (((uae_s32)(newv)) < 0); + put_long(srca,newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_40b9_0)(uae_u32 opcode) /* NEGX.L (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); + SET_NFLG (((uae_s32)(newv)) < 0); + put_long(srca,newv); +}}}}}m68k_incpc(6); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40c0_0)(uae_u32 opcode) /* MVSR2.W Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel645; } +{{ MakeSR(); + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((regs.sr) & 0xffff); +}}}m68k_incpc(2); +endlabel645: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40d0_0)(uae_u32 opcode) /* MVSR2.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel646; } +{{ uaecptr srca = m68k_areg(regs, srcreg); + MakeSR(); + put_word(srca,regs.sr); +}}}m68k_incpc(2); +endlabel646: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40d8_0)(uae_u32 opcode) /* MVSR2.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel647; } +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += 2; + MakeSR(); + put_word(srca,regs.sr); +}}}m68k_incpc(2); +endlabel647: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40e0_0)(uae_u32 opcode) /* MVSR2.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel648; } +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; + m68k_areg (regs, srcreg) = srca; + MakeSR(); + put_word(srca,regs.sr); +}}}m68k_incpc(2); +endlabel648: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40e8_0)(uae_u32 opcode) /* MVSR2.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel649; } +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); + MakeSR(); + put_word(srca,regs.sr); +}}}m68k_incpc(4); +endlabel649: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40f0_0)(uae_u32 opcode) /* MVSR2.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel650; } +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); + MakeSR(); + put_word(srca,regs.sr); +}}}}endlabel650: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40f8_0)(uae_u32 opcode) /* MVSR2.W (xxx).W */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel651; } +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); + MakeSR(); + put_word(srca,regs.sr); +}}}m68k_incpc(4); +endlabel651: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40f9_0)(uae_u32 opcode) /* MVSR2.W (xxx).L */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel652; } +{{ uaecptr srca = get_ilong(2); + MakeSR(); + put_word(srca,regs.sr); +}}}m68k_incpc(6); +endlabel652: ; + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_4100_0)(uae_u32 opcode) /* CHK.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel653; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel653; } +}}}m68k_incpc(2); +endlabel653: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4110_0)(uae_u32 opcode) /* CHK.L (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel654; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel654; } +}}}}m68k_incpc(2); +endlabel654: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4118_0)(uae_u32 opcode) /* CHK.L (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel655; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel655; } +}}}}m68k_incpc(2); +endlabel655: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4120_0)(uae_u32 opcode) /* CHK.L -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel656; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel656; } +}}}}m68k_incpc(2); +endlabel656: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4128_0)(uae_u32 opcode) /* CHK.L (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel657; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel657; } +}}}}m68k_incpc(4); +endlabel657: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4130_0)(uae_u32 opcode) /* CHK.L (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel658; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel658; } +}}}}}endlabel658: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4138_0)(uae_u32 opcode) /* CHK.L (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel659; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel659; } +}}}}m68k_incpc(4); +endlabel659: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4139_0)(uae_u32 opcode) /* CHK.L (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel660; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel660; } +}}}}m68k_incpc(6); +endlabel660: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_413a_0)(uae_u32 opcode) /* CHK.L (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel661; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel661; } +}}}}m68k_incpc(4); +endlabel661: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_413b_0)(uae_u32 opcode) /* CHK.L (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel662; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel662; } +}}}}}endlabel662: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_413c_0)(uae_u32 opcode) /* CHK.L #.L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel663; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel663; } +}}}m68k_incpc(6); +endlabel663: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4180_0)(uae_u32 opcode) /* CHK.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel664; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel664; } +}}}m68k_incpc(2); +endlabel664: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4190_0)(uae_u32 opcode) /* CHK.W (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel665; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel665; } +}}}}m68k_incpc(2); +endlabel665: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4198_0)(uae_u32 opcode) /* CHK.W (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_s16 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel666; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel666; } +}}}}m68k_incpc(2); +endlabel666: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_41a0_0)(uae_u32 opcode) /* CHK.W -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s16 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel667; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel667; } +}}}}m68k_incpc(2); +endlabel667: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_41a8_0)(uae_u32 opcode) /* CHK.W (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel668; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel668; } +}}}}m68k_incpc(4); +endlabel668: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_41b0_0)(uae_u32 opcode) /* CHK.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel669; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel669; } +}}}}}endlabel669: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_41b8_0)(uae_u32 opcode) /* CHK.W (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel670; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel670; } +}}}}m68k_incpc(4); +endlabel670: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_41b9_0)(uae_u32 opcode) /* CHK.W (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel671; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel671; } +}}}}m68k_incpc(6); +endlabel671: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_41ba_0)(uae_u32 opcode) /* CHK.W (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel672; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel672; } +}}}}m68k_incpc(4); +endlabel672: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_41bb_0)(uae_u32 opcode) /* CHK.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel673; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel673; } +}}}}}endlabel673: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_41bc_0)(uae_u32 opcode) /* CHK.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 src = get_iword(2); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel674; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel674; } +}}}m68k_incpc(4); +endlabel674: ; + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_41d0_0)(uae_u32 opcode) /* LEA.L (An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ m68k_areg(regs, dstreg) = (srca); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_41e8_0)(uae_u32 opcode) /* LEA.L (d16,An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ m68k_areg(regs, dstreg) = (srca); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_41f0_0)(uae_u32 opcode) /* LEA.L (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ m68k_areg(regs, dstreg) = (srca); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_41f8_0)(uae_u32 opcode) /* LEA.L (xxx).W,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ m68k_areg(regs, dstreg) = (srca); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_41f9_0)(uae_u32 opcode) /* LEA.L (xxx).L,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ m68k_areg(regs, dstreg) = (srca); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_41fa_0)(uae_u32 opcode) /* LEA.L (d16,PC),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ m68k_areg(regs, dstreg) = (srca); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_41fb_0)(uae_u32 opcode) /* LEA.L (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ m68k_areg(regs, dstreg) = (srca); +}}}} cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_4200_0)(uae_u32 opcode) /* CLR.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ CLEAR_CZNV; + SET_ZFLG (((uae_s8)(0)) == 0); + SET_NFLG (((uae_s8)(0)) < 0); + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((0) & 0xff); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4210_0)(uae_u32 opcode) /* CLR.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(0)) == 0); + SET_NFLG (((uae_s8)(0)) < 0); + put_byte(srca,0); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4218_0)(uae_u32 opcode) /* CLR.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(0)) == 0); + SET_NFLG (((uae_s8)(0)) < 0); + put_byte(srca,0); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4220_0)(uae_u32 opcode) /* CLR.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(0)) == 0); + SET_NFLG (((uae_s8)(0)) < 0); + put_byte(srca,0); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4228_0)(uae_u32 opcode) /* CLR.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(0)) == 0); + SET_NFLG (((uae_s8)(0)) < 0); + put_byte(srca,0); +}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4230_0)(uae_u32 opcode) /* CLR.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(0)) == 0); + SET_NFLG (((uae_s8)(0)) < 0); + put_byte(srca,0); +}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4238_0)(uae_u32 opcode) /* CLR.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(0)) == 0); + SET_NFLG (((uae_s8)(0)) < 0); + put_byte(srca,0); +}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4239_0)(uae_u32 opcode) /* CLR.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(0)) == 0); + SET_NFLG (((uae_s8)(0)) < 0); + put_byte(srca,0); +}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4240_0)(uae_u32 opcode) /* CLR.W Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(0)) == 0); + SET_NFLG (((uae_s16)(0)) < 0); + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((0) & 0xffff); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4250_0)(uae_u32 opcode) /* CLR.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(0)) == 0); + SET_NFLG (((uae_s16)(0)) < 0); + put_word(srca,0); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4258_0)(uae_u32 opcode) /* CLR.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(0)) == 0); + SET_NFLG (((uae_s16)(0)) < 0); + put_word(srca,0); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4260_0)(uae_u32 opcode) /* CLR.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; + m68k_areg (regs, srcreg) = srca; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(0)) == 0); + SET_NFLG (((uae_s16)(0)) < 0); + put_word(srca,0); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4268_0)(uae_u32 opcode) /* CLR.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(0)) == 0); + SET_NFLG (((uae_s16)(0)) < 0); + put_word(srca,0); +}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4270_0)(uae_u32 opcode) /* CLR.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(0)) == 0); + SET_NFLG (((uae_s16)(0)) < 0); + put_word(srca,0); +}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4278_0)(uae_u32 opcode) /* CLR.W (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(0)) == 0); + SET_NFLG (((uae_s16)(0)) < 0); + put_word(srca,0); +}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4279_0)(uae_u32 opcode) /* CLR.W (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(0)) == 0); + SET_NFLG (((uae_s16)(0)) < 0); + put_word(srca,0); +}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4280_0)(uae_u32 opcode) /* CLR.L Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(0)) == 0); + SET_NFLG (((uae_s32)(0)) < 0); + m68k_dreg(regs, srcreg) = (0); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4290_0)(uae_u32 opcode) /* CLR.L (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(0)) == 0); + SET_NFLG (((uae_s32)(0)) < 0); + put_long(srca,0); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4298_0)(uae_u32 opcode) /* CLR.L (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(0)) == 0); + SET_NFLG (((uae_s32)(0)) < 0); + put_long(srca,0); +}}m68k_incpc(2); + cpuop_end(); +} +#endif + +#ifdef PART_4 +void REGPARAM2 CPUFUNC(op_42a0_0)(uae_u32 opcode) /* CLR.L -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; + m68k_areg (regs, srcreg) = srca; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(0)) == 0); + SET_NFLG (((uae_s32)(0)) < 0); + put_long(srca,0); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_42a8_0)(uae_u32 opcode) /* CLR.L (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(0)) == 0); + SET_NFLG (((uae_s32)(0)) < 0); + put_long(srca,0); +}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_42b0_0)(uae_u32 opcode) /* CLR.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(0)) == 0); + SET_NFLG (((uae_s32)(0)) < 0); + put_long(srca,0); +}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_42b8_0)(uae_u32 opcode) /* CLR.L (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(0)) == 0); + SET_NFLG (((uae_s32)(0)) < 0); + put_long(srca,0); +}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_42b9_0)(uae_u32 opcode) /* CLR.L (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(0)) == 0); + SET_NFLG (((uae_s32)(0)) < 0); + put_long(srca,0); +}}m68k_incpc(6); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_42c0_0)(uae_u32 opcode) /* MVSR2.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ MakeSR(); + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((regs.sr & 0xff) & 0xffff); +}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_42d0_0)(uae_u32 opcode) /* MVSR2.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + MakeSR(); + put_word(srca,regs.sr & 0xff); +}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_42d8_0)(uae_u32 opcode) /* MVSR2.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += 2; + MakeSR(); + put_word(srca,regs.sr & 0xff); +}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_42e0_0)(uae_u32 opcode) /* MVSR2.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; + m68k_areg (regs, srcreg) = srca; + MakeSR(); + put_word(srca,regs.sr & 0xff); +}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_42e8_0)(uae_u32 opcode) /* MVSR2.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); + MakeSR(); + put_word(srca,regs.sr & 0xff); +}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_42f0_0)(uae_u32 opcode) /* MVSR2.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); + MakeSR(); + put_word(srca,regs.sr & 0xff); +}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_42f8_0)(uae_u32 opcode) /* MVSR2.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); + MakeSR(); + put_word(srca,regs.sr & 0xff); +}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_42f9_0)(uae_u32 opcode) /* MVSR2.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); + MakeSR(); + put_word(srca,regs.sr & 0xff); +}}m68k_incpc(6); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_4400_0)(uae_u32 opcode) /* NEG.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(dst)) < 0; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((dst) & 0xff); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4410_0)(uae_u32 opcode) /* NEG.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(dst)) < 0; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(srca,dst); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4418_0)(uae_u32 opcode) /* NEG.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(dst)) < 0; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(srca,dst); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4420_0)(uae_u32 opcode) /* NEG.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(dst)) < 0; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(srca,dst); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4428_0)(uae_u32 opcode) /* NEG.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(dst)) < 0; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(srca,dst); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4430_0)(uae_u32 opcode) /* NEG.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(dst)) < 0; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(srca,dst); +}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4438_0)(uae_u32 opcode) /* NEG.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(dst)) < 0; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(srca,dst); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4439_0)(uae_u32 opcode) /* NEG.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(dst)) < 0; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(srca,dst); +}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4440_0)(uae_u32 opcode) /* NEG.W Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(dst)) < 0; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((dst) & 0xffff); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4450_0)(uae_u32 opcode) /* NEG.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(dst)) < 0; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(srca,dst); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4458_0)(uae_u32 opcode) /* NEG.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(dst)) < 0; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(srca,dst); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4460_0)(uae_u32 opcode) /* NEG.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(dst)) < 0; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(srca,dst); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4468_0)(uae_u32 opcode) /* NEG.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(dst)) < 0; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(srca,dst); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4470_0)(uae_u32 opcode) /* NEG.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(dst)) < 0; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(srca,dst); +}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4478_0)(uae_u32 opcode) /* NEG.W (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(dst)) < 0; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(srca,dst); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4479_0)(uae_u32 opcode) /* NEG.W (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(dst)) < 0; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(srca,dst); +}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4480_0)(uae_u32 opcode) /* NEG.L Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(dst)) < 0; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, srcreg) = (dst); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4490_0)(uae_u32 opcode) /* NEG.L (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(dst)) < 0; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(srca,dst); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4498_0)(uae_u32 opcode) /* NEG.L (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(dst)) < 0; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(srca,dst); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44a0_0)(uae_u32 opcode) /* NEG.L -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(dst)) < 0; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(srca,dst); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44a8_0)(uae_u32 opcode) /* NEG.L (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(dst)) < 0; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(srca,dst); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44b0_0)(uae_u32 opcode) /* NEG.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(dst)) < 0; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(srca,dst); +}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44b8_0)(uae_u32 opcode) /* NEG.L (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(dst)) < 0; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(srca,dst); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44b9_0)(uae_u32 opcode) /* NEG.L (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(dst)) < 0; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(srca,dst); +}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44c0_0)(uae_u32 opcode) /* MV2SR.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); + MakeSR(); + regs.sr &= 0xFF00; + regs.sr |= src & 0xFF; + MakeFromSR(); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44d0_0)(uae_u32 opcode) /* MV2SR.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + MakeSR(); + regs.sr &= 0xFF00; + regs.sr |= src & 0xFF; + MakeFromSR(); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44d8_0)(uae_u32 opcode) /* MV2SR.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; + MakeSR(); + regs.sr &= 0xFF00; + regs.sr |= src & 0xFF; + MakeFromSR(); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44e0_0)(uae_u32 opcode) /* MV2SR.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; + MakeSR(); + regs.sr &= 0xFF00; + regs.sr |= src & 0xFF; + MakeFromSR(); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44e8_0)(uae_u32 opcode) /* MV2SR.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); + MakeSR(); + regs.sr &= 0xFF00; + regs.sr |= src & 0xFF; + MakeFromSR(); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44f0_0)(uae_u32 opcode) /* MV2SR.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); + MakeSR(); + regs.sr &= 0xFF00; + regs.sr |= src & 0xFF; + MakeFromSR(); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44f8_0)(uae_u32 opcode) /* MV2SR.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); + MakeSR(); + regs.sr &= 0xFF00; + regs.sr |= src & 0xFF; + MakeFromSR(); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44f9_0)(uae_u32 opcode) /* MV2SR.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); + MakeSR(); + regs.sr &= 0xFF00; + regs.sr |= src & 0xFF; + MakeFromSR(); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44fa_0)(uae_u32 opcode) /* MV2SR.B (d16,PC) */ +{ + cpuop_begin(); +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); + MakeSR(); + regs.sr &= 0xFF00; + regs.sr |= src & 0xFF; + MakeFromSR(); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44fb_0)(uae_u32 opcode) /* MV2SR.B (d8,PC,Xn) */ +{ + cpuop_begin(); +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); + MakeSR(); + regs.sr &= 0xFF00; + regs.sr |= src & 0xFF; + MakeFromSR(); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44fc_0)(uae_u32 opcode) /* MV2SR.B #.B */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + MakeSR(); + regs.sr &= 0xFF00; + regs.sr |= src & 0xFF; + MakeFromSR(); +}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4600_0)(uae_u32 opcode) /* NOT.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_NFLG (((uae_s8)(dst)) < 0); + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((dst) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4610_0)(uae_u32 opcode) /* NOT.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_NFLG (((uae_s8)(dst)) < 0); + put_byte(srca,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4618_0)(uae_u32 opcode) /* NOT.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_NFLG (((uae_s8)(dst)) < 0); + put_byte(srca,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4620_0)(uae_u32 opcode) /* NOT.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_NFLG (((uae_s8)(dst)) < 0); + put_byte(srca,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4628_0)(uae_u32 opcode) /* NOT.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_NFLG (((uae_s8)(dst)) < 0); + put_byte(srca,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4630_0)(uae_u32 opcode) /* NOT.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_NFLG (((uae_s8)(dst)) < 0); + put_byte(srca,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4638_0)(uae_u32 opcode) /* NOT.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_NFLG (((uae_s8)(dst)) < 0); + put_byte(srca,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4639_0)(uae_u32 opcode) /* NOT.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_NFLG (((uae_s8)(dst)) < 0); + put_byte(srca,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4640_0)(uae_u32 opcode) /* NOT.W Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_NFLG (((uae_s16)(dst)) < 0); + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((dst) & 0xffff); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4650_0)(uae_u32 opcode) /* NOT.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_NFLG (((uae_s16)(dst)) < 0); + put_word(srca,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4658_0)(uae_u32 opcode) /* NOT.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_NFLG (((uae_s16)(dst)) < 0); + put_word(srca,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4660_0)(uae_u32 opcode) /* NOT.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_NFLG (((uae_s16)(dst)) < 0); + put_word(srca,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4668_0)(uae_u32 opcode) /* NOT.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_NFLG (((uae_s16)(dst)) < 0); + put_word(srca,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4670_0)(uae_u32 opcode) /* NOT.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_NFLG (((uae_s16)(dst)) < 0); + put_word(srca,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4678_0)(uae_u32 opcode) /* NOT.W (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_NFLG (((uae_s16)(dst)) < 0); + put_word(srca,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4679_0)(uae_u32 opcode) /* NOT.W (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_NFLG (((uae_s16)(dst)) < 0); + put_word(srca,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4680_0)(uae_u32 opcode) /* NOT.L Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_NFLG (((uae_s32)(dst)) < 0); + m68k_dreg(regs, srcreg) = (dst); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4690_0)(uae_u32 opcode) /* NOT.L (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_NFLG (((uae_s32)(dst)) < 0); + put_long(srca,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4698_0)(uae_u32 opcode) /* NOT.L (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_NFLG (((uae_s32)(dst)) < 0); + put_long(srca,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46a0_0)(uae_u32 opcode) /* NOT.L -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_NFLG (((uae_s32)(dst)) < 0); + put_long(srca,dst); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46a8_0)(uae_u32 opcode) /* NOT.L (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_NFLG (((uae_s32)(dst)) < 0); + put_long(srca,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46b0_0)(uae_u32 opcode) /* NOT.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_NFLG (((uae_s32)(dst)) < 0); + put_long(srca,dst); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46b8_0)(uae_u32 opcode) /* NOT.L (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_NFLG (((uae_s32)(dst)) < 0); + put_long(srca,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46b9_0)(uae_u32 opcode) /* NOT.L (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_NFLG (((uae_s32)(dst)) < 0); + put_long(srca,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46c0_0)(uae_u32 opcode) /* MV2SR.W Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel773; } +{{ uae_s16 src = m68k_dreg(regs, srcreg); + regs.sr = src; + MakeFromSR(); +}}}m68k_incpc(2); +endlabel773: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46d0_0)(uae_u32 opcode) /* MV2SR.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel774; } +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + regs.sr = src; + MakeFromSR(); +}}}}m68k_incpc(2); +endlabel774: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46d8_0)(uae_u32 opcode) /* MV2SR.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel775; } +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; + regs.sr = src; + MakeFromSR(); +}}}}m68k_incpc(2); +endlabel775: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46e0_0)(uae_u32 opcode) /* MV2SR.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel776; } +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; + regs.sr = src; + MakeFromSR(); +}}}}m68k_incpc(2); +endlabel776: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46e8_0)(uae_u32 opcode) /* MV2SR.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel777; } +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); + regs.sr = src; + MakeFromSR(); +}}}}m68k_incpc(4); +endlabel777: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46f0_0)(uae_u32 opcode) /* MV2SR.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel778; } +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); + regs.sr = src; + MakeFromSR(); +}}}}}endlabel778: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46f8_0)(uae_u32 opcode) /* MV2SR.W (xxx).W */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel779; } +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); + regs.sr = src; + MakeFromSR(); +}}}}m68k_incpc(4); +endlabel779: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46f9_0)(uae_u32 opcode) /* MV2SR.W (xxx).L */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel780; } +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); + regs.sr = src; + MakeFromSR(); +}}}}m68k_incpc(6); +endlabel780: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46fa_0)(uae_u32 opcode) /* MV2SR.W (d16,PC) */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel781; } +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); + regs.sr = src; + MakeFromSR(); +}}}}m68k_incpc(4); +endlabel781: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46fb_0)(uae_u32 opcode) /* MV2SR.W (d8,PC,Xn) */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel782; } +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); + regs.sr = src; + MakeFromSR(); +}}}}}endlabel782: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46fc_0)(uae_u32 opcode) /* MV2SR.W #.W */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel783; } +{{ uae_s16 src = get_iword(2); + regs.sr = src; + MakeFromSR(); +}}}m68k_incpc(4); +endlabel783: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4800_0)(uae_u32 opcode) /* NBCD.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((newv) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4808_0)(uae_u32 opcode) /* LINK.L An,#.L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr olda = m68k_areg(regs, 7) - 4; + m68k_areg (regs, 7) = olda; +{ uae_s32 src = m68k_areg(regs, srcreg); + put_long(olda,src); + m68k_areg(regs, srcreg) = (m68k_areg(regs, 7)); +{ uae_s32 offs = get_ilong(2); + m68k_areg(regs, 7) += offs; +}}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_4810_0)(uae_u32 opcode) /* NBCD.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + put_byte(srca,newv); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4818_0)(uae_u32 opcode) /* NBCD.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + put_byte(srca,newv); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4820_0)(uae_u32 opcode) /* NBCD.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + put_byte(srca,newv); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4828_0)(uae_u32 opcode) /* NBCD.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + put_byte(srca,newv); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4830_0)(uae_u32 opcode) /* NBCD.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + put_byte(srca,newv); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4838_0)(uae_u32 opcode) /* NBCD.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + put_byte(srca,newv); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4839_0)(uae_u32 opcode) /* NBCD.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + put_byte(srca,newv); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4840_0)(uae_u32 opcode) /* SWAP.W Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_u32 dst = ((src >> 16)&0xFFFF) | ((src&0xFFFF)<<16); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_NFLG (((uae_s32)(dst)) < 0); + m68k_dreg(regs, srcreg) = (dst); +}}}m68k_incpc(2); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4848_0)(uae_u32 opcode) /* BKPT.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{m68k_incpc(2); + op_illg(opcode); +} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4850_0)(uae_u32 opcode) /* PEA.L (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, 7) - 4; + m68k_areg (regs, 7) = dsta; + put_long(dsta,srca); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4868_0)(uae_u32 opcode) /* PEA.L (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uaecptr dsta = m68k_areg(regs, 7) - 4; + m68k_areg (regs, 7) = dsta; + put_long(dsta,srca); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4870_0)(uae_u32 opcode) /* PEA.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uaecptr dsta = m68k_areg(regs, 7) - 4; + m68k_areg (regs, 7) = dsta; + put_long(dsta,srca); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4878_0)(uae_u32 opcode) /* PEA.L (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uaecptr dsta = m68k_areg(regs, 7) - 4; + m68k_areg (regs, 7) = dsta; + put_long(dsta,srca); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4879_0)(uae_u32 opcode) /* PEA.L (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uaecptr dsta = m68k_areg(regs, 7) - 4; + m68k_areg (regs, 7) = dsta; + put_long(dsta,srca); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_487a_0)(uae_u32 opcode) /* PEA.L (d16,PC) */ +{ + cpuop_begin(); +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uaecptr dsta = m68k_areg(regs, 7) - 4; + m68k_areg (regs, 7) = dsta; + put_long(dsta,srca); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_487b_0)(uae_u32 opcode) /* PEA.L (d8,PC,Xn) */ +{ + cpuop_begin(); +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uaecptr dsta = m68k_areg(regs, 7) - 4; + m68k_areg (regs, 7) = dsta; + put_long(dsta,srca); +}}}} cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_4880_0)(uae_u32 opcode) /* EXT.W Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_u16 dst = (uae_s16)(uae_s8)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_NFLG (((uae_s16)(dst)) < 0); + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((dst) & 0xffff); +}}}m68k_incpc(2); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4890_0)(uae_u32 opcode) /* MVMLE.W #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); +{ uaecptr srca = m68k_areg(regs, dstreg); +{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; + while (dmask) { put_word(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 2; dmask = movem_next[dmask]; } + while (amask) { put_word(srca, m68k_areg(regs, movem_index1[amask])); srca += 2; amask = movem_next[amask]; } +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_48a0_0)(uae_u32 opcode) /* MVMLE.W #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); +{ uaecptr srca = m68k_areg(regs, dstreg) - 0; +{ uae_u16 amask = mask & 0xff, dmask = (mask >> 8) & 0xff; + while (amask) { srca -= 2; put_word(srca, m68k_areg(regs, movem_index2[amask])); amask = movem_next[amask]; } + while (dmask) { srca -= 2; put_word(srca, m68k_dreg(regs, movem_index2[dmask])); dmask = movem_next[dmask]; } + m68k_areg(regs, dstreg) = srca; +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_48a8_0)(uae_u32 opcode) /* MVMLE.W #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); +{ uaecptr srca = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; + while (dmask) { put_word(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 2; dmask = movem_next[dmask]; } + while (amask) { put_word(srca, m68k_areg(regs, movem_index1[amask])); srca += 2; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_48b0_0)(uae_u32 opcode) /* MVMLE.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); +{m68k_incpc(4); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; + while (dmask) { put_word(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 2; dmask = movem_next[dmask]; } + while (amask) { put_word(srca, m68k_areg(regs, movem_index1[amask])); srca += 2; amask = movem_next[amask]; } +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_48b8_0)(uae_u32 opcode) /* MVMLE.W #.W,(xxx).W */ +{ + cpuop_begin(); +{ uae_u16 mask = get_iword(2); +{ uaecptr srca = (uae_s32)(uae_s16)get_iword(4); +{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; + while (dmask) { put_word(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 2; dmask = movem_next[dmask]; } + while (amask) { put_word(srca, m68k_areg(regs, movem_index1[amask])); srca += 2; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_48b9_0)(uae_u32 opcode) /* MVMLE.W #.W,(xxx).L */ +{ + cpuop_begin(); +{ uae_u16 mask = get_iword(2); +{ uaecptr srca = get_ilong(4); +{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; + while (dmask) { put_word(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 2; dmask = movem_next[dmask]; } + while (amask) { put_word(srca, m68k_areg(regs, movem_index1[amask])); srca += 2; amask = movem_next[amask]; } +}}}m68k_incpc(8); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_48c0_0)(uae_u32 opcode) /* EXT.L Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_u32 dst = (uae_s32)(uae_s16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_NFLG (((uae_s32)(dst)) < 0); + m68k_dreg(regs, srcreg) = (dst); +}}}m68k_incpc(2); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_48d0_0)(uae_u32 opcode) /* MVMLE.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); +{ uaecptr srca = m68k_areg(regs, dstreg); +{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; + while (dmask) { put_long(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 4; dmask = movem_next[dmask]; } + while (amask) { put_long(srca, m68k_areg(regs, movem_index1[amask])); srca += 4; amask = movem_next[amask]; } +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_48e0_0)(uae_u32 opcode) /* MVMLE.L #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); +{ uaecptr srca = m68k_areg(regs, dstreg) - 0; +{ uae_u16 amask = mask & 0xff, dmask = (mask >> 8) & 0xff; + while (amask) { srca -= 4; put_long(srca, m68k_areg(regs, movem_index2[amask])); amask = movem_next[amask]; } + while (dmask) { srca -= 4; put_long(srca, m68k_dreg(regs, movem_index2[dmask])); dmask = movem_next[dmask]; } + m68k_areg(regs, dstreg) = srca; +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_48e8_0)(uae_u32 opcode) /* MVMLE.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); +{ uaecptr srca = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; + while (dmask) { put_long(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 4; dmask = movem_next[dmask]; } + while (amask) { put_long(srca, m68k_areg(regs, movem_index1[amask])); srca += 4; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_48f0_0)(uae_u32 opcode) /* MVMLE.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); +{m68k_incpc(4); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; + while (dmask) { put_long(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 4; dmask = movem_next[dmask]; } + while (amask) { put_long(srca, m68k_areg(regs, movem_index1[amask])); srca += 4; amask = movem_next[amask]; } +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_48f8_0)(uae_u32 opcode) /* MVMLE.L #.W,(xxx).W */ +{ + cpuop_begin(); +{ uae_u16 mask = get_iword(2); +{ uaecptr srca = (uae_s32)(uae_s16)get_iword(4); +{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; + while (dmask) { put_long(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 4; dmask = movem_next[dmask]; } + while (amask) { put_long(srca, m68k_areg(regs, movem_index1[amask])); srca += 4; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_48f9_0)(uae_u32 opcode) /* MVMLE.L #.W,(xxx).L */ +{ + cpuop_begin(); +{ uae_u16 mask = get_iword(2); +{ uaecptr srca = get_ilong(4); +{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; + while (dmask) { put_long(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 4; dmask = movem_next[dmask]; } + while (amask) { put_long(srca, m68k_areg(regs, movem_index1[amask])); srca += 4; amask = movem_next[amask]; } +}}}m68k_incpc(8); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_49c0_0)(uae_u32 opcode) /* EXT.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_u32 dst = (uae_s32)(uae_s8)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_NFLG (((uae_s32)(dst)) < 0); + m68k_dreg(regs, srcreg) = (dst); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a00_0)(uae_u32 opcode) /* TST.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a10_0)(uae_u32 opcode) /* TST.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a18_0)(uae_u32 opcode) /* TST.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a20_0)(uae_u32 opcode) /* TST.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a28_0)(uae_u32 opcode) /* TST.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a30_0)(uae_u32 opcode) /* TST.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a38_0)(uae_u32 opcode) /* TST.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a39_0)(uae_u32 opcode) /* TST.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a3a_0)(uae_u32 opcode) /* TST.B (d16,PC) */ +{ + cpuop_begin(); +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a3b_0)(uae_u32 opcode) /* TST.B (d8,PC,Xn) */ +{ + cpuop_begin(); +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a3c_0)(uae_u32 opcode) /* TST.B #.B */ +{ + cpuop_begin(); +{{ uae_s8 src = get_ibyte(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); +}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a40_0)(uae_u32 opcode) /* TST.W Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a48_0)(uae_u32 opcode) /* TST.W An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a50_0)(uae_u32 opcode) /* TST.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a58_0)(uae_u32 opcode) /* TST.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a60_0)(uae_u32 opcode) /* TST.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a68_0)(uae_u32 opcode) /* TST.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a70_0)(uae_u32 opcode) /* TST.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a78_0)(uae_u32 opcode) /* TST.W (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a79_0)(uae_u32 opcode) /* TST.W (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a7a_0)(uae_u32 opcode) /* TST.W (d16,PC) */ +{ + cpuop_begin(); +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a7b_0)(uae_u32 opcode) /* TST.W (d8,PC,Xn) */ +{ + cpuop_begin(); +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a7c_0)(uae_u32 opcode) /* TST.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); +}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a80_0)(uae_u32 opcode) /* TST.L Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a88_0)(uae_u32 opcode) /* TST.L An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a90_0)(uae_u32 opcode) /* TST.L (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a98_0)(uae_u32 opcode) /* TST.L (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4aa0_0)(uae_u32 opcode) /* TST.L -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4aa8_0)(uae_u32 opcode) /* TST.L (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4ab0_0)(uae_u32 opcode) /* TST.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4ab8_0)(uae_u32 opcode) /* TST.L (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4ab9_0)(uae_u32 opcode) /* TST.L (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4aba_0)(uae_u32 opcode) /* TST.L (d16,PC) */ +{ + cpuop_begin(); +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4abb_0)(uae_u32 opcode) /* TST.L (d8,PC,Xn) */ +{ + cpuop_begin(); +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4abc_0)(uae_u32 opcode) /* TST.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); +}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4ac0_0)(uae_u32 opcode) /* TAS.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + src |= 0x80; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((src) & 0xff); +}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4ad0_0)(uae_u32 opcode) /* TAS.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + src |= 0x80; + put_byte(srca,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4ad8_0)(uae_u32 opcode) /* TAS.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + src |= 0x80; + put_byte(srca,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4ae0_0)(uae_u32 opcode) /* TAS.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + src |= 0x80; + put_byte(srca,src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4ae8_0)(uae_u32 opcode) /* TAS.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + src |= 0x80; + put_byte(srca,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4af0_0)(uae_u32 opcode) /* TAS.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + src |= 0x80; + put_byte(srca,src); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4af8_0)(uae_u32 opcode) /* TAS.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + src |= 0x80; + put_byte(srca,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4af9_0)(uae_u32 opcode) /* TAS.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + src |= 0x80; + put_byte(srca,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c00_0)(uae_u32 opcode) /* MULL.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(4); + m68k_mull(opcode, dst, extra); +}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c10_0)(uae_u32 opcode) /* MULL.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); +m68k_incpc(4); + m68k_mull(opcode, dst, extra); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c18_0)(uae_u32 opcode) /* MULL.L #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; +m68k_incpc(4); + m68k_mull(opcode, dst, extra); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c20_0)(uae_u32 opcode) /* MULL.L #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; +m68k_incpc(4); + m68k_mull(opcode, dst, extra); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c28_0)(uae_u32 opcode) /* MULL.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 dst = get_long(dsta); +m68k_incpc(6); + m68k_mull(opcode, dst, extra); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c30_0)(uae_u32 opcode) /* MULL.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); + m68k_mull(opcode, dst, extra); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c38_0)(uae_u32 opcode) /* MULL.L #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 dst = get_long(dsta); +m68k_incpc(6); + m68k_mull(opcode, dst, extra); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c39_0)(uae_u32 opcode) /* MULL.L #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s32 dst = get_long(dsta); +m68k_incpc(8); + m68k_mull(opcode, dst, extra); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c3a_0)(uae_u32 opcode) /* MULL.L #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_getpc () + 4; + dsta += (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 dst = get_long(dsta); +m68k_incpc(6); + m68k_mull(opcode, dst, extra); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c3b_0)(uae_u32 opcode) /* MULL.L #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 dst = get_long(dsta); + m68k_mull(opcode, dst, extra); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c3c_0)(uae_u32 opcode) /* MULL.L #.W,#.L */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uae_s32 dst = get_ilong(4); +m68k_incpc(8); + m68k_mull(opcode, dst, extra); +}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c40_0)(uae_u32 opcode) /* DIVL.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{m68k_incpc(2); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(0); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(2); + m68k_divl(opcode, dst, extra, oldpc); +}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c50_0)(uae_u32 opcode) /* DIVL.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{m68k_incpc(2); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(0); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); +m68k_incpc(2); + m68k_divl(opcode, dst, extra, oldpc); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c58_0)(uae_u32 opcode) /* DIVL.L #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{m68k_incpc(2); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(0); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; +m68k_incpc(2); + m68k_divl(opcode, dst, extra, oldpc); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c60_0)(uae_u32 opcode) /* DIVL.L #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{m68k_incpc(2); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(0); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; +m68k_incpc(2); + m68k_divl(opcode, dst, extra, oldpc); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c68_0)(uae_u32 opcode) /* DIVL.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{m68k_incpc(2); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(0); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); +m68k_incpc(4); + m68k_divl(opcode, dst, extra, oldpc); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c70_0)(uae_u32 opcode) /* DIVL.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{m68k_incpc(2); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(0); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); + m68k_divl(opcode, dst, extra, oldpc); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c78_0)(uae_u32 opcode) /* DIVL.L #.W,(xxx).W */ +{ + cpuop_begin(); +{m68k_incpc(2); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(0); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); +m68k_incpc(4); + m68k_divl(opcode, dst, extra, oldpc); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c79_0)(uae_u32 opcode) /* DIVL.L #.W,(xxx).L */ +{ + cpuop_begin(); +{m68k_incpc(2); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(0); +{ uaecptr dsta = get_ilong(2); +{ uae_s32 dst = get_long(dsta); +m68k_incpc(6); + m68k_divl(opcode, dst, extra, oldpc); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c7a_0)(uae_u32 opcode) /* DIVL.L #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{m68k_incpc(2); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(0); +{ uaecptr dsta = m68k_getpc () + 2; + dsta += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); +m68k_incpc(4); + m68k_divl(opcode, dst, extra, oldpc); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c7b_0)(uae_u32 opcode) /* DIVL.L #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{m68k_incpc(2); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(0); +{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 dst = get_long(dsta); + m68k_divl(opcode, dst, extra, oldpc); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4c7c_0)(uae_u32 opcode) /* DIVL.L #.W,#.L */ +{ + cpuop_begin(); +{m68k_incpc(2); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 extra = get_iword(0); +{ uae_s32 dst = get_ilong(2); +m68k_incpc(6); + m68k_divl(opcode, dst, extra, oldpc); +}}}} cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4c90_0)(uae_u32 opcode) /* MVMEL.W #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr srca = m68k_areg(regs, dstreg); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4c98_0)(uae_u32 opcode) /* MVMEL.W #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr srca = m68k_areg(regs, dstreg); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } + m68k_areg(regs, dstreg) = srca; +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4ca8_0)(uae_u32 opcode) /* MVMEL.W #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr srca = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cb0_0)(uae_u32 opcode) /* MVMEL.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{m68k_incpc(4); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cb8_0)(uae_u32 opcode) /* MVMEL.W #.W,(xxx).W */ +{ + cpuop_begin(); +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr srca = (uae_s32)(uae_s16)get_iword(4); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cb9_0)(uae_u32 opcode) /* MVMEL.W #.W,(xxx).L */ +{ + cpuop_begin(); +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr srca = get_ilong(4); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } +}}}m68k_incpc(8); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cba_0)(uae_u32 opcode) /* MVMEL.W #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr srca = m68k_getpc () + 4; + srca += (uae_s32)(uae_s16)get_iword(4); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cbb_0)(uae_u32 opcode) /* MVMEL.W #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cd0_0)(uae_u32 opcode) /* MVMEL.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr srca = m68k_areg(regs, dstreg); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cd8_0)(uae_u32 opcode) /* MVMEL.L #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr srca = m68k_areg(regs, dstreg); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } + m68k_areg(regs, dstreg) = srca; +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4ce8_0)(uae_u32 opcode) /* MVMEL.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr srca = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cf0_0)(uae_u32 opcode) /* MVMEL.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{m68k_incpc(4); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cf8_0)(uae_u32 opcode) /* MVMEL.L #.W,(xxx).W */ +{ + cpuop_begin(); +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr srca = (uae_s32)(uae_s16)get_iword(4); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cf9_0)(uae_u32 opcode) /* MVMEL.L #.W,(xxx).L */ +{ + cpuop_begin(); +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr srca = get_ilong(4); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } +}}}m68k_incpc(8); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cfa_0)(uae_u32 opcode) /* MVMEL.L #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr srca = m68k_getpc () + 4; + srca += (uae_s32)(uae_s16)get_iword(4); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cfb_0)(uae_u32 opcode) /* MVMEL.L #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4e40_0)(uae_u32 opcode) /* TRAP.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 15); +#else + uae_u32 srcreg = (opcode & 15); +#endif +{{ uae_u32 src = srcreg; +m68k_incpc(2); + Exception(src+32,0); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4e50_0)(uae_u32 opcode) /* LINK.W An,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr olda = m68k_areg(regs, 7) - 4; + m68k_areg (regs, 7) = olda; +{ uae_s32 src = m68k_areg(regs, srcreg); + put_long(olda,src); + m68k_areg(regs, srcreg) = (m68k_areg(regs, 7)); +{ uae_s16 offs = get_iword(2); + m68k_areg(regs, 7) += offs; +}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4e58_0)(uae_u32 opcode) /* UNLK.L An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); + m68k_areg(regs, 7) = src; +{ uaecptr olda = m68k_areg(regs, 7); +{ uae_s32 old = get_long(olda); + m68k_areg(regs, 7) += 4; + m68k_areg(regs, srcreg) = (old); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4e60_0)(uae_u32 opcode) /* MVR2USP.L An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel901; } +{{ uae_s32 src = m68k_areg(regs, srcreg); + regs.usp = src; +}}}m68k_incpc(2); +endlabel901: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4e68_0)(uae_u32 opcode) /* MVUSP2R.L An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel902; } +{{ m68k_areg(regs, srcreg) = (regs.usp); +}}}m68k_incpc(2); +endlabel902: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4e70_0)(uae_u32 opcode) /* RESET.L */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel903; } +{}}m68k_incpc(2); +endlabel903: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4e71_0)(uae_u32 opcode) /* NOP.L */ +{ + cpuop_begin(); +{}m68k_incpc(2); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_4e72_0)(uae_u32 opcode) /* STOP.L #.W */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel905; } +{{ uae_s16 src = get_iword(2); + regs.sr = src; + MakeFromSR(); + m68k_setstopped(1); +}}}m68k_incpc(4); +endlabel905: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4e73_0)(uae_u32 opcode) /* RTE.L */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel906; } +{ uae_u16 newsr; uae_u32 newpc; for (;;) { +{ uaecptr sra = m68k_areg(regs, 7); +{ uae_s16 sr = get_word(sra); + m68k_areg(regs, 7) += 2; +{ uaecptr pca = m68k_areg(regs, 7); +{ uae_s32 pc = get_long(pca); + m68k_areg(regs, 7) += 4; +{ uaecptr formata = m68k_areg(regs, 7); +{ uae_s16 format = get_word(formata); + m68k_areg(regs, 7) += 2; + newsr = sr; newpc = pc; + if ((format & 0xF000) == 0x0000) { break; } + else if ((format & 0xF000) == 0x1000) { ; } + else if ((format & 0xF000) == 0x2000) { m68k_areg(regs, 7) += 4; break; } + else if ((format & 0xF000) == 0x3000) { m68k_areg(regs, 7) += 4; break; } + else if ((format & 0xF000) == 0x7000) { m68k_areg(regs, 7) += 52; break; } + else if ((format & 0xF000) == 0x8000) { m68k_areg(regs, 7) += 50; break; } + else if ((format & 0xF000) == 0x9000) { m68k_areg(regs, 7) += 12; break; } + else if ((format & 0xF000) == 0xa000) { m68k_areg(regs, 7) += 24; break; } + else if ((format & 0xF000) == 0xb000) { m68k_areg(regs, 7) += 84; break; } + else { Exception(14,0); goto endlabel906; } + regs.sr = newsr; MakeFromSR(); +} +}}}}}} regs.sr = newsr; MakeFromSR(); + m68k_setpc_rte(newpc); +}}endlabel906: ; + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4e74_0)(uae_u32 opcode) /* RTD.L #.W */ +{ + cpuop_begin(); +{{ uaecptr pca = m68k_areg(regs, 7); +{ uae_s32 pc = get_long(pca); + m68k_areg(regs, 7) += 4; +{ uae_s16 offs = get_iword(2); + m68k_areg(regs, 7) += offs; + m68k_setpc_rte(pc); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4e75_0)(uae_u32 opcode) /* RTS.L */ +{ + cpuop_begin(); +{ m68k_do_rts(); +} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4e76_0)(uae_u32 opcode) /* TRAPV.L */ +{ + cpuop_begin(); +{m68k_incpc(2); + if (GET_VFLG) { Exception(7,m68k_getpc()); goto endlabel909; } +}endlabel909: ; + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_4e77_0)(uae_u32 opcode) /* RTR.L */ +{ + cpuop_begin(); +{ MakeSR(); +{ uaecptr sra = m68k_areg(regs, 7); +{ uae_s16 sr = get_word(sra); + m68k_areg(regs, 7) += 2; +{ uaecptr pca = m68k_areg(regs, 7); +{ uae_s32 pc = get_long(pca); + m68k_areg(regs, 7) += 4; + regs.sr &= 0xFF00; sr &= 0xFF; + regs.sr |= sr; m68k_setpc(pc); + MakeFromSR(); +}}}}} cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4e7a_0)(uae_u32 opcode) /* MOVEC2.L #.W */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel911; } +{{ uae_s16 src = get_iword(2); +{ int regno = (src >> 12) & 15; + uae_u32 *regp = regs.regs + regno; + if (! m68k_movec2(src & 0xFFF, regp)) goto endlabel911; +}}}}m68k_incpc(4); +endlabel911: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4e7b_0)(uae_u32 opcode) /* MOVE2C.L #.W */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel912; } +{{ uae_s16 src = get_iword(2); +{ int regno = (src >> 12) & 15; + uae_u32 *regp = regs.regs + regno; + if (! m68k_move2c(src & 0xFFF, regp)) goto endlabel912; +}}}}m68k_incpc(4); +endlabel912: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4e90_0)(uae_u32 opcode) /* JSR.L (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_do_jsr(m68k_getpc() + 2, srca); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4ea8_0)(uae_u32 opcode) /* JSR.L (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); + m68k_do_jsr(m68k_getpc() + 4, srca); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4eb0_0)(uae_u32 opcode) /* JSR.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); + m68k_do_jsr(m68k_getpc() + 0, srca); +}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4eb8_0)(uae_u32 opcode) /* JSR.L (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); + m68k_do_jsr(m68k_getpc() + 4, srca); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4eb9_0)(uae_u32 opcode) /* JSR.L (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); + m68k_do_jsr(m68k_getpc() + 6, srca); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4eba_0)(uae_u32 opcode) /* JSR.L (d16,PC) */ +{ + cpuop_begin(); +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); + m68k_do_jsr(m68k_getpc() + 4, srca); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4ebb_0)(uae_u32 opcode) /* JSR.L (d8,PC,Xn) */ +{ + cpuop_begin(); +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); + m68k_do_jsr(m68k_getpc() + 0, srca); +}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4ed0_0)(uae_u32 opcode) /* JMP.L (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_setpc(srca); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4ee8_0)(uae_u32 opcode) /* JMP.L (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); + m68k_setpc(srca); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4ef0_0)(uae_u32 opcode) /* JMP.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); + m68k_setpc(srca); +}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4ef8_0)(uae_u32 opcode) /* JMP.L (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); + m68k_setpc(srca); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4ef9_0)(uae_u32 opcode) /* JMP.L (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); + m68k_setpc(srca); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4efa_0)(uae_u32 opcode) /* JMP.L (d16,PC) */ +{ + cpuop_begin(); +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); + m68k_setpc(srca); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4efb_0)(uae_u32 opcode) /* JMP.L (d8,PC,Xn) */ +{ + cpuop_begin(); +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); + m68k_setpc(srca); +}}} cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_5000_0)(uae_u32 opcode) /* ADD.B #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5010_0)(uae_u32 opcode) /* ADD.B #,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5018_0)(uae_u32 opcode) /* ADD.B #,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5020_0)(uae_u32 opcode) /* ADD.B #,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5028_0)(uae_u32 opcode) /* ADD.B #,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5030_0)(uae_u32 opcode) /* ADD.B #,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5038_0)(uae_u32 opcode) /* ADD.B #,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5039_0)(uae_u32 opcode) /* ADD.B #,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = get_ilong(2); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +#endif + +#ifdef PART_5 +void REGPARAM2 CPUFUNC(op_5040_0)(uae_u32 opcode) /* ADD.W #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5048_0)(uae_u32 opcode) /* ADDA.W #,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_5050_0)(uae_u32 opcode) /* ADD.W #,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5058_0)(uae_u32 opcode) /* ADD.W #,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5060_0)(uae_u32 opcode) /* ADD.W #,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5068_0)(uae_u32 opcode) /* ADD.W #,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5070_0)(uae_u32 opcode) /* ADD.W #,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5078_0)(uae_u32 opcode) /* ADD.W #,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5079_0)(uae_u32 opcode) /* ADD.W #,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = get_ilong(2); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5080_0)(uae_u32 opcode) /* ADD.L #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5088_0)(uae_u32 opcode) /* ADDA.L #,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_5090_0)(uae_u32 opcode) /* ADD.L #,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5098_0)(uae_u32 opcode) /* ADD.L #,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_50a0_0)(uae_u32 opcode) /* ADD.L #,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_50a8_0)(uae_u32 opcode) /* ADD.L #,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_50b0_0)(uae_u32 opcode) /* ADD.L #,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_50b8_0)(uae_u32 opcode) /* ADD.L #,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_50b9_0)(uae_u32 opcode) /* ADD.L #,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = get_ilong(2); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_50c0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(0) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_50c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(0)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel954: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_50d0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(0) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_50d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(0) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_50e0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(0) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_50e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(0) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_50f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(0) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_50f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(0) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_50f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(0) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_50fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(0)) { Exception(7,m68k_getpc()); goto endlabel962; } +}}m68k_incpc(4); +endlabel962: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_50fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(0)) { Exception(7,m68k_getpc()); goto endlabel963; } +}}m68k_incpc(6); +endlabel963: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_50fc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(0)) { Exception(7,m68k_getpc()); goto endlabel964; } +}m68k_incpc(2); +endlabel964: ; + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_5100_0)(uae_u32 opcode) /* SUB.B #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5110_0)(uae_u32 opcode) /* SUB.B #,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5118_0)(uae_u32 opcode) /* SUB.B #,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5120_0)(uae_u32 opcode) /* SUB.B #,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5128_0)(uae_u32 opcode) /* SUB.B #,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5130_0)(uae_u32 opcode) /* SUB.B #,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5138_0)(uae_u32 opcode) /* SUB.B #,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5139_0)(uae_u32 opcode) /* SUB.B #,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = get_ilong(2); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5140_0)(uae_u32 opcode) /* SUB.W #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5148_0)(uae_u32 opcode) /* SUBA.W #,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_5150_0)(uae_u32 opcode) /* SUB.W #,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5158_0)(uae_u32 opcode) /* SUB.W #,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5160_0)(uae_u32 opcode) /* SUB.W #,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5168_0)(uae_u32 opcode) /* SUB.W #,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5170_0)(uae_u32 opcode) /* SUB.W #,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5178_0)(uae_u32 opcode) /* SUB.W #,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5179_0)(uae_u32 opcode) /* SUB.W #,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = get_ilong(2); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5180_0)(uae_u32 opcode) /* SUB.L #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5188_0)(uae_u32 opcode) /* SUBA.L #,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_5190_0)(uae_u32 opcode) /* SUB.L #,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5198_0)(uae_u32 opcode) /* SUB.L #,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_51a0_0)(uae_u32 opcode) /* SUB.L #,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_51a8_0)(uae_u32 opcode) /* SUB.L #,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_51b0_0)(uae_u32 opcode) /* SUB.L #,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_51b8_0)(uae_u32 opcode) /* SUB.L #,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_51b9_0)(uae_u32 opcode) /* SUB.L #,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = get_ilong(2); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_51c0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(1) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_51c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(1)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel992: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_51d0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(1) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_51d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(1) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_51e0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(1) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_51e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(1) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_51f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(1) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_51f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(1) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_51f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(1) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_51fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(1)) { Exception(7,m68k_getpc()); goto endlabel1000; } +}}m68k_incpc(4); +endlabel1000: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_51fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(1)) { Exception(7,m68k_getpc()); goto endlabel1001; } +}}m68k_incpc(6); +endlabel1001: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_51fc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(1)) { Exception(7,m68k_getpc()); goto endlabel1002; } +}m68k_incpc(2); +endlabel1002: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_52c0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(2) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_52c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(2)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel1004: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_52d0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(2) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_52d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(2) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_52e0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(2) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_52e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(2) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_52f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(2) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_52f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(2) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_52f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(2) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_52fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(2)) { Exception(7,m68k_getpc()); goto endlabel1012; } +}}m68k_incpc(4); +endlabel1012: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_52fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(2)) { Exception(7,m68k_getpc()); goto endlabel1013; } +}}m68k_incpc(6); +endlabel1013: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_52fc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(2)) { Exception(7,m68k_getpc()); goto endlabel1014; } +}m68k_incpc(2); +endlabel1014: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_53c0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(3) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_53c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(3)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel1016: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_53d0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(3) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_53d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(3) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_53e0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(3) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_53e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(3) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_53f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(3) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_53f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(3) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_53f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(3) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_53fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(3)) { Exception(7,m68k_getpc()); goto endlabel1024; } +}}m68k_incpc(4); +endlabel1024: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_53fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(3)) { Exception(7,m68k_getpc()); goto endlabel1025; } +}}m68k_incpc(6); +endlabel1025: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_53fc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(3)) { Exception(7,m68k_getpc()); goto endlabel1026; } +}m68k_incpc(2); +endlabel1026: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_54c0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(4) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_54c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(4)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel1028: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_54d0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(4) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_54d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(4) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_54e0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(4) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_54e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(4) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_54f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(4) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_54f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(4) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_54f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(4) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_54fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(4)) { Exception(7,m68k_getpc()); goto endlabel1036; } +}}m68k_incpc(4); +endlabel1036: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_54fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(4)) { Exception(7,m68k_getpc()); goto endlabel1037; } +}}m68k_incpc(6); +endlabel1037: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_54fc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(4)) { Exception(7,m68k_getpc()); goto endlabel1038; } +}m68k_incpc(2); +endlabel1038: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_55c0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(5) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_55c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(5)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel1040: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_55d0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(5) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_55d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(5) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_55e0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(5) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_55e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(5) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_55f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(5) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_55f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(5) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_55f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(5) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_55fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(5)) { Exception(7,m68k_getpc()); goto endlabel1048; } +}}m68k_incpc(4); +endlabel1048: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_55fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(5)) { Exception(7,m68k_getpc()); goto endlabel1049; } +}}m68k_incpc(6); +endlabel1049: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_55fc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(5)) { Exception(7,m68k_getpc()); goto endlabel1050; } +}m68k_incpc(2); +endlabel1050: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_56c0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(6) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_56c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(6)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel1052: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_56d0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(6) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_56d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(6) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_56e0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(6) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_56e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(6) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_56f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(6) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_56f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(6) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_56f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(6) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_56fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(6)) { Exception(7,m68k_getpc()); goto endlabel1060; } +}}m68k_incpc(4); +endlabel1060: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_56fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(6)) { Exception(7,m68k_getpc()); goto endlabel1061; } +}}m68k_incpc(6); +endlabel1061: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_56fc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(6)) { Exception(7,m68k_getpc()); goto endlabel1062; } +}m68k_incpc(2); +endlabel1062: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_57c0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(7) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_57c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(7)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel1064: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_57d0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(7) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_57d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(7) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_57e0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(7) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_57e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(7) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_57f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(7) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_57f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(7) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_57f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(7) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_57fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(7)) { Exception(7,m68k_getpc()); goto endlabel1072; } +}}m68k_incpc(4); +endlabel1072: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_57fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(7)) { Exception(7,m68k_getpc()); goto endlabel1073; } +}}m68k_incpc(6); +endlabel1073: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_57fc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(7)) { Exception(7,m68k_getpc()); goto endlabel1074; } +}m68k_incpc(2); +endlabel1074: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_58c0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(8) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_58c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(8)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel1076: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_58d0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(8) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_58d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(8) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_58e0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(8) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_58e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(8) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_58f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(8) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_58f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(8) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_58f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(8) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_58fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(8)) { Exception(7,m68k_getpc()); goto endlabel1084; } +}}m68k_incpc(4); +endlabel1084: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_58fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(8)) { Exception(7,m68k_getpc()); goto endlabel1085; } +}}m68k_incpc(6); +endlabel1085: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_58fc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(8)) { Exception(7,m68k_getpc()); goto endlabel1086; } +}m68k_incpc(2); +endlabel1086: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_59c0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(9) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_59c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(9)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel1088: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_59d0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(9) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_59d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(9) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_59e0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(9) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_59e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(9) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_59f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(9) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_59f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(9) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_59f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(9) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_59fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(9)) { Exception(7,m68k_getpc()); goto endlabel1096; } +}}m68k_incpc(4); +endlabel1096: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_59fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(9)) { Exception(7,m68k_getpc()); goto endlabel1097; } +}}m68k_incpc(6); +endlabel1097: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_59fc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(9)) { Exception(7,m68k_getpc()); goto endlabel1098; } +}m68k_incpc(2); +endlabel1098: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ac0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(10) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ac8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(10)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel1100: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ad0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(10) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ad8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(10) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ae0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(10) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ae8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(10) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5af0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(10) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5af8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(10) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5af9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(10) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5afa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(10)) { Exception(7,m68k_getpc()); goto endlabel1108; } +}}m68k_incpc(4); +endlabel1108: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5afb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(10)) { Exception(7,m68k_getpc()); goto endlabel1109; } +}}m68k_incpc(6); +endlabel1109: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5afc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(10)) { Exception(7,m68k_getpc()); goto endlabel1110; } +}m68k_incpc(2); +endlabel1110: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5bc0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(11) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5bc8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(11)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel1112: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5bd0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(11) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5bd8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(11) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5be0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(11) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5be8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(11) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5bf0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(11) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5bf8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(11) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5bf9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(11) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5bfa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(11)) { Exception(7,m68k_getpc()); goto endlabel1120; } +}}m68k_incpc(4); +endlabel1120: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5bfb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(11)) { Exception(7,m68k_getpc()); goto endlabel1121; } +}}m68k_incpc(6); +endlabel1121: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5bfc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(11)) { Exception(7,m68k_getpc()); goto endlabel1122; } +}m68k_incpc(2); +endlabel1122: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5cc0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(12) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5cc8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(12)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel1124: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5cd0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(12) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5cd8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(12) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ce0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(12) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ce8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(12) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5cf0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(12) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5cf8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(12) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5cf9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(12) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5cfa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(12)) { Exception(7,m68k_getpc()); goto endlabel1132; } +}}m68k_incpc(4); +endlabel1132: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5cfb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(12)) { Exception(7,m68k_getpc()); goto endlabel1133; } +}}m68k_incpc(6); +endlabel1133: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5cfc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(12)) { Exception(7,m68k_getpc()); goto endlabel1134; } +}m68k_incpc(2); +endlabel1134: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5dc0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(13) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5dc8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(13)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel1136: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5dd0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(13) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5dd8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(13) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5de0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(13) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5de8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(13) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5df0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(13) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5df8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(13) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5df9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(13) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5dfa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(13)) { Exception(7,m68k_getpc()); goto endlabel1144; } +}}m68k_incpc(4); +endlabel1144: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5dfb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(13)) { Exception(7,m68k_getpc()); goto endlabel1145; } +}}m68k_incpc(6); +endlabel1145: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5dfc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(13)) { Exception(7,m68k_getpc()); goto endlabel1146; } +}m68k_incpc(2); +endlabel1146: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ec0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(14) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ec8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(14)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel1148: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ed0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(14) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ed8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(14) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ee0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(14) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ee8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(14) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ef0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(14) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ef8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(14) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ef9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(14) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5efa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(14)) { Exception(7,m68k_getpc()); goto endlabel1156; } +}}m68k_incpc(4); +endlabel1156: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5efb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(14)) { Exception(7,m68k_getpc()); goto endlabel1157; } +}}m68k_incpc(6); +endlabel1157: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5efc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(14)) { Exception(7,m68k_getpc()); goto endlabel1158; } +}m68k_incpc(2); +endlabel1158: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5fc0_0)(uae_u32 opcode) /* Scc.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{{ int val = cctrue(15) ? 0xff : 0; + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5fc8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 offs = get_iword(2); + if (!cctrue(15)) { + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); + if (src) { + m68k_incpc((uae_s32)offs + 2); +return; + } + } +}}}m68k_incpc(4); +endlabel1160: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5fd0_0)(uae_u32 opcode) /* Scc.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ int val = cctrue(15) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5fd8_0)(uae_u32 opcode) /* Scc.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ int val = cctrue(15) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5fe0_0)(uae_u32 opcode) /* Scc.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; + m68k_areg (regs, srcreg) = srca; +{ int val = cctrue(15) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5fe8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(15) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ff0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ int val = cctrue(15) ? 0xff : 0; + put_byte(srca,val); +}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ff8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ int val = cctrue(15) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ff9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ int val = cctrue(15) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#endif + +#ifdef PART_6 +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ffa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ +{ + cpuop_begin(); +{{ uae_s16 dummy = get_iword(2); + if (cctrue(15)) { Exception(7,m68k_getpc()); goto endlabel1168; } +}}m68k_incpc(4); +endlabel1168: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ffb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 dummy = get_ilong(2); + if (cctrue(15)) { Exception(7,m68k_getpc()); goto endlabel1169; } +}}m68k_incpc(6); +endlabel1169: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ffc_0)(uae_u32 opcode) /* TRAPcc.L */ +{ + cpuop_begin(); +{ if (cctrue(15)) { Exception(7,m68k_getpc()); goto endlabel1170; } +}m68k_incpc(2); +endlabel1170: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6000_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(0)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1171: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6001_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(0)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1172: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_60ff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(0)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1173: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6100_0)(uae_u32 opcode) /* BSR.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + uae_s32 s = (uae_s32)src + 2; + m68k_do_bsr(m68k_getpc() + 4, s); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6101_0)(uae_u32 opcode) /* BSR.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + uae_s32 s = (uae_s32)src + 2; + m68k_do_bsr(m68k_getpc() + 2, s); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_61ff_0)(uae_u32 opcode) /* BSR.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + uae_s32 s = (uae_s32)src + 2; + m68k_do_bsr(m68k_getpc() + 6, s); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6200_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(2)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1177: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6201_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(2)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1178: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_62ff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(2)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1179: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6300_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(3)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1180: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6301_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(3)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1181: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_63ff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(3)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1182: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6400_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(4)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1183: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6401_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(4)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1184: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_64ff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(4)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1185: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6500_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(5)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1186: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6501_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(5)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1187: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_65ff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(5)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1188: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6600_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(6)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1189: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6601_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(6)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1190: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_66ff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(6)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1191: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6700_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(7)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1192: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6701_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(7)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1193: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_67ff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(7)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1194: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6800_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(8)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1195: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6801_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(8)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1196: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_68ff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(8)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1197: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6900_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(9)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1198: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6901_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(9)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1199: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_69ff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(9)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1200: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6a00_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(10)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1201: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6a01_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(10)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1202: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6aff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(10)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1203: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6b00_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(11)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1204: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6b01_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(11)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1205: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6bff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(11)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1206: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6c00_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(12)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1207: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6c01_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(12)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1208: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6cff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(12)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1209: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6d00_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(13)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1210: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6d01_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(13)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1211: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6dff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(13)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1212: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6e00_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(14)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1213: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6e01_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(14)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1214: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6eff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(14)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1215: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6f00_0)(uae_u32 opcode) /* Bcc.W #.W */ +{ + cpuop_begin(); +{{ uae_s16 src = get_iword(2); + if (!cctrue(15)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(4); +endlabel1216: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6f01_0)(uae_u32 opcode) /* Bcc.B # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +{{ uae_u32 src = srcreg; + if (!cctrue(15)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(2); +endlabel1217: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6fff_0)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{{ uae_s32 src = get_ilong(2); + if (!cctrue(15)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel1218: ; + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_7000_0)(uae_u32 opcode) /* MOVE.L #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_u32 src = srcreg; +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}m68k_incpc(2); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_7100_0)(uae_u32 opcode) /* EMULOP_RETURN.L */ +{ + cpuop_begin(); +{ m68k_emulop_return(); +} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_7101_0)(uae_u32 opcode) /* EMULOP.L # */ +{ + cpuop_begin(); +{ +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + m68k_emulop(opcode); +}m68k_incpc(2); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_8000_0)(uae_u32 opcode) /* OR.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8010_0)(uae_u32 opcode) /* OR.B (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8018_0)(uae_u32 opcode) /* OR.B (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8020_0)(uae_u32 opcode) /* OR.B -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8028_0)(uae_u32 opcode) /* OR.B (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8030_0)(uae_u32 opcode) /* OR.B (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8038_0)(uae_u32 opcode) /* OR.B (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8039_0)(uae_u32 opcode) /* OR.B (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_803a_0)(uae_u32 opcode) /* OR.B (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_803b_0)(uae_u32 opcode) /* OR.B (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_803c_0)(uae_u32 opcode) /* OR.B #.B,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8040_0)(uae_u32 opcode) /* OR.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8050_0)(uae_u32 opcode) /* OR.W (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8058_0)(uae_u32 opcode) /* OR.W (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8060_0)(uae_u32 opcode) /* OR.W -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8068_0)(uae_u32 opcode) /* OR.W (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8070_0)(uae_u32 opcode) /* OR.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8078_0)(uae_u32 opcode) /* OR.W (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8079_0)(uae_u32 opcode) /* OR.W (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_807a_0)(uae_u32 opcode) /* OR.W (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_807b_0)(uae_u32 opcode) /* OR.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_807c_0)(uae_u32 opcode) /* OR.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8080_0)(uae_u32 opcode) /* OR.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8090_0)(uae_u32 opcode) /* OR.L (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8098_0)(uae_u32 opcode) /* OR.L (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80a0_0)(uae_u32 opcode) /* OR.L -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80a8_0)(uae_u32 opcode) /* OR.L (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80b0_0)(uae_u32 opcode) /* OR.L (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80b8_0)(uae_u32 opcode) /* OR.L (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80b9_0)(uae_u32 opcode) /* OR.L (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80ba_0)(uae_u32 opcode) /* OR.L (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80bb_0)(uae_u32 opcode) /* OR.L (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80bc_0)(uae_u32 opcode) /* OR.L #.L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80c0_0)(uae_u32 opcode) /* DIVU.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(2); + if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1255; } else { + uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; + uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; + if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}endlabel1255: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80d0_0)(uae_u32 opcode) /* DIVU.W (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(2); + if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1256; } else { + uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; + uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; + if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel1256: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80d8_0)(uae_u32 opcode) /* DIVU.W (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(2); + if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1257; } else { + uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; + uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; + if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel1257: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80e0_0)(uae_u32 opcode) /* DIVU.W -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(2); + if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1258; } else { + uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; + uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; + if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel1258: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80e8_0)(uae_u32 opcode) /* DIVU.W (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(4); + if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1259; } else { + uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; + uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; + if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel1259: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80f0_0)(uae_u32 opcode) /* DIVU.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1260; } else { + uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; + uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; + if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}}endlabel1260: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80f8_0)(uae_u32 opcode) /* DIVU.W (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(4); + if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1261; } else { + uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; + uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; + if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel1261: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80f9_0)(uae_u32 opcode) /* DIVU.W (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(6); + if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1262; } else { + uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; + uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; + if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel1262: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80fa_0)(uae_u32 opcode) /* DIVU.W (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(4); + if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1263; } else { + uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; + uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; + if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel1263: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80fb_0)(uae_u32 opcode) /* DIVU.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1264; } else { + uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; + uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; + if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}}endlabel1264: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80fc_0)(uae_u32 opcode) /* DIVU.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 src = get_iword(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(4); + if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1265; } else { + uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; + uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; + if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}endlabel1265: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8100_0)(uae_u32 opcode) /* SBCD.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{ uae_u16 newv_lo = (dst & 0xF) - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = (dst & 0xF0) - (src & 0xF0); + uae_u16 newv, tmp_newv; + int bcd = 0; + newv = tmp_newv = newv_hi + newv_lo; + if (newv_lo & 0xF0) { newv -= 6; bcd = 6; }; + if ((((dst & 0xFF) - (src & 0xFF) - (GET_XFLG ? 1 : 0)) & 0x100) > 0xFF) { newv -= 0x60; } + SET_CFLG ((((dst & 0xFF) - (src & 0xFF) - bcd - (GET_XFLG ? 1 : 0)) & 0x300) > 0xFF); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8108_0)(uae_u32 opcode) /* SBCD.B -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; +{ uae_u16 newv_lo = (dst & 0xF) - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = (dst & 0xF0) - (src & 0xF0); + uae_u16 newv, tmp_newv; + int bcd = 0; + newv = tmp_newv = newv_hi + newv_lo; + if (newv_lo & 0xF0) { newv -= 6; bcd = 6; }; + if ((((dst & 0xFF) - (src & 0xFF) - (GET_XFLG ? 1 : 0)) & 0x100) > 0xFF) { newv -= 0x60; } + SET_CFLG ((((dst & 0xFF) - (src & 0xFF) - bcd - (GET_XFLG ? 1 : 0)) & 0x300) > 0xFF); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + put_byte(dsta,newv); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8110_0)(uae_u32 opcode) /* OR.B Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8118_0)(uae_u32 opcode) /* OR.B Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8120_0)(uae_u32 opcode) /* OR.B Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8128_0)(uae_u32 opcode) /* OR.B Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8130_0)(uae_u32 opcode) /* OR.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8138_0)(uae_u32 opcode) /* OR.B Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8139_0)(uae_u32 opcode) /* OR.B Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s8 dst = get_byte(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_8140_0)(uae_u32 opcode) /* PACK.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uae_u16 val = m68k_dreg(regs, srcreg) + get_iword(2); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & 0xffffff00) | ((val >> 4) & 0xf0) | (val & 0xf); +}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_8148_0)(uae_u32 opcode) /* PACK.L -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uae_u16 val; + m68k_areg(regs, srcreg) -= areg_byteinc[srcreg]; + val = (uae_u16)get_byte(m68k_areg(regs, srcreg)); + m68k_areg(regs, srcreg) -= areg_byteinc[srcreg]; + val = (val | ((uae_u16)get_byte(m68k_areg(regs, srcreg)) << 8)) + get_iword(2); + m68k_areg(regs, dstreg) -= areg_byteinc[dstreg]; + put_byte(m68k_areg(regs, dstreg),((val >> 4) & 0xf0) | (val & 0xf)); +}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_8150_0)(uae_u32 opcode) /* OR.W Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8158_0)(uae_u32 opcode) /* OR.W Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8160_0)(uae_u32 opcode) /* OR.W Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8168_0)(uae_u32 opcode) /* OR.W Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 dst = get_word(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8170_0)(uae_u32 opcode) /* OR.W Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 dst = get_word(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8178_0)(uae_u32 opcode) /* OR.W Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 dst = get_word(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8179_0)(uae_u32 opcode) /* OR.W Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s16 dst = get_word(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_8180_0)(uae_u32 opcode) /* UNPK.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uae_u16 val = m68k_dreg(regs, srcreg); + val = (((val << 4) & 0xf00) | (val & 0xf)) + get_iword(2); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & 0xffff0000) | (val & 0xffff); +}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_8188_0)(uae_u32 opcode) /* UNPK.L -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uae_u16 val; + m68k_areg(regs, srcreg) -= areg_byteinc[srcreg]; + val = (uae_u16)get_byte(m68k_areg(regs, srcreg)); + val = (((val << 4) & 0xf00) | (val & 0xf)) + get_iword(2); + m68k_areg(regs, dstreg) -= areg_byteinc[dstreg]; + put_byte(m68k_areg(regs, dstreg),val); + m68k_areg(regs, dstreg) -= areg_byteinc[dstreg]; + put_byte(m68k_areg(regs, dstreg),val >> 8); +}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_8190_0)(uae_u32 opcode) /* OR.L Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8198_0)(uae_u32 opcode) /* OR.L Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81a0_0)(uae_u32 opcode) /* OR.L Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81a8_0)(uae_u32 opcode) /* OR.L Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81b0_0)(uae_u32 opcode) /* OR.L Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81b8_0)(uae_u32 opcode) /* OR.L Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81b9_0)(uae_u32 opcode) /* OR.L Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s32 dst = get_long(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81c0_0)(uae_u32 opcode) /* DIVS.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(2); + if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1293; } else { + uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; + uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; + if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}endlabel1293: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81d0_0)(uae_u32 opcode) /* DIVS.W (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(2); + if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1294; } else { + uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; + uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; + if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel1294: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81d8_0)(uae_u32 opcode) /* DIVS.W (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(2); + if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1295; } else { + uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; + uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; + if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel1295: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81e0_0)(uae_u32 opcode) /* DIVS.W -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(2); + if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1296; } else { + uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; + uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; + if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel1296: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81e8_0)(uae_u32 opcode) /* DIVS.W (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(4); + if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1297; } else { + uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; + uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; + if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel1297: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81f0_0)(uae_u32 opcode) /* DIVS.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1298; } else { + uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; + uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; + if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}}endlabel1298: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81f8_0)(uae_u32 opcode) /* DIVS.W (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(4); + if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1299; } else { + uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; + uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; + if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel1299: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81f9_0)(uae_u32 opcode) /* DIVS.W (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(6); + if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1300; } else { + uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; + uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; + if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel1300: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81fa_0)(uae_u32 opcode) /* DIVS.W (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(4); + if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1301; } else { + uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; + uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; + if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel1301: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81fb_0)(uae_u32 opcode) /* DIVS.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1302; } else { + uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; + uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; + if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}}endlabel1302: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81fc_0)(uae_u32 opcode) /* DIVS.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 src = get_iword(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(4); + if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1303; } else { + uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; + uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; + if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}endlabel1303: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9000_0)(uae_u32 opcode) /* SUB.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9010_0)(uae_u32 opcode) /* SUB.B (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9018_0)(uae_u32 opcode) /* SUB.B (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9020_0)(uae_u32 opcode) /* SUB.B -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9028_0)(uae_u32 opcode) /* SUB.B (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9030_0)(uae_u32 opcode) /* SUB.B (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9038_0)(uae_u32 opcode) /* SUB.B (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9039_0)(uae_u32 opcode) /* SUB.B (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_903a_0)(uae_u32 opcode) /* SUB.B (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_903b_0)(uae_u32 opcode) /* SUB.B (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_903c_0)(uae_u32 opcode) /* SUB.B #.B,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9040_0)(uae_u32 opcode) /* SUB.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9048_0)(uae_u32 opcode) /* SUB.W An,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9050_0)(uae_u32 opcode) /* SUB.W (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9058_0)(uae_u32 opcode) /* SUB.W (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9060_0)(uae_u32 opcode) /* SUB.W -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9068_0)(uae_u32 opcode) /* SUB.W (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9070_0)(uae_u32 opcode) /* SUB.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9078_0)(uae_u32 opcode) /* SUB.W (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9079_0)(uae_u32 opcode) /* SUB.W (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_907a_0)(uae_u32 opcode) /* SUB.W (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_907b_0)(uae_u32 opcode) /* SUB.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_907c_0)(uae_u32 opcode) /* SUB.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9080_0)(uae_u32 opcode) /* SUB.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9088_0)(uae_u32 opcode) /* SUB.L An,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9090_0)(uae_u32 opcode) /* SUB.L (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9098_0)(uae_u32 opcode) /* SUB.L (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_90a0_0)(uae_u32 opcode) /* SUB.L -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_90a8_0)(uae_u32 opcode) /* SUB.L (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_90b0_0)(uae_u32 opcode) /* SUB.L (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_90b8_0)(uae_u32 opcode) /* SUB.L (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_90b9_0)(uae_u32 opcode) /* SUB.L (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_90ba_0)(uae_u32 opcode) /* SUB.L (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_90bb_0)(uae_u32 opcode) /* SUB.L (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_90bc_0)(uae_u32 opcode) /* SUB.L #.L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}m68k_incpc(6); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_90c0_0)(uae_u32 opcode) /* SUBA.W Dn,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_90c8_0)(uae_u32 opcode) /* SUBA.W An,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_90d0_0)(uae_u32 opcode) /* SUBA.W (An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_90d8_0)(uae_u32 opcode) /* SUBA.W (An)+,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_90e0_0)(uae_u32 opcode) /* SUBA.W -(An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_90e8_0)(uae_u32 opcode) /* SUBA.W (d16,An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_90f0_0)(uae_u32 opcode) /* SUBA.W (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_90f8_0)(uae_u32 opcode) /* SUBA.W (xxx).W,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_90f9_0)(uae_u32 opcode) /* SUBA.W (xxx).L,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_90fa_0)(uae_u32 opcode) /* SUBA.W (d16,PC),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_90fb_0)(uae_u32 opcode) /* SUBA.W (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_90fc_0)(uae_u32 opcode) /* SUBA.W #.W,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_9100_0)(uae_u32 opcode) /* SUBX.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = dst - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9108_0)(uae_u32 opcode) /* SUBX.B -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; +{ uae_u32 newv = dst - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9110_0)(uae_u32 opcode) /* SUB.B Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9118_0)(uae_u32 opcode) /* SUB.B Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9120_0)(uae_u32 opcode) /* SUB.B Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9128_0)(uae_u32 opcode) /* SUB.B Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9130_0)(uae_u32 opcode) /* SUB.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9138_0)(uae_u32 opcode) /* SUB.B Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9139_0)(uae_u32 opcode) /* SUB.B Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9140_0)(uae_u32 opcode) /* SUBX.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = dst - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); + SET_NFLG (((uae_s16)(newv)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9148_0)(uae_u32 opcode) /* SUBX.W -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; +{ uae_u32 newv = dst - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); + SET_NFLG (((uae_s16)(newv)) < 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9150_0)(uae_u32 opcode) /* SUB.W Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9158_0)(uae_u32 opcode) /* SUB.W Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9160_0)(uae_u32 opcode) /* SUB.W Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9168_0)(uae_u32 opcode) /* SUB.W Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9170_0)(uae_u32 opcode) /* SUB.W Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9178_0)(uae_u32 opcode) /* SUB.W Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9179_0)(uae_u32 opcode) /* SUB.W Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9180_0)(uae_u32 opcode) /* SUBX.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = dst - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9188_0)(uae_u32 opcode) /* SUBX.L -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; +{ uae_u32 newv = dst - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); + SET_NFLG (((uae_s32)(newv)) < 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9190_0)(uae_u32 opcode) /* SUB.L Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9198_0)(uae_u32 opcode) /* SUB.L Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_91a0_0)(uae_u32 opcode) /* SUB.L Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_91a8_0)(uae_u32 opcode) /* SUB.L Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_91b0_0)(uae_u32 opcode) /* SUB.L Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_91b8_0)(uae_u32 opcode) /* SUB.L Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_91b9_0)(uae_u32 opcode) /* SUB.L Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_91c0_0)(uae_u32 opcode) /* SUBA.L Dn,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_91c8_0)(uae_u32 opcode) /* SUBA.L An,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_91d0_0)(uae_u32 opcode) /* SUBA.L (An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_91d8_0)(uae_u32 opcode) /* SUBA.L (An)+,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_91e0_0)(uae_u32 opcode) /* SUBA.L -(An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_91e8_0)(uae_u32 opcode) /* SUBA.L (d16,An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_91f0_0)(uae_u32 opcode) /* SUBA.L (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_91f8_0)(uae_u32 opcode) /* SUBA.L (xxx).W,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_91f9_0)(uae_u32 opcode) /* SUBA.L (xxx).L,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_91fa_0)(uae_u32 opcode) /* SUBA.L (d16,PC),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_91fb_0)(uae_u32 opcode) /* SUBA.L (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_91fc_0)(uae_u32 opcode) /* SUBA.L #.L,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_b000_0)(uae_u32 opcode) /* CMP.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b010_0)(uae_u32 opcode) /* CMP.B (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b018_0)(uae_u32 opcode) /* CMP.B (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b020_0)(uae_u32 opcode) /* CMP.B -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b028_0)(uae_u32 opcode) /* CMP.B (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b030_0)(uae_u32 opcode) /* CMP.B (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b038_0)(uae_u32 opcode) /* CMP.B (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b039_0)(uae_u32 opcode) /* CMP.B (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b03a_0)(uae_u32 opcode) /* CMP.B (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b03b_0)(uae_u32 opcode) /* CMP.B (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b03c_0)(uae_u32 opcode) /* CMP.B #.B,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b040_0)(uae_u32 opcode) /* CMP.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +#endif + +#ifdef PART_7 +void REGPARAM2 CPUFUNC(op_b048_0)(uae_u32 opcode) /* CMP.W An,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b050_0)(uae_u32 opcode) /* CMP.W (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b058_0)(uae_u32 opcode) /* CMP.W (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b060_0)(uae_u32 opcode) /* CMP.W -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b068_0)(uae_u32 opcode) /* CMP.W (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b070_0)(uae_u32 opcode) /* CMP.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b078_0)(uae_u32 opcode) /* CMP.W (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b079_0)(uae_u32 opcode) /* CMP.W (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b07a_0)(uae_u32 opcode) /* CMP.W (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b07b_0)(uae_u32 opcode) /* CMP.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b07c_0)(uae_u32 opcode) /* CMP.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b080_0)(uae_u32 opcode) /* CMP.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b088_0)(uae_u32 opcode) /* CMP.L An,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b090_0)(uae_u32 opcode) /* CMP.L (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b098_0)(uae_u32 opcode) /* CMP.L (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0a0_0)(uae_u32 opcode) /* CMP.L -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0a8_0)(uae_u32 opcode) /* CMP.L (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0b0_0)(uae_u32 opcode) /* CMP.L (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0b8_0)(uae_u32 opcode) /* CMP.L (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0b9_0)(uae_u32 opcode) /* CMP.L (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0ba_0)(uae_u32 opcode) /* CMP.L (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0bb_0)(uae_u32 opcode) /* CMP.L (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0bc_0)(uae_u32 opcode) /* CMP.L #.L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0c0_0)(uae_u32 opcode) /* CMPA.W Dn,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0c8_0)(uae_u32 opcode) /* CMPA.W An,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0d0_0)(uae_u32 opcode) /* CMPA.W (An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0d8_0)(uae_u32 opcode) /* CMPA.W (An)+,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0e0_0)(uae_u32 opcode) /* CMPA.W -(An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0e8_0)(uae_u32 opcode) /* CMPA.W (d16,An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0f0_0)(uae_u32 opcode) /* CMPA.W (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0f8_0)(uae_u32 opcode) /* CMPA.W (xxx).W,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0f9_0)(uae_u32 opcode) /* CMPA.W (xxx).L,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0fa_0)(uae_u32 opcode) /* CMPA.W (d16,PC),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0fb_0)(uae_u32 opcode) /* CMPA.W (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0fc_0)(uae_u32 opcode) /* CMPA.W #.W,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b100_0)(uae_u32 opcode) /* EOR.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b108_0)(uae_u32 opcode) /* CMPM.B (An)+,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b110_0)(uae_u32 opcode) /* EOR.B Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b118_0)(uae_u32 opcode) /* EOR.B Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b120_0)(uae_u32 opcode) /* EOR.B Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b128_0)(uae_u32 opcode) /* EOR.B Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b130_0)(uae_u32 opcode) /* EOR.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b138_0)(uae_u32 opcode) /* EOR.B Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b139_0)(uae_u32 opcode) /* EOR.B Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s8 dst = get_byte(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b140_0)(uae_u32 opcode) /* EOR.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b148_0)(uae_u32 opcode) /* CMPM.W (An)+,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b150_0)(uae_u32 opcode) /* EOR.W Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b158_0)(uae_u32 opcode) /* EOR.W Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b160_0)(uae_u32 opcode) /* EOR.W Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b168_0)(uae_u32 opcode) /* EOR.W Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 dst = get_word(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b170_0)(uae_u32 opcode) /* EOR.W Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 dst = get_word(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b178_0)(uae_u32 opcode) /* EOR.W Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 dst = get_word(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b179_0)(uae_u32 opcode) /* EOR.W Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s16 dst = get_word(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b180_0)(uae_u32 opcode) /* EOR.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b188_0)(uae_u32 opcode) /* CMPM.L (An)+,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b190_0)(uae_u32 opcode) /* EOR.L Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b198_0)(uae_u32 opcode) /* EOR.L Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1a0_0)(uae_u32 opcode) /* EOR.L Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1a8_0)(uae_u32 opcode) /* EOR.L Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1b0_0)(uae_u32 opcode) /* EOR.L Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1b8_0)(uae_u32 opcode) /* EOR.L Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1b9_0)(uae_u32 opcode) /* EOR.L Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s32 dst = get_long(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1c0_0)(uae_u32 opcode) /* CMPA.L Dn,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1c8_0)(uae_u32 opcode) /* CMPA.L An,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1d0_0)(uae_u32 opcode) /* CMPA.L (An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1d8_0)(uae_u32 opcode) /* CMPA.L (An)+,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1e0_0)(uae_u32 opcode) /* CMPA.L -(An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1e8_0)(uae_u32 opcode) /* CMPA.L (d16,An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1f0_0)(uae_u32 opcode) /* CMPA.L (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1f8_0)(uae_u32 opcode) /* CMPA.L (xxx).W,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1f9_0)(uae_u32 opcode) /* CMPA.L (xxx).L,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1fa_0)(uae_u32 opcode) /* CMPA.L (d16,PC),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1fb_0)(uae_u32 opcode) /* CMPA.L (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1fc_0)(uae_u32 opcode) /* CMPA.L #.L,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c000_0)(uae_u32 opcode) /* AND.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c010_0)(uae_u32 opcode) /* AND.B (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c018_0)(uae_u32 opcode) /* AND.B (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c020_0)(uae_u32 opcode) /* AND.B -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c028_0)(uae_u32 opcode) /* AND.B (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c030_0)(uae_u32 opcode) /* AND.B (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c038_0)(uae_u32 opcode) /* AND.B (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c039_0)(uae_u32 opcode) /* AND.B (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c03a_0)(uae_u32 opcode) /* AND.B (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c03b_0)(uae_u32 opcode) /* AND.B (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c03c_0)(uae_u32 opcode) /* AND.B #.B,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c040_0)(uae_u32 opcode) /* AND.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c050_0)(uae_u32 opcode) /* AND.W (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c058_0)(uae_u32 opcode) /* AND.W (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c060_0)(uae_u32 opcode) /* AND.W -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c068_0)(uae_u32 opcode) /* AND.W (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c070_0)(uae_u32 opcode) /* AND.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c078_0)(uae_u32 opcode) /* AND.W (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c079_0)(uae_u32 opcode) /* AND.W (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c07a_0)(uae_u32 opcode) /* AND.W (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c07b_0)(uae_u32 opcode) /* AND.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c07c_0)(uae_u32 opcode) /* AND.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c080_0)(uae_u32 opcode) /* AND.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c090_0)(uae_u32 opcode) /* AND.L (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c098_0)(uae_u32 opcode) /* AND.L (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0a0_0)(uae_u32 opcode) /* AND.L -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0a8_0)(uae_u32 opcode) /* AND.L (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0b0_0)(uae_u32 opcode) /* AND.L (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0b8_0)(uae_u32 opcode) /* AND.L (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0b9_0)(uae_u32 opcode) /* AND.L (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0ba_0)(uae_u32 opcode) /* AND.L (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0bb_0)(uae_u32 opcode) /* AND.L (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0bc_0)(uae_u32 opcode) /* AND.L #.L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0c0_0)(uae_u32 opcode) /* MULU.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0d0_0)(uae_u32 opcode) /* MULU.W (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0d8_0)(uae_u32 opcode) /* MULU.W (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0e0_0)(uae_u32 opcode) /* MULU.W -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0e8_0)(uae_u32 opcode) /* MULU.W (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0f0_0)(uae_u32 opcode) /* MULU.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0f8_0)(uae_u32 opcode) /* MULU.W (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0f9_0)(uae_u32 opcode) /* MULU.W (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0fa_0)(uae_u32 opcode) /* MULU.W (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0fb_0)(uae_u32 opcode) /* MULU.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0fc_0)(uae_u32 opcode) /* MULU.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c100_0)(uae_u32 opcode) /* ABCD.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{ uae_u16 newv_lo = (src & 0xF) + (dst & 0xF) + (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = (src & 0xF0) + (dst & 0xF0); + uae_u16 newv, tmp_newv; + int cflg; + newv = tmp_newv = newv_hi + newv_lo; + if (newv_lo > 9) { newv += 6; } + cflg = (newv & 0x3F0) > 0x90; + if (cflg) newv += 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c108_0)(uae_u32 opcode) /* ABCD.B -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; +{ uae_u16 newv_lo = (src & 0xF) + (dst & 0xF) + (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = (src & 0xF0) + (dst & 0xF0); + uae_u16 newv, tmp_newv; + int cflg; + newv = tmp_newv = newv_hi + newv_lo; + if (newv_lo > 9) { newv += 6; } + cflg = (newv & 0x3F0) > 0x90; + if (cflg) newv += 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + put_byte(dsta,newv); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c110_0)(uae_u32 opcode) /* AND.B Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c118_0)(uae_u32 opcode) /* AND.B Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c120_0)(uae_u32 opcode) /* AND.B Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c128_0)(uae_u32 opcode) /* AND.B Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c130_0)(uae_u32 opcode) /* AND.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c138_0)(uae_u32 opcode) /* AND.B Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c139_0)(uae_u32 opcode) /* AND.B Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s8 dst = get_byte(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_c140_0)(uae_u32 opcode) /* EXG.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + m68k_dreg(regs, srcreg) = (dst); + m68k_dreg(regs, dstreg) = (src); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_c148_0)(uae_u32 opcode) /* EXG.L An,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uae_s32 dst = m68k_areg(regs, dstreg); + m68k_areg(regs, srcreg) = (dst); + m68k_areg(regs, dstreg) = (src); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_c150_0)(uae_u32 opcode) /* AND.W Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c158_0)(uae_u32 opcode) /* AND.W Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c160_0)(uae_u32 opcode) /* AND.W Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c168_0)(uae_u32 opcode) /* AND.W Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 dst = get_word(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c170_0)(uae_u32 opcode) /* AND.W Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 dst = get_word(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c178_0)(uae_u32 opcode) /* AND.W Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 dst = get_word(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c179_0)(uae_u32 opcode) /* AND.W Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s16 dst = get_word(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_c188_0)(uae_u32 opcode) /* EXG.L Dn,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_areg(regs, dstreg); + m68k_dreg(regs, srcreg) = (dst); + m68k_areg(regs, dstreg) = (src); +}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_c190_0)(uae_u32 opcode) /* AND.L Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c198_0)(uae_u32 opcode) /* AND.L Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1a0_0)(uae_u32 opcode) /* AND.L Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1a8_0)(uae_u32 opcode) /* AND.L Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1b0_0)(uae_u32 opcode) /* AND.L Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1b8_0)(uae_u32 opcode) /* AND.L Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1b9_0)(uae_u32 opcode) /* AND.L Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s32 dst = get_long(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1c0_0)(uae_u32 opcode) /* MULS.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1d0_0)(uae_u32 opcode) /* MULS.W (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1d8_0)(uae_u32 opcode) /* MULS.W (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1e0_0)(uae_u32 opcode) /* MULS.W -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1e8_0)(uae_u32 opcode) /* MULS.W (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1f0_0)(uae_u32 opcode) /* MULS.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1f8_0)(uae_u32 opcode) /* MULS.W (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1f9_0)(uae_u32 opcode) /* MULS.W (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1fa_0)(uae_u32 opcode) /* MULS.W (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1fb_0)(uae_u32 opcode) /* MULS.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1fc_0)(uae_u32 opcode) /* MULS.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d000_0)(uae_u32 opcode) /* ADD.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d010_0)(uae_u32 opcode) /* ADD.B (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d018_0)(uae_u32 opcode) /* ADD.B (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d020_0)(uae_u32 opcode) /* ADD.B -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d028_0)(uae_u32 opcode) /* ADD.B (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d030_0)(uae_u32 opcode) /* ADD.B (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d038_0)(uae_u32 opcode) /* ADD.B (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d039_0)(uae_u32 opcode) /* ADD.B (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d03a_0)(uae_u32 opcode) /* ADD.B (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d03b_0)(uae_u32 opcode) /* ADD.B (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d03c_0)(uae_u32 opcode) /* ADD.B #.B,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d040_0)(uae_u32 opcode) /* ADD.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d048_0)(uae_u32 opcode) /* ADD.W An,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d050_0)(uae_u32 opcode) /* ADD.W (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d058_0)(uae_u32 opcode) /* ADD.W (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d060_0)(uae_u32 opcode) /* ADD.W -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d068_0)(uae_u32 opcode) /* ADD.W (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d070_0)(uae_u32 opcode) /* ADD.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d078_0)(uae_u32 opcode) /* ADD.W (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d079_0)(uae_u32 opcode) /* ADD.W (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d07a_0)(uae_u32 opcode) /* ADD.W (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d07b_0)(uae_u32 opcode) /* ADD.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d07c_0)(uae_u32 opcode) /* ADD.W #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d080_0)(uae_u32 opcode) /* ADD.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d088_0)(uae_u32 opcode) /* ADD.L An,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d090_0)(uae_u32 opcode) /* ADD.L (An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d098_0)(uae_u32 opcode) /* ADD.L (An)+,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d0a0_0)(uae_u32 opcode) /* ADD.L -(An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d0a8_0)(uae_u32 opcode) /* ADD.L (d16,An),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d0b0_0)(uae_u32 opcode) /* ADD.L (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d0b8_0)(uae_u32 opcode) /* ADD.L (xxx).W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d0b9_0)(uae_u32 opcode) /* ADD.L (xxx).L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d0ba_0)(uae_u32 opcode) /* ADD.L (d16,PC),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d0bb_0)(uae_u32 opcode) /* ADD.L (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d0bc_0)(uae_u32 opcode) /* ADD.L #.L,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}m68k_incpc(6); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d0c0_0)(uae_u32 opcode) /* ADDA.W Dn,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d0c8_0)(uae_u32 opcode) /* ADDA.W An,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d0d0_0)(uae_u32 opcode) /* ADDA.W (An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d0d8_0)(uae_u32 opcode) /* ADDA.W (An)+,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d0e0_0)(uae_u32 opcode) /* ADDA.W -(An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d0e8_0)(uae_u32 opcode) /* ADDA.W (d16,An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d0f0_0)(uae_u32 opcode) /* ADDA.W (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d0f8_0)(uae_u32 opcode) /* ADDA.W (xxx).W,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d0f9_0)(uae_u32 opcode) /* ADDA.W (xxx).L,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d0fa_0)(uae_u32 opcode) /* ADDA.W (d16,PC),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d0fb_0)(uae_u32 opcode) /* ADDA.W (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d0fc_0)(uae_u32 opcode) /* ADDA.W #.W,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_d100_0)(uae_u32 opcode) /* ADDX.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = dst + src + (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgo) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d108_0)(uae_u32 opcode) /* ADDX.B -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; +{ uae_u32 newv = dst + src + (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgo) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d110_0)(uae_u32 opcode) /* ADD.B Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d118_0)(uae_u32 opcode) /* ADD.B Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s8 dst = get_byte(dsta); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d120_0)(uae_u32 opcode) /* ADD.B Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d128_0)(uae_u32 opcode) /* ADD.B Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d130_0)(uae_u32 opcode) /* ADD.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d138_0)(uae_u32 opcode) /* ADD.B Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d139_0)(uae_u32 opcode) /* ADD.B Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d140_0)(uae_u32 opcode) /* ADDX.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = dst + src + (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgo) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); + SET_NFLG (((uae_s16)(newv)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d148_0)(uae_u32 opcode) /* ADDX.W -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; +{ uae_u32 newv = dst + src + (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgo) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); + SET_NFLG (((uae_s16)(newv)) < 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d150_0)(uae_u32 opcode) /* ADD.W Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d158_0)(uae_u32 opcode) /* ADD.W Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s16 dst = get_word(dsta); + m68k_areg(regs, dstreg) += 2; +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d160_0)(uae_u32 opcode) /* ADD.W Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; +{ uae_s16 dst = get_word(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d168_0)(uae_u32 opcode) /* ADD.W Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d170_0)(uae_u32 opcode) /* ADD.W Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d178_0)(uae_u32 opcode) /* ADD.W Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d179_0)(uae_u32 opcode) /* ADD.W Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d180_0)(uae_u32 opcode) /* ADDX.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = dst + src + (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgo) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d188_0)(uae_u32 opcode) /* ADDX.L -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; +{ uae_u32 newv = dst + src + (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgo) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); + SET_NFLG (((uae_s32)(newv)) < 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d190_0)(uae_u32 opcode) /* ADD.L Dn,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d198_0)(uae_u32 opcode) /* ADD.L Dn,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 dst = get_long(dsta); + m68k_areg(regs, dstreg) += 4; +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d1a0_0)(uae_u32 opcode) /* ADD.L Dn,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; +{ uae_s32 dst = get_long(dsta); + m68k_areg (regs, dstreg) = dsta; +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d1a8_0)(uae_u32 opcode) /* ADD.L Dn,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d1b0_0)(uae_u32 opcode) /* ADD.L Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{m68k_incpc(2); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d1b8_0)(uae_u32 opcode) /* ADD.L Dn,(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d1b9_0)(uae_u32 opcode) /* ADD.L Dn,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_ilong(2); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d1c0_0)(uae_u32 opcode) /* ADDA.L Dn,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d1c8_0)(uae_u32 opcode) /* ADDA.L An,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d1d0_0)(uae_u32 opcode) /* ADDA.L (An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d1d8_0)(uae_u32 opcode) /* ADDA.L (An)+,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#endif + +#ifdef PART_8 +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d1e0_0)(uae_u32 opcode) /* ADDA.L -(An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d1e8_0)(uae_u32 opcode) /* ADDA.L (d16,An),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d1f0_0)(uae_u32 opcode) /* ADDA.L (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d1f8_0)(uae_u32 opcode) /* ADDA.L (xxx).W,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d1f9_0)(uae_u32 opcode) /* ADDA.L (xxx).L,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d1fa_0)(uae_u32 opcode) /* ADDA.L (d16,PC),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d1fb_0)(uae_u32 opcode) /* ADDA.L (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{m68k_incpc(2); +{ uaecptr tmppc = m68k_getpc(); + uaecptr srca = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d1fc_0)(uae_u32 opcode) /* ADDA.L #.L,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_e000_0)(uae_u32 opcode) /* ASR.B #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + uae_u32 sign = (0x80 & val) >> 7; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 8) { + val = 0xff & (uae_u32)-(uae_s32)sign; + SET_CFLG (sign); + COPY_CARRY; + } else { + val >>= cnt - 1; + SET_CFLG (val & 1); + COPY_CARRY; + val >>= 1; + val |= (0xff << (8 - cnt)) & (uae_u32)-(uae_s32)sign; + val &= 0xff; + } + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e008_0)(uae_u32 opcode) /* LSR.B #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 8) { + SET_CFLG ((cnt == 8) & (val >> 7)); + COPY_CARRY; + val = 0; + } else { + val >>= cnt - 1; + SET_CFLG (val & 1); + COPY_CARRY; + val >>= 1; + } + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e010_0)(uae_u32 opcode) /* ROXR.B #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + cnt &= 63; + CLEAR_CZNV; +{ cnt--; + { + uae_u32 carry; + uae_u32 hival = (val << 1) | GET_XFLG; + hival <<= (7 - cnt); + val >>= cnt; + carry = val & 1; + val >>= 1; + val |= hival; + SET_XFLG (carry); + val &= 0xff; + } } + SET_CFLG (GET_XFLG); + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e018_0)(uae_u32 opcode) /* ROR.B #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + cnt &= 63; + CLEAR_CZNV; +{ uae_u32 hival; + cnt &= 7; + hival = val << (8 - cnt); + val >>= cnt; + val |= hival; + val &= 0xff; + SET_CFLG ((val & 0x80) >> 7); + } + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e020_0)(uae_u32 opcode) /* ASR.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 cnt = m68k_dreg(regs, srcreg); +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + uae_u32 sign = (0x80 & val) >> 7; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 8) { + val = 0xff & (uae_u32)-(uae_s32)sign; + SET_CFLG (sign); + COPY_CARRY; + } else if (cnt > 0) { + val >>= cnt - 1; + SET_CFLG (val & 1); + COPY_CARRY; + val >>= 1; + val |= (0xff << (8 - cnt)) & (uae_u32)-(uae_s32)sign; + val &= 0xff; + } + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e028_0)(uae_u32 opcode) /* LSR.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 cnt = m68k_dreg(regs, srcreg); +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 8) { + SET_CFLG ((cnt == 8) & (val >> 7)); + COPY_CARRY; + val = 0; + } else if (cnt > 0) { + val >>= cnt - 1; + SET_CFLG (val & 1); + COPY_CARRY; + val >>= 1; + } + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e030_0)(uae_u32 opcode) /* ROXR.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 cnt = m68k_dreg(regs, srcreg); +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 36) cnt -= 36; + if (cnt >= 18) cnt -= 18; + if (cnt >= 9) cnt -= 9; + if (cnt > 0) { + cnt--; + { + uae_u32 carry; + uae_u32 hival = (val << 1) | GET_XFLG; + hival <<= (7 - cnt); + val >>= cnt; + carry = val & 1; + val >>= 1; + val |= hival; + SET_XFLG (carry); + val &= 0xff; + } } + SET_CFLG (GET_XFLG); + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e038_0)(uae_u32 opcode) /* ROR.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 cnt = m68k_dreg(regs, srcreg); +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt > 0) { uae_u32 hival; + cnt &= 7; + hival = val << (8 - cnt); + val >>= cnt; + val |= hival; + val &= 0xff; + SET_CFLG ((val & 0x80) >> 7); + } + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e040_0)(uae_u32 opcode) /* ASR.W #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = (0x8000 & val) >> 15; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 16) { + val = 0xffff & (uae_u32)-(uae_s32)sign; + SET_CFLG (sign); + COPY_CARRY; + } else { + val >>= cnt - 1; + SET_CFLG (val & 1); + COPY_CARRY; + val >>= 1; + val |= (0xffff << (16 - cnt)) & (uae_u32)-(uae_s32)sign; + val &= 0xffff; + } + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e048_0)(uae_u32 opcode) /* LSR.W #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 16) { + SET_CFLG ((cnt == 16) & (val >> 15)); + COPY_CARRY; + val = 0; + } else { + val >>= cnt - 1; + SET_CFLG (val & 1); + COPY_CARRY; + val >>= 1; + } + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e050_0)(uae_u32 opcode) /* ROXR.W #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + cnt &= 63; + CLEAR_CZNV; +{ cnt--; + { + uae_u32 carry; + uae_u32 hival = (val << 1) | GET_XFLG; + hival <<= (15 - cnt); + val >>= cnt; + carry = val & 1; + val >>= 1; + val |= hival; + SET_XFLG (carry); + val &= 0xffff; + } } + SET_CFLG (GET_XFLG); + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e058_0)(uae_u32 opcode) /* ROR.W #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + cnt &= 63; + CLEAR_CZNV; +{ uae_u32 hival; + cnt &= 15; + hival = val << (16 - cnt); + val >>= cnt; + val |= hival; + val &= 0xffff; + SET_CFLG ((val & 0x8000) >> 15); + } + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e060_0)(uae_u32 opcode) /* ASR.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 cnt = m68k_dreg(regs, srcreg); +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = (0x8000 & val) >> 15; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 16) { + val = 0xffff & (uae_u32)-(uae_s32)sign; + SET_CFLG (sign); + COPY_CARRY; + } else if (cnt > 0) { + val >>= cnt - 1; + SET_CFLG (val & 1); + COPY_CARRY; + val >>= 1; + val |= (0xffff << (16 - cnt)) & (uae_u32)-(uae_s32)sign; + val &= 0xffff; + } + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e068_0)(uae_u32 opcode) /* LSR.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 cnt = m68k_dreg(regs, srcreg); +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 16) { + SET_CFLG ((cnt == 16) & (val >> 15)); + COPY_CARRY; + val = 0; + } else if (cnt > 0) { + val >>= cnt - 1; + SET_CFLG (val & 1); + COPY_CARRY; + val >>= 1; + } + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e070_0)(uae_u32 opcode) /* ROXR.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 cnt = m68k_dreg(regs, srcreg); +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 34) cnt -= 34; + if (cnt >= 17) cnt -= 17; + if (cnt > 0) { + cnt--; + { + uae_u32 carry; + uae_u32 hival = (val << 1) | GET_XFLG; + hival <<= (15 - cnt); + val >>= cnt; + carry = val & 1; + val >>= 1; + val |= hival; + SET_XFLG (carry); + val &= 0xffff; + } } + SET_CFLG (GET_XFLG); + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e078_0)(uae_u32 opcode) /* ROR.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 cnt = m68k_dreg(regs, srcreg); +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt > 0) { uae_u32 hival; + cnt &= 15; + hival = val << (16 - cnt); + val >>= cnt; + val |= hival; + val &= 0xffff; + SET_CFLG ((val & 0x8000) >> 15); + } + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e080_0)(uae_u32 opcode) /* ASR.L #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + uae_u32 sign = (0x80000000 & val) >> 31; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 32) { + val = 0xffffffff & (uae_u32)-(uae_s32)sign; + SET_CFLG (sign); + COPY_CARRY; + } else { + val >>= cnt - 1; + SET_CFLG (val & 1); + COPY_CARRY; + val >>= 1; + val |= (0xffffffff << (32 - cnt)) & (uae_u32)-(uae_s32)sign; + val &= 0xffffffff; + } + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e088_0)(uae_u32 opcode) /* LSR.L #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 32) { + SET_CFLG ((cnt == 32) & (val >> 31)); + COPY_CARRY; + val = 0; + } else { + val >>= cnt - 1; + SET_CFLG (val & 1); + COPY_CARRY; + val >>= 1; + } + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e090_0)(uae_u32 opcode) /* ROXR.L #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + cnt &= 63; + CLEAR_CZNV; +{ cnt--; + { + uae_u32 carry; + uae_u32 hival = (val << 1) | GET_XFLG; + hival <<= (31 - cnt); + val >>= cnt; + carry = val & 1; + val >>= 1; + val |= hival; + SET_XFLG (carry); + val &= 0xffffffff; + } } + SET_CFLG (GET_XFLG); + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e098_0)(uae_u32 opcode) /* ROR.L #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + cnt &= 63; + CLEAR_CZNV; +{ uae_u32 hival; + cnt &= 31; + hival = val << (32 - cnt); + val >>= cnt; + val |= hival; + val &= 0xffffffff; + SET_CFLG ((val & 0x80000000) >> 31); + } + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e0a0_0)(uae_u32 opcode) /* ASR.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 cnt = m68k_dreg(regs, srcreg); +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + uae_u32 sign = (0x80000000 & val) >> 31; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 32) { + val = 0xffffffff & (uae_u32)-(uae_s32)sign; + SET_CFLG (sign); + COPY_CARRY; + } else if (cnt > 0) { + val >>= cnt - 1; + SET_CFLG (val & 1); + COPY_CARRY; + val >>= 1; + val |= (0xffffffff << (32 - cnt)) & (uae_u32)-(uae_s32)sign; + val &= 0xffffffff; + } + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e0a8_0)(uae_u32 opcode) /* LSR.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 cnt = m68k_dreg(regs, srcreg); +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 32) { + SET_CFLG ((cnt == 32) & (val >> 31)); + COPY_CARRY; + val = 0; + } else if (cnt > 0) { + val >>= cnt - 1; + SET_CFLG (val & 1); + COPY_CARRY; + val >>= 1; + } + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e0b0_0)(uae_u32 opcode) /* ROXR.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 cnt = m68k_dreg(regs, srcreg); +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 33) cnt -= 33; + if (cnt > 0) { + cnt--; + { + uae_u32 carry; + uae_u32 hival = (val << 1) | GET_XFLG; + hival <<= (31 - cnt); + val >>= cnt; + carry = val & 1; + val >>= 1; + val |= hival; + SET_XFLG (carry); + val &= 0xffffffff; + } } + SET_CFLG (GET_XFLG); + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e0b8_0)(uae_u32 opcode) /* ROR.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 cnt = m68k_dreg(regs, srcreg); +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + cnt &= 63; + CLEAR_CZNV; + if (cnt > 0) { uae_u32 hival; + cnt &= 31; + hival = val << (32 - cnt); + val >>= cnt; + val |= hival; + val &= 0xffffffff; + SET_CFLG ((val & 0x80000000) >> 31); + } + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e0d0_0)(uae_u32 opcode) /* ASRW.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 cflg = val & 1; + val = (val >> 1) | sign; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + SET_CFLG (cflg); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e0d8_0)(uae_u32 opcode) /* ASRW.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); + m68k_areg(regs, srcreg) += 2; +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 cflg = val & 1; + val = (val >> 1) | sign; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + SET_CFLG (cflg); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e0e0_0)(uae_u32 opcode) /* ASRW.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; +{ uae_s16 data = get_word(dataa); + m68k_areg (regs, srcreg) = dataa; +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 cflg = val & 1; + val = (val >> 1) | sign; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + SET_CFLG (cflg); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e0e8_0)(uae_u32 opcode) /* ASRW.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 cflg = val & 1; + val = (val >> 1) | sign; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + SET_CFLG (cflg); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e0f0_0)(uae_u32 opcode) /* ASRW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 cflg = val & 1; + val = (val >> 1) | sign; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + SET_CFLG (cflg); + COPY_CARRY; + put_word(dataa,val); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e0f8_0)(uae_u32 opcode) /* ASRW.W (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 cflg = val & 1; + val = (val >> 1) | sign; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + SET_CFLG (cflg); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e0f9_0)(uae_u32 opcode) /* ASRW.W (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr dataa = get_ilong(2); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 cflg = val & 1; + val = (val >> 1) | sign; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + SET_CFLG (cflg); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e100_0)(uae_u32 opcode) /* ASL.B #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 8) { + SET_VFLG (val != 0); + SET_CFLG (cnt == 8 ? val & 1 : 0); + COPY_CARRY; + val = 0; + } else { + uae_u32 mask = (0xff << (7 - cnt)) & 0xff; + SET_VFLG ((val & mask) != mask && (val & mask) != 0); + val <<= cnt - 1; + SET_CFLG ((val & 0x80) >> 7); + COPY_CARRY; + val <<= 1; + val &= 0xff; + } + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e108_0)(uae_u32 opcode) /* LSL.B #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 8) { + SET_CFLG (cnt == 8 ? val & 1 : 0); + COPY_CARRY; + val = 0; + } else { + val <<= (cnt - 1); + SET_CFLG ((val & 0x80) >> 7); + COPY_CARRY; + val <<= 1; + val &= 0xff; + } + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e110_0)(uae_u32 opcode) /* ROXL.B #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + cnt &= 63; + CLEAR_CZNV; +{ cnt--; + { + uae_u32 carry; + uae_u32 loval = val >> (7 - cnt); + carry = loval & 1; + val = (((val << 1) | GET_XFLG) << cnt) | (loval >> 1); + SET_XFLG (carry); + val &= 0xff; + } } + SET_CFLG (GET_XFLG); + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e118_0)(uae_u32 opcode) /* ROL.B #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + cnt &= 63; + CLEAR_CZNV; +{ uae_u32 loval; + cnt &= 7; + loval = val >> (8 - cnt); + val <<= cnt; + val |= loval; + val &= 0xff; + SET_CFLG (val & 1); +} + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e120_0)(uae_u32 opcode) /* ASL.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 cnt = m68k_dreg(regs, srcreg); +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 8) { + SET_VFLG (val != 0); + SET_CFLG (cnt == 8 ? val & 1 : 0); + COPY_CARRY; + val = 0; + } else if (cnt > 0) { + uae_u32 mask = (0xff << (7 - cnt)) & 0xff; + SET_VFLG ((val & mask) != mask && (val & mask) != 0); + val <<= cnt - 1; + SET_CFLG ((val & 0x80) >> 7); + COPY_CARRY; + val <<= 1; + val &= 0xff; + } + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e128_0)(uae_u32 opcode) /* LSL.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 cnt = m68k_dreg(regs, srcreg); +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 8) { + SET_CFLG (cnt == 8 ? val & 1 : 0); + COPY_CARRY; + val = 0; + } else if (cnt > 0) { + val <<= (cnt - 1); + SET_CFLG ((val & 0x80) >> 7); + COPY_CARRY; + val <<= 1; + val &= 0xff; + } + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e130_0)(uae_u32 opcode) /* ROXL.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 cnt = m68k_dreg(regs, srcreg); +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 36) cnt -= 36; + if (cnt >= 18) cnt -= 18; + if (cnt >= 9) cnt -= 9; + if (cnt > 0) { + cnt--; + { + uae_u32 carry; + uae_u32 loval = val >> (7 - cnt); + carry = loval & 1; + val = (((val << 1) | GET_XFLG) << cnt) | (loval >> 1); + SET_XFLG (carry); + val &= 0xff; + } } + SET_CFLG (GET_XFLG); + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e138_0)(uae_u32 opcode) /* ROL.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 cnt = m68k_dreg(regs, srcreg); +{ uae_s8 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u8)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt > 0) { + uae_u32 loval; + cnt &= 7; + loval = val >> (8 - cnt); + val <<= cnt; + val |= loval; + val &= 0xff; + SET_CFLG (val & 1); +} + SET_ZFLG (((uae_s8)(val)) == 0); + SET_NFLG (((uae_s8)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e140_0)(uae_u32 opcode) /* ASL.W #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 16) { + SET_VFLG (val != 0); + SET_CFLG (cnt == 16 ? val & 1 : 0); + COPY_CARRY; + val = 0; + } else { + uae_u32 mask = (0xffff << (15 - cnt)) & 0xffff; + SET_VFLG ((val & mask) != mask && (val & mask) != 0); + val <<= cnt - 1; + SET_CFLG ((val & 0x8000) >> 15); + COPY_CARRY; + val <<= 1; + val &= 0xffff; + } + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e148_0)(uae_u32 opcode) /* LSL.W #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 16) { + SET_CFLG (cnt == 16 ? val & 1 : 0); + COPY_CARRY; + val = 0; + } else { + val <<= (cnt - 1); + SET_CFLG ((val & 0x8000) >> 15); + COPY_CARRY; + val <<= 1; + val &= 0xffff; + } + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e150_0)(uae_u32 opcode) /* ROXL.W #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + cnt &= 63; + CLEAR_CZNV; +{ cnt--; + { + uae_u32 carry; + uae_u32 loval = val >> (15 - cnt); + carry = loval & 1; + val = (((val << 1) | GET_XFLG) << cnt) | (loval >> 1); + SET_XFLG (carry); + val &= 0xffff; + } } + SET_CFLG (GET_XFLG); + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e158_0)(uae_u32 opcode) /* ROL.W #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + cnt &= 63; + CLEAR_CZNV; +{ uae_u32 loval; + cnt &= 15; + loval = val >> (16 - cnt); + val <<= cnt; + val |= loval; + val &= 0xffff; + SET_CFLG (val & 1); +} + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e160_0)(uae_u32 opcode) /* ASL.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 cnt = m68k_dreg(regs, srcreg); +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 16) { + SET_VFLG (val != 0); + SET_CFLG (cnt == 16 ? val & 1 : 0); + COPY_CARRY; + val = 0; + } else if (cnt > 0) { + uae_u32 mask = (0xffff << (15 - cnt)) & 0xffff; + SET_VFLG ((val & mask) != mask && (val & mask) != 0); + val <<= cnt - 1; + SET_CFLG ((val & 0x8000) >> 15); + COPY_CARRY; + val <<= 1; + val &= 0xffff; + } + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e168_0)(uae_u32 opcode) /* LSL.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 cnt = m68k_dreg(regs, srcreg); +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 16) { + SET_CFLG (cnt == 16 ? val & 1 : 0); + COPY_CARRY; + val = 0; + } else if (cnt > 0) { + val <<= (cnt - 1); + SET_CFLG ((val & 0x8000) >> 15); + COPY_CARRY; + val <<= 1; + val &= 0xffff; + } + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e170_0)(uae_u32 opcode) /* ROXL.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 cnt = m68k_dreg(regs, srcreg); +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 34) cnt -= 34; + if (cnt >= 17) cnt -= 17; + if (cnt > 0) { + cnt--; + { + uae_u32 carry; + uae_u32 loval = val >> (15 - cnt); + carry = loval & 1; + val = (((val << 1) | GET_XFLG) << cnt) | (loval >> 1); + SET_XFLG (carry); + val &= 0xffff; + } } + SET_CFLG (GET_XFLG); + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e178_0)(uae_u32 opcode) /* ROL.W Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 cnt = m68k_dreg(regs, srcreg); +{ uae_s16 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = (uae_u16)data; + cnt &= 63; + CLEAR_CZNV; + if (cnt > 0) { + uae_u32 loval; + cnt &= 15; + loval = val >> (16 - cnt); + val <<= cnt; + val |= loval; + val &= 0xffff; + SET_CFLG (val & 1); +} + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e180_0)(uae_u32 opcode) /* ASL.L #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 32) { + SET_VFLG (val != 0); + SET_CFLG (cnt == 32 ? val & 1 : 0); + COPY_CARRY; + val = 0; + } else { + uae_u32 mask = (0xffffffff << (31 - cnt)) & 0xffffffff; + SET_VFLG ((val & mask) != mask && (val & mask) != 0); + val <<= cnt - 1; + SET_CFLG ((val & 0x80000000) >> 31); + COPY_CARRY; + val <<= 1; + val &= 0xffffffff; + } + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e188_0)(uae_u32 opcode) /* LSL.L #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 32) { + SET_CFLG (cnt == 32 ? val & 1 : 0); + COPY_CARRY; + val = 0; + } else { + val <<= (cnt - 1); + SET_CFLG ((val & 0x80000000) >> 31); + COPY_CARRY; + val <<= 1; + val &= 0xffffffff; + } + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e190_0)(uae_u32 opcode) /* ROXL.L #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + cnt &= 63; + CLEAR_CZNV; +{ cnt--; + { + uae_u32 carry; + uae_u32 loval = val >> (31 - cnt); + carry = loval & 1; + val = (((val << 1) | GET_XFLG) << cnt) | (loval >> 1); + SET_XFLG (carry); + val &= 0xffffffff; + } } + SET_CFLG (GET_XFLG); + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e198_0)(uae_u32 opcode) /* ROL.L #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 cnt = srcreg; +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + cnt &= 63; + CLEAR_CZNV; +{ uae_u32 loval; + cnt &= 31; + loval = val >> (32 - cnt); + val <<= cnt; + val |= loval; + val &= 0xffffffff; + SET_CFLG (val & 1); +} + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e1a0_0)(uae_u32 opcode) /* ASL.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 cnt = m68k_dreg(regs, srcreg); +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 32) { + SET_VFLG (val != 0); + SET_CFLG (cnt == 32 ? val & 1 : 0); + COPY_CARRY; + val = 0; + } else if (cnt > 0) { + uae_u32 mask = (0xffffffff << (31 - cnt)) & 0xffffffff; + SET_VFLG ((val & mask) != mask && (val & mask) != 0); + val <<= cnt - 1; + SET_CFLG ((val & 0x80000000) >> 31); + COPY_CARRY; + val <<= 1; + val &= 0xffffffff; + } + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e1a8_0)(uae_u32 opcode) /* LSL.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 cnt = m68k_dreg(regs, srcreg); +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 32) { + SET_CFLG (cnt == 32 ? val & 1 : 0); + COPY_CARRY; + val = 0; + } else if (cnt > 0) { + val <<= (cnt - 1); + SET_CFLG ((val & 0x80000000) >> 31); + COPY_CARRY; + val <<= 1; + val &= 0xffffffff; + } + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e1b0_0)(uae_u32 opcode) /* ROXL.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 cnt = m68k_dreg(regs, srcreg); +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + cnt &= 63; + CLEAR_CZNV; + if (cnt >= 33) cnt -= 33; + if (cnt > 0) { + cnt--; + { + uae_u32 carry; + uae_u32 loval = val >> (31 - cnt); + carry = loval & 1; + val = (((val << 1) | GET_XFLG) << cnt) | (loval >> 1); + SET_XFLG (carry); + val &= 0xffffffff; + } } + SET_CFLG (GET_XFLG); + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e1b8_0)(uae_u32 opcode) /* ROL.L Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 cnt = m68k_dreg(regs, srcreg); +{ uae_s32 data = m68k_dreg(regs, dstreg); +{ uae_u32 val = data; + cnt &= 63; + CLEAR_CZNV; + if (cnt > 0) { + uae_u32 loval; + cnt &= 31; + loval = val >> (32 - cnt); + val <<= cnt; + val |= loval; + val &= 0xffffffff; + SET_CFLG (val & 1); +} + SET_ZFLG (((uae_s32)(val)) == 0); + SET_NFLG (((uae_s32)(val)) < 0); + m68k_dreg(regs, dstreg) = (val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e1d0_0)(uae_u32 opcode) /* ASLW.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 sign2; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + sign2 = 0x8000 & val; + SET_CFLG (sign != 0); + COPY_CARRY; + SET_VFLG (GET_VFLG | (sign2 != sign)); + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e1d8_0)(uae_u32 opcode) /* ASLW.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); + m68k_areg(regs, srcreg) += 2; +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 sign2; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + sign2 = 0x8000 & val; + SET_CFLG (sign != 0); + COPY_CARRY; + SET_VFLG (GET_VFLG | (sign2 != sign)); + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e1e0_0)(uae_u32 opcode) /* ASLW.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; +{ uae_s16 data = get_word(dataa); + m68k_areg (regs, srcreg) = dataa; +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 sign2; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + sign2 = 0x8000 & val; + SET_CFLG (sign != 0); + COPY_CARRY; + SET_VFLG (GET_VFLG | (sign2 != sign)); + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e1e8_0)(uae_u32 opcode) /* ASLW.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 sign2; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + sign2 = 0x8000 & val; + SET_CFLG (sign != 0); + COPY_CARRY; + SET_VFLG (GET_VFLG | (sign2 != sign)); + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e1f0_0)(uae_u32 opcode) /* ASLW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 sign2; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + sign2 = 0x8000 & val; + SET_CFLG (sign != 0); + COPY_CARRY; + SET_VFLG (GET_VFLG | (sign2 != sign)); + put_word(dataa,val); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e1f8_0)(uae_u32 opcode) /* ASLW.W (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 sign2; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + sign2 = 0x8000 & val; + SET_CFLG (sign != 0); + COPY_CARRY; + SET_VFLG (GET_VFLG | (sign2 != sign)); + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e1f9_0)(uae_u32 opcode) /* ASLW.W (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr dataa = get_ilong(2); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 sign2; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + sign2 = 0x8000 & val; + SET_CFLG (sign != 0); + COPY_CARRY; + SET_VFLG (GET_VFLG | (sign2 != sign)); + put_word(dataa,val); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e2d0_0)(uae_u32 opcode) /* LSRW.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 carry = val & 1; + val >>= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e2d8_0)(uae_u32 opcode) /* LSRW.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); + m68k_areg(regs, srcreg) += 2; +{ uae_u32 val = (uae_u16)data; + uae_u32 carry = val & 1; + val >>= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e2e0_0)(uae_u32 opcode) /* LSRW.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; +{ uae_s16 data = get_word(dataa); + m68k_areg (regs, srcreg) = dataa; +{ uae_u32 val = (uae_u16)data; + uae_u32 carry = val & 1; + val >>= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e2e8_0)(uae_u32 opcode) /* LSRW.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 carry = val & 1; + val >>= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e2f0_0)(uae_u32 opcode) /* LSRW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 carry = val & 1; + val >>= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e2f8_0)(uae_u32 opcode) /* LSRW.W (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 carry = val & 1; + val >>= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e2f9_0)(uae_u32 opcode) /* LSRW.W (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr dataa = get_ilong(2); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 carry = val & 1; + val >>= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e3d0_0)(uae_u32 opcode) /* LSLW.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e3d8_0)(uae_u32 opcode) /* LSLW.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); + m68k_areg(regs, srcreg) += 2; +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e3e0_0)(uae_u32 opcode) /* LSLW.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; +{ uae_s16 data = get_word(dataa); + m68k_areg (regs, srcreg) = dataa; +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e3e8_0)(uae_u32 opcode) /* LSLW.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e3f0_0)(uae_u32 opcode) /* LSLW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e3f8_0)(uae_u32 opcode) /* LSLW.W (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e3f9_0)(uae_u32 opcode) /* LSLW.W (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr dataa = get_ilong(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e4d0_0)(uae_u32 opcode) /* ROXRW.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (GET_XFLG) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e4d8_0)(uae_u32 opcode) /* ROXRW.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); + m68k_areg(regs, srcreg) += 2; +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (GET_XFLG) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e4e0_0)(uae_u32 opcode) /* ROXRW.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; +{ uae_s16 data = get_word(dataa); + m68k_areg (regs, srcreg) = dataa; +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (GET_XFLG) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e4e8_0)(uae_u32 opcode) /* ROXRW.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (GET_XFLG) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e4f0_0)(uae_u32 opcode) /* ROXRW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (GET_XFLG) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e4f8_0)(uae_u32 opcode) /* ROXRW.W (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (GET_XFLG) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e4f9_0)(uae_u32 opcode) /* ROXRW.W (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr dataa = get_ilong(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (GET_XFLG) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e5d0_0)(uae_u32 opcode) /* ROXLW.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (GET_XFLG) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e5d8_0)(uae_u32 opcode) /* ROXLW.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); + m68k_areg(regs, srcreg) += 2; +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (GET_XFLG) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e5e0_0)(uae_u32 opcode) /* ROXLW.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; +{ uae_s16 data = get_word(dataa); + m68k_areg (regs, srcreg) = dataa; +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (GET_XFLG) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e5e8_0)(uae_u32 opcode) /* ROXLW.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (GET_XFLG) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e5f0_0)(uae_u32 opcode) /* ROXLW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (GET_XFLG) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e5f8_0)(uae_u32 opcode) /* ROXLW.W (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (GET_XFLG) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e5f9_0)(uae_u32 opcode) /* ROXLW.W (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr dataa = get_ilong(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (GET_XFLG) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e6d0_0)(uae_u32 opcode) /* RORW.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (carry) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e6d8_0)(uae_u32 opcode) /* RORW.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); + m68k_areg(regs, srcreg) += 2; +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (carry) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e6e0_0)(uae_u32 opcode) /* RORW.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; +{ uae_s16 data = get_word(dataa); + m68k_areg (regs, srcreg) = dataa; +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (carry) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e6e8_0)(uae_u32 opcode) /* RORW.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (carry) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e6f0_0)(uae_u32 opcode) /* RORW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (carry) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + put_word(dataa,val); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e6f8_0)(uae_u32 opcode) /* RORW.W (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (carry) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e6f9_0)(uae_u32 opcode) /* RORW.W (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr dataa = get_ilong(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (carry) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + put_word(dataa,val); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e7d0_0)(uae_u32 opcode) /* ROLW.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (carry) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e7d8_0)(uae_u32 opcode) /* ROLW.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg); +{ uae_s16 data = get_word(dataa); + m68k_areg(regs, srcreg) += 2; +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (carry) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e7e0_0)(uae_u32 opcode) /* ROLW.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; +{ uae_s16 data = get_word(dataa); + m68k_areg (regs, srcreg) = dataa; +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (carry) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + put_word(dataa,val); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e7e8_0)(uae_u32 opcode) /* ROLW.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (carry) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e7f0_0)(uae_u32 opcode) /* ROLW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (carry) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + put_word(dataa,val); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e7f8_0)(uae_u32 opcode) /* ROLW.W (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (carry) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e7f9_0)(uae_u32 opcode) /* ROLW.W (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr dataa = get_ilong(2); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (carry) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + put_word(dataa,val); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e8c0_0)(uae_u32 opcode) /* BFTST.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e8d0_0)(uae_u32 opcode) /* BFTST.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e8e8_0)(uae_u32 opcode) /* BFTST.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e8f0_0)(uae_u32 opcode) /* BFTST.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e8f8_0)(uae_u32 opcode) /* BFTST.L #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e8f9_0)(uae_u32 opcode) /* BFTST.L #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e8fa_0)(uae_u32 opcode) /* BFTST.L #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_getpc () + 4; + dsta += (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e8fb_0)(uae_u32 opcode) /* BFTST.L #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e9c0_0)(uae_u32 opcode) /* BFEXTU.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e9d0_0)(uae_u32 opcode) /* BFEXTU.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e9e8_0)(uae_u32 opcode) /* BFEXTU.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e9f0_0)(uae_u32 opcode) /* BFEXTU.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e9f8_0)(uae_u32 opcode) /* BFEXTU.L #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e9f9_0)(uae_u32 opcode) /* BFEXTU.L #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e9fa_0)(uae_u32 opcode) /* BFEXTU.L #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_getpc () + 4; + dsta += (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e9fb_0)(uae_u32 opcode) /* BFEXTU.L #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_eac0_0)(uae_u32 opcode) /* BFCHG.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = ~tmp; + tmp <<= (32 - width); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ((offset & 0x1f) == 0 ? 0 : + (0xffffffff << (32 - (offset & 0x1f))))) | + (tmp >> (offset & 0x1f)) | + (((offset & 0x1f) + width) >= 32 ? 0 : + (m68k_dreg(regs, dstreg) & ((uae_u32)0xffffffff >> ((offset & 0x1f) + width)))); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ead0_0)(uae_u32 opcode) /* BFCHG.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = ~tmp; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_eae8_0)(uae_u32 opcode) /* BFCHG.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = ~tmp; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_eaf0_0)(uae_u32 opcode) /* BFCHG.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = ~tmp; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_eaf8_0)(uae_u32 opcode) /* BFCHG.L #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = ~tmp; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_eaf9_0)(uae_u32 opcode) /* BFCHG.L #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = ~tmp; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ebc0_0)(uae_u32 opcode) /* BFEXTS.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ebd0_0)(uae_u32 opcode) /* BFEXTS.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ebe8_0)(uae_u32 opcode) /* BFEXTS.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ebf0_0)(uae_u32 opcode) /* BFEXTS.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ebf8_0)(uae_u32 opcode) /* BFEXTS.L #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ebf9_0)(uae_u32 opcode) /* BFEXTS.L #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ebfa_0)(uae_u32 opcode) /* BFEXTS.L #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_getpc () + 4; + dsta += (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ebfb_0)(uae_u32 opcode) /* BFEXTS.L #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); + m68k_dreg(regs, (extra >> 12) & 7) = tmp; +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ecc0_0)(uae_u32 opcode) /* BFCLR.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = 0; + tmp <<= (32 - width); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ((offset & 0x1f) == 0 ? 0 : + (0xffffffff << (32 - (offset & 0x1f))))) | + (tmp >> (offset & 0x1f)) | + (((offset & 0x1f) + width) >= 32 ? 0 : + (m68k_dreg(regs, dstreg) & ((uae_u32)0xffffffff >> ((offset & 0x1f) + width)))); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ecd0_0)(uae_u32 opcode) /* BFCLR.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = 0; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ece8_0)(uae_u32 opcode) /* BFCLR.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = 0; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ecf0_0)(uae_u32 opcode) /* BFCLR.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = 0; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ecf8_0)(uae_u32 opcode) /* BFCLR.L #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = 0; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ecf9_0)(uae_u32 opcode) /* BFCLR.L #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = 0; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_edc0_0)(uae_u32 opcode) /* BFFFO.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + { uae_u32 mask = 1 << (width-1); + while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} + m68k_dreg(regs, (extra >> 12) & 7) = offset; +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_edd0_0)(uae_u32 opcode) /* BFFFO.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + { uae_u32 mask = 1 << (width-1); + while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} + m68k_dreg(regs, (extra >> 12) & 7) = offset; +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_ede8_0)(uae_u32 opcode) /* BFFFO.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + { uae_u32 mask = 1 << (width-1); + while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} + m68k_dreg(regs, (extra >> 12) & 7) = offset; +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_edf0_0)(uae_u32 opcode) /* BFFFO.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + { uae_u32 mask = 1 << (width-1); + while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} + m68k_dreg(regs, (extra >> 12) & 7) = offset; +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_edf8_0)(uae_u32 opcode) /* BFFFO.L #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + { uae_u32 mask = 1 << (width-1); + while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} + m68k_dreg(regs, (extra >> 12) & 7) = offset; +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_edf9_0)(uae_u32 opcode) /* BFFFO.L #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + { uae_u32 mask = 1 << (width-1); + while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} + m68k_dreg(regs, (extra >> 12) & 7) = offset; +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_edfa_0)(uae_u32 opcode) /* BFFFO.L #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_getpc () + 4; + dsta += (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + { uae_u32 mask = 1 << (width-1); + while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} + m68k_dreg(regs, (extra >> 12) & 7) = offset; +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_edfb_0)(uae_u32 opcode) /* BFFFO.L #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr tmppc = m68k_getpc(); + uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + { uae_u32 mask = 1 << (width-1); + while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} + m68k_dreg(regs, (extra >> 12) & 7) = offset; +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_eec0_0)(uae_u32 opcode) /* BFSET.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = 0xffffffff; + tmp <<= (32 - width); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ((offset & 0x1f) == 0 ? 0 : + (0xffffffff << (32 - (offset & 0x1f))))) | + (tmp >> (offset & 0x1f)) | + (((offset & 0x1f) + width) >= 32 ? 0 : + (m68k_dreg(regs, dstreg) & ((uae_u32)0xffffffff >> ((offset & 0x1f) + width)))); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_eed0_0)(uae_u32 opcode) /* BFSET.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = 0xffffffff; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_eee8_0)(uae_u32 opcode) /* BFSET.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = 0xffffffff; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_eef0_0)(uae_u32 opcode) /* BFSET.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = 0xffffffff; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_eef8_0)(uae_u32 opcode) /* BFSET.L #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = 0xffffffff; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_eef9_0)(uae_u32 opcode) /* BFSET.L #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = 0xffffffff; + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_efc0_0)(uae_u32 opcode) /* BFINS.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = m68k_dreg(regs, (extra >> 12) & 7); + SET_NFLG_ALWAYS (tmp & (1 << (width - 1)) ? 1 : 0); + SET_ZFLG (tmp == 0); + tmp <<= (32 - width); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ((offset & 0x1f) == 0 ? 0 : + (0xffffffff << (32 - (offset & 0x1f))))) | + (tmp >> (offset & 0x1f)) | + (((offset & 0x1f) + width) >= 32 ? 0 : + (m68k_dreg(regs, dstreg) & ((uae_u32)0xffffffff >> ((offset & 0x1f) + width)))); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_efd0_0)(uae_u32 opcode) /* BFINS.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = m68k_dreg(regs, (extra >> 12) & 7); + SET_NFLG_ALWAYS (tmp & (1 << (width - 1)) ? 1 : 0); + SET_ZFLG (tmp == 0); + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_efe8_0)(uae_u32 opcode) /* BFINS.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = m68k_dreg(regs, (extra >> 12) & 7); + SET_NFLG_ALWAYS (tmp & (1 << (width - 1)) ? 1 : 0); + SET_ZFLG (tmp == 0); + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_eff0_0)(uae_u32 opcode) /* BFINS.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +{m68k_incpc(4); +{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = m68k_dreg(regs, (extra >> 12) & 7); + SET_NFLG_ALWAYS (tmp & (1 << (width - 1)) ? 1 : 0); + SET_ZFLG (tmp == 0); + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_eff8_0)(uae_u32 opcode) /* BFINS.L #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = m68k_dreg(regs, (extra >> 12) & 7); + SET_NFLG_ALWAYS (tmp & (1 << (width - 1)) ? 1 : 0); + SET_ZFLG (tmp == 0); + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_eff9_0)(uae_u32 opcode) /* BFINS.L #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +{ uaecptr dsta = get_ilong(4); +{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; + int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; + uae_u32 tmp,bf0,bf1; + dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); + bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; + tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); + tmp >>= (32 - width); + SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); + SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); + tmp = m68k_dreg(regs, (extra >> 12) & 7); + SET_NFLG_ALWAYS (tmp & (1 << (width - 1)) ? 1 : 0); + SET_ZFLG (tmp == 0); + tmp <<= (32 - width); + bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | + (tmp >> (offset & 7)) | + (((offset & 7) + width) >= 32 ? 0 : + (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); + put_long(dsta,bf0 ); + if (((offset & 7) + width) > 32) { + bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | + (tmp << (8 - (offset & 7))); + put_byte(dsta+4,bf1); + } +}}}}m68k_incpc(8); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f200_0)(uae_u32 opcode) /* FPP.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_arithmetic(opcode, extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f208_0)(uae_u32 opcode) /* FPP.L #.W,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_arithmetic(opcode, extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f210_0)(uae_u32 opcode) /* FPP.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_arithmetic(opcode, extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f218_0)(uae_u32 opcode) /* FPP.L #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_arithmetic(opcode, extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f220_0)(uae_u32 opcode) /* FPP.L #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_arithmetic(opcode, extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f228_0)(uae_u32 opcode) /* FPP.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_arithmetic(opcode, extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f230_0)(uae_u32 opcode) /* FPP.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_arithmetic(opcode, extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f238_0)(uae_u32 opcode) /* FPP.L #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_arithmetic(opcode, extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f239_0)(uae_u32 opcode) /* FPP.L #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_arithmetic(opcode, extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f23a_0)(uae_u32 opcode) /* FPP.L #.W,(d16,PC) */ +{ + cpuop_begin(); + uae_u32 dstreg = 2; +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_arithmetic(opcode, extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f23b_0)(uae_u32 opcode) /* FPP.L #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_arithmetic(opcode, extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f23c_0)(uae_u32 opcode) /* FPP.L #.W,#.L */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_arithmetic(opcode, extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f240_0)(uae_u32 opcode) /* FScc.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_scc(opcode,extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f248_0)(uae_u32 opcode) /* FDBcc.L #.W,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_dbcc(opcode, extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f250_0)(uae_u32 opcode) /* FScc.L #.W,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_scc(opcode,extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f258_0)(uae_u32 opcode) /* FScc.L #.W,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_scc(opcode,extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f260_0)(uae_u32 opcode) /* FScc.L #.W,-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_scc(opcode,extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f268_0)(uae_u32 opcode) /* FScc.L #.W,(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_scc(opcode,extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f270_0)(uae_u32 opcode) /* FScc.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_scc(opcode,extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f278_0)(uae_u32 opcode) /* FScc.L #.W,(xxx).W */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_scc(opcode,extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f279_0)(uae_u32 opcode) /* FScc.L #.W,(xxx).L */ +{ + cpuop_begin(); +{{ uae_s16 extra = get_iword(2); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_scc(opcode,extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f27a_0)(uae_u32 opcode) /* FTRAPcc.L #.W */ +{ + cpuop_begin(); +{m68k_incpc(2); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s16 dummy = get_iword(0); +m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_trapcc(opcode,oldpc); +}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f27b_0)(uae_u32 opcode) /* FTRAPcc.L #.L */ +{ + cpuop_begin(); +{m68k_incpc(2); +{ uaecptr oldpc = m68k_getpc(); +{ uae_s32 dummy = get_ilong(0); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_trapcc(opcode,oldpc); +}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f27c_0)(uae_u32 opcode) /* FTRAPcc.L */ +{ + cpuop_begin(); +{m68k_incpc(2); +{ uaecptr oldpc = m68k_getpc(); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_trapcc(opcode,oldpc); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f280_0)(uae_u32 opcode) /* FBcc.L #,#.W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 63); +#else + uae_u32 srcreg = (opcode & 63); +#endif +{m68k_incpc(2); +{ uaecptr pc = m68k_getpc(); +{ uae_s16 extra = get_iword(0); +m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_bcc(opcode,pc,extra); +}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f2c0_0)(uae_u32 opcode) /* FBcc.L #,#.L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 63); +#else + uae_u32 srcreg = (opcode & 63); +#endif +{m68k_incpc(2); +{ uaecptr pc = m68k_getpc(); +{ uae_s32 extra = get_ilong(0); +m68k_incpc(4); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_bcc(opcode,pc,extra); +}}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f310_0)(uae_u32 opcode) /* FSAVE.L (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1829; } +{m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_save(opcode); +}}endlabel1829: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f320_0)(uae_u32 opcode) /* FSAVE.L -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1830; } +{m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_save(opcode); +}}endlabel1830: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f328_0)(uae_u32 opcode) /* FSAVE.L (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1831; } +{m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_save(opcode); +}}endlabel1831: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f330_0)(uae_u32 opcode) /* FSAVE.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1832; } +{m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_save(opcode); +}}endlabel1832: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f338_0)(uae_u32 opcode) /* FSAVE.L (xxx).W */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel1833; } +{m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_save(opcode); +}}endlabel1833: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f339_0)(uae_u32 opcode) /* FSAVE.L (xxx).L */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel1834; } +{m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_save(opcode); +}}endlabel1834: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f350_0)(uae_u32 opcode) /* FRESTORE.L (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1835; } +{m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_restore(opcode); +}}endlabel1835: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f358_0)(uae_u32 opcode) /* FRESTORE.L (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1836; } +{m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_restore(opcode); +}}endlabel1836: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f368_0)(uae_u32 opcode) /* FRESTORE.L (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1837; } +{m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_restore(opcode); +}}endlabel1837: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f370_0)(uae_u32 opcode) /* FRESTORE.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1838; } +{m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_restore(opcode); +}}endlabel1838: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f378_0)(uae_u32 opcode) /* FRESTORE.L (xxx).W */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel1839; } +{m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_restore(opcode); +}}endlabel1839: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f379_0)(uae_u32 opcode) /* FRESTORE.L (xxx).L */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel1840; } +{m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_restore(opcode); +}}endlabel1840: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f37a_0)(uae_u32 opcode) /* FRESTORE.L (d16,PC) */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel1841; } +{m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_restore(opcode); +}}endlabel1841: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f37b_0)(uae_u32 opcode) /* FRESTORE.L (d8,PC,Xn) */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel1842; } +{m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + fpuop_restore(opcode); +}}endlabel1842: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f408_0)(uae_u32 opcode) /* CINVL.L #,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1843; } +{ if (srcreg&0x2) + flush_icache(31); +}}m68k_incpc(2); +endlabel1843: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f410_0)(uae_u32 opcode) /* CINVP.L #,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1844; } +{ if (srcreg&0x2) + flush_icache(32); +}}m68k_incpc(2); +endlabel1844: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f418_0)(uae_u32 opcode) /* CINVA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1845; } +{ if (srcreg&0x2) + flush_icache(33); +}}m68k_incpc(2); +endlabel1845: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f419_0)(uae_u32 opcode) /* CINVA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1846; } +{ if (srcreg&0x2) + flush_icache(33); +}}m68k_incpc(2); +endlabel1846: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f41a_0)(uae_u32 opcode) /* CINVA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1847; } +{ if (srcreg&0x2) + flush_icache(33); +}}m68k_incpc(2); +endlabel1847: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f41b_0)(uae_u32 opcode) /* CINVA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1848; } +{ if (srcreg&0x2) + flush_icache(33); +}}m68k_incpc(2); +endlabel1848: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f41c_0)(uae_u32 opcode) /* CINVA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1849; } +{ if (srcreg&0x2) + flush_icache(33); +}}m68k_incpc(2); +endlabel1849: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f41d_0)(uae_u32 opcode) /* CINVA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1850; } +{ if (srcreg&0x2) + flush_icache(33); +}}m68k_incpc(2); +endlabel1850: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f41e_0)(uae_u32 opcode) /* CINVA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1851; } +{ if (srcreg&0x2) + flush_icache(33); +}}m68k_incpc(2); +endlabel1851: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f41f_0)(uae_u32 opcode) /* CINVA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1852; } +{ if (srcreg&0x2) + flush_icache(33); +}}m68k_incpc(2); +endlabel1852: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f428_0)(uae_u32 opcode) /* CPUSHL.L #,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1853; } +{ if (srcreg&0x2) + flush_icache(41); +}}m68k_incpc(2); +endlabel1853: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f430_0)(uae_u32 opcode) /* CPUSHP.L #,An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1854; } +{ if (srcreg&0x2) + flush_icache(42); +}}m68k_incpc(2); +endlabel1854: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f438_0)(uae_u32 opcode) /* CPUSHA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1855; } +{ if (srcreg&0x2) + flush_icache(43); +}}m68k_incpc(2); +endlabel1855: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f439_0)(uae_u32 opcode) /* CPUSHA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1856; } +{ if (srcreg&0x2) + flush_icache(43); +}}m68k_incpc(2); +endlabel1856: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f43a_0)(uae_u32 opcode) /* CPUSHA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1857; } +{ if (srcreg&0x2) + flush_icache(43); +}}m68k_incpc(2); +endlabel1857: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f43b_0)(uae_u32 opcode) /* CPUSHA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1858; } +{ if (srcreg&0x2) + flush_icache(43); +}}m68k_incpc(2); +endlabel1858: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f43c_0)(uae_u32 opcode) /* CPUSHA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1859; } +{ if (srcreg&0x2) + flush_icache(43); +}}m68k_incpc(2); +endlabel1859: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f43d_0)(uae_u32 opcode) /* CPUSHA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1860; } +{ if (srcreg&0x2) + flush_icache(43); +}}m68k_incpc(2); +endlabel1860: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f43e_0)(uae_u32 opcode) /* CPUSHA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1861; } +{ if (srcreg&0x2) + flush_icache(43); +}}m68k_incpc(2); +endlabel1861: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f43f_0)(uae_u32 opcode) /* CPUSHA.L # */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 14) & 3); +#else + uae_u32 srcreg = ((opcode >> 6) & 3); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel1862; } +{ if (srcreg&0x2) + flush_icache(43); +}}m68k_incpc(2); +endlabel1862: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f500_0)(uae_u32 opcode) /* MMUOP.L #,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = (uae_s32)(uae_s8)(((opcode >> 11) | (opcode << 5)) & 7); +#else + uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 3) & 255); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 extra = srcreg; +m68k_incpc(2); +#ifdef HAVE_GET_WORD_UNSWAPPED + opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); +#endif + mmu_op(opcode,extra); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f600_0)(uae_u32 opcode) /* MOVE16.L (An)+,(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr memsa = m68k_areg(regs, srcreg); +{ uaecptr memda = get_ilong(2); + memsa &= ~15; + memda &= ~15; + put_long(memda, get_long(memsa)); + put_long(memda+4, get_long(memsa+4)); + put_long(memda+8, get_long(memsa+8)); + put_long(memda+12, get_long(memsa+12)); + m68k_areg(regs, srcreg) += 16; +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f608_0)(uae_u32 opcode) /* MOVE16.L (xxx).L,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uaecptr memsa = get_ilong(2); +{ uaecptr memda = m68k_areg(regs, dstreg); + memsa &= ~15; + memda &= ~15; + put_long(memda, get_long(memsa)); + put_long(memda+4, get_long(memsa+4)); + put_long(memda+8, get_long(memsa+8)); + put_long(memda+12, get_long(memsa+12)); + m68k_areg(regs, dstreg) += 16; +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f610_0)(uae_u32 opcode) /* MOVE16.L (An),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr memsa = m68k_areg(regs, srcreg); +{ uaecptr memda = get_ilong(2); + memsa &= ~15; + memda &= ~15; + put_long(memda, get_long(memsa)); + put_long(memda+4, get_long(memsa+4)); + put_long(memda+8, get_long(memsa+8)); + put_long(memda+12, get_long(memsa+12)); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f618_0)(uae_u32 opcode) /* MOVE16.L (xxx).L,(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uaecptr memsa = get_ilong(2); +{ uaecptr memda = m68k_areg(regs, dstreg); + memsa &= ~15; + memda &= ~15; + put_long(memda, get_long(memsa)); + put_long(memda+4, get_long(memsa+4)); + put_long(memda+8, get_long(memsa+8)); + put_long(memda+12, get_long(memsa+12)); +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_f620_0)(uae_u32 opcode) /* MOVE16.L (An)+,(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif + uae_u32 dstreg = 0; +{ uaecptr mems = m68k_areg(regs, srcreg) & ~15, memd; + dstreg = (get_iword(2) >> 12) & 7; + memd = m68k_areg(regs, dstreg) & ~15; + put_long(memd, get_long(mems)); + put_long(memd+4, get_long(mems+4)); + put_long(memd+8, get_long(mems+8)); + put_long(memd+12, get_long(mems+12)); + if (srcreg != dstreg) + m68k_areg(regs, srcreg) += 16; + m68k_areg(regs, dstreg) += 16; +}m68k_incpc(4); + cpuop_end(); +} + +#endif +#endif + + +#ifdef _MSC_VER +#pragma warning(disable:4102) /* unreferenced label */ +#endif + +#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) +#define PART_1 1 +#define PART_2 1 +#define PART_3 1 +#define PART_4 1 +#define PART_5 1 +#define PART_6 1 +#define PART_7 1 +#define PART_8 1 +#endif + +#ifdef PART_1 +#endif + +#ifdef PART_2 +#endif + +#ifdef PART_3 +#endif + +#ifdef PART_4 +void REGPARAM2 CPUFUNC(op_4800_1)(uae_u32 opcode) /* NBCD.B Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((newv) & 0xff); +}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4810_1)(uae_u32 opcode) /* NBCD.B (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4818_1)(uae_u32 opcode) /* NBCD.B (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4820_1)(uae_u32 opcode) /* NBCD.B -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4828_1)(uae_u32 opcode) /* NBCD.B (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4830_1)(uae_u32 opcode) /* NBCD.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{m68k_incpc(2); +{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); +{ uae_s8 src = get_byte(srca); +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}} cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4838_1)(uae_u32 opcode) /* NBCD.B (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4839_1)(uae_u32 opcode) /* NBCD.B (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}m68k_incpc(6); + cpuop_end(); +} +#endif + +#ifdef PART_5 +#endif + +#ifdef PART_6 +void REGPARAM2 CPUFUNC(op_8100_1)(uae_u32 opcode) /* SBCD.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{ uae_u16 newv_lo = (dst & 0xF) - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = (dst & 0xF0) - (src & 0xF0); + uae_u16 newv, tmp_newv; + int bcd = 0; + newv = tmp_newv = newv_hi + newv_lo; + if (newv_lo & 0xF0) { newv -= 6; bcd = 6; }; + if ((((dst & 0xFF) - (src & 0xFF) - (GET_XFLG ? 1 : 0)) & 0x100) > 0xFF) { newv -= 0x60; } + SET_CFLG ((((dst & 0xFF) - (src & 0xFF) - bcd - (GET_XFLG ? 1 : 0)) & 0x300) > 0xFF); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + SET_VFLG ((tmp_newv & 0x80) != 0 && (newv & 0x80) == 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8108_1)(uae_u32 opcode) /* SBCD.B -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; +{ uae_u16 newv_lo = (dst & 0xF) - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = (dst & 0xF0) - (src & 0xF0); + uae_u16 newv, tmp_newv; + int bcd = 0; + newv = tmp_newv = newv_hi + newv_lo; + if (newv_lo & 0xF0) { newv -= 6; bcd = 6; }; + if ((((dst & 0xFF) - (src & 0xFF) - (GET_XFLG ? 1 : 0)) & 0x100) > 0xFF) { newv -= 0x60; } + SET_CFLG ((((dst & 0xFF) - (src & 0xFF) - bcd - (GET_XFLG ? 1 : 0)) & 0x300) > 0xFF); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + SET_VFLG ((tmp_newv & 0x80) != 0 && (newv & 0x80) == 0); + put_byte(dsta,newv); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +#endif + +#ifdef PART_7 +void REGPARAM2 CPUFUNC(op_c100_1)(uae_u32 opcode) /* ABCD.B Dn,Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{ uae_u16 newv_lo = (src & 0xF) + (dst & 0xF) + (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = (src & 0xF0) + (dst & 0xF0); + uae_u16 newv, tmp_newv; + int cflg; + newv = tmp_newv = newv_hi + newv_lo; + if (newv_lo > 9) { newv += 6; } + cflg = (newv & 0x3F0) > 0x90; + if (cflg) newv += 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + SET_VFLG ((tmp_newv & 0x80) == 0 && (newv & 0x80) != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}m68k_incpc(2); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c108_1)(uae_u32 opcode) /* ABCD.B -(An),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; +{ uae_s8 dst = get_byte(dsta); + m68k_areg (regs, dstreg) = dsta; +{ uae_u16 newv_lo = (src & 0xF) + (dst & 0xF) + (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = (src & 0xF0) + (dst & 0xF0); + uae_u16 newv, tmp_newv; + int cflg; + newv = tmp_newv = newv_hi + newv_lo; + if (newv_lo > 9) { newv += 6; } + cflg = (newv & 0x3F0) > 0x90; + if (cflg) newv += 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + SET_VFLG ((tmp_newv & 0x80) == 0 && (newv & 0x80) != 0); + put_byte(dsta,newv); +}}}}}}m68k_incpc(2); + cpuop_end(); +} +#endif + +#ifdef PART_8 +#endif + + +#ifdef _MSC_VER +#pragma warning(disable:4102) /* unreferenced label */ +#endif + +#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) +#define PART_1 1 +#define PART_2 1 +#define PART_3 1 +#define PART_4 1 +#define PART_5 1 +#define PART_6 1 +#define PART_7 1 +#define PART_8 1 +#endif + +#ifdef PART_1 +#endif + +#ifdef PART_2 +#endif + +#ifdef PART_3 +#endif + +#ifdef PART_4 +#endif + +#ifdef PART_5 +#endif + +#ifdef PART_6 +#endif + +#ifdef PART_7 +#endif + +#ifdef PART_8 +#endif + + +#ifdef _MSC_VER +#pragma warning(disable:4102) /* unreferenced label */ +#endif + +#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) +#define PART_1 1 +#define PART_2 1 +#define PART_3 1 +#define PART_4 1 +#define PART_5 1 +#define PART_6 1 +#define PART_7 1 +#define PART_8 1 +#endif + +#ifdef PART_1 +void REGPARAM2 CPUFUNC(op_30_3)(uae_u32 opcode) /* OR.B #.B,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s8 dst = get_byte(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_70_3)(uae_u32 opcode) /* OR.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s16 dst = get_word(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0_3)(uae_u32 opcode) /* OR.L #.L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); +{ uae_s32 dst = get_long(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_130_3)(uae_u32 opcode) /* BTST.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13b_3)(uae_u32 opcode) /* BTST.B Dn,(d8,PC,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif + uae_u32 dstreg = 3; +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr dsta = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_170_3)(uae_u32 opcode) /* BCHG.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_17b_3)(uae_u32 opcode) /* BCHG.B Dn,(d8,PC,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif + uae_u32 dstreg = 3; +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr dsta = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1b0_3)(uae_u32 opcode) /* BCLR.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1bb_3)(uae_u32 opcode) /* BCLR.B Dn,(d8,PC,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif + uae_u32 dstreg = 3; +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr dsta = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1f0_3)(uae_u32 opcode) /* BSET.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1fb_3)(uae_u32 opcode) /* BSET.B Dn,(d8,PC,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif + uae_u32 dstreg = 3; +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr dsta = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_230_3)(uae_u32 opcode) /* AND.B #.B,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s8 dst = get_byte(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_270_3)(uae_u32 opcode) /* AND.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s16 dst = get_word(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2b0_3)(uae_u32 opcode) /* AND.L #.L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); +{ uae_s32 dst = get_long(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_430_3)(uae_u32 opcode) /* SUB.B #.B,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_470_3)(uae_u32 opcode) /* SUB.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4b0_3)(uae_u32 opcode) /* SUB.L #.L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_630_3)(uae_u32 opcode) /* ADD.B #.B,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_670_3)(uae_u32 opcode) /* ADD.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_6b0_3)(uae_u32 opcode) /* ADD.L #.L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_830_3)(uae_u32 opcode) /* BTST.B #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_83b_3)(uae_u32 opcode) /* BTST.B #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 src = get_iword(2); +{ uaecptr tmppc = m68k_getpc() + 4; + uaecptr dsta = get_disp_ea_000(tmppc, get_iword(4)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_870_3)(uae_u32 opcode) /* BCHG.B #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_87b_3)(uae_u32 opcode) /* BCHG.B #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 src = get_iword(2); +{ uaecptr tmppc = m68k_getpc() + 4; + uaecptr dsta = get_disp_ea_000(tmppc, get_iword(4)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + dst ^= (1 << src); + SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8b0_3)(uae_u32 opcode) /* BCLR.B #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8bb_3)(uae_u32 opcode) /* BCLR.B #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 src = get_iword(2); +{ uaecptr tmppc = m68k_getpc() + 4; + uaecptr dsta = get_disp_ea_000(tmppc, get_iword(4)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst &= ~(1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8f0_3)(uae_u32 opcode) /* BSET.B #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8fb_3)(uae_u32 opcode) /* BSET.B #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 src = get_iword(2); +{ uaecptr tmppc = m68k_getpc() + 4; + uaecptr dsta = get_disp_ea_000(tmppc, get_iword(4)); +{ uae_s8 dst = get_byte(dsta); + src &= 7; + SET_ZFLG (1 ^ ((dst >> src) & 1)); + dst |= (1 << src); + put_byte(dsta,dst); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a30_3)(uae_u32 opcode) /* EOR.B #.B,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s8 dst = get_byte(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_a70_3)(uae_u32 opcode) /* EOR.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s16 dst = get_word(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +#endif + +#ifdef PART_2 +void REGPARAM2 CPUFUNC(op_ab0_3)(uae_u32 opcode) /* EOR.L #.L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); +{ uae_s32 dst = get_long(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c30_3)(uae_u32 opcode) /* CMP.B #.B,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c3b_3)(uae_u32 opcode) /* CMP.B #.B,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s8 src = get_ibyte(2); +{ uaecptr tmppc = m68k_getpc() + 4; + uaecptr dsta = get_disp_ea_000(tmppc, get_iword(4)); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c70_3)(uae_u32 opcode) /* CMP.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c7b_3)(uae_u32 opcode) /* CMP.W #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s16 src = get_iword(2); +{ uaecptr tmppc = m68k_getpc() + 4; + uaecptr dsta = get_disp_ea_000(tmppc, get_iword(4)); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_cb0_3)(uae_u32 opcode) /* CMP.L #.L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_cbb_3)(uae_u32 opcode) /* CMP.L #.L,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{{ uae_s32 src = get_ilong(2); +{ uaecptr tmppc = m68k_getpc() + 6; + uaecptr dsta = get_disp_ea_000(tmppc, get_iword(6)); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1030_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_103b_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10b0_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10bb_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10f0_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_10fb_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1130_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_113b_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1170_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_117b_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1180_3)(uae_u32 opcode) /* MOVE.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1190_3)(uae_u32 opcode) /* MOVE.B (An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_1198_3)(uae_u32 opcode) /* MOVE.B (An)+,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s8 src = get_byte(srca); + m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11a0_3)(uae_u32 opcode) /* MOVE.B -(An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; +{ uae_s8 src = get_byte(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11a8_3)(uae_u32 opcode) /* MOVE.B (d16,An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11b0_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11b8_3)(uae_u32 opcode) /* MOVE.B (xxx).W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11b9_3)(uae_u32 opcode) /* MOVE.B (xxx).L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11ba_3)(uae_u32 opcode) /* MOVE.B (d16,PC),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11bb_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11bc_3)(uae_u32 opcode) /* MOVE.B #.B,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s8 src = get_ibyte(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11f0_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_11fb_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(xxx).W */ +{ + cpuop_begin(); +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13f0_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_13fb_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(xxx).L */ +{ + cpuop_begin(); +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2030_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_203b_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_2070_3)(uae_u32 opcode) /* MOVEA.L (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_u32 val = src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_207b_3)(uae_u32 opcode) /* MOVEA.L (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_u32 val = src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_20b0_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20bb_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20f0_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_20fb_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 4; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2130_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_213b_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +#endif + +#ifdef PART_3 +void REGPARAM2 CPUFUNC(op_2170_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_217b_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2180_3)(uae_u32 opcode) /* MOVE.L Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2188_3)(uae_u32 opcode) /* MOVE.L An,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = m68k_areg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2190_3)(uae_u32 opcode) /* MOVE.L (An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_2198_3)(uae_u32 opcode) /* MOVE.L (An)+,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s32 src = get_long(srca); + m68k_areg(regs, srcreg) += 4; +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21a0_3)(uae_u32 opcode) /* MOVE.L -(An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; +{ uae_s32 src = get_long(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21a8_3)(uae_u32 opcode) /* MOVE.L (d16,An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21b0_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21b8_3)(uae_u32 opcode) /* MOVE.L (xxx).W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21b9_3)(uae_u32 opcode) /* MOVE.L (xxx).L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21ba_3)(uae_u32 opcode) /* MOVE.L (d16,PC),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21bb_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21bc_3)(uae_u32 opcode) /* MOVE.L #.L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s32 src = get_ilong(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21f0_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_21fb_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(xxx).W */ +{ + cpuop_begin(); +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23f0_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_23fb_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(xxx).L */ +{ + cpuop_begin(); +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3030_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_303b_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_3070_3)(uae_u32 opcode) /* MOVEA.W (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_u32 val = (uae_s32)(uae_s16)src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_307b_3)(uae_u32 opcode) /* MOVEA.W (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_u32 val = (uae_s32)(uae_s16)src; + m68k_areg(regs, dstreg) = (val); +}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_30b0_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30bb_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30f0_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_30fb_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg); + m68k_areg(regs, dstreg) += 2; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3130_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_313b_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),-(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; + m68k_areg (regs, dstreg) = dsta; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3170_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_317b_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3180_3)(uae_u32 opcode) /* MOVE.W Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3188_3)(uae_u32 opcode) /* MOVE.W An,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = m68k_areg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3190_3)(uae_u32 opcode) /* MOVE.W (An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_3198_3)(uae_u32 opcode) /* MOVE.W (An)+,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); +{ uae_s16 src = get_word(srca); + m68k_areg(regs, srcreg) += 2; +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31a0_3)(uae_u32 opcode) /* MOVE.W -(An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; +{ uae_s16 src = get_word(srca); + m68k_areg (regs, srcreg) = srca; +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31a8_3)(uae_u32 opcode) /* MOVE.W (d16,An),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31b0_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31b8_3)(uae_u32 opcode) /* MOVE.W (xxx).W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31b9_3)(uae_u32 opcode) /* MOVE.W (xxx).L,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_ilong(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31ba_3)(uae_u32 opcode) /* MOVE.W (d16,PC),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = m68k_getpc () + 2; + srca += (uae_s32)(uae_s16)get_iword(2); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31bb_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31bc_3)(uae_u32 opcode) /* MOVE.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uae_s16 src = get_iword(2); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31f0_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(xxx).W */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_31fb_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(xxx).W */ +{ + cpuop_begin(); +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(6); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_33f0_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(xxx).L */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_33fb_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(xxx).L */ +{ + cpuop_begin(); +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uaecptr dsta = get_ilong(4); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(8); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4030_3)(uae_u32 opcode) /* NEGX.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4070_3)(uae_u32 opcode) /* NEGX.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); + SET_NFLG (((uae_s16)(newv)) < 0); + put_word(srca,newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_40b0_3)(uae_u32 opcode) /* NEGX.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); + SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); + SET_NFLG (((uae_s32)(newv)) < 0); + put_long(srca,newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40f0_3)(uae_u32 opcode) /* MVSR2.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel2002; } +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); + MakeSR(); + put_word(srca,regs.sr); +}}}m68k_incpc(4); +endlabel2002: ; + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_4130_3)(uae_u32 opcode) /* CHK.L (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel2003; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel2003; } +}}}}m68k_incpc(4); +endlabel2003: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_413b_3)(uae_u32 opcode) /* CHK.L (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel2004; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel2004; } +}}}}m68k_incpc(4); +endlabel2004: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_41b0_3)(uae_u32 opcode) /* CHK.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel2005; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel2005; } +}}}}m68k_incpc(4); +endlabel2005: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_41bb_3)(uae_u32 opcode) /* CHK.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel2006; } + else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel2006; } +}}}}m68k_incpc(4); +endlabel2006: ; + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_41f0_3)(uae_u32 opcode) /* LEA.L (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ m68k_areg(regs, dstreg) = (srca); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_41fb_3)(uae_u32 opcode) /* LEA.L (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ m68k_areg(regs, dstreg) = (srca); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_4230_3)(uae_u32 opcode) /* CLR.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(0)) == 0); + SET_NFLG (((uae_s8)(0)) < 0); + put_byte(srca,0); +}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4270_3)(uae_u32 opcode) /* CLR.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(0)) == 0); + SET_NFLG (((uae_s16)(0)) < 0); + put_word(srca,0); +}}m68k_incpc(4); + cpuop_end(); +} +#endif + +#ifdef PART_4 +void REGPARAM2 CPUFUNC(op_42b0_3)(uae_u32 opcode) /* CLR.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(0)) == 0); + SET_NFLG (((uae_s32)(0)) < 0); + put_long(srca,0); +}}m68k_incpc(4); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_42f0_3)(uae_u32 opcode) /* MVSR2.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); + MakeSR(); + put_word(srca,regs.sr & 0xff); +}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_4430_3)(uae_u32 opcode) /* NEG.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(0)) < 0; + int flgn = ((uae_s8)(dst)) < 0; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(srca,dst); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4470_3)(uae_u32 opcode) /* NEG.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(0)) < 0; + int flgn = ((uae_s16)(dst)) < 0; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(srca,dst); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44b0_3)(uae_u32 opcode) /* NEG.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(0)) < 0; + int flgn = ((uae_s32)(dst)) < 0; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(srca,dst); +}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44f0_3)(uae_u32 opcode) /* MV2SR.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); + MakeSR(); + regs.sr &= 0xFF00; + regs.sr |= src & 0xFF; + MakeFromSR(); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_44fb_3)(uae_u32 opcode) /* MV2SR.B (d8,PC,Xn) */ +{ + cpuop_begin(); +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); + MakeSR(); + regs.sr &= 0xFF00; + regs.sr |= src & 0xFF; + MakeFromSR(); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4630_3)(uae_u32 opcode) /* NOT.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(dst)) == 0); + SET_NFLG (((uae_s8)(dst)) < 0); + put_byte(srca,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4670_3)(uae_u32 opcode) /* NOT.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(dst)) == 0); + SET_NFLG (((uae_s16)(dst)) < 0); + put_word(srca,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46b0_3)(uae_u32 opcode) /* NOT.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_u32 dst = ~src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(dst)) == 0); + SET_NFLG (((uae_s32)(dst)) < 0); + put_long(srca,dst); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46f0_3)(uae_u32 opcode) /* MV2SR.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{if (!regs.s) { Exception(8,0); goto endlabel2021; } +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); + regs.sr = src; + MakeFromSR(); +}}}}m68k_incpc(4); +endlabel2021: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_46fb_3)(uae_u32 opcode) /* MV2SR.W (d8,PC,Xn) */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel2022; } +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); + regs.sr = src; + MakeFromSR(); +}}}}m68k_incpc(4); +endlabel2022: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4830_3)(uae_u32 opcode) /* NBCD.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); + uae_u16 newv_hi = - (src & 0xF0); + uae_u16 newv; + int cflg; + if (newv_lo > 9) { newv_lo -= 6; } + newv = newv_hi + newv_lo; + cflg = (newv & 0x1F0) > 0x90; + if (cflg) newv -= 0x60; + SET_CFLG (cflg); + COPY_CARRY; + SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); + SET_NFLG (((uae_s8)(newv)) < 0); + put_byte(srca,newv); +}}}}m68k_incpc(4); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4870_3)(uae_u32 opcode) /* PEA.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uaecptr dsta = m68k_areg(regs, 7) - 4; + m68k_areg (regs, 7) = dsta; + put_long(dsta,srca); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_487b_3)(uae_u32 opcode) /* PEA.L (d8,PC,Xn) */ +{ + cpuop_begin(); +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uaecptr dsta = m68k_areg(regs, 7) - 4; + m68k_areg (regs, 7) = dsta; + put_long(dsta,srca); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_48b0_3)(uae_u32 opcode) /* MVMLE.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); +{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; + while (dmask) { put_word(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 2; dmask = movem_next[dmask]; } + while (amask) { put_word(srca, m68k_areg(regs, movem_index1[amask])); srca += 2; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_48f0_3)(uae_u32 opcode) /* MVMLE.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); +{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; + while (dmask) { put_long(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 4; dmask = movem_next[dmask]; } + while (amask) { put_long(srca, m68k_areg(regs, movem_index1[amask])); srca += 4; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_4a30_3)(uae_u32 opcode) /* TST.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a3b_3)(uae_u32 opcode) /* TST.B (d8,PC,Xn) */ +{ + cpuop_begin(); +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a70_3)(uae_u32 opcode) /* TST.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4a7b_3)(uae_u32 opcode) /* TST.W (d8,PC,Xn) */ +{ + cpuop_begin(); +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4ab0_3)(uae_u32 opcode) /* TST.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4abb_3)(uae_u32 opcode) /* TST.L (d8,PC,Xn) */ +{ + cpuop_begin(); +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); +}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_4af0_3)(uae_u32 opcode) /* TAS.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + src |= 0x80; + put_byte(srca,src); +}}}m68k_incpc(4); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cb0_3)(uae_u32 opcode) /* MVMEL.W #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cbb_3)(uae_u32 opcode) /* MVMEL.W #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr tmppc = m68k_getpc() + 4; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(4)); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cf0_3)(uae_u32 opcode) /* MVMEL.L #.W,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4cfb_3)(uae_u32 opcode) /* MVMEL.L #.W,(d8,PC,Xn) */ +{ + cpuop_begin(); + uae_u32 dstreg = 3; +{ uae_u16 mask = get_iword(2); + unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; +{ uaecptr tmppc = m68k_getpc() + 4; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(4)); +{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } + while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } +}}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4eb0_3)(uae_u32 opcode) /* JSR.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); + m68k_do_jsr(m68k_getpc() + 4, srca); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4ebb_3)(uae_u32 opcode) /* JSR.L (d8,PC,Xn) */ +{ + cpuop_begin(); +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); + m68k_do_jsr(m68k_getpc() + 4, srca); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4ef0_3)(uae_u32 opcode) /* JMP.L (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); + m68k_setpc(srca); +}} cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_4efb_3)(uae_u32 opcode) /* JMP.L (d8,PC,Xn) */ +{ + cpuop_begin(); +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); + m68k_setpc(srca); +}} cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_5030_3)(uae_u32 opcode) /* ADD.B #,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +#endif + +#ifdef PART_5 +void REGPARAM2 CPUFUNC(op_5070_3)(uae_u32 opcode) /* ADD.W #,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_50b0_3)(uae_u32 opcode) /* ADD.L #,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_50f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(0) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_5130_3)(uae_u32 opcode) /* SUB.B #,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_5170_3)(uae_u32 opcode) /* SUB.W #,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_51b0_3)(uae_u32 opcode) /* SUB.L #,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; +#else + uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_u32 src = srcreg; +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_51f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(1) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_52f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(2) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_53f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(3) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_54f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(4) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_55f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(5) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_56f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(6) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_57f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(7) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_58f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(8) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_59f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(9) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5af0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(10) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5bf0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(11) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5cf0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(12) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5df0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(13) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ef0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(14) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_5ff0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ int val = cctrue(15) ? 0xff : 0; + put_byte(srca,val); +}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#endif + +#ifdef PART_6 +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_60ff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(0)) goto endlabel2065; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2065; +{ uae_s32 src = get_ilong(2); + if (!cctrue(0)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2065: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_62ff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(2)) goto endlabel2066; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2066; +{ uae_s32 src = get_ilong(2); + if (!cctrue(2)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2066: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_63ff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(3)) goto endlabel2067; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2067; +{ uae_s32 src = get_ilong(2); + if (!cctrue(3)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2067: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_64ff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(4)) goto endlabel2068; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2068; +{ uae_s32 src = get_ilong(2); + if (!cctrue(4)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2068: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_65ff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(5)) goto endlabel2069; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2069; +{ uae_s32 src = get_ilong(2); + if (!cctrue(5)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2069: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_66ff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(6)) goto endlabel2070; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2070; +{ uae_s32 src = get_ilong(2); + if (!cctrue(6)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2070: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_67ff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(7)) goto endlabel2071; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2071; +{ uae_s32 src = get_ilong(2); + if (!cctrue(7)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2071: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_68ff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(8)) goto endlabel2072; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2072; +{ uae_s32 src = get_ilong(2); + if (!cctrue(8)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2072: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_69ff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(9)) goto endlabel2073; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2073; +{ uae_s32 src = get_ilong(2); + if (!cctrue(9)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2073: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6aff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(10)) goto endlabel2074; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2074; +{ uae_s32 src = get_ilong(2); + if (!cctrue(10)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2074: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6bff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(11)) goto endlabel2075; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2075; +{ uae_s32 src = get_ilong(2); + if (!cctrue(11)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2075: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6cff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(12)) goto endlabel2076; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2076; +{ uae_s32 src = get_ilong(2); + if (!cctrue(12)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2076: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6dff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(13)) goto endlabel2077; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2077; +{ uae_s32 src = get_ilong(2); + if (!cctrue(13)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2077: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6eff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(14)) goto endlabel2078; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2078; +{ uae_s32 src = get_ilong(2); + if (!cctrue(14)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2078: ; + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_6fff_3)(uae_u32 opcode) /* Bcc.L #.L */ +{ + cpuop_begin(); +{ m68k_incpc(2); + if (!cctrue(15)) goto endlabel2079; + last_addr_for_exception_3 = m68k_getpc() + 2; + last_fault_for_exception_3 = m68k_getpc() + 1; + last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2079; +{ uae_s32 src = get_ilong(2); + if (!cctrue(15)) goto didnt_jump; + m68k_incpc ((uae_s32)src + 2); +return; +didnt_jump:; +}}m68k_incpc(6); +endlabel2079: ; + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_8030_3)(uae_u32 opcode) /* OR.B (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_803b_3)(uae_u32 opcode) /* OR.B (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8070_3)(uae_u32 opcode) /* OR.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_807b_3)(uae_u32 opcode) /* OR.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80b0_3)(uae_u32 opcode) /* OR.L (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80bb_3)(uae_u32 opcode) /* OR.L (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80f0_3)(uae_u32 opcode) /* DIVU.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(4); + if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel2086; } else { + uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; + uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; + if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel2086: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_80fb_3)(uae_u32 opcode) /* DIVU.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(4); + if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel2087; } else { + uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; + uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; + if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel2087: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8130_3)(uae_u32 opcode) /* OR.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s8 dst = get_byte(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_8170_3)(uae_u32 opcode) /* OR.W Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s16 dst = get_word(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81b0_3)(uae_u32 opcode) /* OR.L Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s32 dst = get_long(dsta); + src |= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81f0_3)(uae_u32 opcode) /* DIVS.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(4); + if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel2091; } else { + uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; + uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; + if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel2091: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_81fb_3)(uae_u32 opcode) /* DIVS.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{ uaecptr oldpc = m68k_getpc(); +{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +m68k_incpc(4); + if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel2092; } else { + uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; + uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; + if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else + { + if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_NFLG (((uae_s16)(newv)) < 0); + newv = (newv & 0xffff) | ((uae_u32)rem << 16); + m68k_dreg(regs, dstreg) = (newv); + } + } +}}}}endlabel2092: ; + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9030_3)(uae_u32 opcode) /* SUB.B (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_903b_3)(uae_u32 opcode) /* SUB.B (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9070_3)(uae_u32 opcode) /* SUB.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_907b_3)(uae_u32 opcode) /* SUB.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_90b0_3)(uae_u32 opcode) /* SUB.L (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_90bb_3)(uae_u32 opcode) /* SUB.L (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_90f0_3)(uae_u32 opcode) /* SUBA.W (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_90fb_3)(uae_u32 opcode) /* SUBA.W (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_9130_3)(uae_u32 opcode) /* SUB.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_9170_3)(uae_u32 opcode) /* SUB.W Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_91b0_3)(uae_u32 opcode) /* SUB.L Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_91f0_3)(uae_u32 opcode) /* SUBA.L (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_91fb_3)(uae_u32 opcode) /* SUBA.L (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst - src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_b030_3)(uae_u32 opcode) /* CMP.B (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b03b_3)(uae_u32 opcode) /* CMP.B (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +#endif + +#ifdef PART_7 +void REGPARAM2 CPUFUNC(op_b070_3)(uae_u32 opcode) /* CMP.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b07b_3)(uae_u32 opcode) /* CMP.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0b0_3)(uae_u32 opcode) /* CMP.L (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0bb_3)(uae_u32 opcode) /* CMP.L (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0f0_3)(uae_u32 opcode) /* CMPA.W (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b0fb_3)(uae_u32 opcode) /* CMPA.W (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b130_3)(uae_u32 opcode) /* EOR.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s8 dst = get_byte(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b170_3)(uae_u32 opcode) /* EOR.W Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s16 dst = get_word(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1b0_3)(uae_u32 opcode) /* EOR.L Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s32 dst = get_long(dsta); + src ^= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1f0_3)(uae_u32 opcode) /* CMPA.L (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_b1fb_3)(uae_u32 opcode) /* CMPA.L (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs != flgo) && (flgn != flgo)); + SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); + SET_NFLG (flgn != 0); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c030_3)(uae_u32 opcode) /* AND.B (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c03b_3)(uae_u32 opcode) /* AND.B (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c070_3)(uae_u32 opcode) /* AND.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c07b_3)(uae_u32 opcode) /* AND.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0b0_3)(uae_u32 opcode) /* AND.L (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0bb_3)(uae_u32 opcode) /* AND.L (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + m68k_dreg(regs, dstreg) = (src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0f0_3)(uae_u32 opcode) /* MULU.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c0fb_3)(uae_u32 opcode) /* MULU.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c130_3)(uae_u32 opcode) /* AND.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s8 dst = get_byte(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s8)(src)) == 0); + SET_NFLG (((uae_s8)(src)) < 0); + put_byte(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c170_3)(uae_u32 opcode) /* AND.W Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s16 dst = get_word(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(src)) == 0); + SET_NFLG (((uae_s16)(src)) < 0); + put_word(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1b0_3)(uae_u32 opcode) /* AND.L Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s32 dst = get_long(dsta); + src &= dst; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(src)) == 0); + SET_NFLG (((uae_s32)(src)) < 0); + put_long(dsta,src); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1f0_3)(uae_u32 opcode) /* MULS.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_c1fb_3)(uae_u32 opcode) /* MULS.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; + CLEAR_CZNV; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_NFLG (((uae_s32)(newv)) < 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d030_3)(uae_u32 opcode) /* ADD.B (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d03b_3)(uae_u32 opcode) /* ADD.B (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s8 src = get_byte(srca); +{ uae_s8 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d070_3)(uae_u32 opcode) /* ADD.W (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d07b_3)(uae_u32 opcode) /* ADD.W (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s16 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d0b0_3)(uae_u32 opcode) /* ADD.L (d8,An,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d0bb_3)(uae_u32 opcode) /* ADD.L (d8,PC,Xn),Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_dreg(regs, dstreg); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + m68k_dreg(regs, dstreg) = (newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d0f0_3)(uae_u32 opcode) /* ADDA.W (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d0fb_3)(uae_u32 opcode) /* ADDA.W (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s16 src = get_word(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_d130_3)(uae_u32 opcode) /* ADD.B Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s8 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s8 dst = get_byte(dsta); +{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); +{ int flgs = ((uae_s8)(src)) < 0; + int flgo = ((uae_s8)(dst)) < 0; + int flgn = ((uae_s8)(newv)) < 0; + SET_ZFLG (((uae_s8)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_byte(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d170_3)(uae_u32 opcode) /* ADD.W Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s16 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s16 dst = get_word(dsta); +{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); +{ int flgs = ((uae_s16)(src)) < 0; + int flgo = ((uae_s16)(dst)) < 0; + int flgn = ((uae_s16)(newv)) < 0; + SET_ZFLG (((uae_s16)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_word(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_d1b0_3)(uae_u32 opcode) /* ADD.L Dn,(d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 1) & 7); +#else + uae_u32 srcreg = ((opcode >> 9) & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 8) & 7; +#else + uae_u32 dstreg = opcode & 7; +#endif +{{ uae_s32 src = m68k_dreg(regs, srcreg); +{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); +{ uae_s32 dst = get_long(dsta); +{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); +{ int flgs = ((uae_s32)(src)) < 0; + int flgo = ((uae_s32)(dst)) < 0; + int flgn = ((uae_s32)(newv)) < 0; + SET_ZFLG (((uae_s32)(newv)) == 0); + SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); + SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); + COPY_CARRY; + SET_NFLG (flgn != 0); + put_long(dsta,newv); +}}}}}}}m68k_incpc(4); + cpuop_end(); +} +#endif + +#ifdef PART_8 +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d1f0_3)(uae_u32 opcode) /* ADDA.L (d8,An,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_d1fb_3)(uae_u32 opcode) /* ADDA.L (d8,PC,Xn),An */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 dstreg = (opcode >> 1) & 7; +#else + uae_u32 dstreg = (opcode >> 9) & 7; +#endif +{{ uaecptr tmppc = m68k_getpc() + 2; + uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); +{ uae_s32 src = get_long(srca); +{ uae_s32 dst = m68k_areg(regs, dstreg); +{ uae_u32 newv = dst + src; + m68k_areg(regs, dstreg) = (newv); +}}}}}m68k_incpc(4); + cpuop_end(); +} + +#endif +void REGPARAM2 CPUFUNC(op_e0f0_3)(uae_u32 opcode) /* ASRW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 cflg = val & 1; + val = (val >> 1) | sign; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + SET_CFLG (cflg); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e1f0_3)(uae_u32 opcode) /* ASLW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 sign = 0x8000 & val; + uae_u32 sign2; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); + sign2 = 0x8000 & val; + SET_CFLG (sign != 0); + COPY_CARRY; + SET_VFLG (GET_VFLG | (sign2 != sign)); + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e2f0_3)(uae_u32 opcode) /* LSRW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 data = get_word(dataa); +{ uae_u32 val = (uae_u16)data; + uae_u32 carry = val & 1; + val >>= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e3f0_3)(uae_u32 opcode) /* LSLW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e4f0_3)(uae_u32 opcode) /* ROXRW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (GET_XFLG) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e5f0_3)(uae_u32 opcode) /* ROXLW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (GET_XFLG) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + COPY_CARRY; + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e6f0_3)(uae_u32 opcode) /* RORW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 1; + val >>= 1; + if (carry) val |= 0x8000; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry); + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +void REGPARAM2 CPUFUNC(op_e7f0_3)(uae_u32 opcode) /* ROLW.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); +{ uae_s16 data = get_word(dataa); +{ uae_u16 val = data; + uae_u32 carry = val & 0x8000; + val <<= 1; + if (carry) val |= 1; + CLEAR_CZNV; + SET_ZFLG (((uae_s16)(val)) == 0); + SET_NFLG (((uae_s16)(val)) < 0); +SET_CFLG (carry >> 15); + put_word(dataa,val); +}}}}m68k_incpc(4); + cpuop_end(); +} +#endif + + +#ifdef _MSC_VER +#pragma warning(disable:4102) /* unreferenced label */ +#endif + +#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) +#define PART_1 1 +#define PART_2 1 +#define PART_3 1 +#define PART_4 1 +#define PART_5 1 +#define PART_6 1 +#define PART_7 1 +#define PART_8 1 +#endif + +#ifdef PART_1 +#endif + +#ifdef PART_2 +#endif + +#ifdef PART_3 +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40c0_4)(uae_u32 opcode) /* MVSR2.W Dn */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ MakeSR(); + m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((regs.sr) & 0xffff); +}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40d0_4)(uae_u32 opcode) /* MVSR2.W (An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + MakeSR(); + put_word(srca,regs.sr); +}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40d8_4)(uae_u32 opcode) /* MVSR2.W (An)+ */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg); + m68k_areg(regs, srcreg) += 2; + MakeSR(); + put_word(srca,regs.sr); +}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40e0_4)(uae_u32 opcode) /* MVSR2.W -(An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; + m68k_areg (regs, srcreg) = srca; + MakeSR(); + put_word(srca,regs.sr); +}}m68k_incpc(2); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40e8_4)(uae_u32 opcode) /* MVSR2.W (d16,An) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); + MakeSR(); + put_word(srca,regs.sr); +}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40f0_4)(uae_u32 opcode) /* MVSR2.W (d8,An,Xn) */ +{ + cpuop_begin(); +#ifdef HAVE_GET_WORD_UNSWAPPED + uae_u32 srcreg = ((opcode >> 8) & 7); +#else + uae_u32 srcreg = (opcode & 7); +#endif +{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); + MakeSR(); + put_word(srca,regs.sr); +}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40f8_4)(uae_u32 opcode) /* MVSR2.W (xxx).W */ +{ + cpuop_begin(); +{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); + MakeSR(); + put_word(srca,regs.sr); +}}m68k_incpc(4); + cpuop_end(); +} + +#endif +#ifndef NOFLAGS +void REGPARAM2 CPUFUNC(op_40f9_4)(uae_u32 opcode) /* MVSR2.W (xxx).L */ +{ + cpuop_begin(); +{{ uaecptr srca = get_ilong(2); + MakeSR(); + put_word(srca,regs.sr); +}}m68k_incpc(6); + cpuop_end(); +} + +#endif +#endif + +#ifdef PART_4 +void REGPARAM2 CPUFUNC(op_4e73_4)(uae_u32 opcode) /* RTE.L */ +{ + cpuop_begin(); +{if (!regs.s) { Exception(8,0); goto endlabel2161; } +{{ uaecptr sra = m68k_areg(regs, 7); +{ uae_s16 sr = get_word(sra); + m68k_areg(regs, 7) += 2; +{ uaecptr pca = m68k_areg(regs, 7); +{ uae_s32 pc = get_long(pca); + m68k_areg(regs, 7) += 4; + regs.sr = sr; m68k_setpc_rte(pc); + MakeFromSR(); +}}}}}}endlabel2161: ; + cpuop_end(); +} +#endif + +#ifdef PART_5 +#endif + +#ifdef PART_6 +#endif + +#ifdef PART_7 +#endif + +#ifdef PART_8 +#endif + diff --git a/BasiliskII/src/uae_cpu/cpuemu_nf.cpp b/BasiliskII/src/uae_cpu/cpuemu_nf.cpp new file mode 100644 index 00000000..72e965cf --- /dev/null +++ b/BasiliskII/src/uae_cpu/cpuemu_nf.cpp @@ -0,0 +1,2 @@ +#define NOFLAGS +#include "cpuemu.cpp" diff --git a/BasiliskII/src/uae_cpu/cpustbl.cpp b/BasiliskII/src/uae_cpu/cpustbl.cpp new file mode 100644 index 00000000..87fc85bf --- /dev/null +++ b/BasiliskII/src/uae_cpu/cpustbl.cpp @@ -0,0 +1,8720 @@ +#include "sysdeps.h" +#include "m68k.h" +#include "memory.h" +#include "readcpu.h" +#include "newcpu.h" +#include "compiler/compemu.h" +#include "fpu/fpu.h" +#include "cputbl.h" +#define SET_CFLG_ALWAYS(x) SET_CFLG(x) +#define SET_NFLG_ALWAYS(x) SET_NFLG(x) +#define CPUFUNC_FF(x) x##_ff +#define CPUFUNC_NF(x) x##_nf +#define CPUFUNC(x) CPUFUNC_FF(x) +#ifdef NOFLAGS +# include "noflags.h" +#endif +struct cputbl CPUFUNC(op_smalltbl_0)[] = { +{ CPUFUNC(op_0_0), 0, 0 }, /* OR.B #.B,Dn */ +{ CPUFUNC(op_10_0), 0, 16 }, /* OR.B #.B,(An) */ +{ CPUFUNC(op_18_0), 0, 24 }, /* OR.B #.B,(An)+ */ +{ CPUFUNC(op_20_0), 0, 32 }, /* OR.B #.B,-(An) */ +{ CPUFUNC(op_28_0), 0, 40 }, /* OR.B #.B,(d16,An) */ +{ CPUFUNC(op_30_0), 0, 48 }, /* OR.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_38_0), 0, 56 }, /* OR.B #.B,(xxx).W */ +{ CPUFUNC(op_39_0), 0, 57 }, /* OR.B #.B,(xxx).L */ +{ CPUFUNC(op_3c_0), 0, 60 }, /* ORSR.B #.W */ +{ CPUFUNC(op_40_0), 0, 64 }, /* OR.W #.W,Dn */ +{ CPUFUNC(op_50_0), 0, 80 }, /* OR.W #.W,(An) */ +{ CPUFUNC(op_58_0), 0, 88 }, /* OR.W #.W,(An)+ */ +{ CPUFUNC(op_60_0), 0, 96 }, /* OR.W #.W,-(An) */ +{ CPUFUNC(op_68_0), 0, 104 }, /* OR.W #.W,(d16,An) */ +{ CPUFUNC(op_70_0), 0, 112 }, /* OR.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_78_0), 0, 120 }, /* OR.W #.W,(xxx).W */ +{ CPUFUNC(op_79_0), 0, 121 }, /* OR.W #.W,(xxx).L */ +{ CPUFUNC(op_7c_0), 0, 124 }, /* ORSR.W #.W */ +{ CPUFUNC(op_80_0), 0, 128 }, /* OR.L #.L,Dn */ +{ CPUFUNC(op_90_0), 0, 144 }, /* OR.L #.L,(An) */ +{ CPUFUNC(op_98_0), 0, 152 }, /* OR.L #.L,(An)+ */ +{ CPUFUNC(op_a0_0), 0, 160 }, /* OR.L #.L,-(An) */ +{ CPUFUNC(op_a8_0), 0, 168 }, /* OR.L #.L,(d16,An) */ +{ CPUFUNC(op_b0_0), 0, 176 }, /* OR.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_b8_0), 0, 184 }, /* OR.L #.L,(xxx).W */ +{ CPUFUNC(op_b9_0), 0, 185 }, /* OR.L #.L,(xxx).L */ +{ CPUFUNC(op_d0_0), 0, 208 }, /* CHK2.B #.W,(An) */ +{ CPUFUNC(op_e8_0), 0, 232 }, /* CHK2.B #.W,(d16,An) */ +{ CPUFUNC(op_f0_0), 0, 240 }, /* CHK2.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_f8_0), 0, 248 }, /* CHK2.B #.W,(xxx).W */ +{ CPUFUNC(op_f9_0), 0, 249 }, /* CHK2.B #.W,(xxx).L */ +{ CPUFUNC(op_fa_0), 0, 250 }, /* CHK2.B #.W,(d16,PC) */ +{ CPUFUNC(op_fb_0), 0, 251 }, /* CHK2.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_100_0), 0, 256 }, /* BTST.L Dn,Dn */ +{ CPUFUNC_FF(op_108_0), 0, 264 }, /* MVPMR.W (d16,An),Dn */ +{ CPUFUNC(op_110_0), 0, 272 }, /* BTST.B Dn,(An) */ +{ CPUFUNC(op_118_0), 0, 280 }, /* BTST.B Dn,(An)+ */ +{ CPUFUNC(op_120_0), 0, 288 }, /* BTST.B Dn,-(An) */ +{ CPUFUNC(op_128_0), 0, 296 }, /* BTST.B Dn,(d16,An) */ +{ CPUFUNC(op_130_0), 0, 304 }, /* BTST.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_138_0), 0, 312 }, /* BTST.B Dn,(xxx).W */ +{ CPUFUNC(op_139_0), 0, 313 }, /* BTST.B Dn,(xxx).L */ +{ CPUFUNC(op_13a_0), 0, 314 }, /* BTST.B Dn,(d16,PC) */ +{ CPUFUNC(op_13b_0), 0, 315 }, /* BTST.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_13c_0), 0, 316 }, /* BTST.B Dn,#.B */ +{ CPUFUNC(op_140_0), 0, 320 }, /* BCHG.L Dn,Dn */ +{ CPUFUNC_FF(op_148_0), 0, 328 }, /* MVPMR.L (d16,An),Dn */ +{ CPUFUNC(op_150_0), 0, 336 }, /* BCHG.B Dn,(An) */ +{ CPUFUNC(op_158_0), 0, 344 }, /* BCHG.B Dn,(An)+ */ +{ CPUFUNC(op_160_0), 0, 352 }, /* BCHG.B Dn,-(An) */ +{ CPUFUNC(op_168_0), 0, 360 }, /* BCHG.B Dn,(d16,An) */ +{ CPUFUNC(op_170_0), 0, 368 }, /* BCHG.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_178_0), 0, 376 }, /* BCHG.B Dn,(xxx).W */ +{ CPUFUNC(op_179_0), 0, 377 }, /* BCHG.B Dn,(xxx).L */ +{ CPUFUNC(op_17a_0), 0, 378 }, /* BCHG.B Dn,(d16,PC) */ +{ CPUFUNC(op_17b_0), 0, 379 }, /* BCHG.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_180_0), 0, 384 }, /* BCLR.L Dn,Dn */ +{ CPUFUNC_FF(op_188_0), 0, 392 }, /* MVPRM.W Dn,(d16,An) */ +{ CPUFUNC(op_190_0), 0, 400 }, /* BCLR.B Dn,(An) */ +{ CPUFUNC(op_198_0), 0, 408 }, /* BCLR.B Dn,(An)+ */ +{ CPUFUNC(op_1a0_0), 0, 416 }, /* BCLR.B Dn,-(An) */ +{ CPUFUNC(op_1a8_0), 0, 424 }, /* BCLR.B Dn,(d16,An) */ +{ CPUFUNC(op_1b0_0), 0, 432 }, /* BCLR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1b8_0), 0, 440 }, /* BCLR.B Dn,(xxx).W */ +{ CPUFUNC(op_1b9_0), 0, 441 }, /* BCLR.B Dn,(xxx).L */ +{ CPUFUNC(op_1ba_0), 0, 442 }, /* BCLR.B Dn,(d16,PC) */ +{ CPUFUNC(op_1bb_0), 0, 443 }, /* BCLR.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_1c0_0), 0, 448 }, /* BSET.L Dn,Dn */ +{ CPUFUNC_FF(op_1c8_0), 0, 456 }, /* MVPRM.L Dn,(d16,An) */ +{ CPUFUNC(op_1d0_0), 0, 464 }, /* BSET.B Dn,(An) */ +{ CPUFUNC(op_1d8_0), 0, 472 }, /* BSET.B Dn,(An)+ */ +{ CPUFUNC(op_1e0_0), 0, 480 }, /* BSET.B Dn,-(An) */ +{ CPUFUNC(op_1e8_0), 0, 488 }, /* BSET.B Dn,(d16,An) */ +{ CPUFUNC(op_1f0_0), 0, 496 }, /* BSET.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1f8_0), 0, 504 }, /* BSET.B Dn,(xxx).W */ +{ CPUFUNC(op_1f9_0), 0, 505 }, /* BSET.B Dn,(xxx).L */ +{ CPUFUNC(op_1fa_0), 0, 506 }, /* BSET.B Dn,(d16,PC) */ +{ CPUFUNC(op_1fb_0), 0, 507 }, /* BSET.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_200_0), 0, 512 }, /* AND.B #.B,Dn */ +{ CPUFUNC(op_210_0), 0, 528 }, /* AND.B #.B,(An) */ +{ CPUFUNC(op_218_0), 0, 536 }, /* AND.B #.B,(An)+ */ +{ CPUFUNC(op_220_0), 0, 544 }, /* AND.B #.B,-(An) */ +{ CPUFUNC(op_228_0), 0, 552 }, /* AND.B #.B,(d16,An) */ +{ CPUFUNC(op_230_0), 0, 560 }, /* AND.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_238_0), 0, 568 }, /* AND.B #.B,(xxx).W */ +{ CPUFUNC(op_239_0), 0, 569 }, /* AND.B #.B,(xxx).L */ +{ CPUFUNC(op_23c_0), 0, 572 }, /* ANDSR.B #.W */ +{ CPUFUNC(op_240_0), 0, 576 }, /* AND.W #.W,Dn */ +{ CPUFUNC(op_250_0), 0, 592 }, /* AND.W #.W,(An) */ +{ CPUFUNC(op_258_0), 0, 600 }, /* AND.W #.W,(An)+ */ +{ CPUFUNC(op_260_0), 0, 608 }, /* AND.W #.W,-(An) */ +{ CPUFUNC(op_268_0), 0, 616 }, /* AND.W #.W,(d16,An) */ +{ CPUFUNC(op_270_0), 0, 624 }, /* AND.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_278_0), 0, 632 }, /* AND.W #.W,(xxx).W */ +{ CPUFUNC(op_279_0), 0, 633 }, /* AND.W #.W,(xxx).L */ +{ CPUFUNC(op_27c_0), 0, 636 }, /* ANDSR.W #.W */ +{ CPUFUNC(op_280_0), 0, 640 }, /* AND.L #.L,Dn */ +{ CPUFUNC(op_290_0), 0, 656 }, /* AND.L #.L,(An) */ +{ CPUFUNC(op_298_0), 0, 664 }, /* AND.L #.L,(An)+ */ +{ CPUFUNC(op_2a0_0), 0, 672 }, /* AND.L #.L,-(An) */ +{ CPUFUNC(op_2a8_0), 0, 680 }, /* AND.L #.L,(d16,An) */ +{ CPUFUNC(op_2b0_0), 0, 688 }, /* AND.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_2b8_0), 0, 696 }, /* AND.L #.L,(xxx).W */ +{ CPUFUNC(op_2b9_0), 0, 697 }, /* AND.L #.L,(xxx).L */ +{ CPUFUNC(op_2d0_0), 0, 720 }, /* CHK2.W #.W,(An) */ +{ CPUFUNC(op_2e8_0), 0, 744 }, /* CHK2.W #.W,(d16,An) */ +{ CPUFUNC(op_2f0_0), 0, 752 }, /* CHK2.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_2f8_0), 0, 760 }, /* CHK2.W #.W,(xxx).W */ +{ CPUFUNC(op_2f9_0), 0, 761 }, /* CHK2.W #.W,(xxx).L */ +{ CPUFUNC(op_2fa_0), 0, 762 }, /* CHK2.W #.W,(d16,PC) */ +{ CPUFUNC(op_2fb_0), 0, 763 }, /* CHK2.W #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_400_0), 0, 1024 }, /* SUB.B #.B,Dn */ +{ CPUFUNC(op_410_0), 0, 1040 }, /* SUB.B #.B,(An) */ +{ CPUFUNC(op_418_0), 0, 1048 }, /* SUB.B #.B,(An)+ */ +{ CPUFUNC(op_420_0), 0, 1056 }, /* SUB.B #.B,-(An) */ +{ CPUFUNC(op_428_0), 0, 1064 }, /* SUB.B #.B,(d16,An) */ +{ CPUFUNC(op_430_0), 0, 1072 }, /* SUB.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_438_0), 0, 1080 }, /* SUB.B #.B,(xxx).W */ +{ CPUFUNC(op_439_0), 0, 1081 }, /* SUB.B #.B,(xxx).L */ +{ CPUFUNC(op_440_0), 0, 1088 }, /* SUB.W #.W,Dn */ +{ CPUFUNC(op_450_0), 0, 1104 }, /* SUB.W #.W,(An) */ +{ CPUFUNC(op_458_0), 0, 1112 }, /* SUB.W #.W,(An)+ */ +{ CPUFUNC(op_460_0), 0, 1120 }, /* SUB.W #.W,-(An) */ +{ CPUFUNC(op_468_0), 0, 1128 }, /* SUB.W #.W,(d16,An) */ +{ CPUFUNC(op_470_0), 0, 1136 }, /* SUB.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_478_0), 0, 1144 }, /* SUB.W #.W,(xxx).W */ +{ CPUFUNC(op_479_0), 0, 1145 }, /* SUB.W #.W,(xxx).L */ +{ CPUFUNC(op_480_0), 0, 1152 }, /* SUB.L #.L,Dn */ +{ CPUFUNC(op_490_0), 0, 1168 }, /* SUB.L #.L,(An) */ +{ CPUFUNC(op_498_0), 0, 1176 }, /* SUB.L #.L,(An)+ */ +{ CPUFUNC(op_4a0_0), 0, 1184 }, /* SUB.L #.L,-(An) */ +{ CPUFUNC(op_4a8_0), 0, 1192 }, /* SUB.L #.L,(d16,An) */ +{ CPUFUNC(op_4b0_0), 0, 1200 }, /* SUB.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_4b8_0), 0, 1208 }, /* SUB.L #.L,(xxx).W */ +{ CPUFUNC(op_4b9_0), 0, 1209 }, /* SUB.L #.L,(xxx).L */ +{ CPUFUNC(op_4d0_0), 0, 1232 }, /* CHK2.L #.W,(An) */ +{ CPUFUNC(op_4e8_0), 0, 1256 }, /* CHK2.L #.W,(d16,An) */ +{ CPUFUNC(op_4f0_0), 0, 1264 }, /* CHK2.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_4f8_0), 0, 1272 }, /* CHK2.L #.W,(xxx).W */ +{ CPUFUNC(op_4f9_0), 0, 1273 }, /* CHK2.L #.W,(xxx).L */ +{ CPUFUNC(op_4fa_0), 0, 1274 }, /* CHK2.L #.W,(d16,PC) */ +{ CPUFUNC(op_4fb_0), 0, 1275 }, /* CHK2.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_600_0), 0, 1536 }, /* ADD.B #.B,Dn */ +{ CPUFUNC(op_610_0), 0, 1552 }, /* ADD.B #.B,(An) */ +{ CPUFUNC(op_618_0), 0, 1560 }, /* ADD.B #.B,(An)+ */ +{ CPUFUNC(op_620_0), 0, 1568 }, /* ADD.B #.B,-(An) */ +{ CPUFUNC(op_628_0), 0, 1576 }, /* ADD.B #.B,(d16,An) */ +{ CPUFUNC(op_630_0), 0, 1584 }, /* ADD.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_638_0), 0, 1592 }, /* ADD.B #.B,(xxx).W */ +{ CPUFUNC(op_639_0), 0, 1593 }, /* ADD.B #.B,(xxx).L */ +{ CPUFUNC(op_640_0), 0, 1600 }, /* ADD.W #.W,Dn */ +{ CPUFUNC(op_650_0), 0, 1616 }, /* ADD.W #.W,(An) */ +{ CPUFUNC(op_658_0), 0, 1624 }, /* ADD.W #.W,(An)+ */ +{ CPUFUNC(op_660_0), 0, 1632 }, /* ADD.W #.W,-(An) */ +{ CPUFUNC(op_668_0), 0, 1640 }, /* ADD.W #.W,(d16,An) */ +{ CPUFUNC(op_670_0), 0, 1648 }, /* ADD.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_678_0), 0, 1656 }, /* ADD.W #.W,(xxx).W */ +{ CPUFUNC(op_679_0), 0, 1657 }, /* ADD.W #.W,(xxx).L */ +{ CPUFUNC(op_680_0), 0, 1664 }, /* ADD.L #.L,Dn */ +{ CPUFUNC(op_690_0), 0, 1680 }, /* ADD.L #.L,(An) */ +{ CPUFUNC(op_698_0), 0, 1688 }, /* ADD.L #.L,(An)+ */ +{ CPUFUNC(op_6a0_0), 0, 1696 }, /* ADD.L #.L,-(An) */ +{ CPUFUNC(op_6a8_0), 0, 1704 }, /* ADD.L #.L,(d16,An) */ +{ CPUFUNC(op_6b0_0), 0, 1712 }, /* ADD.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_6b8_0), 0, 1720 }, /* ADD.L #.L,(xxx).W */ +{ CPUFUNC(op_6b9_0), 0, 1721 }, /* ADD.L #.L,(xxx).L */ +{ CPUFUNC(op_6c0_0), 0, 1728 }, /* RTM.L Dn */ +{ CPUFUNC(op_6c8_0), 0, 1736 }, /* RTM.L An */ +{ CPUFUNC_FF(op_6d0_0), 0, 1744 }, /* CALLM.L (An) */ +{ CPUFUNC_FF(op_6e8_0), 0, 1768 }, /* CALLM.L (d16,An) */ +{ CPUFUNC_FF(op_6f0_0), 0, 1776 }, /* CALLM.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_6f8_0), 0, 1784 }, /* CALLM.L (xxx).W */ +{ CPUFUNC_FF(op_6f9_0), 0, 1785 }, /* CALLM.L (xxx).L */ +{ CPUFUNC_FF(op_6fa_0), 0, 1786 }, /* CALLM.L (d16,PC) */ +{ CPUFUNC_FF(op_6fb_0), 0, 1787 }, /* CALLM.L (d8,PC,Xn) */ +{ CPUFUNC(op_800_0), 0, 2048 }, /* BTST.L #.W,Dn */ +{ CPUFUNC(op_810_0), 0, 2064 }, /* BTST.B #.W,(An) */ +{ CPUFUNC(op_818_0), 0, 2072 }, /* BTST.B #.W,(An)+ */ +{ CPUFUNC(op_820_0), 0, 2080 }, /* BTST.B #.W,-(An) */ +{ CPUFUNC(op_828_0), 0, 2088 }, /* BTST.B #.W,(d16,An) */ +{ CPUFUNC(op_830_0), 0, 2096 }, /* BTST.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_838_0), 0, 2104 }, /* BTST.B #.W,(xxx).W */ +{ CPUFUNC(op_839_0), 0, 2105 }, /* BTST.B #.W,(xxx).L */ +{ CPUFUNC(op_83a_0), 0, 2106 }, /* BTST.B #.W,(d16,PC) */ +{ CPUFUNC(op_83b_0), 0, 2107 }, /* BTST.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_83c_0), 0, 2108 }, /* BTST.B #.W,#.B */ +{ CPUFUNC(op_840_0), 0, 2112 }, /* BCHG.L #.W,Dn */ +{ CPUFUNC(op_850_0), 0, 2128 }, /* BCHG.B #.W,(An) */ +{ CPUFUNC(op_858_0), 0, 2136 }, /* BCHG.B #.W,(An)+ */ +{ CPUFUNC(op_860_0), 0, 2144 }, /* BCHG.B #.W,-(An) */ +{ CPUFUNC(op_868_0), 0, 2152 }, /* BCHG.B #.W,(d16,An) */ +{ CPUFUNC(op_870_0), 0, 2160 }, /* BCHG.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_878_0), 0, 2168 }, /* BCHG.B #.W,(xxx).W */ +{ CPUFUNC(op_879_0), 0, 2169 }, /* BCHG.B #.W,(xxx).L */ +{ CPUFUNC(op_87a_0), 0, 2170 }, /* BCHG.B #.W,(d16,PC) */ +{ CPUFUNC(op_87b_0), 0, 2171 }, /* BCHG.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_880_0), 0, 2176 }, /* BCLR.L #.W,Dn */ +{ CPUFUNC(op_890_0), 0, 2192 }, /* BCLR.B #.W,(An) */ +{ CPUFUNC(op_898_0), 0, 2200 }, /* BCLR.B #.W,(An)+ */ +{ CPUFUNC(op_8a0_0), 0, 2208 }, /* BCLR.B #.W,-(An) */ +{ CPUFUNC(op_8a8_0), 0, 2216 }, /* BCLR.B #.W,(d16,An) */ +{ CPUFUNC(op_8b0_0), 0, 2224 }, /* BCLR.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_8b8_0), 0, 2232 }, /* BCLR.B #.W,(xxx).W */ +{ CPUFUNC(op_8b9_0), 0, 2233 }, /* BCLR.B #.W,(xxx).L */ +{ CPUFUNC(op_8ba_0), 0, 2234 }, /* BCLR.B #.W,(d16,PC) */ +{ CPUFUNC(op_8bb_0), 0, 2235 }, /* BCLR.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_8c0_0), 0, 2240 }, /* BSET.L #.W,Dn */ +{ CPUFUNC(op_8d0_0), 0, 2256 }, /* BSET.B #.W,(An) */ +{ CPUFUNC(op_8d8_0), 0, 2264 }, /* BSET.B #.W,(An)+ */ +{ CPUFUNC(op_8e0_0), 0, 2272 }, /* BSET.B #.W,-(An) */ +{ CPUFUNC(op_8e8_0), 0, 2280 }, /* BSET.B #.W,(d16,An) */ +{ CPUFUNC(op_8f0_0), 0, 2288 }, /* BSET.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_8f8_0), 0, 2296 }, /* BSET.B #.W,(xxx).W */ +{ CPUFUNC(op_8f9_0), 0, 2297 }, /* BSET.B #.W,(xxx).L */ +{ CPUFUNC(op_8fa_0), 0, 2298 }, /* BSET.B #.W,(d16,PC) */ +{ CPUFUNC(op_8fb_0), 0, 2299 }, /* BSET.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_a00_0), 0, 2560 }, /* EOR.B #.B,Dn */ +{ CPUFUNC(op_a10_0), 0, 2576 }, /* EOR.B #.B,(An) */ +{ CPUFUNC(op_a18_0), 0, 2584 }, /* EOR.B #.B,(An)+ */ +{ CPUFUNC(op_a20_0), 0, 2592 }, /* EOR.B #.B,-(An) */ +{ CPUFUNC(op_a28_0), 0, 2600 }, /* EOR.B #.B,(d16,An) */ +{ CPUFUNC(op_a30_0), 0, 2608 }, /* EOR.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_a38_0), 0, 2616 }, /* EOR.B #.B,(xxx).W */ +{ CPUFUNC(op_a39_0), 0, 2617 }, /* EOR.B #.B,(xxx).L */ +{ CPUFUNC(op_a3c_0), 0, 2620 }, /* EORSR.B #.W */ +{ CPUFUNC(op_a40_0), 0, 2624 }, /* EOR.W #.W,Dn */ +{ CPUFUNC(op_a50_0), 0, 2640 }, /* EOR.W #.W,(An) */ +{ CPUFUNC(op_a58_0), 0, 2648 }, /* EOR.W #.W,(An)+ */ +{ CPUFUNC(op_a60_0), 0, 2656 }, /* EOR.W #.W,-(An) */ +{ CPUFUNC(op_a68_0), 0, 2664 }, /* EOR.W #.W,(d16,An) */ +{ CPUFUNC(op_a70_0), 0, 2672 }, /* EOR.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_a78_0), 0, 2680 }, /* EOR.W #.W,(xxx).W */ +{ CPUFUNC(op_a79_0), 0, 2681 }, /* EOR.W #.W,(xxx).L */ +{ CPUFUNC(op_a7c_0), 0, 2684 }, /* EORSR.W #.W */ +{ CPUFUNC(op_a80_0), 0, 2688 }, /* EOR.L #.L,Dn */ +{ CPUFUNC(op_a90_0), 0, 2704 }, /* EOR.L #.L,(An) */ +{ CPUFUNC(op_a98_0), 0, 2712 }, /* EOR.L #.L,(An)+ */ +{ CPUFUNC(op_aa0_0), 0, 2720 }, /* EOR.L #.L,-(An) */ +{ CPUFUNC(op_aa8_0), 0, 2728 }, /* EOR.L #.L,(d16,An) */ +{ CPUFUNC(op_ab0_0), 0, 2736 }, /* EOR.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_ab8_0), 0, 2744 }, /* EOR.L #.L,(xxx).W */ +{ CPUFUNC(op_ab9_0), 0, 2745 }, /* EOR.L #.L,(xxx).L */ +{ CPUFUNC(op_ad0_0), 0, 2768 }, /* CAS.B #.W,(An) */ +{ CPUFUNC(op_ad8_0), 0, 2776 }, /* CAS.B #.W,(An)+ */ +{ CPUFUNC(op_ae0_0), 0, 2784 }, /* CAS.B #.W,-(An) */ +{ CPUFUNC(op_ae8_0), 0, 2792 }, /* CAS.B #.W,(d16,An) */ +{ CPUFUNC(op_af0_0), 0, 2800 }, /* CAS.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_af8_0), 0, 2808 }, /* CAS.B #.W,(xxx).W */ +{ CPUFUNC(op_af9_0), 0, 2809 }, /* CAS.B #.W,(xxx).L */ +{ CPUFUNC(op_c00_0), 0, 3072 }, /* CMP.B #.B,Dn */ +{ CPUFUNC(op_c10_0), 0, 3088 }, /* CMP.B #.B,(An) */ +{ CPUFUNC(op_c18_0), 0, 3096 }, /* CMP.B #.B,(An)+ */ +{ CPUFUNC(op_c20_0), 0, 3104 }, /* CMP.B #.B,-(An) */ +{ CPUFUNC(op_c28_0), 0, 3112 }, /* CMP.B #.B,(d16,An) */ +{ CPUFUNC(op_c30_0), 0, 3120 }, /* CMP.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_c38_0), 0, 3128 }, /* CMP.B #.B,(xxx).W */ +{ CPUFUNC(op_c39_0), 0, 3129 }, /* CMP.B #.B,(xxx).L */ +{ CPUFUNC(op_c3a_0), 0, 3130 }, /* CMP.B #.B,(d16,PC) */ +{ CPUFUNC(op_c3b_0), 0, 3131 }, /* CMP.B #.B,(d8,PC,Xn) */ +{ CPUFUNC(op_c40_0), 0, 3136 }, /* CMP.W #.W,Dn */ +{ CPUFUNC(op_c50_0), 0, 3152 }, /* CMP.W #.W,(An) */ +{ CPUFUNC(op_c58_0), 0, 3160 }, /* CMP.W #.W,(An)+ */ +{ CPUFUNC(op_c60_0), 0, 3168 }, /* CMP.W #.W,-(An) */ +{ CPUFUNC(op_c68_0), 0, 3176 }, /* CMP.W #.W,(d16,An) */ +{ CPUFUNC(op_c70_0), 0, 3184 }, /* CMP.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_c78_0), 0, 3192 }, /* CMP.W #.W,(xxx).W */ +{ CPUFUNC(op_c79_0), 0, 3193 }, /* CMP.W #.W,(xxx).L */ +{ CPUFUNC(op_c7a_0), 0, 3194 }, /* CMP.W #.W,(d16,PC) */ +{ CPUFUNC(op_c7b_0), 0, 3195 }, /* CMP.W #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_c80_0), 0, 3200 }, /* CMP.L #.L,Dn */ +{ CPUFUNC(op_c90_0), 0, 3216 }, /* CMP.L #.L,(An) */ +{ CPUFUNC(op_c98_0), 0, 3224 }, /* CMP.L #.L,(An)+ */ +{ CPUFUNC(op_ca0_0), 0, 3232 }, /* CMP.L #.L,-(An) */ +{ CPUFUNC(op_ca8_0), 0, 3240 }, /* CMP.L #.L,(d16,An) */ +{ CPUFUNC(op_cb0_0), 0, 3248 }, /* CMP.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_cb8_0), 0, 3256 }, /* CMP.L #.L,(xxx).W */ +{ CPUFUNC(op_cb9_0), 0, 3257 }, /* CMP.L #.L,(xxx).L */ +{ CPUFUNC(op_cba_0), 0, 3258 }, /* CMP.L #.L,(d16,PC) */ +{ CPUFUNC(op_cbb_0), 0, 3259 }, /* CMP.L #.L,(d8,PC,Xn) */ +{ CPUFUNC(op_cd0_0), 0, 3280 }, /* CAS.W #.W,(An) */ +{ CPUFUNC(op_cd8_0), 0, 3288 }, /* CAS.W #.W,(An)+ */ +{ CPUFUNC(op_ce0_0), 0, 3296 }, /* CAS.W #.W,-(An) */ +{ CPUFUNC(op_ce8_0), 0, 3304 }, /* CAS.W #.W,(d16,An) */ +{ CPUFUNC(op_cf0_0), 0, 3312 }, /* CAS.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_cf8_0), 0, 3320 }, /* CAS.W #.W,(xxx).W */ +{ CPUFUNC(op_cf9_0), 0, 3321 }, /* CAS.W #.W,(xxx).L */ +{ CPUFUNC(op_cfc_0), 0, 3324 }, /* CAS2.W #.L */ +{ CPUFUNC_FF(op_e10_0), 0, 3600 }, /* MOVES.B #.W,(An) */ +{ CPUFUNC_FF(op_e18_0), 0, 3608 }, /* MOVES.B #.W,(An)+ */ +{ CPUFUNC_FF(op_e20_0), 0, 3616 }, /* MOVES.B #.W,-(An) */ +{ CPUFUNC_FF(op_e28_0), 0, 3624 }, /* MOVES.B #.W,(d16,An) */ +{ CPUFUNC_FF(op_e30_0), 0, 3632 }, /* MOVES.B #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_e38_0), 0, 3640 }, /* MOVES.B #.W,(xxx).W */ +{ CPUFUNC_FF(op_e39_0), 0, 3641 }, /* MOVES.B #.W,(xxx).L */ +{ CPUFUNC_FF(op_e50_0), 0, 3664 }, /* MOVES.W #.W,(An) */ +{ CPUFUNC_FF(op_e58_0), 0, 3672 }, /* MOVES.W #.W,(An)+ */ +{ CPUFUNC_FF(op_e60_0), 0, 3680 }, /* MOVES.W #.W,-(An) */ +{ CPUFUNC_FF(op_e68_0), 0, 3688 }, /* MOVES.W #.W,(d16,An) */ +{ CPUFUNC_FF(op_e70_0), 0, 3696 }, /* MOVES.W #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_e78_0), 0, 3704 }, /* MOVES.W #.W,(xxx).W */ +{ CPUFUNC_FF(op_e79_0), 0, 3705 }, /* MOVES.W #.W,(xxx).L */ +{ CPUFUNC_FF(op_e90_0), 0, 3728 }, /* MOVES.L #.W,(An) */ +{ CPUFUNC_FF(op_e98_0), 0, 3736 }, /* MOVES.L #.W,(An)+ */ +{ CPUFUNC_FF(op_ea0_0), 0, 3744 }, /* MOVES.L #.W,-(An) */ +{ CPUFUNC_FF(op_ea8_0), 0, 3752 }, /* MOVES.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_eb0_0), 0, 3760 }, /* MOVES.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_eb8_0), 0, 3768 }, /* MOVES.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_eb9_0), 0, 3769 }, /* MOVES.L #.W,(xxx).L */ +{ CPUFUNC(op_ed0_0), 0, 3792 }, /* CAS.L #.W,(An) */ +{ CPUFUNC(op_ed8_0), 0, 3800 }, /* CAS.L #.W,(An)+ */ +{ CPUFUNC(op_ee0_0), 0, 3808 }, /* CAS.L #.W,-(An) */ +{ CPUFUNC(op_ee8_0), 0, 3816 }, /* CAS.L #.W,(d16,An) */ +{ CPUFUNC(op_ef0_0), 0, 3824 }, /* CAS.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_ef8_0), 0, 3832 }, /* CAS.L #.W,(xxx).W */ +{ CPUFUNC(op_ef9_0), 0, 3833 }, /* CAS.L #.W,(xxx).L */ +{ CPUFUNC(op_efc_0), 0, 3836 }, /* CAS2.L #.L */ +{ CPUFUNC(op_1000_0), 0, 4096 }, /* MOVE.B Dn,Dn */ +{ CPUFUNC(op_1010_0), 0, 4112 }, /* MOVE.B (An),Dn */ +{ CPUFUNC(op_1018_0), 0, 4120 }, /* MOVE.B (An)+,Dn */ +{ CPUFUNC(op_1020_0), 0, 4128 }, /* MOVE.B -(An),Dn */ +{ CPUFUNC(op_1028_0), 0, 4136 }, /* MOVE.B (d16,An),Dn */ +{ CPUFUNC(op_1030_0), 0, 4144 }, /* MOVE.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_1038_0), 0, 4152 }, /* MOVE.B (xxx).W,Dn */ +{ CPUFUNC(op_1039_0), 0, 4153 }, /* MOVE.B (xxx).L,Dn */ +{ CPUFUNC(op_103a_0), 0, 4154 }, /* MOVE.B (d16,PC),Dn */ +{ CPUFUNC(op_103b_0), 0, 4155 }, /* MOVE.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_103c_0), 0, 4156 }, /* MOVE.B #.B,Dn */ +{ CPUFUNC(op_1080_0), 0, 4224 }, /* MOVE.B Dn,(An) */ +{ CPUFUNC(op_1090_0), 0, 4240 }, /* MOVE.B (An),(An) */ +{ CPUFUNC(op_1098_0), 0, 4248 }, /* MOVE.B (An)+,(An) */ +{ CPUFUNC(op_10a0_0), 0, 4256 }, /* MOVE.B -(An),(An) */ +{ CPUFUNC(op_10a8_0), 0, 4264 }, /* MOVE.B (d16,An),(An) */ +{ CPUFUNC(op_10b0_0), 0, 4272 }, /* MOVE.B (d8,An,Xn),(An) */ +{ CPUFUNC(op_10b8_0), 0, 4280 }, /* MOVE.B (xxx).W,(An) */ +{ CPUFUNC(op_10b9_0), 0, 4281 }, /* MOVE.B (xxx).L,(An) */ +{ CPUFUNC(op_10ba_0), 0, 4282 }, /* MOVE.B (d16,PC),(An) */ +{ CPUFUNC(op_10bb_0), 0, 4283 }, /* MOVE.B (d8,PC,Xn),(An) */ +{ CPUFUNC(op_10bc_0), 0, 4284 }, /* MOVE.B #.B,(An) */ +{ CPUFUNC(op_10c0_0), 0, 4288 }, /* MOVE.B Dn,(An)+ */ +{ CPUFUNC(op_10d0_0), 0, 4304 }, /* MOVE.B (An),(An)+ */ +{ CPUFUNC(op_10d8_0), 0, 4312 }, /* MOVE.B (An)+,(An)+ */ +{ CPUFUNC(op_10e0_0), 0, 4320 }, /* MOVE.B -(An),(An)+ */ +{ CPUFUNC(op_10e8_0), 0, 4328 }, /* MOVE.B (d16,An),(An)+ */ +{ CPUFUNC(op_10f0_0), 0, 4336 }, /* MOVE.B (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_10f8_0), 0, 4344 }, /* MOVE.B (xxx).W,(An)+ */ +{ CPUFUNC(op_10f9_0), 0, 4345 }, /* MOVE.B (xxx).L,(An)+ */ +{ CPUFUNC(op_10fa_0), 0, 4346 }, /* MOVE.B (d16,PC),(An)+ */ +{ CPUFUNC(op_10fb_0), 0, 4347 }, /* MOVE.B (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_10fc_0), 0, 4348 }, /* MOVE.B #.B,(An)+ */ +{ CPUFUNC(op_1100_0), 0, 4352 }, /* MOVE.B Dn,-(An) */ +{ CPUFUNC(op_1110_0), 0, 4368 }, /* MOVE.B (An),-(An) */ +{ CPUFUNC(op_1118_0), 0, 4376 }, /* MOVE.B (An)+,-(An) */ +{ CPUFUNC(op_1120_0), 0, 4384 }, /* MOVE.B -(An),-(An) */ +{ CPUFUNC(op_1128_0), 0, 4392 }, /* MOVE.B (d16,An),-(An) */ +{ CPUFUNC(op_1130_0), 0, 4400 }, /* MOVE.B (d8,An,Xn),-(An) */ +{ CPUFUNC(op_1138_0), 0, 4408 }, /* MOVE.B (xxx).W,-(An) */ +{ CPUFUNC(op_1139_0), 0, 4409 }, /* MOVE.B (xxx).L,-(An) */ +{ CPUFUNC(op_113a_0), 0, 4410 }, /* MOVE.B (d16,PC),-(An) */ +{ CPUFUNC(op_113b_0), 0, 4411 }, /* MOVE.B (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_113c_0), 0, 4412 }, /* MOVE.B #.B,-(An) */ +{ CPUFUNC(op_1140_0), 0, 4416 }, /* MOVE.B Dn,(d16,An) */ +{ CPUFUNC(op_1150_0), 0, 4432 }, /* MOVE.B (An),(d16,An) */ +{ CPUFUNC(op_1158_0), 0, 4440 }, /* MOVE.B (An)+,(d16,An) */ +{ CPUFUNC(op_1160_0), 0, 4448 }, /* MOVE.B -(An),(d16,An) */ +{ CPUFUNC(op_1168_0), 0, 4456 }, /* MOVE.B (d16,An),(d16,An) */ +{ CPUFUNC(op_1170_0), 0, 4464 }, /* MOVE.B (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_1178_0), 0, 4472 }, /* MOVE.B (xxx).W,(d16,An) */ +{ CPUFUNC(op_1179_0), 0, 4473 }, /* MOVE.B (xxx).L,(d16,An) */ +{ CPUFUNC(op_117a_0), 0, 4474 }, /* MOVE.B (d16,PC),(d16,An) */ +{ CPUFUNC(op_117b_0), 0, 4475 }, /* MOVE.B (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_117c_0), 0, 4476 }, /* MOVE.B #.B,(d16,An) */ +{ CPUFUNC(op_1180_0), 0, 4480 }, /* MOVE.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1190_0), 0, 4496 }, /* MOVE.B (An),(d8,An,Xn) */ +{ CPUFUNC(op_1198_0), 0, 4504 }, /* MOVE.B (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_11a0_0), 0, 4512 }, /* MOVE.B -(An),(d8,An,Xn) */ +{ CPUFUNC(op_11a8_0), 0, 4520 }, /* MOVE.B (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_11b0_0), 0, 4528 }, /* MOVE.B (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_11b8_0), 0, 4536 }, /* MOVE.B (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_11b9_0), 0, 4537 }, /* MOVE.B (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_11ba_0), 0, 4538 }, /* MOVE.B (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_11bb_0), 0, 4539 }, /* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_11bc_0), 0, 4540 }, /* MOVE.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_11c0_0), 0, 4544 }, /* MOVE.B Dn,(xxx).W */ +{ CPUFUNC(op_11d0_0), 0, 4560 }, /* MOVE.B (An),(xxx).W */ +{ CPUFUNC(op_11d8_0), 0, 4568 }, /* MOVE.B (An)+,(xxx).W */ +{ CPUFUNC(op_11e0_0), 0, 4576 }, /* MOVE.B -(An),(xxx).W */ +{ CPUFUNC(op_11e8_0), 0, 4584 }, /* MOVE.B (d16,An),(xxx).W */ +{ CPUFUNC(op_11f0_0), 0, 4592 }, /* MOVE.B (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_11f8_0), 0, 4600 }, /* MOVE.B (xxx).W,(xxx).W */ +{ CPUFUNC(op_11f9_0), 0, 4601 }, /* MOVE.B (xxx).L,(xxx).W */ +{ CPUFUNC(op_11fa_0), 0, 4602 }, /* MOVE.B (d16,PC),(xxx).W */ +{ CPUFUNC(op_11fb_0), 0, 4603 }, /* MOVE.B (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_11fc_0), 0, 4604 }, /* MOVE.B #.B,(xxx).W */ +{ CPUFUNC(op_13c0_0), 0, 5056 }, /* MOVE.B Dn,(xxx).L */ +{ CPUFUNC(op_13d0_0), 0, 5072 }, /* MOVE.B (An),(xxx).L */ +{ CPUFUNC(op_13d8_0), 0, 5080 }, /* MOVE.B (An)+,(xxx).L */ +{ CPUFUNC(op_13e0_0), 0, 5088 }, /* MOVE.B -(An),(xxx).L */ +{ CPUFUNC(op_13e8_0), 0, 5096 }, /* MOVE.B (d16,An),(xxx).L */ +{ CPUFUNC(op_13f0_0), 0, 5104 }, /* MOVE.B (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_13f8_0), 0, 5112 }, /* MOVE.B (xxx).W,(xxx).L */ +{ CPUFUNC(op_13f9_0), 0, 5113 }, /* MOVE.B (xxx).L,(xxx).L */ +{ CPUFUNC(op_13fa_0), 0, 5114 }, /* MOVE.B (d16,PC),(xxx).L */ +{ CPUFUNC(op_13fb_0), 0, 5115 }, /* MOVE.B (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_13fc_0), 0, 5116 }, /* MOVE.B #.B,(xxx).L */ +{ CPUFUNC(op_2000_0), 0, 8192 }, /* MOVE.L Dn,Dn */ +{ CPUFUNC(op_2008_0), 0, 8200 }, /* MOVE.L An,Dn */ +{ CPUFUNC(op_2010_0), 0, 8208 }, /* MOVE.L (An),Dn */ +{ CPUFUNC(op_2018_0), 0, 8216 }, /* MOVE.L (An)+,Dn */ +{ CPUFUNC(op_2020_0), 0, 8224 }, /* MOVE.L -(An),Dn */ +{ CPUFUNC(op_2028_0), 0, 8232 }, /* MOVE.L (d16,An),Dn */ +{ CPUFUNC(op_2030_0), 0, 8240 }, /* MOVE.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_2038_0), 0, 8248 }, /* MOVE.L (xxx).W,Dn */ +{ CPUFUNC(op_2039_0), 0, 8249 }, /* MOVE.L (xxx).L,Dn */ +{ CPUFUNC(op_203a_0), 0, 8250 }, /* MOVE.L (d16,PC),Dn */ +{ CPUFUNC(op_203b_0), 0, 8251 }, /* MOVE.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_203c_0), 0, 8252 }, /* MOVE.L #.L,Dn */ +{ CPUFUNC_FF(op_2040_0), 0, 8256 }, /* MOVEA.L Dn,An */ +{ CPUFUNC_FF(op_2048_0), 0, 8264 }, /* MOVEA.L An,An */ +{ CPUFUNC_FF(op_2050_0), 0, 8272 }, /* MOVEA.L (An),An */ +{ CPUFUNC_FF(op_2058_0), 0, 8280 }, /* MOVEA.L (An)+,An */ +{ CPUFUNC_FF(op_2060_0), 0, 8288 }, /* MOVEA.L -(An),An */ +{ CPUFUNC_FF(op_2068_0), 0, 8296 }, /* MOVEA.L (d16,An),An */ +{ CPUFUNC_FF(op_2070_0), 0, 8304 }, /* MOVEA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_2078_0), 0, 8312 }, /* MOVEA.L (xxx).W,An */ +{ CPUFUNC_FF(op_2079_0), 0, 8313 }, /* MOVEA.L (xxx).L,An */ +{ CPUFUNC_FF(op_207a_0), 0, 8314 }, /* MOVEA.L (d16,PC),An */ +{ CPUFUNC_FF(op_207b_0), 0, 8315 }, /* MOVEA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_207c_0), 0, 8316 }, /* MOVEA.L #.L,An */ +{ CPUFUNC(op_2080_0), 0, 8320 }, /* MOVE.L Dn,(An) */ +{ CPUFUNC(op_2088_0), 0, 8328 }, /* MOVE.L An,(An) */ +{ CPUFUNC(op_2090_0), 0, 8336 }, /* MOVE.L (An),(An) */ +{ CPUFUNC(op_2098_0), 0, 8344 }, /* MOVE.L (An)+,(An) */ +{ CPUFUNC(op_20a0_0), 0, 8352 }, /* MOVE.L -(An),(An) */ +{ CPUFUNC(op_20a8_0), 0, 8360 }, /* MOVE.L (d16,An),(An) */ +{ CPUFUNC(op_20b0_0), 0, 8368 }, /* MOVE.L (d8,An,Xn),(An) */ +{ CPUFUNC(op_20b8_0), 0, 8376 }, /* MOVE.L (xxx).W,(An) */ +{ CPUFUNC(op_20b9_0), 0, 8377 }, /* MOVE.L (xxx).L,(An) */ +{ CPUFUNC(op_20ba_0), 0, 8378 }, /* MOVE.L (d16,PC),(An) */ +{ CPUFUNC(op_20bb_0), 0, 8379 }, /* MOVE.L (d8,PC,Xn),(An) */ +{ CPUFUNC(op_20bc_0), 0, 8380 }, /* MOVE.L #.L,(An) */ +{ CPUFUNC(op_20c0_0), 0, 8384 }, /* MOVE.L Dn,(An)+ */ +{ CPUFUNC(op_20c8_0), 0, 8392 }, /* MOVE.L An,(An)+ */ +{ CPUFUNC(op_20d0_0), 0, 8400 }, /* MOVE.L (An),(An)+ */ +{ CPUFUNC(op_20d8_0), 0, 8408 }, /* MOVE.L (An)+,(An)+ */ +{ CPUFUNC(op_20e0_0), 0, 8416 }, /* MOVE.L -(An),(An)+ */ +{ CPUFUNC(op_20e8_0), 0, 8424 }, /* MOVE.L (d16,An),(An)+ */ +{ CPUFUNC(op_20f0_0), 0, 8432 }, /* MOVE.L (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_20f8_0), 0, 8440 }, /* MOVE.L (xxx).W,(An)+ */ +{ CPUFUNC(op_20f9_0), 0, 8441 }, /* MOVE.L (xxx).L,(An)+ */ +{ CPUFUNC(op_20fa_0), 0, 8442 }, /* MOVE.L (d16,PC),(An)+ */ +{ CPUFUNC(op_20fb_0), 0, 8443 }, /* MOVE.L (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_20fc_0), 0, 8444 }, /* MOVE.L #.L,(An)+ */ +{ CPUFUNC(op_2100_0), 0, 8448 }, /* MOVE.L Dn,-(An) */ +{ CPUFUNC(op_2108_0), 0, 8456 }, /* MOVE.L An,-(An) */ +{ CPUFUNC(op_2110_0), 0, 8464 }, /* MOVE.L (An),-(An) */ +{ CPUFUNC(op_2118_0), 0, 8472 }, /* MOVE.L (An)+,-(An) */ +{ CPUFUNC(op_2120_0), 0, 8480 }, /* MOVE.L -(An),-(An) */ +{ CPUFUNC(op_2128_0), 0, 8488 }, /* MOVE.L (d16,An),-(An) */ +{ CPUFUNC(op_2130_0), 0, 8496 }, /* MOVE.L (d8,An,Xn),-(An) */ +{ CPUFUNC(op_2138_0), 0, 8504 }, /* MOVE.L (xxx).W,-(An) */ +{ CPUFUNC(op_2139_0), 0, 8505 }, /* MOVE.L (xxx).L,-(An) */ +{ CPUFUNC(op_213a_0), 0, 8506 }, /* MOVE.L (d16,PC),-(An) */ +{ CPUFUNC(op_213b_0), 0, 8507 }, /* MOVE.L (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_213c_0), 0, 8508 }, /* MOVE.L #.L,-(An) */ +{ CPUFUNC(op_2140_0), 0, 8512 }, /* MOVE.L Dn,(d16,An) */ +{ CPUFUNC(op_2148_0), 0, 8520 }, /* MOVE.L An,(d16,An) */ +{ CPUFUNC(op_2150_0), 0, 8528 }, /* MOVE.L (An),(d16,An) */ +{ CPUFUNC(op_2158_0), 0, 8536 }, /* MOVE.L (An)+,(d16,An) */ +{ CPUFUNC(op_2160_0), 0, 8544 }, /* MOVE.L -(An),(d16,An) */ +{ CPUFUNC(op_2168_0), 0, 8552 }, /* MOVE.L (d16,An),(d16,An) */ +{ CPUFUNC(op_2170_0), 0, 8560 }, /* MOVE.L (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_2178_0), 0, 8568 }, /* MOVE.L (xxx).W,(d16,An) */ +{ CPUFUNC(op_2179_0), 0, 8569 }, /* MOVE.L (xxx).L,(d16,An) */ +{ CPUFUNC(op_217a_0), 0, 8570 }, /* MOVE.L (d16,PC),(d16,An) */ +{ CPUFUNC(op_217b_0), 0, 8571 }, /* MOVE.L (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_217c_0), 0, 8572 }, /* MOVE.L #.L,(d16,An) */ +{ CPUFUNC(op_2180_0), 0, 8576 }, /* MOVE.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_2188_0), 0, 8584 }, /* MOVE.L An,(d8,An,Xn) */ +{ CPUFUNC(op_2190_0), 0, 8592 }, /* MOVE.L (An),(d8,An,Xn) */ +{ CPUFUNC(op_2198_0), 0, 8600 }, /* MOVE.L (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_21a0_0), 0, 8608 }, /* MOVE.L -(An),(d8,An,Xn) */ +{ CPUFUNC(op_21a8_0), 0, 8616 }, /* MOVE.L (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_21b0_0), 0, 8624 }, /* MOVE.L (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_21b8_0), 0, 8632 }, /* MOVE.L (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_21b9_0), 0, 8633 }, /* MOVE.L (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_21ba_0), 0, 8634 }, /* MOVE.L (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_21bb_0), 0, 8635 }, /* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_21bc_0), 0, 8636 }, /* MOVE.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_21c0_0), 0, 8640 }, /* MOVE.L Dn,(xxx).W */ +{ CPUFUNC(op_21c8_0), 0, 8648 }, /* MOVE.L An,(xxx).W */ +{ CPUFUNC(op_21d0_0), 0, 8656 }, /* MOVE.L (An),(xxx).W */ +{ CPUFUNC(op_21d8_0), 0, 8664 }, /* MOVE.L (An)+,(xxx).W */ +{ CPUFUNC(op_21e0_0), 0, 8672 }, /* MOVE.L -(An),(xxx).W */ +{ CPUFUNC(op_21e8_0), 0, 8680 }, /* MOVE.L (d16,An),(xxx).W */ +{ CPUFUNC(op_21f0_0), 0, 8688 }, /* MOVE.L (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_21f8_0), 0, 8696 }, /* MOVE.L (xxx).W,(xxx).W */ +{ CPUFUNC(op_21f9_0), 0, 8697 }, /* MOVE.L (xxx).L,(xxx).W */ +{ CPUFUNC(op_21fa_0), 0, 8698 }, /* MOVE.L (d16,PC),(xxx).W */ +{ CPUFUNC(op_21fb_0), 0, 8699 }, /* MOVE.L (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_21fc_0), 0, 8700 }, /* MOVE.L #.L,(xxx).W */ +{ CPUFUNC(op_23c0_0), 0, 9152 }, /* MOVE.L Dn,(xxx).L */ +{ CPUFUNC(op_23c8_0), 0, 9160 }, /* MOVE.L An,(xxx).L */ +{ CPUFUNC(op_23d0_0), 0, 9168 }, /* MOVE.L (An),(xxx).L */ +{ CPUFUNC(op_23d8_0), 0, 9176 }, /* MOVE.L (An)+,(xxx).L */ +{ CPUFUNC(op_23e0_0), 0, 9184 }, /* MOVE.L -(An),(xxx).L */ +{ CPUFUNC(op_23e8_0), 0, 9192 }, /* MOVE.L (d16,An),(xxx).L */ +{ CPUFUNC(op_23f0_0), 0, 9200 }, /* MOVE.L (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_23f8_0), 0, 9208 }, /* MOVE.L (xxx).W,(xxx).L */ +{ CPUFUNC(op_23f9_0), 0, 9209 }, /* MOVE.L (xxx).L,(xxx).L */ +{ CPUFUNC(op_23fa_0), 0, 9210 }, /* MOVE.L (d16,PC),(xxx).L */ +{ CPUFUNC(op_23fb_0), 0, 9211 }, /* MOVE.L (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_23fc_0), 0, 9212 }, /* MOVE.L #.L,(xxx).L */ +{ CPUFUNC(op_3000_0), 0, 12288 }, /* MOVE.W Dn,Dn */ +{ CPUFUNC(op_3008_0), 0, 12296 }, /* MOVE.W An,Dn */ +{ CPUFUNC(op_3010_0), 0, 12304 }, /* MOVE.W (An),Dn */ +{ CPUFUNC(op_3018_0), 0, 12312 }, /* MOVE.W (An)+,Dn */ +{ CPUFUNC(op_3020_0), 0, 12320 }, /* MOVE.W -(An),Dn */ +{ CPUFUNC(op_3028_0), 0, 12328 }, /* MOVE.W (d16,An),Dn */ +{ CPUFUNC(op_3030_0), 0, 12336 }, /* MOVE.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_3038_0), 0, 12344 }, /* MOVE.W (xxx).W,Dn */ +{ CPUFUNC(op_3039_0), 0, 12345 }, /* MOVE.W (xxx).L,Dn */ +{ CPUFUNC(op_303a_0), 0, 12346 }, /* MOVE.W (d16,PC),Dn */ +{ CPUFUNC(op_303b_0), 0, 12347 }, /* MOVE.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_303c_0), 0, 12348 }, /* MOVE.W #.W,Dn */ +{ CPUFUNC_FF(op_3040_0), 0, 12352 }, /* MOVEA.W Dn,An */ +{ CPUFUNC_FF(op_3048_0), 0, 12360 }, /* MOVEA.W An,An */ +{ CPUFUNC_FF(op_3050_0), 0, 12368 }, /* MOVEA.W (An),An */ +{ CPUFUNC_FF(op_3058_0), 0, 12376 }, /* MOVEA.W (An)+,An */ +{ CPUFUNC_FF(op_3060_0), 0, 12384 }, /* MOVEA.W -(An),An */ +{ CPUFUNC_FF(op_3068_0), 0, 12392 }, /* MOVEA.W (d16,An),An */ +{ CPUFUNC_FF(op_3070_0), 0, 12400 }, /* MOVEA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_3078_0), 0, 12408 }, /* MOVEA.W (xxx).W,An */ +{ CPUFUNC_FF(op_3079_0), 0, 12409 }, /* MOVEA.W (xxx).L,An */ +{ CPUFUNC_FF(op_307a_0), 0, 12410 }, /* MOVEA.W (d16,PC),An */ +{ CPUFUNC_FF(op_307b_0), 0, 12411 }, /* MOVEA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_307c_0), 0, 12412 }, /* MOVEA.W #.W,An */ +{ CPUFUNC(op_3080_0), 0, 12416 }, /* MOVE.W Dn,(An) */ +{ CPUFUNC(op_3088_0), 0, 12424 }, /* MOVE.W An,(An) */ +{ CPUFUNC(op_3090_0), 0, 12432 }, /* MOVE.W (An),(An) */ +{ CPUFUNC(op_3098_0), 0, 12440 }, /* MOVE.W (An)+,(An) */ +{ CPUFUNC(op_30a0_0), 0, 12448 }, /* MOVE.W -(An),(An) */ +{ CPUFUNC(op_30a8_0), 0, 12456 }, /* MOVE.W (d16,An),(An) */ +{ CPUFUNC(op_30b0_0), 0, 12464 }, /* MOVE.W (d8,An,Xn),(An) */ +{ CPUFUNC(op_30b8_0), 0, 12472 }, /* MOVE.W (xxx).W,(An) */ +{ CPUFUNC(op_30b9_0), 0, 12473 }, /* MOVE.W (xxx).L,(An) */ +{ CPUFUNC(op_30ba_0), 0, 12474 }, /* MOVE.W (d16,PC),(An) */ +{ CPUFUNC(op_30bb_0), 0, 12475 }, /* MOVE.W (d8,PC,Xn),(An) */ +{ CPUFUNC(op_30bc_0), 0, 12476 }, /* MOVE.W #.W,(An) */ +{ CPUFUNC(op_30c0_0), 0, 12480 }, /* MOVE.W Dn,(An)+ */ +{ CPUFUNC(op_30c8_0), 0, 12488 }, /* MOVE.W An,(An)+ */ +{ CPUFUNC(op_30d0_0), 0, 12496 }, /* MOVE.W (An),(An)+ */ +{ CPUFUNC(op_30d8_0), 0, 12504 }, /* MOVE.W (An)+,(An)+ */ +{ CPUFUNC(op_30e0_0), 0, 12512 }, /* MOVE.W -(An),(An)+ */ +{ CPUFUNC(op_30e8_0), 0, 12520 }, /* MOVE.W (d16,An),(An)+ */ +{ CPUFUNC(op_30f0_0), 0, 12528 }, /* MOVE.W (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_30f8_0), 0, 12536 }, /* MOVE.W (xxx).W,(An)+ */ +{ CPUFUNC(op_30f9_0), 0, 12537 }, /* MOVE.W (xxx).L,(An)+ */ +{ CPUFUNC(op_30fa_0), 0, 12538 }, /* MOVE.W (d16,PC),(An)+ */ +{ CPUFUNC(op_30fb_0), 0, 12539 }, /* MOVE.W (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_30fc_0), 0, 12540 }, /* MOVE.W #.W,(An)+ */ +{ CPUFUNC(op_3100_0), 0, 12544 }, /* MOVE.W Dn,-(An) */ +{ CPUFUNC(op_3108_0), 0, 12552 }, /* MOVE.W An,-(An) */ +{ CPUFUNC(op_3110_0), 0, 12560 }, /* MOVE.W (An),-(An) */ +{ CPUFUNC(op_3118_0), 0, 12568 }, /* MOVE.W (An)+,-(An) */ +{ CPUFUNC(op_3120_0), 0, 12576 }, /* MOVE.W -(An),-(An) */ +{ CPUFUNC(op_3128_0), 0, 12584 }, /* MOVE.W (d16,An),-(An) */ +{ CPUFUNC(op_3130_0), 0, 12592 }, /* MOVE.W (d8,An,Xn),-(An) */ +{ CPUFUNC(op_3138_0), 0, 12600 }, /* MOVE.W (xxx).W,-(An) */ +{ CPUFUNC(op_3139_0), 0, 12601 }, /* MOVE.W (xxx).L,-(An) */ +{ CPUFUNC(op_313a_0), 0, 12602 }, /* MOVE.W (d16,PC),-(An) */ +{ CPUFUNC(op_313b_0), 0, 12603 }, /* MOVE.W (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_313c_0), 0, 12604 }, /* MOVE.W #.W,-(An) */ +{ CPUFUNC(op_3140_0), 0, 12608 }, /* MOVE.W Dn,(d16,An) */ +{ CPUFUNC(op_3148_0), 0, 12616 }, /* MOVE.W An,(d16,An) */ +{ CPUFUNC(op_3150_0), 0, 12624 }, /* MOVE.W (An),(d16,An) */ +{ CPUFUNC(op_3158_0), 0, 12632 }, /* MOVE.W (An)+,(d16,An) */ +{ CPUFUNC(op_3160_0), 0, 12640 }, /* MOVE.W -(An),(d16,An) */ +{ CPUFUNC(op_3168_0), 0, 12648 }, /* MOVE.W (d16,An),(d16,An) */ +{ CPUFUNC(op_3170_0), 0, 12656 }, /* MOVE.W (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_3178_0), 0, 12664 }, /* MOVE.W (xxx).W,(d16,An) */ +{ CPUFUNC(op_3179_0), 0, 12665 }, /* MOVE.W (xxx).L,(d16,An) */ +{ CPUFUNC(op_317a_0), 0, 12666 }, /* MOVE.W (d16,PC),(d16,An) */ +{ CPUFUNC(op_317b_0), 0, 12667 }, /* MOVE.W (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_317c_0), 0, 12668 }, /* MOVE.W #.W,(d16,An) */ +{ CPUFUNC(op_3180_0), 0, 12672 }, /* MOVE.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_3188_0), 0, 12680 }, /* MOVE.W An,(d8,An,Xn) */ +{ CPUFUNC(op_3190_0), 0, 12688 }, /* MOVE.W (An),(d8,An,Xn) */ +{ CPUFUNC(op_3198_0), 0, 12696 }, /* MOVE.W (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_31a0_0), 0, 12704 }, /* MOVE.W -(An),(d8,An,Xn) */ +{ CPUFUNC(op_31a8_0), 0, 12712 }, /* MOVE.W (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_31b0_0), 0, 12720 }, /* MOVE.W (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_31b8_0), 0, 12728 }, /* MOVE.W (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_31b9_0), 0, 12729 }, /* MOVE.W (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_31ba_0), 0, 12730 }, /* MOVE.W (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_31bb_0), 0, 12731 }, /* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_31bc_0), 0, 12732 }, /* MOVE.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_31c0_0), 0, 12736 }, /* MOVE.W Dn,(xxx).W */ +{ CPUFUNC(op_31c8_0), 0, 12744 }, /* MOVE.W An,(xxx).W */ +{ CPUFUNC(op_31d0_0), 0, 12752 }, /* MOVE.W (An),(xxx).W */ +{ CPUFUNC(op_31d8_0), 0, 12760 }, /* MOVE.W (An)+,(xxx).W */ +{ CPUFUNC(op_31e0_0), 0, 12768 }, /* MOVE.W -(An),(xxx).W */ +{ CPUFUNC(op_31e8_0), 0, 12776 }, /* MOVE.W (d16,An),(xxx).W */ +{ CPUFUNC(op_31f0_0), 0, 12784 }, /* MOVE.W (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_31f8_0), 0, 12792 }, /* MOVE.W (xxx).W,(xxx).W */ +{ CPUFUNC(op_31f9_0), 0, 12793 }, /* MOVE.W (xxx).L,(xxx).W */ +{ CPUFUNC(op_31fa_0), 0, 12794 }, /* MOVE.W (d16,PC),(xxx).W */ +{ CPUFUNC(op_31fb_0), 0, 12795 }, /* MOVE.W (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_31fc_0), 0, 12796 }, /* MOVE.W #.W,(xxx).W */ +{ CPUFUNC(op_33c0_0), 0, 13248 }, /* MOVE.W Dn,(xxx).L */ +{ CPUFUNC(op_33c8_0), 0, 13256 }, /* MOVE.W An,(xxx).L */ +{ CPUFUNC(op_33d0_0), 0, 13264 }, /* MOVE.W (An),(xxx).L */ +{ CPUFUNC(op_33d8_0), 0, 13272 }, /* MOVE.W (An)+,(xxx).L */ +{ CPUFUNC(op_33e0_0), 0, 13280 }, /* MOVE.W -(An),(xxx).L */ +{ CPUFUNC(op_33e8_0), 0, 13288 }, /* MOVE.W (d16,An),(xxx).L */ +{ CPUFUNC(op_33f0_0), 0, 13296 }, /* MOVE.W (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_33f8_0), 0, 13304 }, /* MOVE.W (xxx).W,(xxx).L */ +{ CPUFUNC(op_33f9_0), 0, 13305 }, /* MOVE.W (xxx).L,(xxx).L */ +{ CPUFUNC(op_33fa_0), 0, 13306 }, /* MOVE.W (d16,PC),(xxx).L */ +{ CPUFUNC(op_33fb_0), 0, 13307 }, /* MOVE.W (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_33fc_0), 0, 13308 }, /* MOVE.W #.W,(xxx).L */ +{ CPUFUNC(op_4000_0), 0, 16384 }, /* NEGX.B Dn */ +{ CPUFUNC(op_4010_0), 0, 16400 }, /* NEGX.B (An) */ +{ CPUFUNC(op_4018_0), 0, 16408 }, /* NEGX.B (An)+ */ +{ CPUFUNC(op_4020_0), 0, 16416 }, /* NEGX.B -(An) */ +{ CPUFUNC(op_4028_0), 0, 16424 }, /* NEGX.B (d16,An) */ +{ CPUFUNC(op_4030_0), 0, 16432 }, /* NEGX.B (d8,An,Xn) */ +{ CPUFUNC(op_4038_0), 0, 16440 }, /* NEGX.B (xxx).W */ +{ CPUFUNC(op_4039_0), 0, 16441 }, /* NEGX.B (xxx).L */ +{ CPUFUNC(op_4040_0), 0, 16448 }, /* NEGX.W Dn */ +{ CPUFUNC(op_4050_0), 0, 16464 }, /* NEGX.W (An) */ +{ CPUFUNC(op_4058_0), 0, 16472 }, /* NEGX.W (An)+ */ +{ CPUFUNC(op_4060_0), 0, 16480 }, /* NEGX.W -(An) */ +{ CPUFUNC(op_4068_0), 0, 16488 }, /* NEGX.W (d16,An) */ +{ CPUFUNC(op_4070_0), 0, 16496 }, /* NEGX.W (d8,An,Xn) */ +{ CPUFUNC(op_4078_0), 0, 16504 }, /* NEGX.W (xxx).W */ +{ CPUFUNC(op_4079_0), 0, 16505 }, /* NEGX.W (xxx).L */ +{ CPUFUNC(op_4080_0), 0, 16512 }, /* NEGX.L Dn */ +{ CPUFUNC(op_4090_0), 0, 16528 }, /* NEGX.L (An) */ +{ CPUFUNC(op_4098_0), 0, 16536 }, /* NEGX.L (An)+ */ +{ CPUFUNC(op_40a0_0), 0, 16544 }, /* NEGX.L -(An) */ +{ CPUFUNC(op_40a8_0), 0, 16552 }, /* NEGX.L (d16,An) */ +{ CPUFUNC(op_40b0_0), 0, 16560 }, /* NEGX.L (d8,An,Xn) */ +{ CPUFUNC(op_40b8_0), 0, 16568 }, /* NEGX.L (xxx).W */ +{ CPUFUNC(op_40b9_0), 0, 16569 }, /* NEGX.L (xxx).L */ +{ CPUFUNC_FF(op_40c0_0), 0, 16576 }, /* MVSR2.W Dn */ +{ CPUFUNC_FF(op_40d0_0), 0, 16592 }, /* MVSR2.W (An) */ +{ CPUFUNC_FF(op_40d8_0), 0, 16600 }, /* MVSR2.W (An)+ */ +{ CPUFUNC_FF(op_40e0_0), 0, 16608 }, /* MVSR2.W -(An) */ +{ CPUFUNC_FF(op_40e8_0), 0, 16616 }, /* MVSR2.W (d16,An) */ +{ CPUFUNC_FF(op_40f0_0), 0, 16624 }, /* MVSR2.W (d8,An,Xn) */ +{ CPUFUNC_FF(op_40f8_0), 0, 16632 }, /* MVSR2.W (xxx).W */ +{ CPUFUNC_FF(op_40f9_0), 0, 16633 }, /* MVSR2.W (xxx).L */ +{ CPUFUNC(op_4100_0), 0, 16640 }, /* CHK.L Dn,Dn */ +{ CPUFUNC(op_4110_0), 0, 16656 }, /* CHK.L (An),Dn */ +{ CPUFUNC(op_4118_0), 0, 16664 }, /* CHK.L (An)+,Dn */ +{ CPUFUNC(op_4120_0), 0, 16672 }, /* CHK.L -(An),Dn */ +{ CPUFUNC(op_4128_0), 0, 16680 }, /* CHK.L (d16,An),Dn */ +{ CPUFUNC(op_4130_0), 0, 16688 }, /* CHK.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_4138_0), 0, 16696 }, /* CHK.L (xxx).W,Dn */ +{ CPUFUNC(op_4139_0), 0, 16697 }, /* CHK.L (xxx).L,Dn */ +{ CPUFUNC(op_413a_0), 0, 16698 }, /* CHK.L (d16,PC),Dn */ +{ CPUFUNC(op_413b_0), 0, 16699 }, /* CHK.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_413c_0), 0, 16700 }, /* CHK.L #.L,Dn */ +{ CPUFUNC(op_4180_0), 0, 16768 }, /* CHK.W Dn,Dn */ +{ CPUFUNC(op_4190_0), 0, 16784 }, /* CHK.W (An),Dn */ +{ CPUFUNC(op_4198_0), 0, 16792 }, /* CHK.W (An)+,Dn */ +{ CPUFUNC(op_41a0_0), 0, 16800 }, /* CHK.W -(An),Dn */ +{ CPUFUNC(op_41a8_0), 0, 16808 }, /* CHK.W (d16,An),Dn */ +{ CPUFUNC(op_41b0_0), 0, 16816 }, /* CHK.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_41b8_0), 0, 16824 }, /* CHK.W (xxx).W,Dn */ +{ CPUFUNC(op_41b9_0), 0, 16825 }, /* CHK.W (xxx).L,Dn */ +{ CPUFUNC(op_41ba_0), 0, 16826 }, /* CHK.W (d16,PC),Dn */ +{ CPUFUNC(op_41bb_0), 0, 16827 }, /* CHK.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_41bc_0), 0, 16828 }, /* CHK.W #.W,Dn */ +{ CPUFUNC_FF(op_41d0_0), 0, 16848 }, /* LEA.L (An),An */ +{ CPUFUNC_FF(op_41e8_0), 0, 16872 }, /* LEA.L (d16,An),An */ +{ CPUFUNC_FF(op_41f0_0), 0, 16880 }, /* LEA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_41f8_0), 0, 16888 }, /* LEA.L (xxx).W,An */ +{ CPUFUNC_FF(op_41f9_0), 0, 16889 }, /* LEA.L (xxx).L,An */ +{ CPUFUNC_FF(op_41fa_0), 0, 16890 }, /* LEA.L (d16,PC),An */ +{ CPUFUNC_FF(op_41fb_0), 0, 16891 }, /* LEA.L (d8,PC,Xn),An */ +{ CPUFUNC(op_4200_0), 0, 16896 }, /* CLR.B Dn */ +{ CPUFUNC(op_4210_0), 0, 16912 }, /* CLR.B (An) */ +{ CPUFUNC(op_4218_0), 0, 16920 }, /* CLR.B (An)+ */ +{ CPUFUNC(op_4220_0), 0, 16928 }, /* CLR.B -(An) */ +{ CPUFUNC(op_4228_0), 0, 16936 }, /* CLR.B (d16,An) */ +{ CPUFUNC(op_4230_0), 0, 16944 }, /* CLR.B (d8,An,Xn) */ +{ CPUFUNC(op_4238_0), 0, 16952 }, /* CLR.B (xxx).W */ +{ CPUFUNC(op_4239_0), 0, 16953 }, /* CLR.B (xxx).L */ +{ CPUFUNC(op_4240_0), 0, 16960 }, /* CLR.W Dn */ +{ CPUFUNC(op_4250_0), 0, 16976 }, /* CLR.W (An) */ +{ CPUFUNC(op_4258_0), 0, 16984 }, /* CLR.W (An)+ */ +{ CPUFUNC(op_4260_0), 0, 16992 }, /* CLR.W -(An) */ +{ CPUFUNC(op_4268_0), 0, 17000 }, /* CLR.W (d16,An) */ +{ CPUFUNC(op_4270_0), 0, 17008 }, /* CLR.W (d8,An,Xn) */ +{ CPUFUNC(op_4278_0), 0, 17016 }, /* CLR.W (xxx).W */ +{ CPUFUNC(op_4279_0), 0, 17017 }, /* CLR.W (xxx).L */ +{ CPUFUNC(op_4280_0), 0, 17024 }, /* CLR.L Dn */ +{ CPUFUNC(op_4290_0), 0, 17040 }, /* CLR.L (An) */ +{ CPUFUNC(op_4298_0), 0, 17048 }, /* CLR.L (An)+ */ +{ CPUFUNC(op_42a0_0), 0, 17056 }, /* CLR.L -(An) */ +{ CPUFUNC(op_42a8_0), 0, 17064 }, /* CLR.L (d16,An) */ +{ CPUFUNC(op_42b0_0), 0, 17072 }, /* CLR.L (d8,An,Xn) */ +{ CPUFUNC(op_42b8_0), 0, 17080 }, /* CLR.L (xxx).W */ +{ CPUFUNC(op_42b9_0), 0, 17081 }, /* CLR.L (xxx).L */ +{ CPUFUNC_FF(op_42c0_0), 0, 17088 }, /* MVSR2.B Dn */ +{ CPUFUNC_FF(op_42d0_0), 0, 17104 }, /* MVSR2.B (An) */ +{ CPUFUNC_FF(op_42d8_0), 0, 17112 }, /* MVSR2.B (An)+ */ +{ CPUFUNC_FF(op_42e0_0), 0, 17120 }, /* MVSR2.B -(An) */ +{ CPUFUNC_FF(op_42e8_0), 0, 17128 }, /* MVSR2.B (d16,An) */ +{ CPUFUNC_FF(op_42f0_0), 0, 17136 }, /* MVSR2.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_42f8_0), 0, 17144 }, /* MVSR2.B (xxx).W */ +{ CPUFUNC_FF(op_42f9_0), 0, 17145 }, /* MVSR2.B (xxx).L */ +{ CPUFUNC(op_4400_0), 0, 17408 }, /* NEG.B Dn */ +{ CPUFUNC(op_4410_0), 0, 17424 }, /* NEG.B (An) */ +{ CPUFUNC(op_4418_0), 0, 17432 }, /* NEG.B (An)+ */ +{ CPUFUNC(op_4420_0), 0, 17440 }, /* NEG.B -(An) */ +{ CPUFUNC(op_4428_0), 0, 17448 }, /* NEG.B (d16,An) */ +{ CPUFUNC(op_4430_0), 0, 17456 }, /* NEG.B (d8,An,Xn) */ +{ CPUFUNC(op_4438_0), 0, 17464 }, /* NEG.B (xxx).W */ +{ CPUFUNC(op_4439_0), 0, 17465 }, /* NEG.B (xxx).L */ +{ CPUFUNC(op_4440_0), 0, 17472 }, /* NEG.W Dn */ +{ CPUFUNC(op_4450_0), 0, 17488 }, /* NEG.W (An) */ +{ CPUFUNC(op_4458_0), 0, 17496 }, /* NEG.W (An)+ */ +{ CPUFUNC(op_4460_0), 0, 17504 }, /* NEG.W -(An) */ +{ CPUFUNC(op_4468_0), 0, 17512 }, /* NEG.W (d16,An) */ +{ CPUFUNC(op_4470_0), 0, 17520 }, /* NEG.W (d8,An,Xn) */ +{ CPUFUNC(op_4478_0), 0, 17528 }, /* NEG.W (xxx).W */ +{ CPUFUNC(op_4479_0), 0, 17529 }, /* NEG.W (xxx).L */ +{ CPUFUNC(op_4480_0), 0, 17536 }, /* NEG.L Dn */ +{ CPUFUNC(op_4490_0), 0, 17552 }, /* NEG.L (An) */ +{ CPUFUNC(op_4498_0), 0, 17560 }, /* NEG.L (An)+ */ +{ CPUFUNC(op_44a0_0), 0, 17568 }, /* NEG.L -(An) */ +{ CPUFUNC(op_44a8_0), 0, 17576 }, /* NEG.L (d16,An) */ +{ CPUFUNC(op_44b0_0), 0, 17584 }, /* NEG.L (d8,An,Xn) */ +{ CPUFUNC(op_44b8_0), 0, 17592 }, /* NEG.L (xxx).W */ +{ CPUFUNC(op_44b9_0), 0, 17593 }, /* NEG.L (xxx).L */ +{ CPUFUNC(op_44c0_0), 0, 17600 }, /* MV2SR.B Dn */ +{ CPUFUNC(op_44d0_0), 0, 17616 }, /* MV2SR.B (An) */ +{ CPUFUNC(op_44d8_0), 0, 17624 }, /* MV2SR.B (An)+ */ +{ CPUFUNC(op_44e0_0), 0, 17632 }, /* MV2SR.B -(An) */ +{ CPUFUNC(op_44e8_0), 0, 17640 }, /* MV2SR.B (d16,An) */ +{ CPUFUNC(op_44f0_0), 0, 17648 }, /* MV2SR.B (d8,An,Xn) */ +{ CPUFUNC(op_44f8_0), 0, 17656 }, /* MV2SR.B (xxx).W */ +{ CPUFUNC(op_44f9_0), 0, 17657 }, /* MV2SR.B (xxx).L */ +{ CPUFUNC(op_44fa_0), 0, 17658 }, /* MV2SR.B (d16,PC) */ +{ CPUFUNC(op_44fb_0), 0, 17659 }, /* MV2SR.B (d8,PC,Xn) */ +{ CPUFUNC(op_44fc_0), 0, 17660 }, /* MV2SR.B #.B */ +{ CPUFUNC(op_4600_0), 0, 17920 }, /* NOT.B Dn */ +{ CPUFUNC(op_4610_0), 0, 17936 }, /* NOT.B (An) */ +{ CPUFUNC(op_4618_0), 0, 17944 }, /* NOT.B (An)+ */ +{ CPUFUNC(op_4620_0), 0, 17952 }, /* NOT.B -(An) */ +{ CPUFUNC(op_4628_0), 0, 17960 }, /* NOT.B (d16,An) */ +{ CPUFUNC(op_4630_0), 0, 17968 }, /* NOT.B (d8,An,Xn) */ +{ CPUFUNC(op_4638_0), 0, 17976 }, /* NOT.B (xxx).W */ +{ CPUFUNC(op_4639_0), 0, 17977 }, /* NOT.B (xxx).L */ +{ CPUFUNC(op_4640_0), 0, 17984 }, /* NOT.W Dn */ +{ CPUFUNC(op_4650_0), 0, 18000 }, /* NOT.W (An) */ +{ CPUFUNC(op_4658_0), 0, 18008 }, /* NOT.W (An)+ */ +{ CPUFUNC(op_4660_0), 0, 18016 }, /* NOT.W -(An) */ +{ CPUFUNC(op_4668_0), 0, 18024 }, /* NOT.W (d16,An) */ +{ CPUFUNC(op_4670_0), 0, 18032 }, /* NOT.W (d8,An,Xn) */ +{ CPUFUNC(op_4678_0), 0, 18040 }, /* NOT.W (xxx).W */ +{ CPUFUNC(op_4679_0), 0, 18041 }, /* NOT.W (xxx).L */ +{ CPUFUNC(op_4680_0), 0, 18048 }, /* NOT.L Dn */ +{ CPUFUNC(op_4690_0), 0, 18064 }, /* NOT.L (An) */ +{ CPUFUNC(op_4698_0), 0, 18072 }, /* NOT.L (An)+ */ +{ CPUFUNC(op_46a0_0), 0, 18080 }, /* NOT.L -(An) */ +{ CPUFUNC(op_46a8_0), 0, 18088 }, /* NOT.L (d16,An) */ +{ CPUFUNC(op_46b0_0), 0, 18096 }, /* NOT.L (d8,An,Xn) */ +{ CPUFUNC(op_46b8_0), 0, 18104 }, /* NOT.L (xxx).W */ +{ CPUFUNC(op_46b9_0), 0, 18105 }, /* NOT.L (xxx).L */ +{ CPUFUNC(op_46c0_0), 0, 18112 }, /* MV2SR.W Dn */ +{ CPUFUNC(op_46d0_0), 0, 18128 }, /* MV2SR.W (An) */ +{ CPUFUNC(op_46d8_0), 0, 18136 }, /* MV2SR.W (An)+ */ +{ CPUFUNC(op_46e0_0), 0, 18144 }, /* MV2SR.W -(An) */ +{ CPUFUNC(op_46e8_0), 0, 18152 }, /* MV2SR.W (d16,An) */ +{ CPUFUNC(op_46f0_0), 0, 18160 }, /* MV2SR.W (d8,An,Xn) */ +{ CPUFUNC(op_46f8_0), 0, 18168 }, /* MV2SR.W (xxx).W */ +{ CPUFUNC(op_46f9_0), 0, 18169 }, /* MV2SR.W (xxx).L */ +{ CPUFUNC(op_46fa_0), 0, 18170 }, /* MV2SR.W (d16,PC) */ +{ CPUFUNC(op_46fb_0), 0, 18171 }, /* MV2SR.W (d8,PC,Xn) */ +{ CPUFUNC(op_46fc_0), 0, 18172 }, /* MV2SR.W #.W */ +{ CPUFUNC(op_4800_0), 0, 18432 }, /* NBCD.B Dn */ +{ CPUFUNC_FF(op_4808_0), 0, 18440 }, /* LINK.L An,#.L */ +{ CPUFUNC(op_4810_0), 0, 18448 }, /* NBCD.B (An) */ +{ CPUFUNC(op_4818_0), 0, 18456 }, /* NBCD.B (An)+ */ +{ CPUFUNC(op_4820_0), 0, 18464 }, /* NBCD.B -(An) */ +{ CPUFUNC(op_4828_0), 0, 18472 }, /* NBCD.B (d16,An) */ +{ CPUFUNC(op_4830_0), 0, 18480 }, /* NBCD.B (d8,An,Xn) */ +{ CPUFUNC(op_4838_0), 0, 18488 }, /* NBCD.B (xxx).W */ +{ CPUFUNC(op_4839_0), 0, 18489 }, /* NBCD.B (xxx).L */ +{ CPUFUNC(op_4840_0), 0, 18496 }, /* SWAP.W Dn */ +{ CPUFUNC_FF(op_4848_0), 0, 18504 }, /* BKPT.L # */ +{ CPUFUNC_FF(op_4850_0), 0, 18512 }, /* PEA.L (An) */ +{ CPUFUNC_FF(op_4868_0), 0, 18536 }, /* PEA.L (d16,An) */ +{ CPUFUNC_FF(op_4870_0), 0, 18544 }, /* PEA.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4878_0), 0, 18552 }, /* PEA.L (xxx).W */ +{ CPUFUNC_FF(op_4879_0), 0, 18553 }, /* PEA.L (xxx).L */ +{ CPUFUNC_FF(op_487a_0), 0, 18554 }, /* PEA.L (d16,PC) */ +{ CPUFUNC_FF(op_487b_0), 0, 18555 }, /* PEA.L (d8,PC,Xn) */ +{ CPUFUNC(op_4880_0), 0, 18560 }, /* EXT.W Dn */ +{ CPUFUNC_FF(op_4890_0), 0, 18576 }, /* MVMLE.W #.W,(An) */ +{ CPUFUNC_FF(op_48a0_0), 0, 18592 }, /* MVMLE.W #.W,-(An) */ +{ CPUFUNC_FF(op_48a8_0), 0, 18600 }, /* MVMLE.W #.W,(d16,An) */ +{ CPUFUNC_FF(op_48b0_0), 0, 18608 }, /* MVMLE.W #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_48b8_0), 0, 18616 }, /* MVMLE.W #.W,(xxx).W */ +{ CPUFUNC_FF(op_48b9_0), 0, 18617 }, /* MVMLE.W #.W,(xxx).L */ +{ CPUFUNC(op_48c0_0), 0, 18624 }, /* EXT.L Dn */ +{ CPUFUNC_FF(op_48d0_0), 0, 18640 }, /* MVMLE.L #.W,(An) */ +{ CPUFUNC_FF(op_48e0_0), 0, 18656 }, /* MVMLE.L #.W,-(An) */ +{ CPUFUNC_FF(op_48e8_0), 0, 18664 }, /* MVMLE.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_48f0_0), 0, 18672 }, /* MVMLE.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_48f8_0), 0, 18680 }, /* MVMLE.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_48f9_0), 0, 18681 }, /* MVMLE.L #.W,(xxx).L */ +{ CPUFUNC(op_49c0_0), 0, 18880 }, /* EXT.B Dn */ +{ CPUFUNC(op_4a00_0), 0, 18944 }, /* TST.B Dn */ +{ CPUFUNC(op_4a10_0), 0, 18960 }, /* TST.B (An) */ +{ CPUFUNC(op_4a18_0), 0, 18968 }, /* TST.B (An)+ */ +{ CPUFUNC(op_4a20_0), 0, 18976 }, /* TST.B -(An) */ +{ CPUFUNC(op_4a28_0), 0, 18984 }, /* TST.B (d16,An) */ +{ CPUFUNC(op_4a30_0), 0, 18992 }, /* TST.B (d8,An,Xn) */ +{ CPUFUNC(op_4a38_0), 0, 19000 }, /* TST.B (xxx).W */ +{ CPUFUNC(op_4a39_0), 0, 19001 }, /* TST.B (xxx).L */ +{ CPUFUNC(op_4a3a_0), 0, 19002 }, /* TST.B (d16,PC) */ +{ CPUFUNC(op_4a3b_0), 0, 19003 }, /* TST.B (d8,PC,Xn) */ +{ CPUFUNC(op_4a3c_0), 0, 19004 }, /* TST.B #.B */ +{ CPUFUNC(op_4a40_0), 0, 19008 }, /* TST.W Dn */ +{ CPUFUNC(op_4a48_0), 0, 19016 }, /* TST.W An */ +{ CPUFUNC(op_4a50_0), 0, 19024 }, /* TST.W (An) */ +{ CPUFUNC(op_4a58_0), 0, 19032 }, /* TST.W (An)+ */ +{ CPUFUNC(op_4a60_0), 0, 19040 }, /* TST.W -(An) */ +{ CPUFUNC(op_4a68_0), 0, 19048 }, /* TST.W (d16,An) */ +{ CPUFUNC(op_4a70_0), 0, 19056 }, /* TST.W (d8,An,Xn) */ +{ CPUFUNC(op_4a78_0), 0, 19064 }, /* TST.W (xxx).W */ +{ CPUFUNC(op_4a79_0), 0, 19065 }, /* TST.W (xxx).L */ +{ CPUFUNC(op_4a7a_0), 0, 19066 }, /* TST.W (d16,PC) */ +{ CPUFUNC(op_4a7b_0), 0, 19067 }, /* TST.W (d8,PC,Xn) */ +{ CPUFUNC(op_4a7c_0), 0, 19068 }, /* TST.W #.W */ +{ CPUFUNC(op_4a80_0), 0, 19072 }, /* TST.L Dn */ +{ CPUFUNC(op_4a88_0), 0, 19080 }, /* TST.L An */ +{ CPUFUNC(op_4a90_0), 0, 19088 }, /* TST.L (An) */ +{ CPUFUNC(op_4a98_0), 0, 19096 }, /* TST.L (An)+ */ +{ CPUFUNC(op_4aa0_0), 0, 19104 }, /* TST.L -(An) */ +{ CPUFUNC(op_4aa8_0), 0, 19112 }, /* TST.L (d16,An) */ +{ CPUFUNC(op_4ab0_0), 0, 19120 }, /* TST.L (d8,An,Xn) */ +{ CPUFUNC(op_4ab8_0), 0, 19128 }, /* TST.L (xxx).W */ +{ CPUFUNC(op_4ab9_0), 0, 19129 }, /* TST.L (xxx).L */ +{ CPUFUNC(op_4aba_0), 0, 19130 }, /* TST.L (d16,PC) */ +{ CPUFUNC(op_4abb_0), 0, 19131 }, /* TST.L (d8,PC,Xn) */ +{ CPUFUNC(op_4abc_0), 0, 19132 }, /* TST.L #.L */ +{ CPUFUNC(op_4ac0_0), 0, 19136 }, /* TAS.B Dn */ +{ CPUFUNC(op_4ad0_0), 0, 19152 }, /* TAS.B (An) */ +{ CPUFUNC(op_4ad8_0), 0, 19160 }, /* TAS.B (An)+ */ +{ CPUFUNC(op_4ae0_0), 0, 19168 }, /* TAS.B -(An) */ +{ CPUFUNC(op_4ae8_0), 0, 19176 }, /* TAS.B (d16,An) */ +{ CPUFUNC(op_4af0_0), 0, 19184 }, /* TAS.B (d8,An,Xn) */ +{ CPUFUNC(op_4af8_0), 0, 19192 }, /* TAS.B (xxx).W */ +{ CPUFUNC(op_4af9_0), 0, 19193 }, /* TAS.B (xxx).L */ +{ CPUFUNC(op_4c00_0), 0, 19456 }, /* MULL.L #.W,Dn */ +{ CPUFUNC(op_4c10_0), 0, 19472 }, /* MULL.L #.W,(An) */ +{ CPUFUNC(op_4c18_0), 0, 19480 }, /* MULL.L #.W,(An)+ */ +{ CPUFUNC(op_4c20_0), 0, 19488 }, /* MULL.L #.W,-(An) */ +{ CPUFUNC(op_4c28_0), 0, 19496 }, /* MULL.L #.W,(d16,An) */ +{ CPUFUNC(op_4c30_0), 0, 19504 }, /* MULL.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_4c38_0), 0, 19512 }, /* MULL.L #.W,(xxx).W */ +{ CPUFUNC(op_4c39_0), 0, 19513 }, /* MULL.L #.W,(xxx).L */ +{ CPUFUNC(op_4c3a_0), 0, 19514 }, /* MULL.L #.W,(d16,PC) */ +{ CPUFUNC(op_4c3b_0), 0, 19515 }, /* MULL.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_4c3c_0), 0, 19516 }, /* MULL.L #.W,#.L */ +{ CPUFUNC(op_4c40_0), 0, 19520 }, /* DIVL.L #.W,Dn */ +{ CPUFUNC(op_4c50_0), 0, 19536 }, /* DIVL.L #.W,(An) */ +{ CPUFUNC(op_4c58_0), 0, 19544 }, /* DIVL.L #.W,(An)+ */ +{ CPUFUNC(op_4c60_0), 0, 19552 }, /* DIVL.L #.W,-(An) */ +{ CPUFUNC(op_4c68_0), 0, 19560 }, /* DIVL.L #.W,(d16,An) */ +{ CPUFUNC(op_4c70_0), 0, 19568 }, /* DIVL.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_4c78_0), 0, 19576 }, /* DIVL.L #.W,(xxx).W */ +{ CPUFUNC(op_4c79_0), 0, 19577 }, /* DIVL.L #.W,(xxx).L */ +{ CPUFUNC(op_4c7a_0), 0, 19578 }, /* DIVL.L #.W,(d16,PC) */ +{ CPUFUNC(op_4c7b_0), 0, 19579 }, /* DIVL.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_4c7c_0), 0, 19580 }, /* DIVL.L #.W,#.L */ +{ CPUFUNC_FF(op_4c90_0), 0, 19600 }, /* MVMEL.W #.W,(An) */ +{ CPUFUNC_FF(op_4c98_0), 0, 19608 }, /* MVMEL.W #.W,(An)+ */ +{ CPUFUNC_FF(op_4ca8_0), 0, 19624 }, /* MVMEL.W #.W,(d16,An) */ +{ CPUFUNC_FF(op_4cb0_0), 0, 19632 }, /* MVMEL.W #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_4cb8_0), 0, 19640 }, /* MVMEL.W #.W,(xxx).W */ +{ CPUFUNC_FF(op_4cb9_0), 0, 19641 }, /* MVMEL.W #.W,(xxx).L */ +{ CPUFUNC_FF(op_4cba_0), 0, 19642 }, /* MVMEL.W #.W,(d16,PC) */ +{ CPUFUNC_FF(op_4cbb_0), 0, 19643 }, /* MVMEL.W #.W,(d8,PC,Xn) */ +{ CPUFUNC_FF(op_4cd0_0), 0, 19664 }, /* MVMEL.L #.W,(An) */ +{ CPUFUNC_FF(op_4cd8_0), 0, 19672 }, /* MVMEL.L #.W,(An)+ */ +{ CPUFUNC_FF(op_4ce8_0), 0, 19688 }, /* MVMEL.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_4cf0_0), 0, 19696 }, /* MVMEL.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_4cf8_0), 0, 19704 }, /* MVMEL.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_4cf9_0), 0, 19705 }, /* MVMEL.L #.W,(xxx).L */ +{ CPUFUNC_FF(op_4cfa_0), 0, 19706 }, /* MVMEL.L #.W,(d16,PC) */ +{ CPUFUNC_FF(op_4cfb_0), 0, 19707 }, /* MVMEL.L #.W,(d8,PC,Xn) */ +{ CPUFUNC_FF(op_4e40_0), 0, 20032 }, /* TRAP.L # */ +{ CPUFUNC_FF(op_4e50_0), 0, 20048 }, /* LINK.W An,#.W */ +{ CPUFUNC_FF(op_4e58_0), 0, 20056 }, /* UNLK.L An */ +{ CPUFUNC_FF(op_4e60_0), 0, 20064 }, /* MVR2USP.L An */ +{ CPUFUNC_FF(op_4e68_0), 0, 20072 }, /* MVUSP2R.L An */ +{ CPUFUNC_FF(op_4e70_0), 0, 20080 }, /* RESET.L */ +{ CPUFUNC_FF(op_4e71_0), 0, 20081 }, /* NOP.L */ +{ CPUFUNC(op_4e72_0), 0, 20082 }, /* STOP.L #.W */ +{ CPUFUNC(op_4e73_0), 0, 20083 }, /* RTE.L */ +{ CPUFUNC_FF(op_4e74_0), 0, 20084 }, /* RTD.L #.W */ +{ CPUFUNC_FF(op_4e75_0), 0, 20085 }, /* RTS.L */ +{ CPUFUNC_FF(op_4e76_0), 0, 20086 }, /* TRAPV.L */ +{ CPUFUNC(op_4e77_0), 0, 20087 }, /* RTR.L */ +{ CPUFUNC_FF(op_4e7a_0), 0, 20090 }, /* MOVEC2.L #.W */ +{ CPUFUNC_FF(op_4e7b_0), 0, 20091 }, /* MOVE2C.L #.W */ +{ CPUFUNC_FF(op_4e90_0), 0, 20112 }, /* JSR.L (An) */ +{ CPUFUNC_FF(op_4ea8_0), 0, 20136 }, /* JSR.L (d16,An) */ +{ CPUFUNC_FF(op_4eb0_0), 0, 20144 }, /* JSR.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4eb8_0), 0, 20152 }, /* JSR.L (xxx).W */ +{ CPUFUNC_FF(op_4eb9_0), 0, 20153 }, /* JSR.L (xxx).L */ +{ CPUFUNC_FF(op_4eba_0), 0, 20154 }, /* JSR.L (d16,PC) */ +{ CPUFUNC_FF(op_4ebb_0), 0, 20155 }, /* JSR.L (d8,PC,Xn) */ +{ CPUFUNC_FF(op_4ed0_0), 0, 20176 }, /* JMP.L (An) */ +{ CPUFUNC_FF(op_4ee8_0), 0, 20200 }, /* JMP.L (d16,An) */ +{ CPUFUNC_FF(op_4ef0_0), 0, 20208 }, /* JMP.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4ef8_0), 0, 20216 }, /* JMP.L (xxx).W */ +{ CPUFUNC_FF(op_4ef9_0), 0, 20217 }, /* JMP.L (xxx).L */ +{ CPUFUNC_FF(op_4efa_0), 0, 20218 }, /* JMP.L (d16,PC) */ +{ CPUFUNC_FF(op_4efb_0), 0, 20219 }, /* JMP.L (d8,PC,Xn) */ +{ CPUFUNC(op_5000_0), 0, 20480 }, /* ADD.B #,Dn */ +{ CPUFUNC(op_5010_0), 0, 20496 }, /* ADD.B #,(An) */ +{ CPUFUNC(op_5018_0), 0, 20504 }, /* ADD.B #,(An)+ */ +{ CPUFUNC(op_5020_0), 0, 20512 }, /* ADD.B #,-(An) */ +{ CPUFUNC(op_5028_0), 0, 20520 }, /* ADD.B #,(d16,An) */ +{ CPUFUNC(op_5030_0), 0, 20528 }, /* ADD.B #,(d8,An,Xn) */ +{ CPUFUNC(op_5038_0), 0, 20536 }, /* ADD.B #,(xxx).W */ +{ CPUFUNC(op_5039_0), 0, 20537 }, /* ADD.B #,(xxx).L */ +{ CPUFUNC(op_5040_0), 0, 20544 }, /* ADD.W #,Dn */ +{ CPUFUNC_FF(op_5048_0), 0, 20552 }, /* ADDA.W #,An */ +{ CPUFUNC(op_5050_0), 0, 20560 }, /* ADD.W #,(An) */ +{ CPUFUNC(op_5058_0), 0, 20568 }, /* ADD.W #,(An)+ */ +{ CPUFUNC(op_5060_0), 0, 20576 }, /* ADD.W #,-(An) */ +{ CPUFUNC(op_5068_0), 0, 20584 }, /* ADD.W #,(d16,An) */ +{ CPUFUNC(op_5070_0), 0, 20592 }, /* ADD.W #,(d8,An,Xn) */ +{ CPUFUNC(op_5078_0), 0, 20600 }, /* ADD.W #,(xxx).W */ +{ CPUFUNC(op_5079_0), 0, 20601 }, /* ADD.W #,(xxx).L */ +{ CPUFUNC(op_5080_0), 0, 20608 }, /* ADD.L #,Dn */ +{ CPUFUNC_FF(op_5088_0), 0, 20616 }, /* ADDA.L #,An */ +{ CPUFUNC(op_5090_0), 0, 20624 }, /* ADD.L #,(An) */ +{ CPUFUNC(op_5098_0), 0, 20632 }, /* ADD.L #,(An)+ */ +{ CPUFUNC(op_50a0_0), 0, 20640 }, /* ADD.L #,-(An) */ +{ CPUFUNC(op_50a8_0), 0, 20648 }, /* ADD.L #,(d16,An) */ +{ CPUFUNC(op_50b0_0), 0, 20656 }, /* ADD.L #,(d8,An,Xn) */ +{ CPUFUNC(op_50b8_0), 0, 20664 }, /* ADD.L #,(xxx).W */ +{ CPUFUNC(op_50b9_0), 0, 20665 }, /* ADD.L #,(xxx).L */ +{ CPUFUNC_FF(op_50c0_0), 0, 20672 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_50c8_0), 0, 20680 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_50d0_0), 0, 20688 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_50d8_0), 0, 20696 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_50e0_0), 0, 20704 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_50e8_0), 0, 20712 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_50f0_0), 0, 20720 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_50f8_0), 0, 20728 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_50f9_0), 0, 20729 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_50fa_0), 0, 20730 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_50fb_0), 0, 20731 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_50fc_0), 0, 20732 }, /* TRAPcc.L */ +{ CPUFUNC(op_5100_0), 0, 20736 }, /* SUB.B #,Dn */ +{ CPUFUNC(op_5110_0), 0, 20752 }, /* SUB.B #,(An) */ +{ CPUFUNC(op_5118_0), 0, 20760 }, /* SUB.B #,(An)+ */ +{ CPUFUNC(op_5120_0), 0, 20768 }, /* SUB.B #,-(An) */ +{ CPUFUNC(op_5128_0), 0, 20776 }, /* SUB.B #,(d16,An) */ +{ CPUFUNC(op_5130_0), 0, 20784 }, /* SUB.B #,(d8,An,Xn) */ +{ CPUFUNC(op_5138_0), 0, 20792 }, /* SUB.B #,(xxx).W */ +{ CPUFUNC(op_5139_0), 0, 20793 }, /* SUB.B #,(xxx).L */ +{ CPUFUNC(op_5140_0), 0, 20800 }, /* SUB.W #,Dn */ +{ CPUFUNC_FF(op_5148_0), 0, 20808 }, /* SUBA.W #,An */ +{ CPUFUNC(op_5150_0), 0, 20816 }, /* SUB.W #,(An) */ +{ CPUFUNC(op_5158_0), 0, 20824 }, /* SUB.W #,(An)+ */ +{ CPUFUNC(op_5160_0), 0, 20832 }, /* SUB.W #,-(An) */ +{ CPUFUNC(op_5168_0), 0, 20840 }, /* SUB.W #,(d16,An) */ +{ CPUFUNC(op_5170_0), 0, 20848 }, /* SUB.W #,(d8,An,Xn) */ +{ CPUFUNC(op_5178_0), 0, 20856 }, /* SUB.W #,(xxx).W */ +{ CPUFUNC(op_5179_0), 0, 20857 }, /* SUB.W #,(xxx).L */ +{ CPUFUNC(op_5180_0), 0, 20864 }, /* SUB.L #,Dn */ +{ CPUFUNC_FF(op_5188_0), 0, 20872 }, /* SUBA.L #,An */ +{ CPUFUNC(op_5190_0), 0, 20880 }, /* SUB.L #,(An) */ +{ CPUFUNC(op_5198_0), 0, 20888 }, /* SUB.L #,(An)+ */ +{ CPUFUNC(op_51a0_0), 0, 20896 }, /* SUB.L #,-(An) */ +{ CPUFUNC(op_51a8_0), 0, 20904 }, /* SUB.L #,(d16,An) */ +{ CPUFUNC(op_51b0_0), 0, 20912 }, /* SUB.L #,(d8,An,Xn) */ +{ CPUFUNC(op_51b8_0), 0, 20920 }, /* SUB.L #,(xxx).W */ +{ CPUFUNC(op_51b9_0), 0, 20921 }, /* SUB.L #,(xxx).L */ +{ CPUFUNC_FF(op_51c0_0), 0, 20928 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_51c8_0), 0, 20936 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_51d0_0), 0, 20944 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_51d8_0), 0, 20952 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_51e0_0), 0, 20960 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_51e8_0), 0, 20968 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_51f0_0), 0, 20976 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_51f8_0), 0, 20984 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_51f9_0), 0, 20985 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_51fa_0), 0, 20986 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_51fb_0), 0, 20987 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_51fc_0), 0, 20988 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_52c0_0), 0, 21184 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_52c8_0), 0, 21192 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_52d0_0), 0, 21200 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_52d8_0), 0, 21208 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_52e0_0), 0, 21216 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_52e8_0), 0, 21224 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_52f0_0), 0, 21232 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_52f8_0), 0, 21240 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_52f9_0), 0, 21241 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_52fa_0), 0, 21242 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_52fb_0), 0, 21243 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_52fc_0), 0, 21244 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_53c0_0), 0, 21440 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_53c8_0), 0, 21448 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_53d0_0), 0, 21456 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_53d8_0), 0, 21464 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_53e0_0), 0, 21472 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_53e8_0), 0, 21480 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_53f0_0), 0, 21488 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_53f8_0), 0, 21496 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_53f9_0), 0, 21497 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_53fa_0), 0, 21498 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_53fb_0), 0, 21499 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_53fc_0), 0, 21500 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_54c0_0), 0, 21696 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_54c8_0), 0, 21704 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_54d0_0), 0, 21712 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_54d8_0), 0, 21720 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_54e0_0), 0, 21728 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_54e8_0), 0, 21736 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_54f0_0), 0, 21744 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_54f8_0), 0, 21752 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_54f9_0), 0, 21753 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_54fa_0), 0, 21754 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_54fb_0), 0, 21755 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_54fc_0), 0, 21756 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_55c0_0), 0, 21952 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_55c8_0), 0, 21960 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_55d0_0), 0, 21968 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_55d8_0), 0, 21976 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_55e0_0), 0, 21984 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_55e8_0), 0, 21992 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_55f0_0), 0, 22000 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_55f8_0), 0, 22008 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_55f9_0), 0, 22009 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_55fa_0), 0, 22010 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_55fb_0), 0, 22011 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_55fc_0), 0, 22012 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_56c0_0), 0, 22208 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_56c8_0), 0, 22216 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_56d0_0), 0, 22224 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_56d8_0), 0, 22232 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_56e0_0), 0, 22240 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_56e8_0), 0, 22248 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_56f0_0), 0, 22256 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_56f8_0), 0, 22264 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_56f9_0), 0, 22265 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_56fa_0), 0, 22266 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_56fb_0), 0, 22267 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_56fc_0), 0, 22268 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_57c0_0), 0, 22464 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_57c8_0), 0, 22472 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_57d0_0), 0, 22480 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_57d8_0), 0, 22488 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_57e0_0), 0, 22496 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_57e8_0), 0, 22504 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_57f0_0), 0, 22512 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_57f8_0), 0, 22520 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_57f9_0), 0, 22521 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_57fa_0), 0, 22522 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_57fb_0), 0, 22523 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_57fc_0), 0, 22524 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_58c0_0), 0, 22720 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_58c8_0), 0, 22728 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_58d0_0), 0, 22736 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_58d8_0), 0, 22744 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_58e0_0), 0, 22752 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_58e8_0), 0, 22760 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_58f0_0), 0, 22768 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_58f8_0), 0, 22776 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_58f9_0), 0, 22777 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_58fa_0), 0, 22778 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_58fb_0), 0, 22779 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_58fc_0), 0, 22780 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_59c0_0), 0, 22976 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_59c8_0), 0, 22984 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_59d0_0), 0, 22992 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_59d8_0), 0, 23000 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_59e0_0), 0, 23008 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_59e8_0), 0, 23016 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_59f0_0), 0, 23024 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_59f8_0), 0, 23032 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_59f9_0), 0, 23033 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_59fa_0), 0, 23034 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_59fb_0), 0, 23035 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_59fc_0), 0, 23036 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5ac0_0), 0, 23232 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5ac8_0), 0, 23240 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5ad0_0), 0, 23248 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5ad8_0), 0, 23256 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ae0_0), 0, 23264 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ae8_0), 0, 23272 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5af0_0), 0, 23280 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5af8_0), 0, 23288 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5af9_0), 0, 23289 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5afa_0), 0, 23290 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5afb_0), 0, 23291 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5afc_0), 0, 23292 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5bc0_0), 0, 23488 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5bc8_0), 0, 23496 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5bd0_0), 0, 23504 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5bd8_0), 0, 23512 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5be0_0), 0, 23520 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5be8_0), 0, 23528 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5bf0_0), 0, 23536 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5bf8_0), 0, 23544 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5bf9_0), 0, 23545 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5bfa_0), 0, 23546 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5bfb_0), 0, 23547 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5bfc_0), 0, 23548 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5cc0_0), 0, 23744 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5cc8_0), 0, 23752 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5cd0_0), 0, 23760 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5cd8_0), 0, 23768 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ce0_0), 0, 23776 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ce8_0), 0, 23784 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5cf0_0), 0, 23792 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5cf8_0), 0, 23800 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5cf9_0), 0, 23801 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5cfa_0), 0, 23802 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5cfb_0), 0, 23803 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5cfc_0), 0, 23804 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5dc0_0), 0, 24000 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5dc8_0), 0, 24008 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5dd0_0), 0, 24016 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5dd8_0), 0, 24024 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5de0_0), 0, 24032 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5de8_0), 0, 24040 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5df0_0), 0, 24048 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5df8_0), 0, 24056 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5df9_0), 0, 24057 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5dfa_0), 0, 24058 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5dfb_0), 0, 24059 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5dfc_0), 0, 24060 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5ec0_0), 0, 24256 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5ec8_0), 0, 24264 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5ed0_0), 0, 24272 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5ed8_0), 0, 24280 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ee0_0), 0, 24288 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ee8_0), 0, 24296 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5ef0_0), 0, 24304 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5ef8_0), 0, 24312 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5ef9_0), 0, 24313 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5efa_0), 0, 24314 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5efb_0), 0, 24315 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5efc_0), 0, 24316 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5fc0_0), 0, 24512 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5fc8_0), 0, 24520 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5fd0_0), 0, 24528 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5fd8_0), 0, 24536 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5fe0_0), 0, 24544 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5fe8_0), 0, 24552 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5ff0_0), 0, 24560 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5ff8_0), 0, 24568 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5ff9_0), 0, 24569 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5ffa_0), 0, 24570 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5ffb_0), 0, 24571 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5ffc_0), 0, 24572 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_6000_0), 0, 24576 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6001_0), 0, 24577 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_60ff_0), 0, 24831 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6100_0), 0, 24832 }, /* BSR.W #.W */ +{ CPUFUNC_FF(op_6101_0), 0, 24833 }, /* BSR.B # */ +{ CPUFUNC_FF(op_61ff_0), 0, 25087 }, /* BSR.L #.L */ +{ CPUFUNC_FF(op_6200_0), 0, 25088 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6201_0), 0, 25089 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_62ff_0), 0, 25343 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6300_0), 0, 25344 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6301_0), 0, 25345 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_63ff_0), 0, 25599 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6400_0), 0, 25600 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6401_0), 0, 25601 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_64ff_0), 0, 25855 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6500_0), 0, 25856 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6501_0), 0, 25857 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_65ff_0), 0, 26111 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6600_0), 0, 26112 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6601_0), 0, 26113 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_66ff_0), 0, 26367 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6700_0), 0, 26368 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6701_0), 0, 26369 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_67ff_0), 0, 26623 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6800_0), 0, 26624 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6801_0), 0, 26625 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_68ff_0), 0, 26879 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6900_0), 0, 26880 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6901_0), 0, 26881 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_69ff_0), 0, 27135 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6a00_0), 0, 27136 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6a01_0), 0, 27137 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6aff_0), 0, 27391 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6b00_0), 0, 27392 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6b01_0), 0, 27393 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6bff_0), 0, 27647 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6c00_0), 0, 27648 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6c01_0), 0, 27649 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6cff_0), 0, 27903 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6d00_0), 0, 27904 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6d01_0), 0, 27905 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6dff_0), 0, 28159 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6e00_0), 0, 28160 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6e01_0), 0, 28161 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6eff_0), 0, 28415 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6f00_0), 0, 28416 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6f01_0), 0, 28417 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6fff_0), 0, 28671 }, /* Bcc.L #.L */ +{ CPUFUNC(op_7000_0), 0, 28672 }, /* MOVE.L #,Dn */ +{ CPUFUNC_FF(op_7100_0), 0, 28928 }, /* EMULOP_RETURN.L */ +{ CPUFUNC_FF(op_7101_0), 0, 28929 }, /* EMULOP.L # */ +{ CPUFUNC(op_8000_0), 0, 32768 }, /* OR.B Dn,Dn */ +{ CPUFUNC(op_8010_0), 0, 32784 }, /* OR.B (An),Dn */ +{ CPUFUNC(op_8018_0), 0, 32792 }, /* OR.B (An)+,Dn */ +{ CPUFUNC(op_8020_0), 0, 32800 }, /* OR.B -(An),Dn */ +{ CPUFUNC(op_8028_0), 0, 32808 }, /* OR.B (d16,An),Dn */ +{ CPUFUNC(op_8030_0), 0, 32816 }, /* OR.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_8038_0), 0, 32824 }, /* OR.B (xxx).W,Dn */ +{ CPUFUNC(op_8039_0), 0, 32825 }, /* OR.B (xxx).L,Dn */ +{ CPUFUNC(op_803a_0), 0, 32826 }, /* OR.B (d16,PC),Dn */ +{ CPUFUNC(op_803b_0), 0, 32827 }, /* OR.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_803c_0), 0, 32828 }, /* OR.B #.B,Dn */ +{ CPUFUNC(op_8040_0), 0, 32832 }, /* OR.W Dn,Dn */ +{ CPUFUNC(op_8050_0), 0, 32848 }, /* OR.W (An),Dn */ +{ CPUFUNC(op_8058_0), 0, 32856 }, /* OR.W (An)+,Dn */ +{ CPUFUNC(op_8060_0), 0, 32864 }, /* OR.W -(An),Dn */ +{ CPUFUNC(op_8068_0), 0, 32872 }, /* OR.W (d16,An),Dn */ +{ CPUFUNC(op_8070_0), 0, 32880 }, /* OR.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_8078_0), 0, 32888 }, /* OR.W (xxx).W,Dn */ +{ CPUFUNC(op_8079_0), 0, 32889 }, /* OR.W (xxx).L,Dn */ +{ CPUFUNC(op_807a_0), 0, 32890 }, /* OR.W (d16,PC),Dn */ +{ CPUFUNC(op_807b_0), 0, 32891 }, /* OR.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_807c_0), 0, 32892 }, /* OR.W #.W,Dn */ +{ CPUFUNC(op_8080_0), 0, 32896 }, /* OR.L Dn,Dn */ +{ CPUFUNC(op_8090_0), 0, 32912 }, /* OR.L (An),Dn */ +{ CPUFUNC(op_8098_0), 0, 32920 }, /* OR.L (An)+,Dn */ +{ CPUFUNC(op_80a0_0), 0, 32928 }, /* OR.L -(An),Dn */ +{ CPUFUNC(op_80a8_0), 0, 32936 }, /* OR.L (d16,An),Dn */ +{ CPUFUNC(op_80b0_0), 0, 32944 }, /* OR.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_80b8_0), 0, 32952 }, /* OR.L (xxx).W,Dn */ +{ CPUFUNC(op_80b9_0), 0, 32953 }, /* OR.L (xxx).L,Dn */ +{ CPUFUNC(op_80ba_0), 0, 32954 }, /* OR.L (d16,PC),Dn */ +{ CPUFUNC(op_80bb_0), 0, 32955 }, /* OR.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_80bc_0), 0, 32956 }, /* OR.L #.L,Dn */ +{ CPUFUNC(op_80c0_0), 0, 32960 }, /* DIVU.W Dn,Dn */ +{ CPUFUNC(op_80d0_0), 0, 32976 }, /* DIVU.W (An),Dn */ +{ CPUFUNC(op_80d8_0), 0, 32984 }, /* DIVU.W (An)+,Dn */ +{ CPUFUNC(op_80e0_0), 0, 32992 }, /* DIVU.W -(An),Dn */ +{ CPUFUNC(op_80e8_0), 0, 33000 }, /* DIVU.W (d16,An),Dn */ +{ CPUFUNC(op_80f0_0), 0, 33008 }, /* DIVU.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_80f8_0), 0, 33016 }, /* DIVU.W (xxx).W,Dn */ +{ CPUFUNC(op_80f9_0), 0, 33017 }, /* DIVU.W (xxx).L,Dn */ +{ CPUFUNC(op_80fa_0), 0, 33018 }, /* DIVU.W (d16,PC),Dn */ +{ CPUFUNC(op_80fb_0), 0, 33019 }, /* DIVU.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_80fc_0), 0, 33020 }, /* DIVU.W #.W,Dn */ +{ CPUFUNC(op_8100_0), 0, 33024 }, /* SBCD.B Dn,Dn */ +{ CPUFUNC(op_8108_0), 0, 33032 }, /* SBCD.B -(An),-(An) */ +{ CPUFUNC(op_8110_0), 0, 33040 }, /* OR.B Dn,(An) */ +{ CPUFUNC(op_8118_0), 0, 33048 }, /* OR.B Dn,(An)+ */ +{ CPUFUNC(op_8120_0), 0, 33056 }, /* OR.B Dn,-(An) */ +{ CPUFUNC(op_8128_0), 0, 33064 }, /* OR.B Dn,(d16,An) */ +{ CPUFUNC(op_8130_0), 0, 33072 }, /* OR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_8138_0), 0, 33080 }, /* OR.B Dn,(xxx).W */ +{ CPUFUNC(op_8139_0), 0, 33081 }, /* OR.B Dn,(xxx).L */ +{ CPUFUNC_FF(op_8140_0), 0, 33088 }, /* PACK.L Dn,Dn */ +{ CPUFUNC_FF(op_8148_0), 0, 33096 }, /* PACK.L -(An),-(An) */ +{ CPUFUNC(op_8150_0), 0, 33104 }, /* OR.W Dn,(An) */ +{ CPUFUNC(op_8158_0), 0, 33112 }, /* OR.W Dn,(An)+ */ +{ CPUFUNC(op_8160_0), 0, 33120 }, /* OR.W Dn,-(An) */ +{ CPUFUNC(op_8168_0), 0, 33128 }, /* OR.W Dn,(d16,An) */ +{ CPUFUNC(op_8170_0), 0, 33136 }, /* OR.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_8178_0), 0, 33144 }, /* OR.W Dn,(xxx).W */ +{ CPUFUNC(op_8179_0), 0, 33145 }, /* OR.W Dn,(xxx).L */ +{ CPUFUNC_FF(op_8180_0), 0, 33152 }, /* UNPK.L Dn,Dn */ +{ CPUFUNC_FF(op_8188_0), 0, 33160 }, /* UNPK.L -(An),-(An) */ +{ CPUFUNC(op_8190_0), 0, 33168 }, /* OR.L Dn,(An) */ +{ CPUFUNC(op_8198_0), 0, 33176 }, /* OR.L Dn,(An)+ */ +{ CPUFUNC(op_81a0_0), 0, 33184 }, /* OR.L Dn,-(An) */ +{ CPUFUNC(op_81a8_0), 0, 33192 }, /* OR.L Dn,(d16,An) */ +{ CPUFUNC(op_81b0_0), 0, 33200 }, /* OR.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_81b8_0), 0, 33208 }, /* OR.L Dn,(xxx).W */ +{ CPUFUNC(op_81b9_0), 0, 33209 }, /* OR.L Dn,(xxx).L */ +{ CPUFUNC(op_81c0_0), 0, 33216 }, /* DIVS.W Dn,Dn */ +{ CPUFUNC(op_81d0_0), 0, 33232 }, /* DIVS.W (An),Dn */ +{ CPUFUNC(op_81d8_0), 0, 33240 }, /* DIVS.W (An)+,Dn */ +{ CPUFUNC(op_81e0_0), 0, 33248 }, /* DIVS.W -(An),Dn */ +{ CPUFUNC(op_81e8_0), 0, 33256 }, /* DIVS.W (d16,An),Dn */ +{ CPUFUNC(op_81f0_0), 0, 33264 }, /* DIVS.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_81f8_0), 0, 33272 }, /* DIVS.W (xxx).W,Dn */ +{ CPUFUNC(op_81f9_0), 0, 33273 }, /* DIVS.W (xxx).L,Dn */ +{ CPUFUNC(op_81fa_0), 0, 33274 }, /* DIVS.W (d16,PC),Dn */ +{ CPUFUNC(op_81fb_0), 0, 33275 }, /* DIVS.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_81fc_0), 0, 33276 }, /* DIVS.W #.W,Dn */ +{ CPUFUNC(op_9000_0), 0, 36864 }, /* SUB.B Dn,Dn */ +{ CPUFUNC(op_9010_0), 0, 36880 }, /* SUB.B (An),Dn */ +{ CPUFUNC(op_9018_0), 0, 36888 }, /* SUB.B (An)+,Dn */ +{ CPUFUNC(op_9020_0), 0, 36896 }, /* SUB.B -(An),Dn */ +{ CPUFUNC(op_9028_0), 0, 36904 }, /* SUB.B (d16,An),Dn */ +{ CPUFUNC(op_9030_0), 0, 36912 }, /* SUB.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_9038_0), 0, 36920 }, /* SUB.B (xxx).W,Dn */ +{ CPUFUNC(op_9039_0), 0, 36921 }, /* SUB.B (xxx).L,Dn */ +{ CPUFUNC(op_903a_0), 0, 36922 }, /* SUB.B (d16,PC),Dn */ +{ CPUFUNC(op_903b_0), 0, 36923 }, /* SUB.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_903c_0), 0, 36924 }, /* SUB.B #.B,Dn */ +{ CPUFUNC(op_9040_0), 0, 36928 }, /* SUB.W Dn,Dn */ +{ CPUFUNC(op_9048_0), 0, 36936 }, /* SUB.W An,Dn */ +{ CPUFUNC(op_9050_0), 0, 36944 }, /* SUB.W (An),Dn */ +{ CPUFUNC(op_9058_0), 0, 36952 }, /* SUB.W (An)+,Dn */ +{ CPUFUNC(op_9060_0), 0, 36960 }, /* SUB.W -(An),Dn */ +{ CPUFUNC(op_9068_0), 0, 36968 }, /* SUB.W (d16,An),Dn */ +{ CPUFUNC(op_9070_0), 0, 36976 }, /* SUB.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_9078_0), 0, 36984 }, /* SUB.W (xxx).W,Dn */ +{ CPUFUNC(op_9079_0), 0, 36985 }, /* SUB.W (xxx).L,Dn */ +{ CPUFUNC(op_907a_0), 0, 36986 }, /* SUB.W (d16,PC),Dn */ +{ CPUFUNC(op_907b_0), 0, 36987 }, /* SUB.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_907c_0), 0, 36988 }, /* SUB.W #.W,Dn */ +{ CPUFUNC(op_9080_0), 0, 36992 }, /* SUB.L Dn,Dn */ +{ CPUFUNC(op_9088_0), 0, 37000 }, /* SUB.L An,Dn */ +{ CPUFUNC(op_9090_0), 0, 37008 }, /* SUB.L (An),Dn */ +{ CPUFUNC(op_9098_0), 0, 37016 }, /* SUB.L (An)+,Dn */ +{ CPUFUNC(op_90a0_0), 0, 37024 }, /* SUB.L -(An),Dn */ +{ CPUFUNC(op_90a8_0), 0, 37032 }, /* SUB.L (d16,An),Dn */ +{ CPUFUNC(op_90b0_0), 0, 37040 }, /* SUB.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_90b8_0), 0, 37048 }, /* SUB.L (xxx).W,Dn */ +{ CPUFUNC(op_90b9_0), 0, 37049 }, /* SUB.L (xxx).L,Dn */ +{ CPUFUNC(op_90ba_0), 0, 37050 }, /* SUB.L (d16,PC),Dn */ +{ CPUFUNC(op_90bb_0), 0, 37051 }, /* SUB.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_90bc_0), 0, 37052 }, /* SUB.L #.L,Dn */ +{ CPUFUNC_FF(op_90c0_0), 0, 37056 }, /* SUBA.W Dn,An */ +{ CPUFUNC_FF(op_90c8_0), 0, 37064 }, /* SUBA.W An,An */ +{ CPUFUNC_FF(op_90d0_0), 0, 37072 }, /* SUBA.W (An),An */ +{ CPUFUNC_FF(op_90d8_0), 0, 37080 }, /* SUBA.W (An)+,An */ +{ CPUFUNC_FF(op_90e0_0), 0, 37088 }, /* SUBA.W -(An),An */ +{ CPUFUNC_FF(op_90e8_0), 0, 37096 }, /* SUBA.W (d16,An),An */ +{ CPUFUNC_FF(op_90f0_0), 0, 37104 }, /* SUBA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_90f8_0), 0, 37112 }, /* SUBA.W (xxx).W,An */ +{ CPUFUNC_FF(op_90f9_0), 0, 37113 }, /* SUBA.W (xxx).L,An */ +{ CPUFUNC_FF(op_90fa_0), 0, 37114 }, /* SUBA.W (d16,PC),An */ +{ CPUFUNC_FF(op_90fb_0), 0, 37115 }, /* SUBA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_90fc_0), 0, 37116 }, /* SUBA.W #.W,An */ +{ CPUFUNC(op_9100_0), 0, 37120 }, /* SUBX.B Dn,Dn */ +{ CPUFUNC(op_9108_0), 0, 37128 }, /* SUBX.B -(An),-(An) */ +{ CPUFUNC(op_9110_0), 0, 37136 }, /* SUB.B Dn,(An) */ +{ CPUFUNC(op_9118_0), 0, 37144 }, /* SUB.B Dn,(An)+ */ +{ CPUFUNC(op_9120_0), 0, 37152 }, /* SUB.B Dn,-(An) */ +{ CPUFUNC(op_9128_0), 0, 37160 }, /* SUB.B Dn,(d16,An) */ +{ CPUFUNC(op_9130_0), 0, 37168 }, /* SUB.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_9138_0), 0, 37176 }, /* SUB.B Dn,(xxx).W */ +{ CPUFUNC(op_9139_0), 0, 37177 }, /* SUB.B Dn,(xxx).L */ +{ CPUFUNC(op_9140_0), 0, 37184 }, /* SUBX.W Dn,Dn */ +{ CPUFUNC(op_9148_0), 0, 37192 }, /* SUBX.W -(An),-(An) */ +{ CPUFUNC(op_9150_0), 0, 37200 }, /* SUB.W Dn,(An) */ +{ CPUFUNC(op_9158_0), 0, 37208 }, /* SUB.W Dn,(An)+ */ +{ CPUFUNC(op_9160_0), 0, 37216 }, /* SUB.W Dn,-(An) */ +{ CPUFUNC(op_9168_0), 0, 37224 }, /* SUB.W Dn,(d16,An) */ +{ CPUFUNC(op_9170_0), 0, 37232 }, /* SUB.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_9178_0), 0, 37240 }, /* SUB.W Dn,(xxx).W */ +{ CPUFUNC(op_9179_0), 0, 37241 }, /* SUB.W Dn,(xxx).L */ +{ CPUFUNC(op_9180_0), 0, 37248 }, /* SUBX.L Dn,Dn */ +{ CPUFUNC(op_9188_0), 0, 37256 }, /* SUBX.L -(An),-(An) */ +{ CPUFUNC(op_9190_0), 0, 37264 }, /* SUB.L Dn,(An) */ +{ CPUFUNC(op_9198_0), 0, 37272 }, /* SUB.L Dn,(An)+ */ +{ CPUFUNC(op_91a0_0), 0, 37280 }, /* SUB.L Dn,-(An) */ +{ CPUFUNC(op_91a8_0), 0, 37288 }, /* SUB.L Dn,(d16,An) */ +{ CPUFUNC(op_91b0_0), 0, 37296 }, /* SUB.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_91b8_0), 0, 37304 }, /* SUB.L Dn,(xxx).W */ +{ CPUFUNC(op_91b9_0), 0, 37305 }, /* SUB.L Dn,(xxx).L */ +{ CPUFUNC_FF(op_91c0_0), 0, 37312 }, /* SUBA.L Dn,An */ +{ CPUFUNC_FF(op_91c8_0), 0, 37320 }, /* SUBA.L An,An */ +{ CPUFUNC_FF(op_91d0_0), 0, 37328 }, /* SUBA.L (An),An */ +{ CPUFUNC_FF(op_91d8_0), 0, 37336 }, /* SUBA.L (An)+,An */ +{ CPUFUNC_FF(op_91e0_0), 0, 37344 }, /* SUBA.L -(An),An */ +{ CPUFUNC_FF(op_91e8_0), 0, 37352 }, /* SUBA.L (d16,An),An */ +{ CPUFUNC_FF(op_91f0_0), 0, 37360 }, /* SUBA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_91f8_0), 0, 37368 }, /* SUBA.L (xxx).W,An */ +{ CPUFUNC_FF(op_91f9_0), 0, 37369 }, /* SUBA.L (xxx).L,An */ +{ CPUFUNC_FF(op_91fa_0), 0, 37370 }, /* SUBA.L (d16,PC),An */ +{ CPUFUNC_FF(op_91fb_0), 0, 37371 }, /* SUBA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_91fc_0), 0, 37372 }, /* SUBA.L #.L,An */ +{ CPUFUNC(op_b000_0), 0, 45056 }, /* CMP.B Dn,Dn */ +{ CPUFUNC(op_b010_0), 0, 45072 }, /* CMP.B (An),Dn */ +{ CPUFUNC(op_b018_0), 0, 45080 }, /* CMP.B (An)+,Dn */ +{ CPUFUNC(op_b020_0), 0, 45088 }, /* CMP.B -(An),Dn */ +{ CPUFUNC(op_b028_0), 0, 45096 }, /* CMP.B (d16,An),Dn */ +{ CPUFUNC(op_b030_0), 0, 45104 }, /* CMP.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_b038_0), 0, 45112 }, /* CMP.B (xxx).W,Dn */ +{ CPUFUNC(op_b039_0), 0, 45113 }, /* CMP.B (xxx).L,Dn */ +{ CPUFUNC(op_b03a_0), 0, 45114 }, /* CMP.B (d16,PC),Dn */ +{ CPUFUNC(op_b03b_0), 0, 45115 }, /* CMP.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b03c_0), 0, 45116 }, /* CMP.B #.B,Dn */ +{ CPUFUNC(op_b040_0), 0, 45120 }, /* CMP.W Dn,Dn */ +{ CPUFUNC(op_b048_0), 0, 45128 }, /* CMP.W An,Dn */ +{ CPUFUNC(op_b050_0), 0, 45136 }, /* CMP.W (An),Dn */ +{ CPUFUNC(op_b058_0), 0, 45144 }, /* CMP.W (An)+,Dn */ +{ CPUFUNC(op_b060_0), 0, 45152 }, /* CMP.W -(An),Dn */ +{ CPUFUNC(op_b068_0), 0, 45160 }, /* CMP.W (d16,An),Dn */ +{ CPUFUNC(op_b070_0), 0, 45168 }, /* CMP.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_b078_0), 0, 45176 }, /* CMP.W (xxx).W,Dn */ +{ CPUFUNC(op_b079_0), 0, 45177 }, /* CMP.W (xxx).L,Dn */ +{ CPUFUNC(op_b07a_0), 0, 45178 }, /* CMP.W (d16,PC),Dn */ +{ CPUFUNC(op_b07b_0), 0, 45179 }, /* CMP.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b07c_0), 0, 45180 }, /* CMP.W #.W,Dn */ +{ CPUFUNC(op_b080_0), 0, 45184 }, /* CMP.L Dn,Dn */ +{ CPUFUNC(op_b088_0), 0, 45192 }, /* CMP.L An,Dn */ +{ CPUFUNC(op_b090_0), 0, 45200 }, /* CMP.L (An),Dn */ +{ CPUFUNC(op_b098_0), 0, 45208 }, /* CMP.L (An)+,Dn */ +{ CPUFUNC(op_b0a0_0), 0, 45216 }, /* CMP.L -(An),Dn */ +{ CPUFUNC(op_b0a8_0), 0, 45224 }, /* CMP.L (d16,An),Dn */ +{ CPUFUNC(op_b0b0_0), 0, 45232 }, /* CMP.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_b0b8_0), 0, 45240 }, /* CMP.L (xxx).W,Dn */ +{ CPUFUNC(op_b0b9_0), 0, 45241 }, /* CMP.L (xxx).L,Dn */ +{ CPUFUNC(op_b0ba_0), 0, 45242 }, /* CMP.L (d16,PC),Dn */ +{ CPUFUNC(op_b0bb_0), 0, 45243 }, /* CMP.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b0bc_0), 0, 45244 }, /* CMP.L #.L,Dn */ +{ CPUFUNC(op_b0c0_0), 0, 45248 }, /* CMPA.W Dn,An */ +{ CPUFUNC(op_b0c8_0), 0, 45256 }, /* CMPA.W An,An */ +{ CPUFUNC(op_b0d0_0), 0, 45264 }, /* CMPA.W (An),An */ +{ CPUFUNC(op_b0d8_0), 0, 45272 }, /* CMPA.W (An)+,An */ +{ CPUFUNC(op_b0e0_0), 0, 45280 }, /* CMPA.W -(An),An */ +{ CPUFUNC(op_b0e8_0), 0, 45288 }, /* CMPA.W (d16,An),An */ +{ CPUFUNC(op_b0f0_0), 0, 45296 }, /* CMPA.W (d8,An,Xn),An */ +{ CPUFUNC(op_b0f8_0), 0, 45304 }, /* CMPA.W (xxx).W,An */ +{ CPUFUNC(op_b0f9_0), 0, 45305 }, /* CMPA.W (xxx).L,An */ +{ CPUFUNC(op_b0fa_0), 0, 45306 }, /* CMPA.W (d16,PC),An */ +{ CPUFUNC(op_b0fb_0), 0, 45307 }, /* CMPA.W (d8,PC,Xn),An */ +{ CPUFUNC(op_b0fc_0), 0, 45308 }, /* CMPA.W #.W,An */ +{ CPUFUNC(op_b100_0), 0, 45312 }, /* EOR.B Dn,Dn */ +{ CPUFUNC(op_b108_0), 0, 45320 }, /* CMPM.B (An)+,(An)+ */ +{ CPUFUNC(op_b110_0), 0, 45328 }, /* EOR.B Dn,(An) */ +{ CPUFUNC(op_b118_0), 0, 45336 }, /* EOR.B Dn,(An)+ */ +{ CPUFUNC(op_b120_0), 0, 45344 }, /* EOR.B Dn,-(An) */ +{ CPUFUNC(op_b128_0), 0, 45352 }, /* EOR.B Dn,(d16,An) */ +{ CPUFUNC(op_b130_0), 0, 45360 }, /* EOR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b138_0), 0, 45368 }, /* EOR.B Dn,(xxx).W */ +{ CPUFUNC(op_b139_0), 0, 45369 }, /* EOR.B Dn,(xxx).L */ +{ CPUFUNC(op_b140_0), 0, 45376 }, /* EOR.W Dn,Dn */ +{ CPUFUNC(op_b148_0), 0, 45384 }, /* CMPM.W (An)+,(An)+ */ +{ CPUFUNC(op_b150_0), 0, 45392 }, /* EOR.W Dn,(An) */ +{ CPUFUNC(op_b158_0), 0, 45400 }, /* EOR.W Dn,(An)+ */ +{ CPUFUNC(op_b160_0), 0, 45408 }, /* EOR.W Dn,-(An) */ +{ CPUFUNC(op_b168_0), 0, 45416 }, /* EOR.W Dn,(d16,An) */ +{ CPUFUNC(op_b170_0), 0, 45424 }, /* EOR.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b178_0), 0, 45432 }, /* EOR.W Dn,(xxx).W */ +{ CPUFUNC(op_b179_0), 0, 45433 }, /* EOR.W Dn,(xxx).L */ +{ CPUFUNC(op_b180_0), 0, 45440 }, /* EOR.L Dn,Dn */ +{ CPUFUNC(op_b188_0), 0, 45448 }, /* CMPM.L (An)+,(An)+ */ +{ CPUFUNC(op_b190_0), 0, 45456 }, /* EOR.L Dn,(An) */ +{ CPUFUNC(op_b198_0), 0, 45464 }, /* EOR.L Dn,(An)+ */ +{ CPUFUNC(op_b1a0_0), 0, 45472 }, /* EOR.L Dn,-(An) */ +{ CPUFUNC(op_b1a8_0), 0, 45480 }, /* EOR.L Dn,(d16,An) */ +{ CPUFUNC(op_b1b0_0), 0, 45488 }, /* EOR.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b1b8_0), 0, 45496 }, /* EOR.L Dn,(xxx).W */ +{ CPUFUNC(op_b1b9_0), 0, 45497 }, /* EOR.L Dn,(xxx).L */ +{ CPUFUNC(op_b1c0_0), 0, 45504 }, /* CMPA.L Dn,An */ +{ CPUFUNC(op_b1c8_0), 0, 45512 }, /* CMPA.L An,An */ +{ CPUFUNC(op_b1d0_0), 0, 45520 }, /* CMPA.L (An),An */ +{ CPUFUNC(op_b1d8_0), 0, 45528 }, /* CMPA.L (An)+,An */ +{ CPUFUNC(op_b1e0_0), 0, 45536 }, /* CMPA.L -(An),An */ +{ CPUFUNC(op_b1e8_0), 0, 45544 }, /* CMPA.L (d16,An),An */ +{ CPUFUNC(op_b1f0_0), 0, 45552 }, /* CMPA.L (d8,An,Xn),An */ +{ CPUFUNC(op_b1f8_0), 0, 45560 }, /* CMPA.L (xxx).W,An */ +{ CPUFUNC(op_b1f9_0), 0, 45561 }, /* CMPA.L (xxx).L,An */ +{ CPUFUNC(op_b1fa_0), 0, 45562 }, /* CMPA.L (d16,PC),An */ +{ CPUFUNC(op_b1fb_0), 0, 45563 }, /* CMPA.L (d8,PC,Xn),An */ +{ CPUFUNC(op_b1fc_0), 0, 45564 }, /* CMPA.L #.L,An */ +{ CPUFUNC(op_c000_0), 0, 49152 }, /* AND.B Dn,Dn */ +{ CPUFUNC(op_c010_0), 0, 49168 }, /* AND.B (An),Dn */ +{ CPUFUNC(op_c018_0), 0, 49176 }, /* AND.B (An)+,Dn */ +{ CPUFUNC(op_c020_0), 0, 49184 }, /* AND.B -(An),Dn */ +{ CPUFUNC(op_c028_0), 0, 49192 }, /* AND.B (d16,An),Dn */ +{ CPUFUNC(op_c030_0), 0, 49200 }, /* AND.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_c038_0), 0, 49208 }, /* AND.B (xxx).W,Dn */ +{ CPUFUNC(op_c039_0), 0, 49209 }, /* AND.B (xxx).L,Dn */ +{ CPUFUNC(op_c03a_0), 0, 49210 }, /* AND.B (d16,PC),Dn */ +{ CPUFUNC(op_c03b_0), 0, 49211 }, /* AND.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c03c_0), 0, 49212 }, /* AND.B #.B,Dn */ +{ CPUFUNC(op_c040_0), 0, 49216 }, /* AND.W Dn,Dn */ +{ CPUFUNC(op_c050_0), 0, 49232 }, /* AND.W (An),Dn */ +{ CPUFUNC(op_c058_0), 0, 49240 }, /* AND.W (An)+,Dn */ +{ CPUFUNC(op_c060_0), 0, 49248 }, /* AND.W -(An),Dn */ +{ CPUFUNC(op_c068_0), 0, 49256 }, /* AND.W (d16,An),Dn */ +{ CPUFUNC(op_c070_0), 0, 49264 }, /* AND.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c078_0), 0, 49272 }, /* AND.W (xxx).W,Dn */ +{ CPUFUNC(op_c079_0), 0, 49273 }, /* AND.W (xxx).L,Dn */ +{ CPUFUNC(op_c07a_0), 0, 49274 }, /* AND.W (d16,PC),Dn */ +{ CPUFUNC(op_c07b_0), 0, 49275 }, /* AND.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c07c_0), 0, 49276 }, /* AND.W #.W,Dn */ +{ CPUFUNC(op_c080_0), 0, 49280 }, /* AND.L Dn,Dn */ +{ CPUFUNC(op_c090_0), 0, 49296 }, /* AND.L (An),Dn */ +{ CPUFUNC(op_c098_0), 0, 49304 }, /* AND.L (An)+,Dn */ +{ CPUFUNC(op_c0a0_0), 0, 49312 }, /* AND.L -(An),Dn */ +{ CPUFUNC(op_c0a8_0), 0, 49320 }, /* AND.L (d16,An),Dn */ +{ CPUFUNC(op_c0b0_0), 0, 49328 }, /* AND.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_c0b8_0), 0, 49336 }, /* AND.L (xxx).W,Dn */ +{ CPUFUNC(op_c0b9_0), 0, 49337 }, /* AND.L (xxx).L,Dn */ +{ CPUFUNC(op_c0ba_0), 0, 49338 }, /* AND.L (d16,PC),Dn */ +{ CPUFUNC(op_c0bb_0), 0, 49339 }, /* AND.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c0bc_0), 0, 49340 }, /* AND.L #.L,Dn */ +{ CPUFUNC(op_c0c0_0), 0, 49344 }, /* MULU.W Dn,Dn */ +{ CPUFUNC(op_c0d0_0), 0, 49360 }, /* MULU.W (An),Dn */ +{ CPUFUNC(op_c0d8_0), 0, 49368 }, /* MULU.W (An)+,Dn */ +{ CPUFUNC(op_c0e0_0), 0, 49376 }, /* MULU.W -(An),Dn */ +{ CPUFUNC(op_c0e8_0), 0, 49384 }, /* MULU.W (d16,An),Dn */ +{ CPUFUNC(op_c0f0_0), 0, 49392 }, /* MULU.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c0f8_0), 0, 49400 }, /* MULU.W (xxx).W,Dn */ +{ CPUFUNC(op_c0f9_0), 0, 49401 }, /* MULU.W (xxx).L,Dn */ +{ CPUFUNC(op_c0fa_0), 0, 49402 }, /* MULU.W (d16,PC),Dn */ +{ CPUFUNC(op_c0fb_0), 0, 49403 }, /* MULU.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c0fc_0), 0, 49404 }, /* MULU.W #.W,Dn */ +{ CPUFUNC(op_c100_0), 0, 49408 }, /* ABCD.B Dn,Dn */ +{ CPUFUNC(op_c108_0), 0, 49416 }, /* ABCD.B -(An),-(An) */ +{ CPUFUNC(op_c110_0), 0, 49424 }, /* AND.B Dn,(An) */ +{ CPUFUNC(op_c118_0), 0, 49432 }, /* AND.B Dn,(An)+ */ +{ CPUFUNC(op_c120_0), 0, 49440 }, /* AND.B Dn,-(An) */ +{ CPUFUNC(op_c128_0), 0, 49448 }, /* AND.B Dn,(d16,An) */ +{ CPUFUNC(op_c130_0), 0, 49456 }, /* AND.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c138_0), 0, 49464 }, /* AND.B Dn,(xxx).W */ +{ CPUFUNC(op_c139_0), 0, 49465 }, /* AND.B Dn,(xxx).L */ +{ CPUFUNC_FF(op_c140_0), 0, 49472 }, /* EXG.L Dn,Dn */ +{ CPUFUNC_FF(op_c148_0), 0, 49480 }, /* EXG.L An,An */ +{ CPUFUNC(op_c150_0), 0, 49488 }, /* AND.W Dn,(An) */ +{ CPUFUNC(op_c158_0), 0, 49496 }, /* AND.W Dn,(An)+ */ +{ CPUFUNC(op_c160_0), 0, 49504 }, /* AND.W Dn,-(An) */ +{ CPUFUNC(op_c168_0), 0, 49512 }, /* AND.W Dn,(d16,An) */ +{ CPUFUNC(op_c170_0), 0, 49520 }, /* AND.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c178_0), 0, 49528 }, /* AND.W Dn,(xxx).W */ +{ CPUFUNC(op_c179_0), 0, 49529 }, /* AND.W Dn,(xxx).L */ +{ CPUFUNC_FF(op_c188_0), 0, 49544 }, /* EXG.L Dn,An */ +{ CPUFUNC(op_c190_0), 0, 49552 }, /* AND.L Dn,(An) */ +{ CPUFUNC(op_c198_0), 0, 49560 }, /* AND.L Dn,(An)+ */ +{ CPUFUNC(op_c1a0_0), 0, 49568 }, /* AND.L Dn,-(An) */ +{ CPUFUNC(op_c1a8_0), 0, 49576 }, /* AND.L Dn,(d16,An) */ +{ CPUFUNC(op_c1b0_0), 0, 49584 }, /* AND.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c1b8_0), 0, 49592 }, /* AND.L Dn,(xxx).W */ +{ CPUFUNC(op_c1b9_0), 0, 49593 }, /* AND.L Dn,(xxx).L */ +{ CPUFUNC(op_c1c0_0), 0, 49600 }, /* MULS.W Dn,Dn */ +{ CPUFUNC(op_c1d0_0), 0, 49616 }, /* MULS.W (An),Dn */ +{ CPUFUNC(op_c1d8_0), 0, 49624 }, /* MULS.W (An)+,Dn */ +{ CPUFUNC(op_c1e0_0), 0, 49632 }, /* MULS.W -(An),Dn */ +{ CPUFUNC(op_c1e8_0), 0, 49640 }, /* MULS.W (d16,An),Dn */ +{ CPUFUNC(op_c1f0_0), 0, 49648 }, /* MULS.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c1f8_0), 0, 49656 }, /* MULS.W (xxx).W,Dn */ +{ CPUFUNC(op_c1f9_0), 0, 49657 }, /* MULS.W (xxx).L,Dn */ +{ CPUFUNC(op_c1fa_0), 0, 49658 }, /* MULS.W (d16,PC),Dn */ +{ CPUFUNC(op_c1fb_0), 0, 49659 }, /* MULS.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c1fc_0), 0, 49660 }, /* MULS.W #.W,Dn */ +{ CPUFUNC(op_d000_0), 0, 53248 }, /* ADD.B Dn,Dn */ +{ CPUFUNC(op_d010_0), 0, 53264 }, /* ADD.B (An),Dn */ +{ CPUFUNC(op_d018_0), 0, 53272 }, /* ADD.B (An)+,Dn */ +{ CPUFUNC(op_d020_0), 0, 53280 }, /* ADD.B -(An),Dn */ +{ CPUFUNC(op_d028_0), 0, 53288 }, /* ADD.B (d16,An),Dn */ +{ CPUFUNC(op_d030_0), 0, 53296 }, /* ADD.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_d038_0), 0, 53304 }, /* ADD.B (xxx).W,Dn */ +{ CPUFUNC(op_d039_0), 0, 53305 }, /* ADD.B (xxx).L,Dn */ +{ CPUFUNC(op_d03a_0), 0, 53306 }, /* ADD.B (d16,PC),Dn */ +{ CPUFUNC(op_d03b_0), 0, 53307 }, /* ADD.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d03c_0), 0, 53308 }, /* ADD.B #.B,Dn */ +{ CPUFUNC(op_d040_0), 0, 53312 }, /* ADD.W Dn,Dn */ +{ CPUFUNC(op_d048_0), 0, 53320 }, /* ADD.W An,Dn */ +{ CPUFUNC(op_d050_0), 0, 53328 }, /* ADD.W (An),Dn */ +{ CPUFUNC(op_d058_0), 0, 53336 }, /* ADD.W (An)+,Dn */ +{ CPUFUNC(op_d060_0), 0, 53344 }, /* ADD.W -(An),Dn */ +{ CPUFUNC(op_d068_0), 0, 53352 }, /* ADD.W (d16,An),Dn */ +{ CPUFUNC(op_d070_0), 0, 53360 }, /* ADD.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_d078_0), 0, 53368 }, /* ADD.W (xxx).W,Dn */ +{ CPUFUNC(op_d079_0), 0, 53369 }, /* ADD.W (xxx).L,Dn */ +{ CPUFUNC(op_d07a_0), 0, 53370 }, /* ADD.W (d16,PC),Dn */ +{ CPUFUNC(op_d07b_0), 0, 53371 }, /* ADD.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d07c_0), 0, 53372 }, /* ADD.W #.W,Dn */ +{ CPUFUNC(op_d080_0), 0, 53376 }, /* ADD.L Dn,Dn */ +{ CPUFUNC(op_d088_0), 0, 53384 }, /* ADD.L An,Dn */ +{ CPUFUNC(op_d090_0), 0, 53392 }, /* ADD.L (An),Dn */ +{ CPUFUNC(op_d098_0), 0, 53400 }, /* ADD.L (An)+,Dn */ +{ CPUFUNC(op_d0a0_0), 0, 53408 }, /* ADD.L -(An),Dn */ +{ CPUFUNC(op_d0a8_0), 0, 53416 }, /* ADD.L (d16,An),Dn */ +{ CPUFUNC(op_d0b0_0), 0, 53424 }, /* ADD.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_d0b8_0), 0, 53432 }, /* ADD.L (xxx).W,Dn */ +{ CPUFUNC(op_d0b9_0), 0, 53433 }, /* ADD.L (xxx).L,Dn */ +{ CPUFUNC(op_d0ba_0), 0, 53434 }, /* ADD.L (d16,PC),Dn */ +{ CPUFUNC(op_d0bb_0), 0, 53435 }, /* ADD.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d0bc_0), 0, 53436 }, /* ADD.L #.L,Dn */ +{ CPUFUNC_FF(op_d0c0_0), 0, 53440 }, /* ADDA.W Dn,An */ +{ CPUFUNC_FF(op_d0c8_0), 0, 53448 }, /* ADDA.W An,An */ +{ CPUFUNC_FF(op_d0d0_0), 0, 53456 }, /* ADDA.W (An),An */ +{ CPUFUNC_FF(op_d0d8_0), 0, 53464 }, /* ADDA.W (An)+,An */ +{ CPUFUNC_FF(op_d0e0_0), 0, 53472 }, /* ADDA.W -(An),An */ +{ CPUFUNC_FF(op_d0e8_0), 0, 53480 }, /* ADDA.W (d16,An),An */ +{ CPUFUNC_FF(op_d0f0_0), 0, 53488 }, /* ADDA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_d0f8_0), 0, 53496 }, /* ADDA.W (xxx).W,An */ +{ CPUFUNC_FF(op_d0f9_0), 0, 53497 }, /* ADDA.W (xxx).L,An */ +{ CPUFUNC_FF(op_d0fa_0), 0, 53498 }, /* ADDA.W (d16,PC),An */ +{ CPUFUNC_FF(op_d0fb_0), 0, 53499 }, /* ADDA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_d0fc_0), 0, 53500 }, /* ADDA.W #.W,An */ +{ CPUFUNC(op_d100_0), 0, 53504 }, /* ADDX.B Dn,Dn */ +{ CPUFUNC(op_d108_0), 0, 53512 }, /* ADDX.B -(An),-(An) */ +{ CPUFUNC(op_d110_0), 0, 53520 }, /* ADD.B Dn,(An) */ +{ CPUFUNC(op_d118_0), 0, 53528 }, /* ADD.B Dn,(An)+ */ +{ CPUFUNC(op_d120_0), 0, 53536 }, /* ADD.B Dn,-(An) */ +{ CPUFUNC(op_d128_0), 0, 53544 }, /* ADD.B Dn,(d16,An) */ +{ CPUFUNC(op_d130_0), 0, 53552 }, /* ADD.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d138_0), 0, 53560 }, /* ADD.B Dn,(xxx).W */ +{ CPUFUNC(op_d139_0), 0, 53561 }, /* ADD.B Dn,(xxx).L */ +{ CPUFUNC(op_d140_0), 0, 53568 }, /* ADDX.W Dn,Dn */ +{ CPUFUNC(op_d148_0), 0, 53576 }, /* ADDX.W -(An),-(An) */ +{ CPUFUNC(op_d150_0), 0, 53584 }, /* ADD.W Dn,(An) */ +{ CPUFUNC(op_d158_0), 0, 53592 }, /* ADD.W Dn,(An)+ */ +{ CPUFUNC(op_d160_0), 0, 53600 }, /* ADD.W Dn,-(An) */ +{ CPUFUNC(op_d168_0), 0, 53608 }, /* ADD.W Dn,(d16,An) */ +{ CPUFUNC(op_d170_0), 0, 53616 }, /* ADD.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d178_0), 0, 53624 }, /* ADD.W Dn,(xxx).W */ +{ CPUFUNC(op_d179_0), 0, 53625 }, /* ADD.W Dn,(xxx).L */ +{ CPUFUNC(op_d180_0), 0, 53632 }, /* ADDX.L Dn,Dn */ +{ CPUFUNC(op_d188_0), 0, 53640 }, /* ADDX.L -(An),-(An) */ +{ CPUFUNC(op_d190_0), 0, 53648 }, /* ADD.L Dn,(An) */ +{ CPUFUNC(op_d198_0), 0, 53656 }, /* ADD.L Dn,(An)+ */ +{ CPUFUNC(op_d1a0_0), 0, 53664 }, /* ADD.L Dn,-(An) */ +{ CPUFUNC(op_d1a8_0), 0, 53672 }, /* ADD.L Dn,(d16,An) */ +{ CPUFUNC(op_d1b0_0), 0, 53680 }, /* ADD.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d1b8_0), 0, 53688 }, /* ADD.L Dn,(xxx).W */ +{ CPUFUNC(op_d1b9_0), 0, 53689 }, /* ADD.L Dn,(xxx).L */ +{ CPUFUNC_FF(op_d1c0_0), 0, 53696 }, /* ADDA.L Dn,An */ +{ CPUFUNC_FF(op_d1c8_0), 0, 53704 }, /* ADDA.L An,An */ +{ CPUFUNC_FF(op_d1d0_0), 0, 53712 }, /* ADDA.L (An),An */ +{ CPUFUNC_FF(op_d1d8_0), 0, 53720 }, /* ADDA.L (An)+,An */ +{ CPUFUNC_FF(op_d1e0_0), 0, 53728 }, /* ADDA.L -(An),An */ +{ CPUFUNC_FF(op_d1e8_0), 0, 53736 }, /* ADDA.L (d16,An),An */ +{ CPUFUNC_FF(op_d1f0_0), 0, 53744 }, /* ADDA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_d1f8_0), 0, 53752 }, /* ADDA.L (xxx).W,An */ +{ CPUFUNC_FF(op_d1f9_0), 0, 53753 }, /* ADDA.L (xxx).L,An */ +{ CPUFUNC_FF(op_d1fa_0), 0, 53754 }, /* ADDA.L (d16,PC),An */ +{ CPUFUNC_FF(op_d1fb_0), 0, 53755 }, /* ADDA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_d1fc_0), 0, 53756 }, /* ADDA.L #.L,An */ +{ CPUFUNC(op_e000_0), 0, 57344 }, /* ASR.B #,Dn */ +{ CPUFUNC(op_e008_0), 0, 57352 }, /* LSR.B #,Dn */ +{ CPUFUNC(op_e010_0), 0, 57360 }, /* ROXR.B #,Dn */ +{ CPUFUNC(op_e018_0), 0, 57368 }, /* ROR.B #,Dn */ +{ CPUFUNC(op_e020_0), 0, 57376 }, /* ASR.B Dn,Dn */ +{ CPUFUNC(op_e028_0), 0, 57384 }, /* LSR.B Dn,Dn */ +{ CPUFUNC(op_e030_0), 0, 57392 }, /* ROXR.B Dn,Dn */ +{ CPUFUNC(op_e038_0), 0, 57400 }, /* ROR.B Dn,Dn */ +{ CPUFUNC(op_e040_0), 0, 57408 }, /* ASR.W #,Dn */ +{ CPUFUNC(op_e048_0), 0, 57416 }, /* LSR.W #,Dn */ +{ CPUFUNC(op_e050_0), 0, 57424 }, /* ROXR.W #,Dn */ +{ CPUFUNC(op_e058_0), 0, 57432 }, /* ROR.W #,Dn */ +{ CPUFUNC(op_e060_0), 0, 57440 }, /* ASR.W Dn,Dn */ +{ CPUFUNC(op_e068_0), 0, 57448 }, /* LSR.W Dn,Dn */ +{ CPUFUNC(op_e070_0), 0, 57456 }, /* ROXR.W Dn,Dn */ +{ CPUFUNC(op_e078_0), 0, 57464 }, /* ROR.W Dn,Dn */ +{ CPUFUNC(op_e080_0), 0, 57472 }, /* ASR.L #,Dn */ +{ CPUFUNC(op_e088_0), 0, 57480 }, /* LSR.L #,Dn */ +{ CPUFUNC(op_e090_0), 0, 57488 }, /* ROXR.L #,Dn */ +{ CPUFUNC(op_e098_0), 0, 57496 }, /* ROR.L #,Dn */ +{ CPUFUNC(op_e0a0_0), 0, 57504 }, /* ASR.L Dn,Dn */ +{ CPUFUNC(op_e0a8_0), 0, 57512 }, /* LSR.L Dn,Dn */ +{ CPUFUNC(op_e0b0_0), 0, 57520 }, /* ROXR.L Dn,Dn */ +{ CPUFUNC(op_e0b8_0), 0, 57528 }, /* ROR.L Dn,Dn */ +{ CPUFUNC(op_e0d0_0), 0, 57552 }, /* ASRW.W (An) */ +{ CPUFUNC(op_e0d8_0), 0, 57560 }, /* ASRW.W (An)+ */ +{ CPUFUNC(op_e0e0_0), 0, 57568 }, /* ASRW.W -(An) */ +{ CPUFUNC(op_e0e8_0), 0, 57576 }, /* ASRW.W (d16,An) */ +{ CPUFUNC(op_e0f0_0), 0, 57584 }, /* ASRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e0f8_0), 0, 57592 }, /* ASRW.W (xxx).W */ +{ CPUFUNC(op_e0f9_0), 0, 57593 }, /* ASRW.W (xxx).L */ +{ CPUFUNC(op_e100_0), 0, 57600 }, /* ASL.B #,Dn */ +{ CPUFUNC(op_e108_0), 0, 57608 }, /* LSL.B #,Dn */ +{ CPUFUNC(op_e110_0), 0, 57616 }, /* ROXL.B #,Dn */ +{ CPUFUNC(op_e118_0), 0, 57624 }, /* ROL.B #,Dn */ +{ CPUFUNC(op_e120_0), 0, 57632 }, /* ASL.B Dn,Dn */ +{ CPUFUNC(op_e128_0), 0, 57640 }, /* LSL.B Dn,Dn */ +{ CPUFUNC(op_e130_0), 0, 57648 }, /* ROXL.B Dn,Dn */ +{ CPUFUNC(op_e138_0), 0, 57656 }, /* ROL.B Dn,Dn */ +{ CPUFUNC(op_e140_0), 0, 57664 }, /* ASL.W #,Dn */ +{ CPUFUNC(op_e148_0), 0, 57672 }, /* LSL.W #,Dn */ +{ CPUFUNC(op_e150_0), 0, 57680 }, /* ROXL.W #,Dn */ +{ CPUFUNC(op_e158_0), 0, 57688 }, /* ROL.W #,Dn */ +{ CPUFUNC(op_e160_0), 0, 57696 }, /* ASL.W Dn,Dn */ +{ CPUFUNC(op_e168_0), 0, 57704 }, /* LSL.W Dn,Dn */ +{ CPUFUNC(op_e170_0), 0, 57712 }, /* ROXL.W Dn,Dn */ +{ CPUFUNC(op_e178_0), 0, 57720 }, /* ROL.W Dn,Dn */ +{ CPUFUNC(op_e180_0), 0, 57728 }, /* ASL.L #,Dn */ +{ CPUFUNC(op_e188_0), 0, 57736 }, /* LSL.L #,Dn */ +{ CPUFUNC(op_e190_0), 0, 57744 }, /* ROXL.L #,Dn */ +{ CPUFUNC(op_e198_0), 0, 57752 }, /* ROL.L #,Dn */ +{ CPUFUNC(op_e1a0_0), 0, 57760 }, /* ASL.L Dn,Dn */ +{ CPUFUNC(op_e1a8_0), 0, 57768 }, /* LSL.L Dn,Dn */ +{ CPUFUNC(op_e1b0_0), 0, 57776 }, /* ROXL.L Dn,Dn */ +{ CPUFUNC(op_e1b8_0), 0, 57784 }, /* ROL.L Dn,Dn */ +{ CPUFUNC(op_e1d0_0), 0, 57808 }, /* ASLW.W (An) */ +{ CPUFUNC(op_e1d8_0), 0, 57816 }, /* ASLW.W (An)+ */ +{ CPUFUNC(op_e1e0_0), 0, 57824 }, /* ASLW.W -(An) */ +{ CPUFUNC(op_e1e8_0), 0, 57832 }, /* ASLW.W (d16,An) */ +{ CPUFUNC(op_e1f0_0), 0, 57840 }, /* ASLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e1f8_0), 0, 57848 }, /* ASLW.W (xxx).W */ +{ CPUFUNC(op_e1f9_0), 0, 57849 }, /* ASLW.W (xxx).L */ +{ CPUFUNC(op_e2d0_0), 0, 58064 }, /* LSRW.W (An) */ +{ CPUFUNC(op_e2d8_0), 0, 58072 }, /* LSRW.W (An)+ */ +{ CPUFUNC(op_e2e0_0), 0, 58080 }, /* LSRW.W -(An) */ +{ CPUFUNC(op_e2e8_0), 0, 58088 }, /* LSRW.W (d16,An) */ +{ CPUFUNC(op_e2f0_0), 0, 58096 }, /* LSRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e2f8_0), 0, 58104 }, /* LSRW.W (xxx).W */ +{ CPUFUNC(op_e2f9_0), 0, 58105 }, /* LSRW.W (xxx).L */ +{ CPUFUNC(op_e3d0_0), 0, 58320 }, /* LSLW.W (An) */ +{ CPUFUNC(op_e3d8_0), 0, 58328 }, /* LSLW.W (An)+ */ +{ CPUFUNC(op_e3e0_0), 0, 58336 }, /* LSLW.W -(An) */ +{ CPUFUNC(op_e3e8_0), 0, 58344 }, /* LSLW.W (d16,An) */ +{ CPUFUNC(op_e3f0_0), 0, 58352 }, /* LSLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e3f8_0), 0, 58360 }, /* LSLW.W (xxx).W */ +{ CPUFUNC(op_e3f9_0), 0, 58361 }, /* LSLW.W (xxx).L */ +{ CPUFUNC(op_e4d0_0), 0, 58576 }, /* ROXRW.W (An) */ +{ CPUFUNC(op_e4d8_0), 0, 58584 }, /* ROXRW.W (An)+ */ +{ CPUFUNC(op_e4e0_0), 0, 58592 }, /* ROXRW.W -(An) */ +{ CPUFUNC(op_e4e8_0), 0, 58600 }, /* ROXRW.W (d16,An) */ +{ CPUFUNC(op_e4f0_0), 0, 58608 }, /* ROXRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e4f8_0), 0, 58616 }, /* ROXRW.W (xxx).W */ +{ CPUFUNC(op_e4f9_0), 0, 58617 }, /* ROXRW.W (xxx).L */ +{ CPUFUNC(op_e5d0_0), 0, 58832 }, /* ROXLW.W (An) */ +{ CPUFUNC(op_e5d8_0), 0, 58840 }, /* ROXLW.W (An)+ */ +{ CPUFUNC(op_e5e0_0), 0, 58848 }, /* ROXLW.W -(An) */ +{ CPUFUNC(op_e5e8_0), 0, 58856 }, /* ROXLW.W (d16,An) */ +{ CPUFUNC(op_e5f0_0), 0, 58864 }, /* ROXLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e5f8_0), 0, 58872 }, /* ROXLW.W (xxx).W */ +{ CPUFUNC(op_e5f9_0), 0, 58873 }, /* ROXLW.W (xxx).L */ +{ CPUFUNC(op_e6d0_0), 0, 59088 }, /* RORW.W (An) */ +{ CPUFUNC(op_e6d8_0), 0, 59096 }, /* RORW.W (An)+ */ +{ CPUFUNC(op_e6e0_0), 0, 59104 }, /* RORW.W -(An) */ +{ CPUFUNC(op_e6e8_0), 0, 59112 }, /* RORW.W (d16,An) */ +{ CPUFUNC(op_e6f0_0), 0, 59120 }, /* RORW.W (d8,An,Xn) */ +{ CPUFUNC(op_e6f8_0), 0, 59128 }, /* RORW.W (xxx).W */ +{ CPUFUNC(op_e6f9_0), 0, 59129 }, /* RORW.W (xxx).L */ +{ CPUFUNC(op_e7d0_0), 0, 59344 }, /* ROLW.W (An) */ +{ CPUFUNC(op_e7d8_0), 0, 59352 }, /* ROLW.W (An)+ */ +{ CPUFUNC(op_e7e0_0), 0, 59360 }, /* ROLW.W -(An) */ +{ CPUFUNC(op_e7e8_0), 0, 59368 }, /* ROLW.W (d16,An) */ +{ CPUFUNC(op_e7f0_0), 0, 59376 }, /* ROLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e7f8_0), 0, 59384 }, /* ROLW.W (xxx).W */ +{ CPUFUNC(op_e7f9_0), 0, 59385 }, /* ROLW.W (xxx).L */ +{ CPUFUNC(op_e8c0_0), 0, 59584 }, /* BFTST.L #.W,Dn */ +{ CPUFUNC(op_e8d0_0), 0, 59600 }, /* BFTST.L #.W,(An) */ +{ CPUFUNC(op_e8e8_0), 0, 59624 }, /* BFTST.L #.W,(d16,An) */ +{ CPUFUNC(op_e8f0_0), 0, 59632 }, /* BFTST.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_e8f8_0), 0, 59640 }, /* BFTST.L #.W,(xxx).W */ +{ CPUFUNC(op_e8f9_0), 0, 59641 }, /* BFTST.L #.W,(xxx).L */ +{ CPUFUNC(op_e8fa_0), 0, 59642 }, /* BFTST.L #.W,(d16,PC) */ +{ CPUFUNC(op_e8fb_0), 0, 59643 }, /* BFTST.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_e9c0_0), 0, 59840 }, /* BFEXTU.L #.W,Dn */ +{ CPUFUNC(op_e9d0_0), 0, 59856 }, /* BFEXTU.L #.W,(An) */ +{ CPUFUNC(op_e9e8_0), 0, 59880 }, /* BFEXTU.L #.W,(d16,An) */ +{ CPUFUNC(op_e9f0_0), 0, 59888 }, /* BFEXTU.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_e9f8_0), 0, 59896 }, /* BFEXTU.L #.W,(xxx).W */ +{ CPUFUNC(op_e9f9_0), 0, 59897 }, /* BFEXTU.L #.W,(xxx).L */ +{ CPUFUNC(op_e9fa_0), 0, 59898 }, /* BFEXTU.L #.W,(d16,PC) */ +{ CPUFUNC(op_e9fb_0), 0, 59899 }, /* BFEXTU.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_eac0_0), 0, 60096 }, /* BFCHG.L #.W,Dn */ +{ CPUFUNC(op_ead0_0), 0, 60112 }, /* BFCHG.L #.W,(An) */ +{ CPUFUNC(op_eae8_0), 0, 60136 }, /* BFCHG.L #.W,(d16,An) */ +{ CPUFUNC(op_eaf0_0), 0, 60144 }, /* BFCHG.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_eaf8_0), 0, 60152 }, /* BFCHG.L #.W,(xxx).W */ +{ CPUFUNC(op_eaf9_0), 0, 60153 }, /* BFCHG.L #.W,(xxx).L */ +{ CPUFUNC(op_ebc0_0), 0, 60352 }, /* BFEXTS.L #.W,Dn */ +{ CPUFUNC(op_ebd0_0), 0, 60368 }, /* BFEXTS.L #.W,(An) */ +{ CPUFUNC(op_ebe8_0), 0, 60392 }, /* BFEXTS.L #.W,(d16,An) */ +{ CPUFUNC(op_ebf0_0), 0, 60400 }, /* BFEXTS.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_ebf8_0), 0, 60408 }, /* BFEXTS.L #.W,(xxx).W */ +{ CPUFUNC(op_ebf9_0), 0, 60409 }, /* BFEXTS.L #.W,(xxx).L */ +{ CPUFUNC(op_ebfa_0), 0, 60410 }, /* BFEXTS.L #.W,(d16,PC) */ +{ CPUFUNC(op_ebfb_0), 0, 60411 }, /* BFEXTS.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_ecc0_0), 0, 60608 }, /* BFCLR.L #.W,Dn */ +{ CPUFUNC(op_ecd0_0), 0, 60624 }, /* BFCLR.L #.W,(An) */ +{ CPUFUNC(op_ece8_0), 0, 60648 }, /* BFCLR.L #.W,(d16,An) */ +{ CPUFUNC(op_ecf0_0), 0, 60656 }, /* BFCLR.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_ecf8_0), 0, 60664 }, /* BFCLR.L #.W,(xxx).W */ +{ CPUFUNC(op_ecf9_0), 0, 60665 }, /* BFCLR.L #.W,(xxx).L */ +{ CPUFUNC(op_edc0_0), 0, 60864 }, /* BFFFO.L #.W,Dn */ +{ CPUFUNC(op_edd0_0), 0, 60880 }, /* BFFFO.L #.W,(An) */ +{ CPUFUNC(op_ede8_0), 0, 60904 }, /* BFFFO.L #.W,(d16,An) */ +{ CPUFUNC(op_edf0_0), 0, 60912 }, /* BFFFO.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_edf8_0), 0, 60920 }, /* BFFFO.L #.W,(xxx).W */ +{ CPUFUNC(op_edf9_0), 0, 60921 }, /* BFFFO.L #.W,(xxx).L */ +{ CPUFUNC(op_edfa_0), 0, 60922 }, /* BFFFO.L #.W,(d16,PC) */ +{ CPUFUNC(op_edfb_0), 0, 60923 }, /* BFFFO.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_eec0_0), 0, 61120 }, /* BFSET.L #.W,Dn */ +{ CPUFUNC(op_eed0_0), 0, 61136 }, /* BFSET.L #.W,(An) */ +{ CPUFUNC(op_eee8_0), 0, 61160 }, /* BFSET.L #.W,(d16,An) */ +{ CPUFUNC(op_eef0_0), 0, 61168 }, /* BFSET.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_eef8_0), 0, 61176 }, /* BFSET.L #.W,(xxx).W */ +{ CPUFUNC(op_eef9_0), 0, 61177 }, /* BFSET.L #.W,(xxx).L */ +{ CPUFUNC(op_efc0_0), 0, 61376 }, /* BFINS.L #.W,Dn */ +{ CPUFUNC(op_efd0_0), 0, 61392 }, /* BFINS.L #.W,(An) */ +{ CPUFUNC(op_efe8_0), 0, 61416 }, /* BFINS.L #.W,(d16,An) */ +{ CPUFUNC(op_eff0_0), 0, 61424 }, /* BFINS.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_eff8_0), 0, 61432 }, /* BFINS.L #.W,(xxx).W */ +{ CPUFUNC(op_eff9_0), 0, 61433 }, /* BFINS.L #.W,(xxx).L */ +{ CPUFUNC_FF(op_f200_0), 0, 61952 }, /* FPP.L #.W,Dn */ +{ CPUFUNC_FF(op_f208_0), 0, 61960 }, /* FPP.L #.W,An */ +{ CPUFUNC_FF(op_f210_0), 0, 61968 }, /* FPP.L #.W,(An) */ +{ CPUFUNC_FF(op_f218_0), 0, 61976 }, /* FPP.L #.W,(An)+ */ +{ CPUFUNC_FF(op_f220_0), 0, 61984 }, /* FPP.L #.W,-(An) */ +{ CPUFUNC_FF(op_f228_0), 0, 61992 }, /* FPP.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_f230_0), 0, 62000 }, /* FPP.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_f238_0), 0, 62008 }, /* FPP.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_f239_0), 0, 62009 }, /* FPP.L #.W,(xxx).L */ +{ CPUFUNC_FF(op_f23a_0), 0, 62010 }, /* FPP.L #.W,(d16,PC) */ +{ CPUFUNC_FF(op_f23b_0), 0, 62011 }, /* FPP.L #.W,(d8,PC,Xn) */ +{ CPUFUNC_FF(op_f23c_0), 0, 62012 }, /* FPP.L #.W,#.L */ +{ CPUFUNC_FF(op_f240_0), 0, 62016 }, /* FScc.L #.W,Dn */ +{ CPUFUNC_FF(op_f248_0), 0, 62024 }, /* FDBcc.L #.W,Dn */ +{ CPUFUNC_FF(op_f250_0), 0, 62032 }, /* FScc.L #.W,(An) */ +{ CPUFUNC_FF(op_f258_0), 0, 62040 }, /* FScc.L #.W,(An)+ */ +{ CPUFUNC_FF(op_f260_0), 0, 62048 }, /* FScc.L #.W,-(An) */ +{ CPUFUNC_FF(op_f268_0), 0, 62056 }, /* FScc.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_f270_0), 0, 62064 }, /* FScc.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_f278_0), 0, 62072 }, /* FScc.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_f279_0), 0, 62073 }, /* FScc.L #.W,(xxx).L */ +{ CPUFUNC_FF(op_f27a_0), 0, 62074 }, /* FTRAPcc.L #.W */ +{ CPUFUNC_FF(op_f27b_0), 0, 62075 }, /* FTRAPcc.L #.L */ +{ CPUFUNC_FF(op_f27c_0), 0, 62076 }, /* FTRAPcc.L */ +{ CPUFUNC_FF(op_f280_0), 0, 62080 }, /* FBcc.L #,#.W */ +{ CPUFUNC_FF(op_f2c0_0), 0, 62144 }, /* FBcc.L #,#.L */ +{ CPUFUNC_FF(op_f310_0), 0, 62224 }, /* FSAVE.L (An) */ +{ CPUFUNC_FF(op_f320_0), 0, 62240 }, /* FSAVE.L -(An) */ +{ CPUFUNC_FF(op_f328_0), 0, 62248 }, /* FSAVE.L (d16,An) */ +{ CPUFUNC_FF(op_f330_0), 0, 62256 }, /* FSAVE.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_f338_0), 0, 62264 }, /* FSAVE.L (xxx).W */ +{ CPUFUNC_FF(op_f339_0), 0, 62265 }, /* FSAVE.L (xxx).L */ +{ CPUFUNC_FF(op_f350_0), 0, 62288 }, /* FRESTORE.L (An) */ +{ CPUFUNC_FF(op_f358_0), 0, 62296 }, /* FRESTORE.L (An)+ */ +{ CPUFUNC_FF(op_f368_0), 0, 62312 }, /* FRESTORE.L (d16,An) */ +{ CPUFUNC_FF(op_f370_0), 0, 62320 }, /* FRESTORE.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_f378_0), 0, 62328 }, /* FRESTORE.L (xxx).W */ +{ CPUFUNC_FF(op_f379_0), 0, 62329 }, /* FRESTORE.L (xxx).L */ +{ CPUFUNC_FF(op_f37a_0), 0, 62330 }, /* FRESTORE.L (d16,PC) */ +{ CPUFUNC_FF(op_f37b_0), 0, 62331 }, /* FRESTORE.L (d8,PC,Xn) */ +{ CPUFUNC_FF(op_f408_0), 0, 62472 }, /* CINVL.L #,An */ +{ CPUFUNC_FF(op_f410_0), 0, 62480 }, /* CINVP.L #,An */ +{ CPUFUNC_FF(op_f418_0), 0, 62488 }, /* CINVA.L # */ +{ CPUFUNC_FF(op_f419_0), 0, 62489 }, /* CINVA.L # */ +{ CPUFUNC_FF(op_f41a_0), 0, 62490 }, /* CINVA.L # */ +{ CPUFUNC_FF(op_f41b_0), 0, 62491 }, /* CINVA.L # */ +{ CPUFUNC_FF(op_f41c_0), 0, 62492 }, /* CINVA.L # */ +{ CPUFUNC_FF(op_f41d_0), 0, 62493 }, /* CINVA.L # */ +{ CPUFUNC_FF(op_f41e_0), 0, 62494 }, /* CINVA.L # */ +{ CPUFUNC_FF(op_f41f_0), 0, 62495 }, /* CINVA.L # */ +{ CPUFUNC_FF(op_f428_0), 0, 62504 }, /* CPUSHL.L #,An */ +{ CPUFUNC_FF(op_f430_0), 0, 62512 }, /* CPUSHP.L #,An */ +{ CPUFUNC_FF(op_f438_0), 0, 62520 }, /* CPUSHA.L # */ +{ CPUFUNC_FF(op_f439_0), 0, 62521 }, /* CPUSHA.L # */ +{ CPUFUNC_FF(op_f43a_0), 0, 62522 }, /* CPUSHA.L # */ +{ CPUFUNC_FF(op_f43b_0), 0, 62523 }, /* CPUSHA.L # */ +{ CPUFUNC_FF(op_f43c_0), 0, 62524 }, /* CPUSHA.L # */ +{ CPUFUNC_FF(op_f43d_0), 0, 62525 }, /* CPUSHA.L # */ +{ CPUFUNC_FF(op_f43e_0), 0, 62526 }, /* CPUSHA.L # */ +{ CPUFUNC_FF(op_f43f_0), 0, 62527 }, /* CPUSHA.L # */ +{ CPUFUNC_FF(op_f500_0), 0, 62720 }, /* MMUOP.L #,Dn */ +{ CPUFUNC_FF(op_f600_0), 0, 62976 }, /* MOVE16.L (An)+,(xxx).L */ +{ CPUFUNC_FF(op_f608_0), 0, 62984 }, /* MOVE16.L (xxx).L,(An)+ */ +{ CPUFUNC_FF(op_f610_0), 0, 62992 }, /* MOVE16.L (An),(xxx).L */ +{ CPUFUNC_FF(op_f618_0), 0, 63000 }, /* MOVE16.L (xxx).L,(An) */ +{ CPUFUNC_FF(op_f620_0), 0, 63008 }, /* MOVE16.L (An)+,(An)+ */ +{ 0, 0, 0 }}; +struct cputbl CPUFUNC(op_smalltbl_1)[] = { +{ CPUFUNC(op_0_0), 0, 0 }, /* OR.B #.B,Dn */ +{ CPUFUNC(op_10_0), 0, 16 }, /* OR.B #.B,(An) */ +{ CPUFUNC(op_18_0), 0, 24 }, /* OR.B #.B,(An)+ */ +{ CPUFUNC(op_20_0), 0, 32 }, /* OR.B #.B,-(An) */ +{ CPUFUNC(op_28_0), 0, 40 }, /* OR.B #.B,(d16,An) */ +{ CPUFUNC(op_30_0), 0, 48 }, /* OR.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_38_0), 0, 56 }, /* OR.B #.B,(xxx).W */ +{ CPUFUNC(op_39_0), 0, 57 }, /* OR.B #.B,(xxx).L */ +{ CPUFUNC(op_3c_0), 0, 60 }, /* ORSR.B #.W */ +{ CPUFUNC(op_40_0), 0, 64 }, /* OR.W #.W,Dn */ +{ CPUFUNC(op_50_0), 0, 80 }, /* OR.W #.W,(An) */ +{ CPUFUNC(op_58_0), 0, 88 }, /* OR.W #.W,(An)+ */ +{ CPUFUNC(op_60_0), 0, 96 }, /* OR.W #.W,-(An) */ +{ CPUFUNC(op_68_0), 0, 104 }, /* OR.W #.W,(d16,An) */ +{ CPUFUNC(op_70_0), 0, 112 }, /* OR.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_78_0), 0, 120 }, /* OR.W #.W,(xxx).W */ +{ CPUFUNC(op_79_0), 0, 121 }, /* OR.W #.W,(xxx).L */ +{ CPUFUNC(op_7c_0), 0, 124 }, /* ORSR.W #.W */ +{ CPUFUNC(op_80_0), 0, 128 }, /* OR.L #.L,Dn */ +{ CPUFUNC(op_90_0), 0, 144 }, /* OR.L #.L,(An) */ +{ CPUFUNC(op_98_0), 0, 152 }, /* OR.L #.L,(An)+ */ +{ CPUFUNC(op_a0_0), 0, 160 }, /* OR.L #.L,-(An) */ +{ CPUFUNC(op_a8_0), 0, 168 }, /* OR.L #.L,(d16,An) */ +{ CPUFUNC(op_b0_0), 0, 176 }, /* OR.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_b8_0), 0, 184 }, /* OR.L #.L,(xxx).W */ +{ CPUFUNC(op_b9_0), 0, 185 }, /* OR.L #.L,(xxx).L */ +{ CPUFUNC(op_d0_0), 0, 208 }, /* CHK2.B #.W,(An) */ +{ CPUFUNC(op_e8_0), 0, 232 }, /* CHK2.B #.W,(d16,An) */ +{ CPUFUNC(op_f0_0), 0, 240 }, /* CHK2.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_f8_0), 0, 248 }, /* CHK2.B #.W,(xxx).W */ +{ CPUFUNC(op_f9_0), 0, 249 }, /* CHK2.B #.W,(xxx).L */ +{ CPUFUNC(op_fa_0), 0, 250 }, /* CHK2.B #.W,(d16,PC) */ +{ CPUFUNC(op_fb_0), 0, 251 }, /* CHK2.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_100_0), 0, 256 }, /* BTST.L Dn,Dn */ +{ CPUFUNC_FF(op_108_0), 0, 264 }, /* MVPMR.W (d16,An),Dn */ +{ CPUFUNC(op_110_0), 0, 272 }, /* BTST.B Dn,(An) */ +{ CPUFUNC(op_118_0), 0, 280 }, /* BTST.B Dn,(An)+ */ +{ CPUFUNC(op_120_0), 0, 288 }, /* BTST.B Dn,-(An) */ +{ CPUFUNC(op_128_0), 0, 296 }, /* BTST.B Dn,(d16,An) */ +{ CPUFUNC(op_130_0), 0, 304 }, /* BTST.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_138_0), 0, 312 }, /* BTST.B Dn,(xxx).W */ +{ CPUFUNC(op_139_0), 0, 313 }, /* BTST.B Dn,(xxx).L */ +{ CPUFUNC(op_13a_0), 0, 314 }, /* BTST.B Dn,(d16,PC) */ +{ CPUFUNC(op_13b_0), 0, 315 }, /* BTST.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_13c_0), 0, 316 }, /* BTST.B Dn,#.B */ +{ CPUFUNC(op_140_0), 0, 320 }, /* BCHG.L Dn,Dn */ +{ CPUFUNC_FF(op_148_0), 0, 328 }, /* MVPMR.L (d16,An),Dn */ +{ CPUFUNC(op_150_0), 0, 336 }, /* BCHG.B Dn,(An) */ +{ CPUFUNC(op_158_0), 0, 344 }, /* BCHG.B Dn,(An)+ */ +{ CPUFUNC(op_160_0), 0, 352 }, /* BCHG.B Dn,-(An) */ +{ CPUFUNC(op_168_0), 0, 360 }, /* BCHG.B Dn,(d16,An) */ +{ CPUFUNC(op_170_0), 0, 368 }, /* BCHG.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_178_0), 0, 376 }, /* BCHG.B Dn,(xxx).W */ +{ CPUFUNC(op_179_0), 0, 377 }, /* BCHG.B Dn,(xxx).L */ +{ CPUFUNC(op_17a_0), 0, 378 }, /* BCHG.B Dn,(d16,PC) */ +{ CPUFUNC(op_17b_0), 0, 379 }, /* BCHG.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_180_0), 0, 384 }, /* BCLR.L Dn,Dn */ +{ CPUFUNC_FF(op_188_0), 0, 392 }, /* MVPRM.W Dn,(d16,An) */ +{ CPUFUNC(op_190_0), 0, 400 }, /* BCLR.B Dn,(An) */ +{ CPUFUNC(op_198_0), 0, 408 }, /* BCLR.B Dn,(An)+ */ +{ CPUFUNC(op_1a0_0), 0, 416 }, /* BCLR.B Dn,-(An) */ +{ CPUFUNC(op_1a8_0), 0, 424 }, /* BCLR.B Dn,(d16,An) */ +{ CPUFUNC(op_1b0_0), 0, 432 }, /* BCLR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1b8_0), 0, 440 }, /* BCLR.B Dn,(xxx).W */ +{ CPUFUNC(op_1b9_0), 0, 441 }, /* BCLR.B Dn,(xxx).L */ +{ CPUFUNC(op_1ba_0), 0, 442 }, /* BCLR.B Dn,(d16,PC) */ +{ CPUFUNC(op_1bb_0), 0, 443 }, /* BCLR.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_1c0_0), 0, 448 }, /* BSET.L Dn,Dn */ +{ CPUFUNC_FF(op_1c8_0), 0, 456 }, /* MVPRM.L Dn,(d16,An) */ +{ CPUFUNC(op_1d0_0), 0, 464 }, /* BSET.B Dn,(An) */ +{ CPUFUNC(op_1d8_0), 0, 472 }, /* BSET.B Dn,(An)+ */ +{ CPUFUNC(op_1e0_0), 0, 480 }, /* BSET.B Dn,-(An) */ +{ CPUFUNC(op_1e8_0), 0, 488 }, /* BSET.B Dn,(d16,An) */ +{ CPUFUNC(op_1f0_0), 0, 496 }, /* BSET.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1f8_0), 0, 504 }, /* BSET.B Dn,(xxx).W */ +{ CPUFUNC(op_1f9_0), 0, 505 }, /* BSET.B Dn,(xxx).L */ +{ CPUFUNC(op_1fa_0), 0, 506 }, /* BSET.B Dn,(d16,PC) */ +{ CPUFUNC(op_1fb_0), 0, 507 }, /* BSET.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_200_0), 0, 512 }, /* AND.B #.B,Dn */ +{ CPUFUNC(op_210_0), 0, 528 }, /* AND.B #.B,(An) */ +{ CPUFUNC(op_218_0), 0, 536 }, /* AND.B #.B,(An)+ */ +{ CPUFUNC(op_220_0), 0, 544 }, /* AND.B #.B,-(An) */ +{ CPUFUNC(op_228_0), 0, 552 }, /* AND.B #.B,(d16,An) */ +{ CPUFUNC(op_230_0), 0, 560 }, /* AND.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_238_0), 0, 568 }, /* AND.B #.B,(xxx).W */ +{ CPUFUNC(op_239_0), 0, 569 }, /* AND.B #.B,(xxx).L */ +{ CPUFUNC(op_23c_0), 0, 572 }, /* ANDSR.B #.W */ +{ CPUFUNC(op_240_0), 0, 576 }, /* AND.W #.W,Dn */ +{ CPUFUNC(op_250_0), 0, 592 }, /* AND.W #.W,(An) */ +{ CPUFUNC(op_258_0), 0, 600 }, /* AND.W #.W,(An)+ */ +{ CPUFUNC(op_260_0), 0, 608 }, /* AND.W #.W,-(An) */ +{ CPUFUNC(op_268_0), 0, 616 }, /* AND.W #.W,(d16,An) */ +{ CPUFUNC(op_270_0), 0, 624 }, /* AND.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_278_0), 0, 632 }, /* AND.W #.W,(xxx).W */ +{ CPUFUNC(op_279_0), 0, 633 }, /* AND.W #.W,(xxx).L */ +{ CPUFUNC(op_27c_0), 0, 636 }, /* ANDSR.W #.W */ +{ CPUFUNC(op_280_0), 0, 640 }, /* AND.L #.L,Dn */ +{ CPUFUNC(op_290_0), 0, 656 }, /* AND.L #.L,(An) */ +{ CPUFUNC(op_298_0), 0, 664 }, /* AND.L #.L,(An)+ */ +{ CPUFUNC(op_2a0_0), 0, 672 }, /* AND.L #.L,-(An) */ +{ CPUFUNC(op_2a8_0), 0, 680 }, /* AND.L #.L,(d16,An) */ +{ CPUFUNC(op_2b0_0), 0, 688 }, /* AND.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_2b8_0), 0, 696 }, /* AND.L #.L,(xxx).W */ +{ CPUFUNC(op_2b9_0), 0, 697 }, /* AND.L #.L,(xxx).L */ +{ CPUFUNC(op_2d0_0), 0, 720 }, /* CHK2.W #.W,(An) */ +{ CPUFUNC(op_2e8_0), 0, 744 }, /* CHK2.W #.W,(d16,An) */ +{ CPUFUNC(op_2f0_0), 0, 752 }, /* CHK2.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_2f8_0), 0, 760 }, /* CHK2.W #.W,(xxx).W */ +{ CPUFUNC(op_2f9_0), 0, 761 }, /* CHK2.W #.W,(xxx).L */ +{ CPUFUNC(op_2fa_0), 0, 762 }, /* CHK2.W #.W,(d16,PC) */ +{ CPUFUNC(op_2fb_0), 0, 763 }, /* CHK2.W #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_400_0), 0, 1024 }, /* SUB.B #.B,Dn */ +{ CPUFUNC(op_410_0), 0, 1040 }, /* SUB.B #.B,(An) */ +{ CPUFUNC(op_418_0), 0, 1048 }, /* SUB.B #.B,(An)+ */ +{ CPUFUNC(op_420_0), 0, 1056 }, /* SUB.B #.B,-(An) */ +{ CPUFUNC(op_428_0), 0, 1064 }, /* SUB.B #.B,(d16,An) */ +{ CPUFUNC(op_430_0), 0, 1072 }, /* SUB.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_438_0), 0, 1080 }, /* SUB.B #.B,(xxx).W */ +{ CPUFUNC(op_439_0), 0, 1081 }, /* SUB.B #.B,(xxx).L */ +{ CPUFUNC(op_440_0), 0, 1088 }, /* SUB.W #.W,Dn */ +{ CPUFUNC(op_450_0), 0, 1104 }, /* SUB.W #.W,(An) */ +{ CPUFUNC(op_458_0), 0, 1112 }, /* SUB.W #.W,(An)+ */ +{ CPUFUNC(op_460_0), 0, 1120 }, /* SUB.W #.W,-(An) */ +{ CPUFUNC(op_468_0), 0, 1128 }, /* SUB.W #.W,(d16,An) */ +{ CPUFUNC(op_470_0), 0, 1136 }, /* SUB.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_478_0), 0, 1144 }, /* SUB.W #.W,(xxx).W */ +{ CPUFUNC(op_479_0), 0, 1145 }, /* SUB.W #.W,(xxx).L */ +{ CPUFUNC(op_480_0), 0, 1152 }, /* SUB.L #.L,Dn */ +{ CPUFUNC(op_490_0), 0, 1168 }, /* SUB.L #.L,(An) */ +{ CPUFUNC(op_498_0), 0, 1176 }, /* SUB.L #.L,(An)+ */ +{ CPUFUNC(op_4a0_0), 0, 1184 }, /* SUB.L #.L,-(An) */ +{ CPUFUNC(op_4a8_0), 0, 1192 }, /* SUB.L #.L,(d16,An) */ +{ CPUFUNC(op_4b0_0), 0, 1200 }, /* SUB.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_4b8_0), 0, 1208 }, /* SUB.L #.L,(xxx).W */ +{ CPUFUNC(op_4b9_0), 0, 1209 }, /* SUB.L #.L,(xxx).L */ +{ CPUFUNC(op_4d0_0), 0, 1232 }, /* CHK2.L #.W,(An) */ +{ CPUFUNC(op_4e8_0), 0, 1256 }, /* CHK2.L #.W,(d16,An) */ +{ CPUFUNC(op_4f0_0), 0, 1264 }, /* CHK2.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_4f8_0), 0, 1272 }, /* CHK2.L #.W,(xxx).W */ +{ CPUFUNC(op_4f9_0), 0, 1273 }, /* CHK2.L #.W,(xxx).L */ +{ CPUFUNC(op_4fa_0), 0, 1274 }, /* CHK2.L #.W,(d16,PC) */ +{ CPUFUNC(op_4fb_0), 0, 1275 }, /* CHK2.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_600_0), 0, 1536 }, /* ADD.B #.B,Dn */ +{ CPUFUNC(op_610_0), 0, 1552 }, /* ADD.B #.B,(An) */ +{ CPUFUNC(op_618_0), 0, 1560 }, /* ADD.B #.B,(An)+ */ +{ CPUFUNC(op_620_0), 0, 1568 }, /* ADD.B #.B,-(An) */ +{ CPUFUNC(op_628_0), 0, 1576 }, /* ADD.B #.B,(d16,An) */ +{ CPUFUNC(op_630_0), 0, 1584 }, /* ADD.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_638_0), 0, 1592 }, /* ADD.B #.B,(xxx).W */ +{ CPUFUNC(op_639_0), 0, 1593 }, /* ADD.B #.B,(xxx).L */ +{ CPUFUNC(op_640_0), 0, 1600 }, /* ADD.W #.W,Dn */ +{ CPUFUNC(op_650_0), 0, 1616 }, /* ADD.W #.W,(An) */ +{ CPUFUNC(op_658_0), 0, 1624 }, /* ADD.W #.W,(An)+ */ +{ CPUFUNC(op_660_0), 0, 1632 }, /* ADD.W #.W,-(An) */ +{ CPUFUNC(op_668_0), 0, 1640 }, /* ADD.W #.W,(d16,An) */ +{ CPUFUNC(op_670_0), 0, 1648 }, /* ADD.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_678_0), 0, 1656 }, /* ADD.W #.W,(xxx).W */ +{ CPUFUNC(op_679_0), 0, 1657 }, /* ADD.W #.W,(xxx).L */ +{ CPUFUNC(op_680_0), 0, 1664 }, /* ADD.L #.L,Dn */ +{ CPUFUNC(op_690_0), 0, 1680 }, /* ADD.L #.L,(An) */ +{ CPUFUNC(op_698_0), 0, 1688 }, /* ADD.L #.L,(An)+ */ +{ CPUFUNC(op_6a0_0), 0, 1696 }, /* ADD.L #.L,-(An) */ +{ CPUFUNC(op_6a8_0), 0, 1704 }, /* ADD.L #.L,(d16,An) */ +{ CPUFUNC(op_6b0_0), 0, 1712 }, /* ADD.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_6b8_0), 0, 1720 }, /* ADD.L #.L,(xxx).W */ +{ CPUFUNC(op_6b9_0), 0, 1721 }, /* ADD.L #.L,(xxx).L */ +{ CPUFUNC(op_6c0_0), 0, 1728 }, /* RTM.L Dn */ +{ CPUFUNC(op_6c8_0), 0, 1736 }, /* RTM.L An */ +{ CPUFUNC_FF(op_6d0_0), 0, 1744 }, /* CALLM.L (An) */ +{ CPUFUNC_FF(op_6e8_0), 0, 1768 }, /* CALLM.L (d16,An) */ +{ CPUFUNC_FF(op_6f0_0), 0, 1776 }, /* CALLM.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_6f8_0), 0, 1784 }, /* CALLM.L (xxx).W */ +{ CPUFUNC_FF(op_6f9_0), 0, 1785 }, /* CALLM.L (xxx).L */ +{ CPUFUNC_FF(op_6fa_0), 0, 1786 }, /* CALLM.L (d16,PC) */ +{ CPUFUNC_FF(op_6fb_0), 0, 1787 }, /* CALLM.L (d8,PC,Xn) */ +{ CPUFUNC(op_800_0), 0, 2048 }, /* BTST.L #.W,Dn */ +{ CPUFUNC(op_810_0), 0, 2064 }, /* BTST.B #.W,(An) */ +{ CPUFUNC(op_818_0), 0, 2072 }, /* BTST.B #.W,(An)+ */ +{ CPUFUNC(op_820_0), 0, 2080 }, /* BTST.B #.W,-(An) */ +{ CPUFUNC(op_828_0), 0, 2088 }, /* BTST.B #.W,(d16,An) */ +{ CPUFUNC(op_830_0), 0, 2096 }, /* BTST.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_838_0), 0, 2104 }, /* BTST.B #.W,(xxx).W */ +{ CPUFUNC(op_839_0), 0, 2105 }, /* BTST.B #.W,(xxx).L */ +{ CPUFUNC(op_83a_0), 0, 2106 }, /* BTST.B #.W,(d16,PC) */ +{ CPUFUNC(op_83b_0), 0, 2107 }, /* BTST.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_83c_0), 0, 2108 }, /* BTST.B #.W,#.B */ +{ CPUFUNC(op_840_0), 0, 2112 }, /* BCHG.L #.W,Dn */ +{ CPUFUNC(op_850_0), 0, 2128 }, /* BCHG.B #.W,(An) */ +{ CPUFUNC(op_858_0), 0, 2136 }, /* BCHG.B #.W,(An)+ */ +{ CPUFUNC(op_860_0), 0, 2144 }, /* BCHG.B #.W,-(An) */ +{ CPUFUNC(op_868_0), 0, 2152 }, /* BCHG.B #.W,(d16,An) */ +{ CPUFUNC(op_870_0), 0, 2160 }, /* BCHG.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_878_0), 0, 2168 }, /* BCHG.B #.W,(xxx).W */ +{ CPUFUNC(op_879_0), 0, 2169 }, /* BCHG.B #.W,(xxx).L */ +{ CPUFUNC(op_87a_0), 0, 2170 }, /* BCHG.B #.W,(d16,PC) */ +{ CPUFUNC(op_87b_0), 0, 2171 }, /* BCHG.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_880_0), 0, 2176 }, /* BCLR.L #.W,Dn */ +{ CPUFUNC(op_890_0), 0, 2192 }, /* BCLR.B #.W,(An) */ +{ CPUFUNC(op_898_0), 0, 2200 }, /* BCLR.B #.W,(An)+ */ +{ CPUFUNC(op_8a0_0), 0, 2208 }, /* BCLR.B #.W,-(An) */ +{ CPUFUNC(op_8a8_0), 0, 2216 }, /* BCLR.B #.W,(d16,An) */ +{ CPUFUNC(op_8b0_0), 0, 2224 }, /* BCLR.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_8b8_0), 0, 2232 }, /* BCLR.B #.W,(xxx).W */ +{ CPUFUNC(op_8b9_0), 0, 2233 }, /* BCLR.B #.W,(xxx).L */ +{ CPUFUNC(op_8ba_0), 0, 2234 }, /* BCLR.B #.W,(d16,PC) */ +{ CPUFUNC(op_8bb_0), 0, 2235 }, /* BCLR.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_8c0_0), 0, 2240 }, /* BSET.L #.W,Dn */ +{ CPUFUNC(op_8d0_0), 0, 2256 }, /* BSET.B #.W,(An) */ +{ CPUFUNC(op_8d8_0), 0, 2264 }, /* BSET.B #.W,(An)+ */ +{ CPUFUNC(op_8e0_0), 0, 2272 }, /* BSET.B #.W,-(An) */ +{ CPUFUNC(op_8e8_0), 0, 2280 }, /* BSET.B #.W,(d16,An) */ +{ CPUFUNC(op_8f0_0), 0, 2288 }, /* BSET.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_8f8_0), 0, 2296 }, /* BSET.B #.W,(xxx).W */ +{ CPUFUNC(op_8f9_0), 0, 2297 }, /* BSET.B #.W,(xxx).L */ +{ CPUFUNC(op_8fa_0), 0, 2298 }, /* BSET.B #.W,(d16,PC) */ +{ CPUFUNC(op_8fb_0), 0, 2299 }, /* BSET.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_a00_0), 0, 2560 }, /* EOR.B #.B,Dn */ +{ CPUFUNC(op_a10_0), 0, 2576 }, /* EOR.B #.B,(An) */ +{ CPUFUNC(op_a18_0), 0, 2584 }, /* EOR.B #.B,(An)+ */ +{ CPUFUNC(op_a20_0), 0, 2592 }, /* EOR.B #.B,-(An) */ +{ CPUFUNC(op_a28_0), 0, 2600 }, /* EOR.B #.B,(d16,An) */ +{ CPUFUNC(op_a30_0), 0, 2608 }, /* EOR.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_a38_0), 0, 2616 }, /* EOR.B #.B,(xxx).W */ +{ CPUFUNC(op_a39_0), 0, 2617 }, /* EOR.B #.B,(xxx).L */ +{ CPUFUNC(op_a3c_0), 0, 2620 }, /* EORSR.B #.W */ +{ CPUFUNC(op_a40_0), 0, 2624 }, /* EOR.W #.W,Dn */ +{ CPUFUNC(op_a50_0), 0, 2640 }, /* EOR.W #.W,(An) */ +{ CPUFUNC(op_a58_0), 0, 2648 }, /* EOR.W #.W,(An)+ */ +{ CPUFUNC(op_a60_0), 0, 2656 }, /* EOR.W #.W,-(An) */ +{ CPUFUNC(op_a68_0), 0, 2664 }, /* EOR.W #.W,(d16,An) */ +{ CPUFUNC(op_a70_0), 0, 2672 }, /* EOR.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_a78_0), 0, 2680 }, /* EOR.W #.W,(xxx).W */ +{ CPUFUNC(op_a79_0), 0, 2681 }, /* EOR.W #.W,(xxx).L */ +{ CPUFUNC(op_a7c_0), 0, 2684 }, /* EORSR.W #.W */ +{ CPUFUNC(op_a80_0), 0, 2688 }, /* EOR.L #.L,Dn */ +{ CPUFUNC(op_a90_0), 0, 2704 }, /* EOR.L #.L,(An) */ +{ CPUFUNC(op_a98_0), 0, 2712 }, /* EOR.L #.L,(An)+ */ +{ CPUFUNC(op_aa0_0), 0, 2720 }, /* EOR.L #.L,-(An) */ +{ CPUFUNC(op_aa8_0), 0, 2728 }, /* EOR.L #.L,(d16,An) */ +{ CPUFUNC(op_ab0_0), 0, 2736 }, /* EOR.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_ab8_0), 0, 2744 }, /* EOR.L #.L,(xxx).W */ +{ CPUFUNC(op_ab9_0), 0, 2745 }, /* EOR.L #.L,(xxx).L */ +{ CPUFUNC(op_ad0_0), 0, 2768 }, /* CAS.B #.W,(An) */ +{ CPUFUNC(op_ad8_0), 0, 2776 }, /* CAS.B #.W,(An)+ */ +{ CPUFUNC(op_ae0_0), 0, 2784 }, /* CAS.B #.W,-(An) */ +{ CPUFUNC(op_ae8_0), 0, 2792 }, /* CAS.B #.W,(d16,An) */ +{ CPUFUNC(op_af0_0), 0, 2800 }, /* CAS.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_af8_0), 0, 2808 }, /* CAS.B #.W,(xxx).W */ +{ CPUFUNC(op_af9_0), 0, 2809 }, /* CAS.B #.W,(xxx).L */ +{ CPUFUNC(op_c00_0), 0, 3072 }, /* CMP.B #.B,Dn */ +{ CPUFUNC(op_c10_0), 0, 3088 }, /* CMP.B #.B,(An) */ +{ CPUFUNC(op_c18_0), 0, 3096 }, /* CMP.B #.B,(An)+ */ +{ CPUFUNC(op_c20_0), 0, 3104 }, /* CMP.B #.B,-(An) */ +{ CPUFUNC(op_c28_0), 0, 3112 }, /* CMP.B #.B,(d16,An) */ +{ CPUFUNC(op_c30_0), 0, 3120 }, /* CMP.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_c38_0), 0, 3128 }, /* CMP.B #.B,(xxx).W */ +{ CPUFUNC(op_c39_0), 0, 3129 }, /* CMP.B #.B,(xxx).L */ +{ CPUFUNC(op_c3a_0), 0, 3130 }, /* CMP.B #.B,(d16,PC) */ +{ CPUFUNC(op_c3b_0), 0, 3131 }, /* CMP.B #.B,(d8,PC,Xn) */ +{ CPUFUNC(op_c40_0), 0, 3136 }, /* CMP.W #.W,Dn */ +{ CPUFUNC(op_c50_0), 0, 3152 }, /* CMP.W #.W,(An) */ +{ CPUFUNC(op_c58_0), 0, 3160 }, /* CMP.W #.W,(An)+ */ +{ CPUFUNC(op_c60_0), 0, 3168 }, /* CMP.W #.W,-(An) */ +{ CPUFUNC(op_c68_0), 0, 3176 }, /* CMP.W #.W,(d16,An) */ +{ CPUFUNC(op_c70_0), 0, 3184 }, /* CMP.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_c78_0), 0, 3192 }, /* CMP.W #.W,(xxx).W */ +{ CPUFUNC(op_c79_0), 0, 3193 }, /* CMP.W #.W,(xxx).L */ +{ CPUFUNC(op_c7a_0), 0, 3194 }, /* CMP.W #.W,(d16,PC) */ +{ CPUFUNC(op_c7b_0), 0, 3195 }, /* CMP.W #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_c80_0), 0, 3200 }, /* CMP.L #.L,Dn */ +{ CPUFUNC(op_c90_0), 0, 3216 }, /* CMP.L #.L,(An) */ +{ CPUFUNC(op_c98_0), 0, 3224 }, /* CMP.L #.L,(An)+ */ +{ CPUFUNC(op_ca0_0), 0, 3232 }, /* CMP.L #.L,-(An) */ +{ CPUFUNC(op_ca8_0), 0, 3240 }, /* CMP.L #.L,(d16,An) */ +{ CPUFUNC(op_cb0_0), 0, 3248 }, /* CMP.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_cb8_0), 0, 3256 }, /* CMP.L #.L,(xxx).W */ +{ CPUFUNC(op_cb9_0), 0, 3257 }, /* CMP.L #.L,(xxx).L */ +{ CPUFUNC(op_cba_0), 0, 3258 }, /* CMP.L #.L,(d16,PC) */ +{ CPUFUNC(op_cbb_0), 0, 3259 }, /* CMP.L #.L,(d8,PC,Xn) */ +{ CPUFUNC(op_cd0_0), 0, 3280 }, /* CAS.W #.W,(An) */ +{ CPUFUNC(op_cd8_0), 0, 3288 }, /* CAS.W #.W,(An)+ */ +{ CPUFUNC(op_ce0_0), 0, 3296 }, /* CAS.W #.W,-(An) */ +{ CPUFUNC(op_ce8_0), 0, 3304 }, /* CAS.W #.W,(d16,An) */ +{ CPUFUNC(op_cf0_0), 0, 3312 }, /* CAS.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_cf8_0), 0, 3320 }, /* CAS.W #.W,(xxx).W */ +{ CPUFUNC(op_cf9_0), 0, 3321 }, /* CAS.W #.W,(xxx).L */ +{ CPUFUNC(op_cfc_0), 0, 3324 }, /* CAS2.W #.L */ +{ CPUFUNC_FF(op_e10_0), 0, 3600 }, /* MOVES.B #.W,(An) */ +{ CPUFUNC_FF(op_e18_0), 0, 3608 }, /* MOVES.B #.W,(An)+ */ +{ CPUFUNC_FF(op_e20_0), 0, 3616 }, /* MOVES.B #.W,-(An) */ +{ CPUFUNC_FF(op_e28_0), 0, 3624 }, /* MOVES.B #.W,(d16,An) */ +{ CPUFUNC_FF(op_e30_0), 0, 3632 }, /* MOVES.B #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_e38_0), 0, 3640 }, /* MOVES.B #.W,(xxx).W */ +{ CPUFUNC_FF(op_e39_0), 0, 3641 }, /* MOVES.B #.W,(xxx).L */ +{ CPUFUNC_FF(op_e50_0), 0, 3664 }, /* MOVES.W #.W,(An) */ +{ CPUFUNC_FF(op_e58_0), 0, 3672 }, /* MOVES.W #.W,(An)+ */ +{ CPUFUNC_FF(op_e60_0), 0, 3680 }, /* MOVES.W #.W,-(An) */ +{ CPUFUNC_FF(op_e68_0), 0, 3688 }, /* MOVES.W #.W,(d16,An) */ +{ CPUFUNC_FF(op_e70_0), 0, 3696 }, /* MOVES.W #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_e78_0), 0, 3704 }, /* MOVES.W #.W,(xxx).W */ +{ CPUFUNC_FF(op_e79_0), 0, 3705 }, /* MOVES.W #.W,(xxx).L */ +{ CPUFUNC_FF(op_e90_0), 0, 3728 }, /* MOVES.L #.W,(An) */ +{ CPUFUNC_FF(op_e98_0), 0, 3736 }, /* MOVES.L #.W,(An)+ */ +{ CPUFUNC_FF(op_ea0_0), 0, 3744 }, /* MOVES.L #.W,-(An) */ +{ CPUFUNC_FF(op_ea8_0), 0, 3752 }, /* MOVES.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_eb0_0), 0, 3760 }, /* MOVES.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_eb8_0), 0, 3768 }, /* MOVES.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_eb9_0), 0, 3769 }, /* MOVES.L #.W,(xxx).L */ +{ CPUFUNC(op_ed0_0), 0, 3792 }, /* CAS.L #.W,(An) */ +{ CPUFUNC(op_ed8_0), 0, 3800 }, /* CAS.L #.W,(An)+ */ +{ CPUFUNC(op_ee0_0), 0, 3808 }, /* CAS.L #.W,-(An) */ +{ CPUFUNC(op_ee8_0), 0, 3816 }, /* CAS.L #.W,(d16,An) */ +{ CPUFUNC(op_ef0_0), 0, 3824 }, /* CAS.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_ef8_0), 0, 3832 }, /* CAS.L #.W,(xxx).W */ +{ CPUFUNC(op_ef9_0), 0, 3833 }, /* CAS.L #.W,(xxx).L */ +{ CPUFUNC(op_efc_0), 0, 3836 }, /* CAS2.L #.L */ +{ CPUFUNC(op_1000_0), 0, 4096 }, /* MOVE.B Dn,Dn */ +{ CPUFUNC(op_1010_0), 0, 4112 }, /* MOVE.B (An),Dn */ +{ CPUFUNC(op_1018_0), 0, 4120 }, /* MOVE.B (An)+,Dn */ +{ CPUFUNC(op_1020_0), 0, 4128 }, /* MOVE.B -(An),Dn */ +{ CPUFUNC(op_1028_0), 0, 4136 }, /* MOVE.B (d16,An),Dn */ +{ CPUFUNC(op_1030_0), 0, 4144 }, /* MOVE.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_1038_0), 0, 4152 }, /* MOVE.B (xxx).W,Dn */ +{ CPUFUNC(op_1039_0), 0, 4153 }, /* MOVE.B (xxx).L,Dn */ +{ CPUFUNC(op_103a_0), 0, 4154 }, /* MOVE.B (d16,PC),Dn */ +{ CPUFUNC(op_103b_0), 0, 4155 }, /* MOVE.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_103c_0), 0, 4156 }, /* MOVE.B #.B,Dn */ +{ CPUFUNC(op_1080_0), 0, 4224 }, /* MOVE.B Dn,(An) */ +{ CPUFUNC(op_1090_0), 0, 4240 }, /* MOVE.B (An),(An) */ +{ CPUFUNC(op_1098_0), 0, 4248 }, /* MOVE.B (An)+,(An) */ +{ CPUFUNC(op_10a0_0), 0, 4256 }, /* MOVE.B -(An),(An) */ +{ CPUFUNC(op_10a8_0), 0, 4264 }, /* MOVE.B (d16,An),(An) */ +{ CPUFUNC(op_10b0_0), 0, 4272 }, /* MOVE.B (d8,An,Xn),(An) */ +{ CPUFUNC(op_10b8_0), 0, 4280 }, /* MOVE.B (xxx).W,(An) */ +{ CPUFUNC(op_10b9_0), 0, 4281 }, /* MOVE.B (xxx).L,(An) */ +{ CPUFUNC(op_10ba_0), 0, 4282 }, /* MOVE.B (d16,PC),(An) */ +{ CPUFUNC(op_10bb_0), 0, 4283 }, /* MOVE.B (d8,PC,Xn),(An) */ +{ CPUFUNC(op_10bc_0), 0, 4284 }, /* MOVE.B #.B,(An) */ +{ CPUFUNC(op_10c0_0), 0, 4288 }, /* MOVE.B Dn,(An)+ */ +{ CPUFUNC(op_10d0_0), 0, 4304 }, /* MOVE.B (An),(An)+ */ +{ CPUFUNC(op_10d8_0), 0, 4312 }, /* MOVE.B (An)+,(An)+ */ +{ CPUFUNC(op_10e0_0), 0, 4320 }, /* MOVE.B -(An),(An)+ */ +{ CPUFUNC(op_10e8_0), 0, 4328 }, /* MOVE.B (d16,An),(An)+ */ +{ CPUFUNC(op_10f0_0), 0, 4336 }, /* MOVE.B (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_10f8_0), 0, 4344 }, /* MOVE.B (xxx).W,(An)+ */ +{ CPUFUNC(op_10f9_0), 0, 4345 }, /* MOVE.B (xxx).L,(An)+ */ +{ CPUFUNC(op_10fa_0), 0, 4346 }, /* MOVE.B (d16,PC),(An)+ */ +{ CPUFUNC(op_10fb_0), 0, 4347 }, /* MOVE.B (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_10fc_0), 0, 4348 }, /* MOVE.B #.B,(An)+ */ +{ CPUFUNC(op_1100_0), 0, 4352 }, /* MOVE.B Dn,-(An) */ +{ CPUFUNC(op_1110_0), 0, 4368 }, /* MOVE.B (An),-(An) */ +{ CPUFUNC(op_1118_0), 0, 4376 }, /* MOVE.B (An)+,-(An) */ +{ CPUFUNC(op_1120_0), 0, 4384 }, /* MOVE.B -(An),-(An) */ +{ CPUFUNC(op_1128_0), 0, 4392 }, /* MOVE.B (d16,An),-(An) */ +{ CPUFUNC(op_1130_0), 0, 4400 }, /* MOVE.B (d8,An,Xn),-(An) */ +{ CPUFUNC(op_1138_0), 0, 4408 }, /* MOVE.B (xxx).W,-(An) */ +{ CPUFUNC(op_1139_0), 0, 4409 }, /* MOVE.B (xxx).L,-(An) */ +{ CPUFUNC(op_113a_0), 0, 4410 }, /* MOVE.B (d16,PC),-(An) */ +{ CPUFUNC(op_113b_0), 0, 4411 }, /* MOVE.B (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_113c_0), 0, 4412 }, /* MOVE.B #.B,-(An) */ +{ CPUFUNC(op_1140_0), 0, 4416 }, /* MOVE.B Dn,(d16,An) */ +{ CPUFUNC(op_1150_0), 0, 4432 }, /* MOVE.B (An),(d16,An) */ +{ CPUFUNC(op_1158_0), 0, 4440 }, /* MOVE.B (An)+,(d16,An) */ +{ CPUFUNC(op_1160_0), 0, 4448 }, /* MOVE.B -(An),(d16,An) */ +{ CPUFUNC(op_1168_0), 0, 4456 }, /* MOVE.B (d16,An),(d16,An) */ +{ CPUFUNC(op_1170_0), 0, 4464 }, /* MOVE.B (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_1178_0), 0, 4472 }, /* MOVE.B (xxx).W,(d16,An) */ +{ CPUFUNC(op_1179_0), 0, 4473 }, /* MOVE.B (xxx).L,(d16,An) */ +{ CPUFUNC(op_117a_0), 0, 4474 }, /* MOVE.B (d16,PC),(d16,An) */ +{ CPUFUNC(op_117b_0), 0, 4475 }, /* MOVE.B (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_117c_0), 0, 4476 }, /* MOVE.B #.B,(d16,An) */ +{ CPUFUNC(op_1180_0), 0, 4480 }, /* MOVE.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1190_0), 0, 4496 }, /* MOVE.B (An),(d8,An,Xn) */ +{ CPUFUNC(op_1198_0), 0, 4504 }, /* MOVE.B (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_11a0_0), 0, 4512 }, /* MOVE.B -(An),(d8,An,Xn) */ +{ CPUFUNC(op_11a8_0), 0, 4520 }, /* MOVE.B (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_11b0_0), 0, 4528 }, /* MOVE.B (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_11b8_0), 0, 4536 }, /* MOVE.B (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_11b9_0), 0, 4537 }, /* MOVE.B (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_11ba_0), 0, 4538 }, /* MOVE.B (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_11bb_0), 0, 4539 }, /* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_11bc_0), 0, 4540 }, /* MOVE.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_11c0_0), 0, 4544 }, /* MOVE.B Dn,(xxx).W */ +{ CPUFUNC(op_11d0_0), 0, 4560 }, /* MOVE.B (An),(xxx).W */ +{ CPUFUNC(op_11d8_0), 0, 4568 }, /* MOVE.B (An)+,(xxx).W */ +{ CPUFUNC(op_11e0_0), 0, 4576 }, /* MOVE.B -(An),(xxx).W */ +{ CPUFUNC(op_11e8_0), 0, 4584 }, /* MOVE.B (d16,An),(xxx).W */ +{ CPUFUNC(op_11f0_0), 0, 4592 }, /* MOVE.B (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_11f8_0), 0, 4600 }, /* MOVE.B (xxx).W,(xxx).W */ +{ CPUFUNC(op_11f9_0), 0, 4601 }, /* MOVE.B (xxx).L,(xxx).W */ +{ CPUFUNC(op_11fa_0), 0, 4602 }, /* MOVE.B (d16,PC),(xxx).W */ +{ CPUFUNC(op_11fb_0), 0, 4603 }, /* MOVE.B (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_11fc_0), 0, 4604 }, /* MOVE.B #.B,(xxx).W */ +{ CPUFUNC(op_13c0_0), 0, 5056 }, /* MOVE.B Dn,(xxx).L */ +{ CPUFUNC(op_13d0_0), 0, 5072 }, /* MOVE.B (An),(xxx).L */ +{ CPUFUNC(op_13d8_0), 0, 5080 }, /* MOVE.B (An)+,(xxx).L */ +{ CPUFUNC(op_13e0_0), 0, 5088 }, /* MOVE.B -(An),(xxx).L */ +{ CPUFUNC(op_13e8_0), 0, 5096 }, /* MOVE.B (d16,An),(xxx).L */ +{ CPUFUNC(op_13f0_0), 0, 5104 }, /* MOVE.B (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_13f8_0), 0, 5112 }, /* MOVE.B (xxx).W,(xxx).L */ +{ CPUFUNC(op_13f9_0), 0, 5113 }, /* MOVE.B (xxx).L,(xxx).L */ +{ CPUFUNC(op_13fa_0), 0, 5114 }, /* MOVE.B (d16,PC),(xxx).L */ +{ CPUFUNC(op_13fb_0), 0, 5115 }, /* MOVE.B (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_13fc_0), 0, 5116 }, /* MOVE.B #.B,(xxx).L */ +{ CPUFUNC(op_2000_0), 0, 8192 }, /* MOVE.L Dn,Dn */ +{ CPUFUNC(op_2008_0), 0, 8200 }, /* MOVE.L An,Dn */ +{ CPUFUNC(op_2010_0), 0, 8208 }, /* MOVE.L (An),Dn */ +{ CPUFUNC(op_2018_0), 0, 8216 }, /* MOVE.L (An)+,Dn */ +{ CPUFUNC(op_2020_0), 0, 8224 }, /* MOVE.L -(An),Dn */ +{ CPUFUNC(op_2028_0), 0, 8232 }, /* MOVE.L (d16,An),Dn */ +{ CPUFUNC(op_2030_0), 0, 8240 }, /* MOVE.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_2038_0), 0, 8248 }, /* MOVE.L (xxx).W,Dn */ +{ CPUFUNC(op_2039_0), 0, 8249 }, /* MOVE.L (xxx).L,Dn */ +{ CPUFUNC(op_203a_0), 0, 8250 }, /* MOVE.L (d16,PC),Dn */ +{ CPUFUNC(op_203b_0), 0, 8251 }, /* MOVE.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_203c_0), 0, 8252 }, /* MOVE.L #.L,Dn */ +{ CPUFUNC_FF(op_2040_0), 0, 8256 }, /* MOVEA.L Dn,An */ +{ CPUFUNC_FF(op_2048_0), 0, 8264 }, /* MOVEA.L An,An */ +{ CPUFUNC_FF(op_2050_0), 0, 8272 }, /* MOVEA.L (An),An */ +{ CPUFUNC_FF(op_2058_0), 0, 8280 }, /* MOVEA.L (An)+,An */ +{ CPUFUNC_FF(op_2060_0), 0, 8288 }, /* MOVEA.L -(An),An */ +{ CPUFUNC_FF(op_2068_0), 0, 8296 }, /* MOVEA.L (d16,An),An */ +{ CPUFUNC_FF(op_2070_0), 0, 8304 }, /* MOVEA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_2078_0), 0, 8312 }, /* MOVEA.L (xxx).W,An */ +{ CPUFUNC_FF(op_2079_0), 0, 8313 }, /* MOVEA.L (xxx).L,An */ +{ CPUFUNC_FF(op_207a_0), 0, 8314 }, /* MOVEA.L (d16,PC),An */ +{ CPUFUNC_FF(op_207b_0), 0, 8315 }, /* MOVEA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_207c_0), 0, 8316 }, /* MOVEA.L #.L,An */ +{ CPUFUNC(op_2080_0), 0, 8320 }, /* MOVE.L Dn,(An) */ +{ CPUFUNC(op_2088_0), 0, 8328 }, /* MOVE.L An,(An) */ +{ CPUFUNC(op_2090_0), 0, 8336 }, /* MOVE.L (An),(An) */ +{ CPUFUNC(op_2098_0), 0, 8344 }, /* MOVE.L (An)+,(An) */ +{ CPUFUNC(op_20a0_0), 0, 8352 }, /* MOVE.L -(An),(An) */ +{ CPUFUNC(op_20a8_0), 0, 8360 }, /* MOVE.L (d16,An),(An) */ +{ CPUFUNC(op_20b0_0), 0, 8368 }, /* MOVE.L (d8,An,Xn),(An) */ +{ CPUFUNC(op_20b8_0), 0, 8376 }, /* MOVE.L (xxx).W,(An) */ +{ CPUFUNC(op_20b9_0), 0, 8377 }, /* MOVE.L (xxx).L,(An) */ +{ CPUFUNC(op_20ba_0), 0, 8378 }, /* MOVE.L (d16,PC),(An) */ +{ CPUFUNC(op_20bb_0), 0, 8379 }, /* MOVE.L (d8,PC,Xn),(An) */ +{ CPUFUNC(op_20bc_0), 0, 8380 }, /* MOVE.L #.L,(An) */ +{ CPUFUNC(op_20c0_0), 0, 8384 }, /* MOVE.L Dn,(An)+ */ +{ CPUFUNC(op_20c8_0), 0, 8392 }, /* MOVE.L An,(An)+ */ +{ CPUFUNC(op_20d0_0), 0, 8400 }, /* MOVE.L (An),(An)+ */ +{ CPUFUNC(op_20d8_0), 0, 8408 }, /* MOVE.L (An)+,(An)+ */ +{ CPUFUNC(op_20e0_0), 0, 8416 }, /* MOVE.L -(An),(An)+ */ +{ CPUFUNC(op_20e8_0), 0, 8424 }, /* MOVE.L (d16,An),(An)+ */ +{ CPUFUNC(op_20f0_0), 0, 8432 }, /* MOVE.L (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_20f8_0), 0, 8440 }, /* MOVE.L (xxx).W,(An)+ */ +{ CPUFUNC(op_20f9_0), 0, 8441 }, /* MOVE.L (xxx).L,(An)+ */ +{ CPUFUNC(op_20fa_0), 0, 8442 }, /* MOVE.L (d16,PC),(An)+ */ +{ CPUFUNC(op_20fb_0), 0, 8443 }, /* MOVE.L (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_20fc_0), 0, 8444 }, /* MOVE.L #.L,(An)+ */ +{ CPUFUNC(op_2100_0), 0, 8448 }, /* MOVE.L Dn,-(An) */ +{ CPUFUNC(op_2108_0), 0, 8456 }, /* MOVE.L An,-(An) */ +{ CPUFUNC(op_2110_0), 0, 8464 }, /* MOVE.L (An),-(An) */ +{ CPUFUNC(op_2118_0), 0, 8472 }, /* MOVE.L (An)+,-(An) */ +{ CPUFUNC(op_2120_0), 0, 8480 }, /* MOVE.L -(An),-(An) */ +{ CPUFUNC(op_2128_0), 0, 8488 }, /* MOVE.L (d16,An),-(An) */ +{ CPUFUNC(op_2130_0), 0, 8496 }, /* MOVE.L (d8,An,Xn),-(An) */ +{ CPUFUNC(op_2138_0), 0, 8504 }, /* MOVE.L (xxx).W,-(An) */ +{ CPUFUNC(op_2139_0), 0, 8505 }, /* MOVE.L (xxx).L,-(An) */ +{ CPUFUNC(op_213a_0), 0, 8506 }, /* MOVE.L (d16,PC),-(An) */ +{ CPUFUNC(op_213b_0), 0, 8507 }, /* MOVE.L (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_213c_0), 0, 8508 }, /* MOVE.L #.L,-(An) */ +{ CPUFUNC(op_2140_0), 0, 8512 }, /* MOVE.L Dn,(d16,An) */ +{ CPUFUNC(op_2148_0), 0, 8520 }, /* MOVE.L An,(d16,An) */ +{ CPUFUNC(op_2150_0), 0, 8528 }, /* MOVE.L (An),(d16,An) */ +{ CPUFUNC(op_2158_0), 0, 8536 }, /* MOVE.L (An)+,(d16,An) */ +{ CPUFUNC(op_2160_0), 0, 8544 }, /* MOVE.L -(An),(d16,An) */ +{ CPUFUNC(op_2168_0), 0, 8552 }, /* MOVE.L (d16,An),(d16,An) */ +{ CPUFUNC(op_2170_0), 0, 8560 }, /* MOVE.L (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_2178_0), 0, 8568 }, /* MOVE.L (xxx).W,(d16,An) */ +{ CPUFUNC(op_2179_0), 0, 8569 }, /* MOVE.L (xxx).L,(d16,An) */ +{ CPUFUNC(op_217a_0), 0, 8570 }, /* MOVE.L (d16,PC),(d16,An) */ +{ CPUFUNC(op_217b_0), 0, 8571 }, /* MOVE.L (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_217c_0), 0, 8572 }, /* MOVE.L #.L,(d16,An) */ +{ CPUFUNC(op_2180_0), 0, 8576 }, /* MOVE.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_2188_0), 0, 8584 }, /* MOVE.L An,(d8,An,Xn) */ +{ CPUFUNC(op_2190_0), 0, 8592 }, /* MOVE.L (An),(d8,An,Xn) */ +{ CPUFUNC(op_2198_0), 0, 8600 }, /* MOVE.L (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_21a0_0), 0, 8608 }, /* MOVE.L -(An),(d8,An,Xn) */ +{ CPUFUNC(op_21a8_0), 0, 8616 }, /* MOVE.L (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_21b0_0), 0, 8624 }, /* MOVE.L (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_21b8_0), 0, 8632 }, /* MOVE.L (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_21b9_0), 0, 8633 }, /* MOVE.L (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_21ba_0), 0, 8634 }, /* MOVE.L (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_21bb_0), 0, 8635 }, /* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_21bc_0), 0, 8636 }, /* MOVE.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_21c0_0), 0, 8640 }, /* MOVE.L Dn,(xxx).W */ +{ CPUFUNC(op_21c8_0), 0, 8648 }, /* MOVE.L An,(xxx).W */ +{ CPUFUNC(op_21d0_0), 0, 8656 }, /* MOVE.L (An),(xxx).W */ +{ CPUFUNC(op_21d8_0), 0, 8664 }, /* MOVE.L (An)+,(xxx).W */ +{ CPUFUNC(op_21e0_0), 0, 8672 }, /* MOVE.L -(An),(xxx).W */ +{ CPUFUNC(op_21e8_0), 0, 8680 }, /* MOVE.L (d16,An),(xxx).W */ +{ CPUFUNC(op_21f0_0), 0, 8688 }, /* MOVE.L (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_21f8_0), 0, 8696 }, /* MOVE.L (xxx).W,(xxx).W */ +{ CPUFUNC(op_21f9_0), 0, 8697 }, /* MOVE.L (xxx).L,(xxx).W */ +{ CPUFUNC(op_21fa_0), 0, 8698 }, /* MOVE.L (d16,PC),(xxx).W */ +{ CPUFUNC(op_21fb_0), 0, 8699 }, /* MOVE.L (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_21fc_0), 0, 8700 }, /* MOVE.L #.L,(xxx).W */ +{ CPUFUNC(op_23c0_0), 0, 9152 }, /* MOVE.L Dn,(xxx).L */ +{ CPUFUNC(op_23c8_0), 0, 9160 }, /* MOVE.L An,(xxx).L */ +{ CPUFUNC(op_23d0_0), 0, 9168 }, /* MOVE.L (An),(xxx).L */ +{ CPUFUNC(op_23d8_0), 0, 9176 }, /* MOVE.L (An)+,(xxx).L */ +{ CPUFUNC(op_23e0_0), 0, 9184 }, /* MOVE.L -(An),(xxx).L */ +{ CPUFUNC(op_23e8_0), 0, 9192 }, /* MOVE.L (d16,An),(xxx).L */ +{ CPUFUNC(op_23f0_0), 0, 9200 }, /* MOVE.L (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_23f8_0), 0, 9208 }, /* MOVE.L (xxx).W,(xxx).L */ +{ CPUFUNC(op_23f9_0), 0, 9209 }, /* MOVE.L (xxx).L,(xxx).L */ +{ CPUFUNC(op_23fa_0), 0, 9210 }, /* MOVE.L (d16,PC),(xxx).L */ +{ CPUFUNC(op_23fb_0), 0, 9211 }, /* MOVE.L (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_23fc_0), 0, 9212 }, /* MOVE.L #.L,(xxx).L */ +{ CPUFUNC(op_3000_0), 0, 12288 }, /* MOVE.W Dn,Dn */ +{ CPUFUNC(op_3008_0), 0, 12296 }, /* MOVE.W An,Dn */ +{ CPUFUNC(op_3010_0), 0, 12304 }, /* MOVE.W (An),Dn */ +{ CPUFUNC(op_3018_0), 0, 12312 }, /* MOVE.W (An)+,Dn */ +{ CPUFUNC(op_3020_0), 0, 12320 }, /* MOVE.W -(An),Dn */ +{ CPUFUNC(op_3028_0), 0, 12328 }, /* MOVE.W (d16,An),Dn */ +{ CPUFUNC(op_3030_0), 0, 12336 }, /* MOVE.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_3038_0), 0, 12344 }, /* MOVE.W (xxx).W,Dn */ +{ CPUFUNC(op_3039_0), 0, 12345 }, /* MOVE.W (xxx).L,Dn */ +{ CPUFUNC(op_303a_0), 0, 12346 }, /* MOVE.W (d16,PC),Dn */ +{ CPUFUNC(op_303b_0), 0, 12347 }, /* MOVE.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_303c_0), 0, 12348 }, /* MOVE.W #.W,Dn */ +{ CPUFUNC_FF(op_3040_0), 0, 12352 }, /* MOVEA.W Dn,An */ +{ CPUFUNC_FF(op_3048_0), 0, 12360 }, /* MOVEA.W An,An */ +{ CPUFUNC_FF(op_3050_0), 0, 12368 }, /* MOVEA.W (An),An */ +{ CPUFUNC_FF(op_3058_0), 0, 12376 }, /* MOVEA.W (An)+,An */ +{ CPUFUNC_FF(op_3060_0), 0, 12384 }, /* MOVEA.W -(An),An */ +{ CPUFUNC_FF(op_3068_0), 0, 12392 }, /* MOVEA.W (d16,An),An */ +{ CPUFUNC_FF(op_3070_0), 0, 12400 }, /* MOVEA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_3078_0), 0, 12408 }, /* MOVEA.W (xxx).W,An */ +{ CPUFUNC_FF(op_3079_0), 0, 12409 }, /* MOVEA.W (xxx).L,An */ +{ CPUFUNC_FF(op_307a_0), 0, 12410 }, /* MOVEA.W (d16,PC),An */ +{ CPUFUNC_FF(op_307b_0), 0, 12411 }, /* MOVEA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_307c_0), 0, 12412 }, /* MOVEA.W #.W,An */ +{ CPUFUNC(op_3080_0), 0, 12416 }, /* MOVE.W Dn,(An) */ +{ CPUFUNC(op_3088_0), 0, 12424 }, /* MOVE.W An,(An) */ +{ CPUFUNC(op_3090_0), 0, 12432 }, /* MOVE.W (An),(An) */ +{ CPUFUNC(op_3098_0), 0, 12440 }, /* MOVE.W (An)+,(An) */ +{ CPUFUNC(op_30a0_0), 0, 12448 }, /* MOVE.W -(An),(An) */ +{ CPUFUNC(op_30a8_0), 0, 12456 }, /* MOVE.W (d16,An),(An) */ +{ CPUFUNC(op_30b0_0), 0, 12464 }, /* MOVE.W (d8,An,Xn),(An) */ +{ CPUFUNC(op_30b8_0), 0, 12472 }, /* MOVE.W (xxx).W,(An) */ +{ CPUFUNC(op_30b9_0), 0, 12473 }, /* MOVE.W (xxx).L,(An) */ +{ CPUFUNC(op_30ba_0), 0, 12474 }, /* MOVE.W (d16,PC),(An) */ +{ CPUFUNC(op_30bb_0), 0, 12475 }, /* MOVE.W (d8,PC,Xn),(An) */ +{ CPUFUNC(op_30bc_0), 0, 12476 }, /* MOVE.W #.W,(An) */ +{ CPUFUNC(op_30c0_0), 0, 12480 }, /* MOVE.W Dn,(An)+ */ +{ CPUFUNC(op_30c8_0), 0, 12488 }, /* MOVE.W An,(An)+ */ +{ CPUFUNC(op_30d0_0), 0, 12496 }, /* MOVE.W (An),(An)+ */ +{ CPUFUNC(op_30d8_0), 0, 12504 }, /* MOVE.W (An)+,(An)+ */ +{ CPUFUNC(op_30e0_0), 0, 12512 }, /* MOVE.W -(An),(An)+ */ +{ CPUFUNC(op_30e8_0), 0, 12520 }, /* MOVE.W (d16,An),(An)+ */ +{ CPUFUNC(op_30f0_0), 0, 12528 }, /* MOVE.W (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_30f8_0), 0, 12536 }, /* MOVE.W (xxx).W,(An)+ */ +{ CPUFUNC(op_30f9_0), 0, 12537 }, /* MOVE.W (xxx).L,(An)+ */ +{ CPUFUNC(op_30fa_0), 0, 12538 }, /* MOVE.W (d16,PC),(An)+ */ +{ CPUFUNC(op_30fb_0), 0, 12539 }, /* MOVE.W (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_30fc_0), 0, 12540 }, /* MOVE.W #.W,(An)+ */ +{ CPUFUNC(op_3100_0), 0, 12544 }, /* MOVE.W Dn,-(An) */ +{ CPUFUNC(op_3108_0), 0, 12552 }, /* MOVE.W An,-(An) */ +{ CPUFUNC(op_3110_0), 0, 12560 }, /* MOVE.W (An),-(An) */ +{ CPUFUNC(op_3118_0), 0, 12568 }, /* MOVE.W (An)+,-(An) */ +{ CPUFUNC(op_3120_0), 0, 12576 }, /* MOVE.W -(An),-(An) */ +{ CPUFUNC(op_3128_0), 0, 12584 }, /* MOVE.W (d16,An),-(An) */ +{ CPUFUNC(op_3130_0), 0, 12592 }, /* MOVE.W (d8,An,Xn),-(An) */ +{ CPUFUNC(op_3138_0), 0, 12600 }, /* MOVE.W (xxx).W,-(An) */ +{ CPUFUNC(op_3139_0), 0, 12601 }, /* MOVE.W (xxx).L,-(An) */ +{ CPUFUNC(op_313a_0), 0, 12602 }, /* MOVE.W (d16,PC),-(An) */ +{ CPUFUNC(op_313b_0), 0, 12603 }, /* MOVE.W (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_313c_0), 0, 12604 }, /* MOVE.W #.W,-(An) */ +{ CPUFUNC(op_3140_0), 0, 12608 }, /* MOVE.W Dn,(d16,An) */ +{ CPUFUNC(op_3148_0), 0, 12616 }, /* MOVE.W An,(d16,An) */ +{ CPUFUNC(op_3150_0), 0, 12624 }, /* MOVE.W (An),(d16,An) */ +{ CPUFUNC(op_3158_0), 0, 12632 }, /* MOVE.W (An)+,(d16,An) */ +{ CPUFUNC(op_3160_0), 0, 12640 }, /* MOVE.W -(An),(d16,An) */ +{ CPUFUNC(op_3168_0), 0, 12648 }, /* MOVE.W (d16,An),(d16,An) */ +{ CPUFUNC(op_3170_0), 0, 12656 }, /* MOVE.W (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_3178_0), 0, 12664 }, /* MOVE.W (xxx).W,(d16,An) */ +{ CPUFUNC(op_3179_0), 0, 12665 }, /* MOVE.W (xxx).L,(d16,An) */ +{ CPUFUNC(op_317a_0), 0, 12666 }, /* MOVE.W (d16,PC),(d16,An) */ +{ CPUFUNC(op_317b_0), 0, 12667 }, /* MOVE.W (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_317c_0), 0, 12668 }, /* MOVE.W #.W,(d16,An) */ +{ CPUFUNC(op_3180_0), 0, 12672 }, /* MOVE.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_3188_0), 0, 12680 }, /* MOVE.W An,(d8,An,Xn) */ +{ CPUFUNC(op_3190_0), 0, 12688 }, /* MOVE.W (An),(d8,An,Xn) */ +{ CPUFUNC(op_3198_0), 0, 12696 }, /* MOVE.W (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_31a0_0), 0, 12704 }, /* MOVE.W -(An),(d8,An,Xn) */ +{ CPUFUNC(op_31a8_0), 0, 12712 }, /* MOVE.W (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_31b0_0), 0, 12720 }, /* MOVE.W (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_31b8_0), 0, 12728 }, /* MOVE.W (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_31b9_0), 0, 12729 }, /* MOVE.W (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_31ba_0), 0, 12730 }, /* MOVE.W (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_31bb_0), 0, 12731 }, /* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_31bc_0), 0, 12732 }, /* MOVE.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_31c0_0), 0, 12736 }, /* MOVE.W Dn,(xxx).W */ +{ CPUFUNC(op_31c8_0), 0, 12744 }, /* MOVE.W An,(xxx).W */ +{ CPUFUNC(op_31d0_0), 0, 12752 }, /* MOVE.W (An),(xxx).W */ +{ CPUFUNC(op_31d8_0), 0, 12760 }, /* MOVE.W (An)+,(xxx).W */ +{ CPUFUNC(op_31e0_0), 0, 12768 }, /* MOVE.W -(An),(xxx).W */ +{ CPUFUNC(op_31e8_0), 0, 12776 }, /* MOVE.W (d16,An),(xxx).W */ +{ CPUFUNC(op_31f0_0), 0, 12784 }, /* MOVE.W (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_31f8_0), 0, 12792 }, /* MOVE.W (xxx).W,(xxx).W */ +{ CPUFUNC(op_31f9_0), 0, 12793 }, /* MOVE.W (xxx).L,(xxx).W */ +{ CPUFUNC(op_31fa_0), 0, 12794 }, /* MOVE.W (d16,PC),(xxx).W */ +{ CPUFUNC(op_31fb_0), 0, 12795 }, /* MOVE.W (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_31fc_0), 0, 12796 }, /* MOVE.W #.W,(xxx).W */ +{ CPUFUNC(op_33c0_0), 0, 13248 }, /* MOVE.W Dn,(xxx).L */ +{ CPUFUNC(op_33c8_0), 0, 13256 }, /* MOVE.W An,(xxx).L */ +{ CPUFUNC(op_33d0_0), 0, 13264 }, /* MOVE.W (An),(xxx).L */ +{ CPUFUNC(op_33d8_0), 0, 13272 }, /* MOVE.W (An)+,(xxx).L */ +{ CPUFUNC(op_33e0_0), 0, 13280 }, /* MOVE.W -(An),(xxx).L */ +{ CPUFUNC(op_33e8_0), 0, 13288 }, /* MOVE.W (d16,An),(xxx).L */ +{ CPUFUNC(op_33f0_0), 0, 13296 }, /* MOVE.W (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_33f8_0), 0, 13304 }, /* MOVE.W (xxx).W,(xxx).L */ +{ CPUFUNC(op_33f9_0), 0, 13305 }, /* MOVE.W (xxx).L,(xxx).L */ +{ CPUFUNC(op_33fa_0), 0, 13306 }, /* MOVE.W (d16,PC),(xxx).L */ +{ CPUFUNC(op_33fb_0), 0, 13307 }, /* MOVE.W (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_33fc_0), 0, 13308 }, /* MOVE.W #.W,(xxx).L */ +{ CPUFUNC(op_4000_0), 0, 16384 }, /* NEGX.B Dn */ +{ CPUFUNC(op_4010_0), 0, 16400 }, /* NEGX.B (An) */ +{ CPUFUNC(op_4018_0), 0, 16408 }, /* NEGX.B (An)+ */ +{ CPUFUNC(op_4020_0), 0, 16416 }, /* NEGX.B -(An) */ +{ CPUFUNC(op_4028_0), 0, 16424 }, /* NEGX.B (d16,An) */ +{ CPUFUNC(op_4030_0), 0, 16432 }, /* NEGX.B (d8,An,Xn) */ +{ CPUFUNC(op_4038_0), 0, 16440 }, /* NEGX.B (xxx).W */ +{ CPUFUNC(op_4039_0), 0, 16441 }, /* NEGX.B (xxx).L */ +{ CPUFUNC(op_4040_0), 0, 16448 }, /* NEGX.W Dn */ +{ CPUFUNC(op_4050_0), 0, 16464 }, /* NEGX.W (An) */ +{ CPUFUNC(op_4058_0), 0, 16472 }, /* NEGX.W (An)+ */ +{ CPUFUNC(op_4060_0), 0, 16480 }, /* NEGX.W -(An) */ +{ CPUFUNC(op_4068_0), 0, 16488 }, /* NEGX.W (d16,An) */ +{ CPUFUNC(op_4070_0), 0, 16496 }, /* NEGX.W (d8,An,Xn) */ +{ CPUFUNC(op_4078_0), 0, 16504 }, /* NEGX.W (xxx).W */ +{ CPUFUNC(op_4079_0), 0, 16505 }, /* NEGX.W (xxx).L */ +{ CPUFUNC(op_4080_0), 0, 16512 }, /* NEGX.L Dn */ +{ CPUFUNC(op_4090_0), 0, 16528 }, /* NEGX.L (An) */ +{ CPUFUNC(op_4098_0), 0, 16536 }, /* NEGX.L (An)+ */ +{ CPUFUNC(op_40a0_0), 0, 16544 }, /* NEGX.L -(An) */ +{ CPUFUNC(op_40a8_0), 0, 16552 }, /* NEGX.L (d16,An) */ +{ CPUFUNC(op_40b0_0), 0, 16560 }, /* NEGX.L (d8,An,Xn) */ +{ CPUFUNC(op_40b8_0), 0, 16568 }, /* NEGX.L (xxx).W */ +{ CPUFUNC(op_40b9_0), 0, 16569 }, /* NEGX.L (xxx).L */ +{ CPUFUNC_FF(op_40c0_0), 0, 16576 }, /* MVSR2.W Dn */ +{ CPUFUNC_FF(op_40d0_0), 0, 16592 }, /* MVSR2.W (An) */ +{ CPUFUNC_FF(op_40d8_0), 0, 16600 }, /* MVSR2.W (An)+ */ +{ CPUFUNC_FF(op_40e0_0), 0, 16608 }, /* MVSR2.W -(An) */ +{ CPUFUNC_FF(op_40e8_0), 0, 16616 }, /* MVSR2.W (d16,An) */ +{ CPUFUNC_FF(op_40f0_0), 0, 16624 }, /* MVSR2.W (d8,An,Xn) */ +{ CPUFUNC_FF(op_40f8_0), 0, 16632 }, /* MVSR2.W (xxx).W */ +{ CPUFUNC_FF(op_40f9_0), 0, 16633 }, /* MVSR2.W (xxx).L */ +{ CPUFUNC(op_4100_0), 0, 16640 }, /* CHK.L Dn,Dn */ +{ CPUFUNC(op_4110_0), 0, 16656 }, /* CHK.L (An),Dn */ +{ CPUFUNC(op_4118_0), 0, 16664 }, /* CHK.L (An)+,Dn */ +{ CPUFUNC(op_4120_0), 0, 16672 }, /* CHK.L -(An),Dn */ +{ CPUFUNC(op_4128_0), 0, 16680 }, /* CHK.L (d16,An),Dn */ +{ CPUFUNC(op_4130_0), 0, 16688 }, /* CHK.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_4138_0), 0, 16696 }, /* CHK.L (xxx).W,Dn */ +{ CPUFUNC(op_4139_0), 0, 16697 }, /* CHK.L (xxx).L,Dn */ +{ CPUFUNC(op_413a_0), 0, 16698 }, /* CHK.L (d16,PC),Dn */ +{ CPUFUNC(op_413b_0), 0, 16699 }, /* CHK.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_413c_0), 0, 16700 }, /* CHK.L #.L,Dn */ +{ CPUFUNC(op_4180_0), 0, 16768 }, /* CHK.W Dn,Dn */ +{ CPUFUNC(op_4190_0), 0, 16784 }, /* CHK.W (An),Dn */ +{ CPUFUNC(op_4198_0), 0, 16792 }, /* CHK.W (An)+,Dn */ +{ CPUFUNC(op_41a0_0), 0, 16800 }, /* CHK.W -(An),Dn */ +{ CPUFUNC(op_41a8_0), 0, 16808 }, /* CHK.W (d16,An),Dn */ +{ CPUFUNC(op_41b0_0), 0, 16816 }, /* CHK.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_41b8_0), 0, 16824 }, /* CHK.W (xxx).W,Dn */ +{ CPUFUNC(op_41b9_0), 0, 16825 }, /* CHK.W (xxx).L,Dn */ +{ CPUFUNC(op_41ba_0), 0, 16826 }, /* CHK.W (d16,PC),Dn */ +{ CPUFUNC(op_41bb_0), 0, 16827 }, /* CHK.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_41bc_0), 0, 16828 }, /* CHK.W #.W,Dn */ +{ CPUFUNC_FF(op_41d0_0), 0, 16848 }, /* LEA.L (An),An */ +{ CPUFUNC_FF(op_41e8_0), 0, 16872 }, /* LEA.L (d16,An),An */ +{ CPUFUNC_FF(op_41f0_0), 0, 16880 }, /* LEA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_41f8_0), 0, 16888 }, /* LEA.L (xxx).W,An */ +{ CPUFUNC_FF(op_41f9_0), 0, 16889 }, /* LEA.L (xxx).L,An */ +{ CPUFUNC_FF(op_41fa_0), 0, 16890 }, /* LEA.L (d16,PC),An */ +{ CPUFUNC_FF(op_41fb_0), 0, 16891 }, /* LEA.L (d8,PC,Xn),An */ +{ CPUFUNC(op_4200_0), 0, 16896 }, /* CLR.B Dn */ +{ CPUFUNC(op_4210_0), 0, 16912 }, /* CLR.B (An) */ +{ CPUFUNC(op_4218_0), 0, 16920 }, /* CLR.B (An)+ */ +{ CPUFUNC(op_4220_0), 0, 16928 }, /* CLR.B -(An) */ +{ CPUFUNC(op_4228_0), 0, 16936 }, /* CLR.B (d16,An) */ +{ CPUFUNC(op_4230_0), 0, 16944 }, /* CLR.B (d8,An,Xn) */ +{ CPUFUNC(op_4238_0), 0, 16952 }, /* CLR.B (xxx).W */ +{ CPUFUNC(op_4239_0), 0, 16953 }, /* CLR.B (xxx).L */ +{ CPUFUNC(op_4240_0), 0, 16960 }, /* CLR.W Dn */ +{ CPUFUNC(op_4250_0), 0, 16976 }, /* CLR.W (An) */ +{ CPUFUNC(op_4258_0), 0, 16984 }, /* CLR.W (An)+ */ +{ CPUFUNC(op_4260_0), 0, 16992 }, /* CLR.W -(An) */ +{ CPUFUNC(op_4268_0), 0, 17000 }, /* CLR.W (d16,An) */ +{ CPUFUNC(op_4270_0), 0, 17008 }, /* CLR.W (d8,An,Xn) */ +{ CPUFUNC(op_4278_0), 0, 17016 }, /* CLR.W (xxx).W */ +{ CPUFUNC(op_4279_0), 0, 17017 }, /* CLR.W (xxx).L */ +{ CPUFUNC(op_4280_0), 0, 17024 }, /* CLR.L Dn */ +{ CPUFUNC(op_4290_0), 0, 17040 }, /* CLR.L (An) */ +{ CPUFUNC(op_4298_0), 0, 17048 }, /* CLR.L (An)+ */ +{ CPUFUNC(op_42a0_0), 0, 17056 }, /* CLR.L -(An) */ +{ CPUFUNC(op_42a8_0), 0, 17064 }, /* CLR.L (d16,An) */ +{ CPUFUNC(op_42b0_0), 0, 17072 }, /* CLR.L (d8,An,Xn) */ +{ CPUFUNC(op_42b8_0), 0, 17080 }, /* CLR.L (xxx).W */ +{ CPUFUNC(op_42b9_0), 0, 17081 }, /* CLR.L (xxx).L */ +{ CPUFUNC_FF(op_42c0_0), 0, 17088 }, /* MVSR2.B Dn */ +{ CPUFUNC_FF(op_42d0_0), 0, 17104 }, /* MVSR2.B (An) */ +{ CPUFUNC_FF(op_42d8_0), 0, 17112 }, /* MVSR2.B (An)+ */ +{ CPUFUNC_FF(op_42e0_0), 0, 17120 }, /* MVSR2.B -(An) */ +{ CPUFUNC_FF(op_42e8_0), 0, 17128 }, /* MVSR2.B (d16,An) */ +{ CPUFUNC_FF(op_42f0_0), 0, 17136 }, /* MVSR2.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_42f8_0), 0, 17144 }, /* MVSR2.B (xxx).W */ +{ CPUFUNC_FF(op_42f9_0), 0, 17145 }, /* MVSR2.B (xxx).L */ +{ CPUFUNC(op_4400_0), 0, 17408 }, /* NEG.B Dn */ +{ CPUFUNC(op_4410_0), 0, 17424 }, /* NEG.B (An) */ +{ CPUFUNC(op_4418_0), 0, 17432 }, /* NEG.B (An)+ */ +{ CPUFUNC(op_4420_0), 0, 17440 }, /* NEG.B -(An) */ +{ CPUFUNC(op_4428_0), 0, 17448 }, /* NEG.B (d16,An) */ +{ CPUFUNC(op_4430_0), 0, 17456 }, /* NEG.B (d8,An,Xn) */ +{ CPUFUNC(op_4438_0), 0, 17464 }, /* NEG.B (xxx).W */ +{ CPUFUNC(op_4439_0), 0, 17465 }, /* NEG.B (xxx).L */ +{ CPUFUNC(op_4440_0), 0, 17472 }, /* NEG.W Dn */ +{ CPUFUNC(op_4450_0), 0, 17488 }, /* NEG.W (An) */ +{ CPUFUNC(op_4458_0), 0, 17496 }, /* NEG.W (An)+ */ +{ CPUFUNC(op_4460_0), 0, 17504 }, /* NEG.W -(An) */ +{ CPUFUNC(op_4468_0), 0, 17512 }, /* NEG.W (d16,An) */ +{ CPUFUNC(op_4470_0), 0, 17520 }, /* NEG.W (d8,An,Xn) */ +{ CPUFUNC(op_4478_0), 0, 17528 }, /* NEG.W (xxx).W */ +{ CPUFUNC(op_4479_0), 0, 17529 }, /* NEG.W (xxx).L */ +{ CPUFUNC(op_4480_0), 0, 17536 }, /* NEG.L Dn */ +{ CPUFUNC(op_4490_0), 0, 17552 }, /* NEG.L (An) */ +{ CPUFUNC(op_4498_0), 0, 17560 }, /* NEG.L (An)+ */ +{ CPUFUNC(op_44a0_0), 0, 17568 }, /* NEG.L -(An) */ +{ CPUFUNC(op_44a8_0), 0, 17576 }, /* NEG.L (d16,An) */ +{ CPUFUNC(op_44b0_0), 0, 17584 }, /* NEG.L (d8,An,Xn) */ +{ CPUFUNC(op_44b8_0), 0, 17592 }, /* NEG.L (xxx).W */ +{ CPUFUNC(op_44b9_0), 0, 17593 }, /* NEG.L (xxx).L */ +{ CPUFUNC(op_44c0_0), 0, 17600 }, /* MV2SR.B Dn */ +{ CPUFUNC(op_44d0_0), 0, 17616 }, /* MV2SR.B (An) */ +{ CPUFUNC(op_44d8_0), 0, 17624 }, /* MV2SR.B (An)+ */ +{ CPUFUNC(op_44e0_0), 0, 17632 }, /* MV2SR.B -(An) */ +{ CPUFUNC(op_44e8_0), 0, 17640 }, /* MV2SR.B (d16,An) */ +{ CPUFUNC(op_44f0_0), 0, 17648 }, /* MV2SR.B (d8,An,Xn) */ +{ CPUFUNC(op_44f8_0), 0, 17656 }, /* MV2SR.B (xxx).W */ +{ CPUFUNC(op_44f9_0), 0, 17657 }, /* MV2SR.B (xxx).L */ +{ CPUFUNC(op_44fa_0), 0, 17658 }, /* MV2SR.B (d16,PC) */ +{ CPUFUNC(op_44fb_0), 0, 17659 }, /* MV2SR.B (d8,PC,Xn) */ +{ CPUFUNC(op_44fc_0), 0, 17660 }, /* MV2SR.B #.B */ +{ CPUFUNC(op_4600_0), 0, 17920 }, /* NOT.B Dn */ +{ CPUFUNC(op_4610_0), 0, 17936 }, /* NOT.B (An) */ +{ CPUFUNC(op_4618_0), 0, 17944 }, /* NOT.B (An)+ */ +{ CPUFUNC(op_4620_0), 0, 17952 }, /* NOT.B -(An) */ +{ CPUFUNC(op_4628_0), 0, 17960 }, /* NOT.B (d16,An) */ +{ CPUFUNC(op_4630_0), 0, 17968 }, /* NOT.B (d8,An,Xn) */ +{ CPUFUNC(op_4638_0), 0, 17976 }, /* NOT.B (xxx).W */ +{ CPUFUNC(op_4639_0), 0, 17977 }, /* NOT.B (xxx).L */ +{ CPUFUNC(op_4640_0), 0, 17984 }, /* NOT.W Dn */ +{ CPUFUNC(op_4650_0), 0, 18000 }, /* NOT.W (An) */ +{ CPUFUNC(op_4658_0), 0, 18008 }, /* NOT.W (An)+ */ +{ CPUFUNC(op_4660_0), 0, 18016 }, /* NOT.W -(An) */ +{ CPUFUNC(op_4668_0), 0, 18024 }, /* NOT.W (d16,An) */ +{ CPUFUNC(op_4670_0), 0, 18032 }, /* NOT.W (d8,An,Xn) */ +{ CPUFUNC(op_4678_0), 0, 18040 }, /* NOT.W (xxx).W */ +{ CPUFUNC(op_4679_0), 0, 18041 }, /* NOT.W (xxx).L */ +{ CPUFUNC(op_4680_0), 0, 18048 }, /* NOT.L Dn */ +{ CPUFUNC(op_4690_0), 0, 18064 }, /* NOT.L (An) */ +{ CPUFUNC(op_4698_0), 0, 18072 }, /* NOT.L (An)+ */ +{ CPUFUNC(op_46a0_0), 0, 18080 }, /* NOT.L -(An) */ +{ CPUFUNC(op_46a8_0), 0, 18088 }, /* NOT.L (d16,An) */ +{ CPUFUNC(op_46b0_0), 0, 18096 }, /* NOT.L (d8,An,Xn) */ +{ CPUFUNC(op_46b8_0), 0, 18104 }, /* NOT.L (xxx).W */ +{ CPUFUNC(op_46b9_0), 0, 18105 }, /* NOT.L (xxx).L */ +{ CPUFUNC(op_46c0_0), 0, 18112 }, /* MV2SR.W Dn */ +{ CPUFUNC(op_46d0_0), 0, 18128 }, /* MV2SR.W (An) */ +{ CPUFUNC(op_46d8_0), 0, 18136 }, /* MV2SR.W (An)+ */ +{ CPUFUNC(op_46e0_0), 0, 18144 }, /* MV2SR.W -(An) */ +{ CPUFUNC(op_46e8_0), 0, 18152 }, /* MV2SR.W (d16,An) */ +{ CPUFUNC(op_46f0_0), 0, 18160 }, /* MV2SR.W (d8,An,Xn) */ +{ CPUFUNC(op_46f8_0), 0, 18168 }, /* MV2SR.W (xxx).W */ +{ CPUFUNC(op_46f9_0), 0, 18169 }, /* MV2SR.W (xxx).L */ +{ CPUFUNC(op_46fa_0), 0, 18170 }, /* MV2SR.W (d16,PC) */ +{ CPUFUNC(op_46fb_0), 0, 18171 }, /* MV2SR.W (d8,PC,Xn) */ +{ CPUFUNC(op_46fc_0), 0, 18172 }, /* MV2SR.W #.W */ +{ CPUFUNC(op_4800_1), 0, 18432 }, /* NBCD.B Dn */ +{ CPUFUNC_FF(op_4808_0), 0, 18440 }, /* LINK.L An,#.L */ +{ CPUFUNC(op_4810_1), 0, 18448 }, /* NBCD.B (An) */ +{ CPUFUNC(op_4818_1), 0, 18456 }, /* NBCD.B (An)+ */ +{ CPUFUNC(op_4820_1), 0, 18464 }, /* NBCD.B -(An) */ +{ CPUFUNC(op_4828_1), 0, 18472 }, /* NBCD.B (d16,An) */ +{ CPUFUNC(op_4830_1), 0, 18480 }, /* NBCD.B (d8,An,Xn) */ +{ CPUFUNC(op_4838_1), 0, 18488 }, /* NBCD.B (xxx).W */ +{ CPUFUNC(op_4839_1), 0, 18489 }, /* NBCD.B (xxx).L */ +{ CPUFUNC(op_4840_0), 0, 18496 }, /* SWAP.W Dn */ +{ CPUFUNC_FF(op_4848_0), 0, 18504 }, /* BKPT.L # */ +{ CPUFUNC_FF(op_4850_0), 0, 18512 }, /* PEA.L (An) */ +{ CPUFUNC_FF(op_4868_0), 0, 18536 }, /* PEA.L (d16,An) */ +{ CPUFUNC_FF(op_4870_0), 0, 18544 }, /* PEA.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4878_0), 0, 18552 }, /* PEA.L (xxx).W */ +{ CPUFUNC_FF(op_4879_0), 0, 18553 }, /* PEA.L (xxx).L */ +{ CPUFUNC_FF(op_487a_0), 0, 18554 }, /* PEA.L (d16,PC) */ +{ CPUFUNC_FF(op_487b_0), 0, 18555 }, /* PEA.L (d8,PC,Xn) */ +{ CPUFUNC(op_4880_0), 0, 18560 }, /* EXT.W Dn */ +{ CPUFUNC_FF(op_4890_0), 0, 18576 }, /* MVMLE.W #.W,(An) */ +{ CPUFUNC_FF(op_48a0_0), 0, 18592 }, /* MVMLE.W #.W,-(An) */ +{ CPUFUNC_FF(op_48a8_0), 0, 18600 }, /* MVMLE.W #.W,(d16,An) */ +{ CPUFUNC_FF(op_48b0_0), 0, 18608 }, /* MVMLE.W #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_48b8_0), 0, 18616 }, /* MVMLE.W #.W,(xxx).W */ +{ CPUFUNC_FF(op_48b9_0), 0, 18617 }, /* MVMLE.W #.W,(xxx).L */ +{ CPUFUNC(op_48c0_0), 0, 18624 }, /* EXT.L Dn */ +{ CPUFUNC_FF(op_48d0_0), 0, 18640 }, /* MVMLE.L #.W,(An) */ +{ CPUFUNC_FF(op_48e0_0), 0, 18656 }, /* MVMLE.L #.W,-(An) */ +{ CPUFUNC_FF(op_48e8_0), 0, 18664 }, /* MVMLE.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_48f0_0), 0, 18672 }, /* MVMLE.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_48f8_0), 0, 18680 }, /* MVMLE.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_48f9_0), 0, 18681 }, /* MVMLE.L #.W,(xxx).L */ +{ CPUFUNC(op_49c0_0), 0, 18880 }, /* EXT.B Dn */ +{ CPUFUNC(op_4a00_0), 0, 18944 }, /* TST.B Dn */ +{ CPUFUNC(op_4a10_0), 0, 18960 }, /* TST.B (An) */ +{ CPUFUNC(op_4a18_0), 0, 18968 }, /* TST.B (An)+ */ +{ CPUFUNC(op_4a20_0), 0, 18976 }, /* TST.B -(An) */ +{ CPUFUNC(op_4a28_0), 0, 18984 }, /* TST.B (d16,An) */ +{ CPUFUNC(op_4a30_0), 0, 18992 }, /* TST.B (d8,An,Xn) */ +{ CPUFUNC(op_4a38_0), 0, 19000 }, /* TST.B (xxx).W */ +{ CPUFUNC(op_4a39_0), 0, 19001 }, /* TST.B (xxx).L */ +{ CPUFUNC(op_4a3a_0), 0, 19002 }, /* TST.B (d16,PC) */ +{ CPUFUNC(op_4a3b_0), 0, 19003 }, /* TST.B (d8,PC,Xn) */ +{ CPUFUNC(op_4a3c_0), 0, 19004 }, /* TST.B #.B */ +{ CPUFUNC(op_4a40_0), 0, 19008 }, /* TST.W Dn */ +{ CPUFUNC(op_4a48_0), 0, 19016 }, /* TST.W An */ +{ CPUFUNC(op_4a50_0), 0, 19024 }, /* TST.W (An) */ +{ CPUFUNC(op_4a58_0), 0, 19032 }, /* TST.W (An)+ */ +{ CPUFUNC(op_4a60_0), 0, 19040 }, /* TST.W -(An) */ +{ CPUFUNC(op_4a68_0), 0, 19048 }, /* TST.W (d16,An) */ +{ CPUFUNC(op_4a70_0), 0, 19056 }, /* TST.W (d8,An,Xn) */ +{ CPUFUNC(op_4a78_0), 0, 19064 }, /* TST.W (xxx).W */ +{ CPUFUNC(op_4a79_0), 0, 19065 }, /* TST.W (xxx).L */ +{ CPUFUNC(op_4a7a_0), 0, 19066 }, /* TST.W (d16,PC) */ +{ CPUFUNC(op_4a7b_0), 0, 19067 }, /* TST.W (d8,PC,Xn) */ +{ CPUFUNC(op_4a7c_0), 0, 19068 }, /* TST.W #.W */ +{ CPUFUNC(op_4a80_0), 0, 19072 }, /* TST.L Dn */ +{ CPUFUNC(op_4a88_0), 0, 19080 }, /* TST.L An */ +{ CPUFUNC(op_4a90_0), 0, 19088 }, /* TST.L (An) */ +{ CPUFUNC(op_4a98_0), 0, 19096 }, /* TST.L (An)+ */ +{ CPUFUNC(op_4aa0_0), 0, 19104 }, /* TST.L -(An) */ +{ CPUFUNC(op_4aa8_0), 0, 19112 }, /* TST.L (d16,An) */ +{ CPUFUNC(op_4ab0_0), 0, 19120 }, /* TST.L (d8,An,Xn) */ +{ CPUFUNC(op_4ab8_0), 0, 19128 }, /* TST.L (xxx).W */ +{ CPUFUNC(op_4ab9_0), 0, 19129 }, /* TST.L (xxx).L */ +{ CPUFUNC(op_4aba_0), 0, 19130 }, /* TST.L (d16,PC) */ +{ CPUFUNC(op_4abb_0), 0, 19131 }, /* TST.L (d8,PC,Xn) */ +{ CPUFUNC(op_4abc_0), 0, 19132 }, /* TST.L #.L */ +{ CPUFUNC(op_4ac0_0), 0, 19136 }, /* TAS.B Dn */ +{ CPUFUNC(op_4ad0_0), 0, 19152 }, /* TAS.B (An) */ +{ CPUFUNC(op_4ad8_0), 0, 19160 }, /* TAS.B (An)+ */ +{ CPUFUNC(op_4ae0_0), 0, 19168 }, /* TAS.B -(An) */ +{ CPUFUNC(op_4ae8_0), 0, 19176 }, /* TAS.B (d16,An) */ +{ CPUFUNC(op_4af0_0), 0, 19184 }, /* TAS.B (d8,An,Xn) */ +{ CPUFUNC(op_4af8_0), 0, 19192 }, /* TAS.B (xxx).W */ +{ CPUFUNC(op_4af9_0), 0, 19193 }, /* TAS.B (xxx).L */ +{ CPUFUNC(op_4c00_0), 0, 19456 }, /* MULL.L #.W,Dn */ +{ CPUFUNC(op_4c10_0), 0, 19472 }, /* MULL.L #.W,(An) */ +{ CPUFUNC(op_4c18_0), 0, 19480 }, /* MULL.L #.W,(An)+ */ +{ CPUFUNC(op_4c20_0), 0, 19488 }, /* MULL.L #.W,-(An) */ +{ CPUFUNC(op_4c28_0), 0, 19496 }, /* MULL.L #.W,(d16,An) */ +{ CPUFUNC(op_4c30_0), 0, 19504 }, /* MULL.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_4c38_0), 0, 19512 }, /* MULL.L #.W,(xxx).W */ +{ CPUFUNC(op_4c39_0), 0, 19513 }, /* MULL.L #.W,(xxx).L */ +{ CPUFUNC(op_4c3a_0), 0, 19514 }, /* MULL.L #.W,(d16,PC) */ +{ CPUFUNC(op_4c3b_0), 0, 19515 }, /* MULL.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_4c3c_0), 0, 19516 }, /* MULL.L #.W,#.L */ +{ CPUFUNC(op_4c40_0), 0, 19520 }, /* DIVL.L #.W,Dn */ +{ CPUFUNC(op_4c50_0), 0, 19536 }, /* DIVL.L #.W,(An) */ +{ CPUFUNC(op_4c58_0), 0, 19544 }, /* DIVL.L #.W,(An)+ */ +{ CPUFUNC(op_4c60_0), 0, 19552 }, /* DIVL.L #.W,-(An) */ +{ CPUFUNC(op_4c68_0), 0, 19560 }, /* DIVL.L #.W,(d16,An) */ +{ CPUFUNC(op_4c70_0), 0, 19568 }, /* DIVL.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_4c78_0), 0, 19576 }, /* DIVL.L #.W,(xxx).W */ +{ CPUFUNC(op_4c79_0), 0, 19577 }, /* DIVL.L #.W,(xxx).L */ +{ CPUFUNC(op_4c7a_0), 0, 19578 }, /* DIVL.L #.W,(d16,PC) */ +{ CPUFUNC(op_4c7b_0), 0, 19579 }, /* DIVL.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_4c7c_0), 0, 19580 }, /* DIVL.L #.W,#.L */ +{ CPUFUNC_FF(op_4c90_0), 0, 19600 }, /* MVMEL.W #.W,(An) */ +{ CPUFUNC_FF(op_4c98_0), 0, 19608 }, /* MVMEL.W #.W,(An)+ */ +{ CPUFUNC_FF(op_4ca8_0), 0, 19624 }, /* MVMEL.W #.W,(d16,An) */ +{ CPUFUNC_FF(op_4cb0_0), 0, 19632 }, /* MVMEL.W #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_4cb8_0), 0, 19640 }, /* MVMEL.W #.W,(xxx).W */ +{ CPUFUNC_FF(op_4cb9_0), 0, 19641 }, /* MVMEL.W #.W,(xxx).L */ +{ CPUFUNC_FF(op_4cba_0), 0, 19642 }, /* MVMEL.W #.W,(d16,PC) */ +{ CPUFUNC_FF(op_4cbb_0), 0, 19643 }, /* MVMEL.W #.W,(d8,PC,Xn) */ +{ CPUFUNC_FF(op_4cd0_0), 0, 19664 }, /* MVMEL.L #.W,(An) */ +{ CPUFUNC_FF(op_4cd8_0), 0, 19672 }, /* MVMEL.L #.W,(An)+ */ +{ CPUFUNC_FF(op_4ce8_0), 0, 19688 }, /* MVMEL.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_4cf0_0), 0, 19696 }, /* MVMEL.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_4cf8_0), 0, 19704 }, /* MVMEL.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_4cf9_0), 0, 19705 }, /* MVMEL.L #.W,(xxx).L */ +{ CPUFUNC_FF(op_4cfa_0), 0, 19706 }, /* MVMEL.L #.W,(d16,PC) */ +{ CPUFUNC_FF(op_4cfb_0), 0, 19707 }, /* MVMEL.L #.W,(d8,PC,Xn) */ +{ CPUFUNC_FF(op_4e40_0), 0, 20032 }, /* TRAP.L # */ +{ CPUFUNC_FF(op_4e50_0), 0, 20048 }, /* LINK.W An,#.W */ +{ CPUFUNC_FF(op_4e58_0), 0, 20056 }, /* UNLK.L An */ +{ CPUFUNC_FF(op_4e60_0), 0, 20064 }, /* MVR2USP.L An */ +{ CPUFUNC_FF(op_4e68_0), 0, 20072 }, /* MVUSP2R.L An */ +{ CPUFUNC_FF(op_4e70_0), 0, 20080 }, /* RESET.L */ +{ CPUFUNC_FF(op_4e71_0), 0, 20081 }, /* NOP.L */ +{ CPUFUNC(op_4e72_0), 0, 20082 }, /* STOP.L #.W */ +{ CPUFUNC(op_4e73_0), 0, 20083 }, /* RTE.L */ +{ CPUFUNC_FF(op_4e74_0), 0, 20084 }, /* RTD.L #.W */ +{ CPUFUNC_FF(op_4e75_0), 0, 20085 }, /* RTS.L */ +{ CPUFUNC_FF(op_4e76_0), 0, 20086 }, /* TRAPV.L */ +{ CPUFUNC(op_4e77_0), 0, 20087 }, /* RTR.L */ +{ CPUFUNC_FF(op_4e7a_0), 0, 20090 }, /* MOVEC2.L #.W */ +{ CPUFUNC_FF(op_4e7b_0), 0, 20091 }, /* MOVE2C.L #.W */ +{ CPUFUNC_FF(op_4e90_0), 0, 20112 }, /* JSR.L (An) */ +{ CPUFUNC_FF(op_4ea8_0), 0, 20136 }, /* JSR.L (d16,An) */ +{ CPUFUNC_FF(op_4eb0_0), 0, 20144 }, /* JSR.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4eb8_0), 0, 20152 }, /* JSR.L (xxx).W */ +{ CPUFUNC_FF(op_4eb9_0), 0, 20153 }, /* JSR.L (xxx).L */ +{ CPUFUNC_FF(op_4eba_0), 0, 20154 }, /* JSR.L (d16,PC) */ +{ CPUFUNC_FF(op_4ebb_0), 0, 20155 }, /* JSR.L (d8,PC,Xn) */ +{ CPUFUNC_FF(op_4ed0_0), 0, 20176 }, /* JMP.L (An) */ +{ CPUFUNC_FF(op_4ee8_0), 0, 20200 }, /* JMP.L (d16,An) */ +{ CPUFUNC_FF(op_4ef0_0), 0, 20208 }, /* JMP.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4ef8_0), 0, 20216 }, /* JMP.L (xxx).W */ +{ CPUFUNC_FF(op_4ef9_0), 0, 20217 }, /* JMP.L (xxx).L */ +{ CPUFUNC_FF(op_4efa_0), 0, 20218 }, /* JMP.L (d16,PC) */ +{ CPUFUNC_FF(op_4efb_0), 0, 20219 }, /* JMP.L (d8,PC,Xn) */ +{ CPUFUNC(op_5000_0), 0, 20480 }, /* ADD.B #,Dn */ +{ CPUFUNC(op_5010_0), 0, 20496 }, /* ADD.B #,(An) */ +{ CPUFUNC(op_5018_0), 0, 20504 }, /* ADD.B #,(An)+ */ +{ CPUFUNC(op_5020_0), 0, 20512 }, /* ADD.B #,-(An) */ +{ CPUFUNC(op_5028_0), 0, 20520 }, /* ADD.B #,(d16,An) */ +{ CPUFUNC(op_5030_0), 0, 20528 }, /* ADD.B #,(d8,An,Xn) */ +{ CPUFUNC(op_5038_0), 0, 20536 }, /* ADD.B #,(xxx).W */ +{ CPUFUNC(op_5039_0), 0, 20537 }, /* ADD.B #,(xxx).L */ +{ CPUFUNC(op_5040_0), 0, 20544 }, /* ADD.W #,Dn */ +{ CPUFUNC_FF(op_5048_0), 0, 20552 }, /* ADDA.W #,An */ +{ CPUFUNC(op_5050_0), 0, 20560 }, /* ADD.W #,(An) */ +{ CPUFUNC(op_5058_0), 0, 20568 }, /* ADD.W #,(An)+ */ +{ CPUFUNC(op_5060_0), 0, 20576 }, /* ADD.W #,-(An) */ +{ CPUFUNC(op_5068_0), 0, 20584 }, /* ADD.W #,(d16,An) */ +{ CPUFUNC(op_5070_0), 0, 20592 }, /* ADD.W #,(d8,An,Xn) */ +{ CPUFUNC(op_5078_0), 0, 20600 }, /* ADD.W #,(xxx).W */ +{ CPUFUNC(op_5079_0), 0, 20601 }, /* ADD.W #,(xxx).L */ +{ CPUFUNC(op_5080_0), 0, 20608 }, /* ADD.L #,Dn */ +{ CPUFUNC_FF(op_5088_0), 0, 20616 }, /* ADDA.L #,An */ +{ CPUFUNC(op_5090_0), 0, 20624 }, /* ADD.L #,(An) */ +{ CPUFUNC(op_5098_0), 0, 20632 }, /* ADD.L #,(An)+ */ +{ CPUFUNC(op_50a0_0), 0, 20640 }, /* ADD.L #,-(An) */ +{ CPUFUNC(op_50a8_0), 0, 20648 }, /* ADD.L #,(d16,An) */ +{ CPUFUNC(op_50b0_0), 0, 20656 }, /* ADD.L #,(d8,An,Xn) */ +{ CPUFUNC(op_50b8_0), 0, 20664 }, /* ADD.L #,(xxx).W */ +{ CPUFUNC(op_50b9_0), 0, 20665 }, /* ADD.L #,(xxx).L */ +{ CPUFUNC_FF(op_50c0_0), 0, 20672 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_50c8_0), 0, 20680 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_50d0_0), 0, 20688 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_50d8_0), 0, 20696 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_50e0_0), 0, 20704 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_50e8_0), 0, 20712 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_50f0_0), 0, 20720 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_50f8_0), 0, 20728 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_50f9_0), 0, 20729 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_50fa_0), 0, 20730 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_50fb_0), 0, 20731 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_50fc_0), 0, 20732 }, /* TRAPcc.L */ +{ CPUFUNC(op_5100_0), 0, 20736 }, /* SUB.B #,Dn */ +{ CPUFUNC(op_5110_0), 0, 20752 }, /* SUB.B #,(An) */ +{ CPUFUNC(op_5118_0), 0, 20760 }, /* SUB.B #,(An)+ */ +{ CPUFUNC(op_5120_0), 0, 20768 }, /* SUB.B #,-(An) */ +{ CPUFUNC(op_5128_0), 0, 20776 }, /* SUB.B #,(d16,An) */ +{ CPUFUNC(op_5130_0), 0, 20784 }, /* SUB.B #,(d8,An,Xn) */ +{ CPUFUNC(op_5138_0), 0, 20792 }, /* SUB.B #,(xxx).W */ +{ CPUFUNC(op_5139_0), 0, 20793 }, /* SUB.B #,(xxx).L */ +{ CPUFUNC(op_5140_0), 0, 20800 }, /* SUB.W #,Dn */ +{ CPUFUNC_FF(op_5148_0), 0, 20808 }, /* SUBA.W #,An */ +{ CPUFUNC(op_5150_0), 0, 20816 }, /* SUB.W #,(An) */ +{ CPUFUNC(op_5158_0), 0, 20824 }, /* SUB.W #,(An)+ */ +{ CPUFUNC(op_5160_0), 0, 20832 }, /* SUB.W #,-(An) */ +{ CPUFUNC(op_5168_0), 0, 20840 }, /* SUB.W #,(d16,An) */ +{ CPUFUNC(op_5170_0), 0, 20848 }, /* SUB.W #,(d8,An,Xn) */ +{ CPUFUNC(op_5178_0), 0, 20856 }, /* SUB.W #,(xxx).W */ +{ CPUFUNC(op_5179_0), 0, 20857 }, /* SUB.W #,(xxx).L */ +{ CPUFUNC(op_5180_0), 0, 20864 }, /* SUB.L #,Dn */ +{ CPUFUNC_FF(op_5188_0), 0, 20872 }, /* SUBA.L #,An */ +{ CPUFUNC(op_5190_0), 0, 20880 }, /* SUB.L #,(An) */ +{ CPUFUNC(op_5198_0), 0, 20888 }, /* SUB.L #,(An)+ */ +{ CPUFUNC(op_51a0_0), 0, 20896 }, /* SUB.L #,-(An) */ +{ CPUFUNC(op_51a8_0), 0, 20904 }, /* SUB.L #,(d16,An) */ +{ CPUFUNC(op_51b0_0), 0, 20912 }, /* SUB.L #,(d8,An,Xn) */ +{ CPUFUNC(op_51b8_0), 0, 20920 }, /* SUB.L #,(xxx).W */ +{ CPUFUNC(op_51b9_0), 0, 20921 }, /* SUB.L #,(xxx).L */ +{ CPUFUNC_FF(op_51c0_0), 0, 20928 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_51c8_0), 0, 20936 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_51d0_0), 0, 20944 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_51d8_0), 0, 20952 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_51e0_0), 0, 20960 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_51e8_0), 0, 20968 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_51f0_0), 0, 20976 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_51f8_0), 0, 20984 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_51f9_0), 0, 20985 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_51fa_0), 0, 20986 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_51fb_0), 0, 20987 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_51fc_0), 0, 20988 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_52c0_0), 0, 21184 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_52c8_0), 0, 21192 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_52d0_0), 0, 21200 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_52d8_0), 0, 21208 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_52e0_0), 0, 21216 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_52e8_0), 0, 21224 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_52f0_0), 0, 21232 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_52f8_0), 0, 21240 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_52f9_0), 0, 21241 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_52fa_0), 0, 21242 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_52fb_0), 0, 21243 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_52fc_0), 0, 21244 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_53c0_0), 0, 21440 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_53c8_0), 0, 21448 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_53d0_0), 0, 21456 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_53d8_0), 0, 21464 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_53e0_0), 0, 21472 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_53e8_0), 0, 21480 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_53f0_0), 0, 21488 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_53f8_0), 0, 21496 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_53f9_0), 0, 21497 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_53fa_0), 0, 21498 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_53fb_0), 0, 21499 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_53fc_0), 0, 21500 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_54c0_0), 0, 21696 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_54c8_0), 0, 21704 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_54d0_0), 0, 21712 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_54d8_0), 0, 21720 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_54e0_0), 0, 21728 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_54e8_0), 0, 21736 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_54f0_0), 0, 21744 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_54f8_0), 0, 21752 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_54f9_0), 0, 21753 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_54fa_0), 0, 21754 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_54fb_0), 0, 21755 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_54fc_0), 0, 21756 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_55c0_0), 0, 21952 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_55c8_0), 0, 21960 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_55d0_0), 0, 21968 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_55d8_0), 0, 21976 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_55e0_0), 0, 21984 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_55e8_0), 0, 21992 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_55f0_0), 0, 22000 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_55f8_0), 0, 22008 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_55f9_0), 0, 22009 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_55fa_0), 0, 22010 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_55fb_0), 0, 22011 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_55fc_0), 0, 22012 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_56c0_0), 0, 22208 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_56c8_0), 0, 22216 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_56d0_0), 0, 22224 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_56d8_0), 0, 22232 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_56e0_0), 0, 22240 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_56e8_0), 0, 22248 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_56f0_0), 0, 22256 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_56f8_0), 0, 22264 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_56f9_0), 0, 22265 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_56fa_0), 0, 22266 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_56fb_0), 0, 22267 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_56fc_0), 0, 22268 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_57c0_0), 0, 22464 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_57c8_0), 0, 22472 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_57d0_0), 0, 22480 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_57d8_0), 0, 22488 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_57e0_0), 0, 22496 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_57e8_0), 0, 22504 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_57f0_0), 0, 22512 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_57f8_0), 0, 22520 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_57f9_0), 0, 22521 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_57fa_0), 0, 22522 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_57fb_0), 0, 22523 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_57fc_0), 0, 22524 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_58c0_0), 0, 22720 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_58c8_0), 0, 22728 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_58d0_0), 0, 22736 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_58d8_0), 0, 22744 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_58e0_0), 0, 22752 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_58e8_0), 0, 22760 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_58f0_0), 0, 22768 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_58f8_0), 0, 22776 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_58f9_0), 0, 22777 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_58fa_0), 0, 22778 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_58fb_0), 0, 22779 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_58fc_0), 0, 22780 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_59c0_0), 0, 22976 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_59c8_0), 0, 22984 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_59d0_0), 0, 22992 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_59d8_0), 0, 23000 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_59e0_0), 0, 23008 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_59e8_0), 0, 23016 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_59f0_0), 0, 23024 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_59f8_0), 0, 23032 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_59f9_0), 0, 23033 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_59fa_0), 0, 23034 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_59fb_0), 0, 23035 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_59fc_0), 0, 23036 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5ac0_0), 0, 23232 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5ac8_0), 0, 23240 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5ad0_0), 0, 23248 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5ad8_0), 0, 23256 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ae0_0), 0, 23264 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ae8_0), 0, 23272 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5af0_0), 0, 23280 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5af8_0), 0, 23288 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5af9_0), 0, 23289 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5afa_0), 0, 23290 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5afb_0), 0, 23291 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5afc_0), 0, 23292 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5bc0_0), 0, 23488 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5bc8_0), 0, 23496 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5bd0_0), 0, 23504 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5bd8_0), 0, 23512 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5be0_0), 0, 23520 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5be8_0), 0, 23528 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5bf0_0), 0, 23536 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5bf8_0), 0, 23544 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5bf9_0), 0, 23545 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5bfa_0), 0, 23546 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5bfb_0), 0, 23547 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5bfc_0), 0, 23548 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5cc0_0), 0, 23744 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5cc8_0), 0, 23752 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5cd0_0), 0, 23760 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5cd8_0), 0, 23768 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ce0_0), 0, 23776 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ce8_0), 0, 23784 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5cf0_0), 0, 23792 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5cf8_0), 0, 23800 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5cf9_0), 0, 23801 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5cfa_0), 0, 23802 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5cfb_0), 0, 23803 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5cfc_0), 0, 23804 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5dc0_0), 0, 24000 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5dc8_0), 0, 24008 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5dd0_0), 0, 24016 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5dd8_0), 0, 24024 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5de0_0), 0, 24032 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5de8_0), 0, 24040 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5df0_0), 0, 24048 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5df8_0), 0, 24056 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5df9_0), 0, 24057 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5dfa_0), 0, 24058 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5dfb_0), 0, 24059 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5dfc_0), 0, 24060 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5ec0_0), 0, 24256 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5ec8_0), 0, 24264 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5ed0_0), 0, 24272 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5ed8_0), 0, 24280 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ee0_0), 0, 24288 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ee8_0), 0, 24296 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5ef0_0), 0, 24304 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5ef8_0), 0, 24312 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5ef9_0), 0, 24313 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5efa_0), 0, 24314 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5efb_0), 0, 24315 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5efc_0), 0, 24316 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5fc0_0), 0, 24512 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5fc8_0), 0, 24520 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5fd0_0), 0, 24528 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5fd8_0), 0, 24536 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5fe0_0), 0, 24544 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5fe8_0), 0, 24552 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5ff0_0), 0, 24560 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5ff8_0), 0, 24568 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5ff9_0), 0, 24569 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5ffa_0), 0, 24570 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5ffb_0), 0, 24571 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5ffc_0), 0, 24572 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_6000_0), 0, 24576 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6001_0), 0, 24577 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_60ff_0), 0, 24831 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6100_0), 0, 24832 }, /* BSR.W #.W */ +{ CPUFUNC_FF(op_6101_0), 0, 24833 }, /* BSR.B # */ +{ CPUFUNC_FF(op_61ff_0), 0, 25087 }, /* BSR.L #.L */ +{ CPUFUNC_FF(op_6200_0), 0, 25088 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6201_0), 0, 25089 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_62ff_0), 0, 25343 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6300_0), 0, 25344 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6301_0), 0, 25345 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_63ff_0), 0, 25599 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6400_0), 0, 25600 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6401_0), 0, 25601 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_64ff_0), 0, 25855 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6500_0), 0, 25856 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6501_0), 0, 25857 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_65ff_0), 0, 26111 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6600_0), 0, 26112 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6601_0), 0, 26113 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_66ff_0), 0, 26367 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6700_0), 0, 26368 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6701_0), 0, 26369 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_67ff_0), 0, 26623 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6800_0), 0, 26624 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6801_0), 0, 26625 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_68ff_0), 0, 26879 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6900_0), 0, 26880 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6901_0), 0, 26881 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_69ff_0), 0, 27135 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6a00_0), 0, 27136 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6a01_0), 0, 27137 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6aff_0), 0, 27391 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6b00_0), 0, 27392 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6b01_0), 0, 27393 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6bff_0), 0, 27647 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6c00_0), 0, 27648 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6c01_0), 0, 27649 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6cff_0), 0, 27903 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6d00_0), 0, 27904 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6d01_0), 0, 27905 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6dff_0), 0, 28159 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6e00_0), 0, 28160 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6e01_0), 0, 28161 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6eff_0), 0, 28415 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6f00_0), 0, 28416 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6f01_0), 0, 28417 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6fff_0), 0, 28671 }, /* Bcc.L #.L */ +{ CPUFUNC(op_7000_0), 0, 28672 }, /* MOVE.L #,Dn */ +{ CPUFUNC_FF(op_7100_0), 0, 28928 }, /* EMULOP_RETURN.L */ +{ CPUFUNC_FF(op_7101_0), 0, 28929 }, /* EMULOP.L # */ +{ CPUFUNC(op_8000_0), 0, 32768 }, /* OR.B Dn,Dn */ +{ CPUFUNC(op_8010_0), 0, 32784 }, /* OR.B (An),Dn */ +{ CPUFUNC(op_8018_0), 0, 32792 }, /* OR.B (An)+,Dn */ +{ CPUFUNC(op_8020_0), 0, 32800 }, /* OR.B -(An),Dn */ +{ CPUFUNC(op_8028_0), 0, 32808 }, /* OR.B (d16,An),Dn */ +{ CPUFUNC(op_8030_0), 0, 32816 }, /* OR.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_8038_0), 0, 32824 }, /* OR.B (xxx).W,Dn */ +{ CPUFUNC(op_8039_0), 0, 32825 }, /* OR.B (xxx).L,Dn */ +{ CPUFUNC(op_803a_0), 0, 32826 }, /* OR.B (d16,PC),Dn */ +{ CPUFUNC(op_803b_0), 0, 32827 }, /* OR.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_803c_0), 0, 32828 }, /* OR.B #.B,Dn */ +{ CPUFUNC(op_8040_0), 0, 32832 }, /* OR.W Dn,Dn */ +{ CPUFUNC(op_8050_0), 0, 32848 }, /* OR.W (An),Dn */ +{ CPUFUNC(op_8058_0), 0, 32856 }, /* OR.W (An)+,Dn */ +{ CPUFUNC(op_8060_0), 0, 32864 }, /* OR.W -(An),Dn */ +{ CPUFUNC(op_8068_0), 0, 32872 }, /* OR.W (d16,An),Dn */ +{ CPUFUNC(op_8070_0), 0, 32880 }, /* OR.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_8078_0), 0, 32888 }, /* OR.W (xxx).W,Dn */ +{ CPUFUNC(op_8079_0), 0, 32889 }, /* OR.W (xxx).L,Dn */ +{ CPUFUNC(op_807a_0), 0, 32890 }, /* OR.W (d16,PC),Dn */ +{ CPUFUNC(op_807b_0), 0, 32891 }, /* OR.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_807c_0), 0, 32892 }, /* OR.W #.W,Dn */ +{ CPUFUNC(op_8080_0), 0, 32896 }, /* OR.L Dn,Dn */ +{ CPUFUNC(op_8090_0), 0, 32912 }, /* OR.L (An),Dn */ +{ CPUFUNC(op_8098_0), 0, 32920 }, /* OR.L (An)+,Dn */ +{ CPUFUNC(op_80a0_0), 0, 32928 }, /* OR.L -(An),Dn */ +{ CPUFUNC(op_80a8_0), 0, 32936 }, /* OR.L (d16,An),Dn */ +{ CPUFUNC(op_80b0_0), 0, 32944 }, /* OR.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_80b8_0), 0, 32952 }, /* OR.L (xxx).W,Dn */ +{ CPUFUNC(op_80b9_0), 0, 32953 }, /* OR.L (xxx).L,Dn */ +{ CPUFUNC(op_80ba_0), 0, 32954 }, /* OR.L (d16,PC),Dn */ +{ CPUFUNC(op_80bb_0), 0, 32955 }, /* OR.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_80bc_0), 0, 32956 }, /* OR.L #.L,Dn */ +{ CPUFUNC(op_80c0_0), 0, 32960 }, /* DIVU.W Dn,Dn */ +{ CPUFUNC(op_80d0_0), 0, 32976 }, /* DIVU.W (An),Dn */ +{ CPUFUNC(op_80d8_0), 0, 32984 }, /* DIVU.W (An)+,Dn */ +{ CPUFUNC(op_80e0_0), 0, 32992 }, /* DIVU.W -(An),Dn */ +{ CPUFUNC(op_80e8_0), 0, 33000 }, /* DIVU.W (d16,An),Dn */ +{ CPUFUNC(op_80f0_0), 0, 33008 }, /* DIVU.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_80f8_0), 0, 33016 }, /* DIVU.W (xxx).W,Dn */ +{ CPUFUNC(op_80f9_0), 0, 33017 }, /* DIVU.W (xxx).L,Dn */ +{ CPUFUNC(op_80fa_0), 0, 33018 }, /* DIVU.W (d16,PC),Dn */ +{ CPUFUNC(op_80fb_0), 0, 33019 }, /* DIVU.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_80fc_0), 0, 33020 }, /* DIVU.W #.W,Dn */ +{ CPUFUNC(op_8100_1), 0, 33024 }, /* SBCD.B Dn,Dn */ +{ CPUFUNC(op_8108_1), 0, 33032 }, /* SBCD.B -(An),-(An) */ +{ CPUFUNC(op_8110_0), 0, 33040 }, /* OR.B Dn,(An) */ +{ CPUFUNC(op_8118_0), 0, 33048 }, /* OR.B Dn,(An)+ */ +{ CPUFUNC(op_8120_0), 0, 33056 }, /* OR.B Dn,-(An) */ +{ CPUFUNC(op_8128_0), 0, 33064 }, /* OR.B Dn,(d16,An) */ +{ CPUFUNC(op_8130_0), 0, 33072 }, /* OR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_8138_0), 0, 33080 }, /* OR.B Dn,(xxx).W */ +{ CPUFUNC(op_8139_0), 0, 33081 }, /* OR.B Dn,(xxx).L */ +{ CPUFUNC_FF(op_8140_0), 0, 33088 }, /* PACK.L Dn,Dn */ +{ CPUFUNC_FF(op_8148_0), 0, 33096 }, /* PACK.L -(An),-(An) */ +{ CPUFUNC(op_8150_0), 0, 33104 }, /* OR.W Dn,(An) */ +{ CPUFUNC(op_8158_0), 0, 33112 }, /* OR.W Dn,(An)+ */ +{ CPUFUNC(op_8160_0), 0, 33120 }, /* OR.W Dn,-(An) */ +{ CPUFUNC(op_8168_0), 0, 33128 }, /* OR.W Dn,(d16,An) */ +{ CPUFUNC(op_8170_0), 0, 33136 }, /* OR.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_8178_0), 0, 33144 }, /* OR.W Dn,(xxx).W */ +{ CPUFUNC(op_8179_0), 0, 33145 }, /* OR.W Dn,(xxx).L */ +{ CPUFUNC_FF(op_8180_0), 0, 33152 }, /* UNPK.L Dn,Dn */ +{ CPUFUNC_FF(op_8188_0), 0, 33160 }, /* UNPK.L -(An),-(An) */ +{ CPUFUNC(op_8190_0), 0, 33168 }, /* OR.L Dn,(An) */ +{ CPUFUNC(op_8198_0), 0, 33176 }, /* OR.L Dn,(An)+ */ +{ CPUFUNC(op_81a0_0), 0, 33184 }, /* OR.L Dn,-(An) */ +{ CPUFUNC(op_81a8_0), 0, 33192 }, /* OR.L Dn,(d16,An) */ +{ CPUFUNC(op_81b0_0), 0, 33200 }, /* OR.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_81b8_0), 0, 33208 }, /* OR.L Dn,(xxx).W */ +{ CPUFUNC(op_81b9_0), 0, 33209 }, /* OR.L Dn,(xxx).L */ +{ CPUFUNC(op_81c0_0), 0, 33216 }, /* DIVS.W Dn,Dn */ +{ CPUFUNC(op_81d0_0), 0, 33232 }, /* DIVS.W (An),Dn */ +{ CPUFUNC(op_81d8_0), 0, 33240 }, /* DIVS.W (An)+,Dn */ +{ CPUFUNC(op_81e0_0), 0, 33248 }, /* DIVS.W -(An),Dn */ +{ CPUFUNC(op_81e8_0), 0, 33256 }, /* DIVS.W (d16,An),Dn */ +{ CPUFUNC(op_81f0_0), 0, 33264 }, /* DIVS.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_81f8_0), 0, 33272 }, /* DIVS.W (xxx).W,Dn */ +{ CPUFUNC(op_81f9_0), 0, 33273 }, /* DIVS.W (xxx).L,Dn */ +{ CPUFUNC(op_81fa_0), 0, 33274 }, /* DIVS.W (d16,PC),Dn */ +{ CPUFUNC(op_81fb_0), 0, 33275 }, /* DIVS.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_81fc_0), 0, 33276 }, /* DIVS.W #.W,Dn */ +{ CPUFUNC(op_9000_0), 0, 36864 }, /* SUB.B Dn,Dn */ +{ CPUFUNC(op_9010_0), 0, 36880 }, /* SUB.B (An),Dn */ +{ CPUFUNC(op_9018_0), 0, 36888 }, /* SUB.B (An)+,Dn */ +{ CPUFUNC(op_9020_0), 0, 36896 }, /* SUB.B -(An),Dn */ +{ CPUFUNC(op_9028_0), 0, 36904 }, /* SUB.B (d16,An),Dn */ +{ CPUFUNC(op_9030_0), 0, 36912 }, /* SUB.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_9038_0), 0, 36920 }, /* SUB.B (xxx).W,Dn */ +{ CPUFUNC(op_9039_0), 0, 36921 }, /* SUB.B (xxx).L,Dn */ +{ CPUFUNC(op_903a_0), 0, 36922 }, /* SUB.B (d16,PC),Dn */ +{ CPUFUNC(op_903b_0), 0, 36923 }, /* SUB.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_903c_0), 0, 36924 }, /* SUB.B #.B,Dn */ +{ CPUFUNC(op_9040_0), 0, 36928 }, /* SUB.W Dn,Dn */ +{ CPUFUNC(op_9048_0), 0, 36936 }, /* SUB.W An,Dn */ +{ CPUFUNC(op_9050_0), 0, 36944 }, /* SUB.W (An),Dn */ +{ CPUFUNC(op_9058_0), 0, 36952 }, /* SUB.W (An)+,Dn */ +{ CPUFUNC(op_9060_0), 0, 36960 }, /* SUB.W -(An),Dn */ +{ CPUFUNC(op_9068_0), 0, 36968 }, /* SUB.W (d16,An),Dn */ +{ CPUFUNC(op_9070_0), 0, 36976 }, /* SUB.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_9078_0), 0, 36984 }, /* SUB.W (xxx).W,Dn */ +{ CPUFUNC(op_9079_0), 0, 36985 }, /* SUB.W (xxx).L,Dn */ +{ CPUFUNC(op_907a_0), 0, 36986 }, /* SUB.W (d16,PC),Dn */ +{ CPUFUNC(op_907b_0), 0, 36987 }, /* SUB.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_907c_0), 0, 36988 }, /* SUB.W #.W,Dn */ +{ CPUFUNC(op_9080_0), 0, 36992 }, /* SUB.L Dn,Dn */ +{ CPUFUNC(op_9088_0), 0, 37000 }, /* SUB.L An,Dn */ +{ CPUFUNC(op_9090_0), 0, 37008 }, /* SUB.L (An),Dn */ +{ CPUFUNC(op_9098_0), 0, 37016 }, /* SUB.L (An)+,Dn */ +{ CPUFUNC(op_90a0_0), 0, 37024 }, /* SUB.L -(An),Dn */ +{ CPUFUNC(op_90a8_0), 0, 37032 }, /* SUB.L (d16,An),Dn */ +{ CPUFUNC(op_90b0_0), 0, 37040 }, /* SUB.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_90b8_0), 0, 37048 }, /* SUB.L (xxx).W,Dn */ +{ CPUFUNC(op_90b9_0), 0, 37049 }, /* SUB.L (xxx).L,Dn */ +{ CPUFUNC(op_90ba_0), 0, 37050 }, /* SUB.L (d16,PC),Dn */ +{ CPUFUNC(op_90bb_0), 0, 37051 }, /* SUB.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_90bc_0), 0, 37052 }, /* SUB.L #.L,Dn */ +{ CPUFUNC_FF(op_90c0_0), 0, 37056 }, /* SUBA.W Dn,An */ +{ CPUFUNC_FF(op_90c8_0), 0, 37064 }, /* SUBA.W An,An */ +{ CPUFUNC_FF(op_90d0_0), 0, 37072 }, /* SUBA.W (An),An */ +{ CPUFUNC_FF(op_90d8_0), 0, 37080 }, /* SUBA.W (An)+,An */ +{ CPUFUNC_FF(op_90e0_0), 0, 37088 }, /* SUBA.W -(An),An */ +{ CPUFUNC_FF(op_90e8_0), 0, 37096 }, /* SUBA.W (d16,An),An */ +{ CPUFUNC_FF(op_90f0_0), 0, 37104 }, /* SUBA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_90f8_0), 0, 37112 }, /* SUBA.W (xxx).W,An */ +{ CPUFUNC_FF(op_90f9_0), 0, 37113 }, /* SUBA.W (xxx).L,An */ +{ CPUFUNC_FF(op_90fa_0), 0, 37114 }, /* SUBA.W (d16,PC),An */ +{ CPUFUNC_FF(op_90fb_0), 0, 37115 }, /* SUBA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_90fc_0), 0, 37116 }, /* SUBA.W #.W,An */ +{ CPUFUNC(op_9100_0), 0, 37120 }, /* SUBX.B Dn,Dn */ +{ CPUFUNC(op_9108_0), 0, 37128 }, /* SUBX.B -(An),-(An) */ +{ CPUFUNC(op_9110_0), 0, 37136 }, /* SUB.B Dn,(An) */ +{ CPUFUNC(op_9118_0), 0, 37144 }, /* SUB.B Dn,(An)+ */ +{ CPUFUNC(op_9120_0), 0, 37152 }, /* SUB.B Dn,-(An) */ +{ CPUFUNC(op_9128_0), 0, 37160 }, /* SUB.B Dn,(d16,An) */ +{ CPUFUNC(op_9130_0), 0, 37168 }, /* SUB.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_9138_0), 0, 37176 }, /* SUB.B Dn,(xxx).W */ +{ CPUFUNC(op_9139_0), 0, 37177 }, /* SUB.B Dn,(xxx).L */ +{ CPUFUNC(op_9140_0), 0, 37184 }, /* SUBX.W Dn,Dn */ +{ CPUFUNC(op_9148_0), 0, 37192 }, /* SUBX.W -(An),-(An) */ +{ CPUFUNC(op_9150_0), 0, 37200 }, /* SUB.W Dn,(An) */ +{ CPUFUNC(op_9158_0), 0, 37208 }, /* SUB.W Dn,(An)+ */ +{ CPUFUNC(op_9160_0), 0, 37216 }, /* SUB.W Dn,-(An) */ +{ CPUFUNC(op_9168_0), 0, 37224 }, /* SUB.W Dn,(d16,An) */ +{ CPUFUNC(op_9170_0), 0, 37232 }, /* SUB.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_9178_0), 0, 37240 }, /* SUB.W Dn,(xxx).W */ +{ CPUFUNC(op_9179_0), 0, 37241 }, /* SUB.W Dn,(xxx).L */ +{ CPUFUNC(op_9180_0), 0, 37248 }, /* SUBX.L Dn,Dn */ +{ CPUFUNC(op_9188_0), 0, 37256 }, /* SUBX.L -(An),-(An) */ +{ CPUFUNC(op_9190_0), 0, 37264 }, /* SUB.L Dn,(An) */ +{ CPUFUNC(op_9198_0), 0, 37272 }, /* SUB.L Dn,(An)+ */ +{ CPUFUNC(op_91a0_0), 0, 37280 }, /* SUB.L Dn,-(An) */ +{ CPUFUNC(op_91a8_0), 0, 37288 }, /* SUB.L Dn,(d16,An) */ +{ CPUFUNC(op_91b0_0), 0, 37296 }, /* SUB.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_91b8_0), 0, 37304 }, /* SUB.L Dn,(xxx).W */ +{ CPUFUNC(op_91b9_0), 0, 37305 }, /* SUB.L Dn,(xxx).L */ +{ CPUFUNC_FF(op_91c0_0), 0, 37312 }, /* SUBA.L Dn,An */ +{ CPUFUNC_FF(op_91c8_0), 0, 37320 }, /* SUBA.L An,An */ +{ CPUFUNC_FF(op_91d0_0), 0, 37328 }, /* SUBA.L (An),An */ +{ CPUFUNC_FF(op_91d8_0), 0, 37336 }, /* SUBA.L (An)+,An */ +{ CPUFUNC_FF(op_91e0_0), 0, 37344 }, /* SUBA.L -(An),An */ +{ CPUFUNC_FF(op_91e8_0), 0, 37352 }, /* SUBA.L (d16,An),An */ +{ CPUFUNC_FF(op_91f0_0), 0, 37360 }, /* SUBA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_91f8_0), 0, 37368 }, /* SUBA.L (xxx).W,An */ +{ CPUFUNC_FF(op_91f9_0), 0, 37369 }, /* SUBA.L (xxx).L,An */ +{ CPUFUNC_FF(op_91fa_0), 0, 37370 }, /* SUBA.L (d16,PC),An */ +{ CPUFUNC_FF(op_91fb_0), 0, 37371 }, /* SUBA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_91fc_0), 0, 37372 }, /* SUBA.L #.L,An */ +{ CPUFUNC(op_b000_0), 0, 45056 }, /* CMP.B Dn,Dn */ +{ CPUFUNC(op_b010_0), 0, 45072 }, /* CMP.B (An),Dn */ +{ CPUFUNC(op_b018_0), 0, 45080 }, /* CMP.B (An)+,Dn */ +{ CPUFUNC(op_b020_0), 0, 45088 }, /* CMP.B -(An),Dn */ +{ CPUFUNC(op_b028_0), 0, 45096 }, /* CMP.B (d16,An),Dn */ +{ CPUFUNC(op_b030_0), 0, 45104 }, /* CMP.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_b038_0), 0, 45112 }, /* CMP.B (xxx).W,Dn */ +{ CPUFUNC(op_b039_0), 0, 45113 }, /* CMP.B (xxx).L,Dn */ +{ CPUFUNC(op_b03a_0), 0, 45114 }, /* CMP.B (d16,PC),Dn */ +{ CPUFUNC(op_b03b_0), 0, 45115 }, /* CMP.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b03c_0), 0, 45116 }, /* CMP.B #.B,Dn */ +{ CPUFUNC(op_b040_0), 0, 45120 }, /* CMP.W Dn,Dn */ +{ CPUFUNC(op_b048_0), 0, 45128 }, /* CMP.W An,Dn */ +{ CPUFUNC(op_b050_0), 0, 45136 }, /* CMP.W (An),Dn */ +{ CPUFUNC(op_b058_0), 0, 45144 }, /* CMP.W (An)+,Dn */ +{ CPUFUNC(op_b060_0), 0, 45152 }, /* CMP.W -(An),Dn */ +{ CPUFUNC(op_b068_0), 0, 45160 }, /* CMP.W (d16,An),Dn */ +{ CPUFUNC(op_b070_0), 0, 45168 }, /* CMP.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_b078_0), 0, 45176 }, /* CMP.W (xxx).W,Dn */ +{ CPUFUNC(op_b079_0), 0, 45177 }, /* CMP.W (xxx).L,Dn */ +{ CPUFUNC(op_b07a_0), 0, 45178 }, /* CMP.W (d16,PC),Dn */ +{ CPUFUNC(op_b07b_0), 0, 45179 }, /* CMP.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b07c_0), 0, 45180 }, /* CMP.W #.W,Dn */ +{ CPUFUNC(op_b080_0), 0, 45184 }, /* CMP.L Dn,Dn */ +{ CPUFUNC(op_b088_0), 0, 45192 }, /* CMP.L An,Dn */ +{ CPUFUNC(op_b090_0), 0, 45200 }, /* CMP.L (An),Dn */ +{ CPUFUNC(op_b098_0), 0, 45208 }, /* CMP.L (An)+,Dn */ +{ CPUFUNC(op_b0a0_0), 0, 45216 }, /* CMP.L -(An),Dn */ +{ CPUFUNC(op_b0a8_0), 0, 45224 }, /* CMP.L (d16,An),Dn */ +{ CPUFUNC(op_b0b0_0), 0, 45232 }, /* CMP.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_b0b8_0), 0, 45240 }, /* CMP.L (xxx).W,Dn */ +{ CPUFUNC(op_b0b9_0), 0, 45241 }, /* CMP.L (xxx).L,Dn */ +{ CPUFUNC(op_b0ba_0), 0, 45242 }, /* CMP.L (d16,PC),Dn */ +{ CPUFUNC(op_b0bb_0), 0, 45243 }, /* CMP.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b0bc_0), 0, 45244 }, /* CMP.L #.L,Dn */ +{ CPUFUNC(op_b0c0_0), 0, 45248 }, /* CMPA.W Dn,An */ +{ CPUFUNC(op_b0c8_0), 0, 45256 }, /* CMPA.W An,An */ +{ CPUFUNC(op_b0d0_0), 0, 45264 }, /* CMPA.W (An),An */ +{ CPUFUNC(op_b0d8_0), 0, 45272 }, /* CMPA.W (An)+,An */ +{ CPUFUNC(op_b0e0_0), 0, 45280 }, /* CMPA.W -(An),An */ +{ CPUFUNC(op_b0e8_0), 0, 45288 }, /* CMPA.W (d16,An),An */ +{ CPUFUNC(op_b0f0_0), 0, 45296 }, /* CMPA.W (d8,An,Xn),An */ +{ CPUFUNC(op_b0f8_0), 0, 45304 }, /* CMPA.W (xxx).W,An */ +{ CPUFUNC(op_b0f9_0), 0, 45305 }, /* CMPA.W (xxx).L,An */ +{ CPUFUNC(op_b0fa_0), 0, 45306 }, /* CMPA.W (d16,PC),An */ +{ CPUFUNC(op_b0fb_0), 0, 45307 }, /* CMPA.W (d8,PC,Xn),An */ +{ CPUFUNC(op_b0fc_0), 0, 45308 }, /* CMPA.W #.W,An */ +{ CPUFUNC(op_b100_0), 0, 45312 }, /* EOR.B Dn,Dn */ +{ CPUFUNC(op_b108_0), 0, 45320 }, /* CMPM.B (An)+,(An)+ */ +{ CPUFUNC(op_b110_0), 0, 45328 }, /* EOR.B Dn,(An) */ +{ CPUFUNC(op_b118_0), 0, 45336 }, /* EOR.B Dn,(An)+ */ +{ CPUFUNC(op_b120_0), 0, 45344 }, /* EOR.B Dn,-(An) */ +{ CPUFUNC(op_b128_0), 0, 45352 }, /* EOR.B Dn,(d16,An) */ +{ CPUFUNC(op_b130_0), 0, 45360 }, /* EOR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b138_0), 0, 45368 }, /* EOR.B Dn,(xxx).W */ +{ CPUFUNC(op_b139_0), 0, 45369 }, /* EOR.B Dn,(xxx).L */ +{ CPUFUNC(op_b140_0), 0, 45376 }, /* EOR.W Dn,Dn */ +{ CPUFUNC(op_b148_0), 0, 45384 }, /* CMPM.W (An)+,(An)+ */ +{ CPUFUNC(op_b150_0), 0, 45392 }, /* EOR.W Dn,(An) */ +{ CPUFUNC(op_b158_0), 0, 45400 }, /* EOR.W Dn,(An)+ */ +{ CPUFUNC(op_b160_0), 0, 45408 }, /* EOR.W Dn,-(An) */ +{ CPUFUNC(op_b168_0), 0, 45416 }, /* EOR.W Dn,(d16,An) */ +{ CPUFUNC(op_b170_0), 0, 45424 }, /* EOR.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b178_0), 0, 45432 }, /* EOR.W Dn,(xxx).W */ +{ CPUFUNC(op_b179_0), 0, 45433 }, /* EOR.W Dn,(xxx).L */ +{ CPUFUNC(op_b180_0), 0, 45440 }, /* EOR.L Dn,Dn */ +{ CPUFUNC(op_b188_0), 0, 45448 }, /* CMPM.L (An)+,(An)+ */ +{ CPUFUNC(op_b190_0), 0, 45456 }, /* EOR.L Dn,(An) */ +{ CPUFUNC(op_b198_0), 0, 45464 }, /* EOR.L Dn,(An)+ */ +{ CPUFUNC(op_b1a0_0), 0, 45472 }, /* EOR.L Dn,-(An) */ +{ CPUFUNC(op_b1a8_0), 0, 45480 }, /* EOR.L Dn,(d16,An) */ +{ CPUFUNC(op_b1b0_0), 0, 45488 }, /* EOR.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b1b8_0), 0, 45496 }, /* EOR.L Dn,(xxx).W */ +{ CPUFUNC(op_b1b9_0), 0, 45497 }, /* EOR.L Dn,(xxx).L */ +{ CPUFUNC(op_b1c0_0), 0, 45504 }, /* CMPA.L Dn,An */ +{ CPUFUNC(op_b1c8_0), 0, 45512 }, /* CMPA.L An,An */ +{ CPUFUNC(op_b1d0_0), 0, 45520 }, /* CMPA.L (An),An */ +{ CPUFUNC(op_b1d8_0), 0, 45528 }, /* CMPA.L (An)+,An */ +{ CPUFUNC(op_b1e0_0), 0, 45536 }, /* CMPA.L -(An),An */ +{ CPUFUNC(op_b1e8_0), 0, 45544 }, /* CMPA.L (d16,An),An */ +{ CPUFUNC(op_b1f0_0), 0, 45552 }, /* CMPA.L (d8,An,Xn),An */ +{ CPUFUNC(op_b1f8_0), 0, 45560 }, /* CMPA.L (xxx).W,An */ +{ CPUFUNC(op_b1f9_0), 0, 45561 }, /* CMPA.L (xxx).L,An */ +{ CPUFUNC(op_b1fa_0), 0, 45562 }, /* CMPA.L (d16,PC),An */ +{ CPUFUNC(op_b1fb_0), 0, 45563 }, /* CMPA.L (d8,PC,Xn),An */ +{ CPUFUNC(op_b1fc_0), 0, 45564 }, /* CMPA.L #.L,An */ +{ CPUFUNC(op_c000_0), 0, 49152 }, /* AND.B Dn,Dn */ +{ CPUFUNC(op_c010_0), 0, 49168 }, /* AND.B (An),Dn */ +{ CPUFUNC(op_c018_0), 0, 49176 }, /* AND.B (An)+,Dn */ +{ CPUFUNC(op_c020_0), 0, 49184 }, /* AND.B -(An),Dn */ +{ CPUFUNC(op_c028_0), 0, 49192 }, /* AND.B (d16,An),Dn */ +{ CPUFUNC(op_c030_0), 0, 49200 }, /* AND.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_c038_0), 0, 49208 }, /* AND.B (xxx).W,Dn */ +{ CPUFUNC(op_c039_0), 0, 49209 }, /* AND.B (xxx).L,Dn */ +{ CPUFUNC(op_c03a_0), 0, 49210 }, /* AND.B (d16,PC),Dn */ +{ CPUFUNC(op_c03b_0), 0, 49211 }, /* AND.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c03c_0), 0, 49212 }, /* AND.B #.B,Dn */ +{ CPUFUNC(op_c040_0), 0, 49216 }, /* AND.W Dn,Dn */ +{ CPUFUNC(op_c050_0), 0, 49232 }, /* AND.W (An),Dn */ +{ CPUFUNC(op_c058_0), 0, 49240 }, /* AND.W (An)+,Dn */ +{ CPUFUNC(op_c060_0), 0, 49248 }, /* AND.W -(An),Dn */ +{ CPUFUNC(op_c068_0), 0, 49256 }, /* AND.W (d16,An),Dn */ +{ CPUFUNC(op_c070_0), 0, 49264 }, /* AND.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c078_0), 0, 49272 }, /* AND.W (xxx).W,Dn */ +{ CPUFUNC(op_c079_0), 0, 49273 }, /* AND.W (xxx).L,Dn */ +{ CPUFUNC(op_c07a_0), 0, 49274 }, /* AND.W (d16,PC),Dn */ +{ CPUFUNC(op_c07b_0), 0, 49275 }, /* AND.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c07c_0), 0, 49276 }, /* AND.W #.W,Dn */ +{ CPUFUNC(op_c080_0), 0, 49280 }, /* AND.L Dn,Dn */ +{ CPUFUNC(op_c090_0), 0, 49296 }, /* AND.L (An),Dn */ +{ CPUFUNC(op_c098_0), 0, 49304 }, /* AND.L (An)+,Dn */ +{ CPUFUNC(op_c0a0_0), 0, 49312 }, /* AND.L -(An),Dn */ +{ CPUFUNC(op_c0a8_0), 0, 49320 }, /* AND.L (d16,An),Dn */ +{ CPUFUNC(op_c0b0_0), 0, 49328 }, /* AND.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_c0b8_0), 0, 49336 }, /* AND.L (xxx).W,Dn */ +{ CPUFUNC(op_c0b9_0), 0, 49337 }, /* AND.L (xxx).L,Dn */ +{ CPUFUNC(op_c0ba_0), 0, 49338 }, /* AND.L (d16,PC),Dn */ +{ CPUFUNC(op_c0bb_0), 0, 49339 }, /* AND.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c0bc_0), 0, 49340 }, /* AND.L #.L,Dn */ +{ CPUFUNC(op_c0c0_0), 0, 49344 }, /* MULU.W Dn,Dn */ +{ CPUFUNC(op_c0d0_0), 0, 49360 }, /* MULU.W (An),Dn */ +{ CPUFUNC(op_c0d8_0), 0, 49368 }, /* MULU.W (An)+,Dn */ +{ CPUFUNC(op_c0e0_0), 0, 49376 }, /* MULU.W -(An),Dn */ +{ CPUFUNC(op_c0e8_0), 0, 49384 }, /* MULU.W (d16,An),Dn */ +{ CPUFUNC(op_c0f0_0), 0, 49392 }, /* MULU.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c0f8_0), 0, 49400 }, /* MULU.W (xxx).W,Dn */ +{ CPUFUNC(op_c0f9_0), 0, 49401 }, /* MULU.W (xxx).L,Dn */ +{ CPUFUNC(op_c0fa_0), 0, 49402 }, /* MULU.W (d16,PC),Dn */ +{ CPUFUNC(op_c0fb_0), 0, 49403 }, /* MULU.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c0fc_0), 0, 49404 }, /* MULU.W #.W,Dn */ +{ CPUFUNC(op_c100_1), 0, 49408 }, /* ABCD.B Dn,Dn */ +{ CPUFUNC(op_c108_1), 0, 49416 }, /* ABCD.B -(An),-(An) */ +{ CPUFUNC(op_c110_0), 0, 49424 }, /* AND.B Dn,(An) */ +{ CPUFUNC(op_c118_0), 0, 49432 }, /* AND.B Dn,(An)+ */ +{ CPUFUNC(op_c120_0), 0, 49440 }, /* AND.B Dn,-(An) */ +{ CPUFUNC(op_c128_0), 0, 49448 }, /* AND.B Dn,(d16,An) */ +{ CPUFUNC(op_c130_0), 0, 49456 }, /* AND.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c138_0), 0, 49464 }, /* AND.B Dn,(xxx).W */ +{ CPUFUNC(op_c139_0), 0, 49465 }, /* AND.B Dn,(xxx).L */ +{ CPUFUNC_FF(op_c140_0), 0, 49472 }, /* EXG.L Dn,Dn */ +{ CPUFUNC_FF(op_c148_0), 0, 49480 }, /* EXG.L An,An */ +{ CPUFUNC(op_c150_0), 0, 49488 }, /* AND.W Dn,(An) */ +{ CPUFUNC(op_c158_0), 0, 49496 }, /* AND.W Dn,(An)+ */ +{ CPUFUNC(op_c160_0), 0, 49504 }, /* AND.W Dn,-(An) */ +{ CPUFUNC(op_c168_0), 0, 49512 }, /* AND.W Dn,(d16,An) */ +{ CPUFUNC(op_c170_0), 0, 49520 }, /* AND.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c178_0), 0, 49528 }, /* AND.W Dn,(xxx).W */ +{ CPUFUNC(op_c179_0), 0, 49529 }, /* AND.W Dn,(xxx).L */ +{ CPUFUNC_FF(op_c188_0), 0, 49544 }, /* EXG.L Dn,An */ +{ CPUFUNC(op_c190_0), 0, 49552 }, /* AND.L Dn,(An) */ +{ CPUFUNC(op_c198_0), 0, 49560 }, /* AND.L Dn,(An)+ */ +{ CPUFUNC(op_c1a0_0), 0, 49568 }, /* AND.L Dn,-(An) */ +{ CPUFUNC(op_c1a8_0), 0, 49576 }, /* AND.L Dn,(d16,An) */ +{ CPUFUNC(op_c1b0_0), 0, 49584 }, /* AND.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c1b8_0), 0, 49592 }, /* AND.L Dn,(xxx).W */ +{ CPUFUNC(op_c1b9_0), 0, 49593 }, /* AND.L Dn,(xxx).L */ +{ CPUFUNC(op_c1c0_0), 0, 49600 }, /* MULS.W Dn,Dn */ +{ CPUFUNC(op_c1d0_0), 0, 49616 }, /* MULS.W (An),Dn */ +{ CPUFUNC(op_c1d8_0), 0, 49624 }, /* MULS.W (An)+,Dn */ +{ CPUFUNC(op_c1e0_0), 0, 49632 }, /* MULS.W -(An),Dn */ +{ CPUFUNC(op_c1e8_0), 0, 49640 }, /* MULS.W (d16,An),Dn */ +{ CPUFUNC(op_c1f0_0), 0, 49648 }, /* MULS.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c1f8_0), 0, 49656 }, /* MULS.W (xxx).W,Dn */ +{ CPUFUNC(op_c1f9_0), 0, 49657 }, /* MULS.W (xxx).L,Dn */ +{ CPUFUNC(op_c1fa_0), 0, 49658 }, /* MULS.W (d16,PC),Dn */ +{ CPUFUNC(op_c1fb_0), 0, 49659 }, /* MULS.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c1fc_0), 0, 49660 }, /* MULS.W #.W,Dn */ +{ CPUFUNC(op_d000_0), 0, 53248 }, /* ADD.B Dn,Dn */ +{ CPUFUNC(op_d010_0), 0, 53264 }, /* ADD.B (An),Dn */ +{ CPUFUNC(op_d018_0), 0, 53272 }, /* ADD.B (An)+,Dn */ +{ CPUFUNC(op_d020_0), 0, 53280 }, /* ADD.B -(An),Dn */ +{ CPUFUNC(op_d028_0), 0, 53288 }, /* ADD.B (d16,An),Dn */ +{ CPUFUNC(op_d030_0), 0, 53296 }, /* ADD.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_d038_0), 0, 53304 }, /* ADD.B (xxx).W,Dn */ +{ CPUFUNC(op_d039_0), 0, 53305 }, /* ADD.B (xxx).L,Dn */ +{ CPUFUNC(op_d03a_0), 0, 53306 }, /* ADD.B (d16,PC),Dn */ +{ CPUFUNC(op_d03b_0), 0, 53307 }, /* ADD.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d03c_0), 0, 53308 }, /* ADD.B #.B,Dn */ +{ CPUFUNC(op_d040_0), 0, 53312 }, /* ADD.W Dn,Dn */ +{ CPUFUNC(op_d048_0), 0, 53320 }, /* ADD.W An,Dn */ +{ CPUFUNC(op_d050_0), 0, 53328 }, /* ADD.W (An),Dn */ +{ CPUFUNC(op_d058_0), 0, 53336 }, /* ADD.W (An)+,Dn */ +{ CPUFUNC(op_d060_0), 0, 53344 }, /* ADD.W -(An),Dn */ +{ CPUFUNC(op_d068_0), 0, 53352 }, /* ADD.W (d16,An),Dn */ +{ CPUFUNC(op_d070_0), 0, 53360 }, /* ADD.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_d078_0), 0, 53368 }, /* ADD.W (xxx).W,Dn */ +{ CPUFUNC(op_d079_0), 0, 53369 }, /* ADD.W (xxx).L,Dn */ +{ CPUFUNC(op_d07a_0), 0, 53370 }, /* ADD.W (d16,PC),Dn */ +{ CPUFUNC(op_d07b_0), 0, 53371 }, /* ADD.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d07c_0), 0, 53372 }, /* ADD.W #.W,Dn */ +{ CPUFUNC(op_d080_0), 0, 53376 }, /* ADD.L Dn,Dn */ +{ CPUFUNC(op_d088_0), 0, 53384 }, /* ADD.L An,Dn */ +{ CPUFUNC(op_d090_0), 0, 53392 }, /* ADD.L (An),Dn */ +{ CPUFUNC(op_d098_0), 0, 53400 }, /* ADD.L (An)+,Dn */ +{ CPUFUNC(op_d0a0_0), 0, 53408 }, /* ADD.L -(An),Dn */ +{ CPUFUNC(op_d0a8_0), 0, 53416 }, /* ADD.L (d16,An),Dn */ +{ CPUFUNC(op_d0b0_0), 0, 53424 }, /* ADD.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_d0b8_0), 0, 53432 }, /* ADD.L (xxx).W,Dn */ +{ CPUFUNC(op_d0b9_0), 0, 53433 }, /* ADD.L (xxx).L,Dn */ +{ CPUFUNC(op_d0ba_0), 0, 53434 }, /* ADD.L (d16,PC),Dn */ +{ CPUFUNC(op_d0bb_0), 0, 53435 }, /* ADD.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d0bc_0), 0, 53436 }, /* ADD.L #.L,Dn */ +{ CPUFUNC_FF(op_d0c0_0), 0, 53440 }, /* ADDA.W Dn,An */ +{ CPUFUNC_FF(op_d0c8_0), 0, 53448 }, /* ADDA.W An,An */ +{ CPUFUNC_FF(op_d0d0_0), 0, 53456 }, /* ADDA.W (An),An */ +{ CPUFUNC_FF(op_d0d8_0), 0, 53464 }, /* ADDA.W (An)+,An */ +{ CPUFUNC_FF(op_d0e0_0), 0, 53472 }, /* ADDA.W -(An),An */ +{ CPUFUNC_FF(op_d0e8_0), 0, 53480 }, /* ADDA.W (d16,An),An */ +{ CPUFUNC_FF(op_d0f0_0), 0, 53488 }, /* ADDA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_d0f8_0), 0, 53496 }, /* ADDA.W (xxx).W,An */ +{ CPUFUNC_FF(op_d0f9_0), 0, 53497 }, /* ADDA.W (xxx).L,An */ +{ CPUFUNC_FF(op_d0fa_0), 0, 53498 }, /* ADDA.W (d16,PC),An */ +{ CPUFUNC_FF(op_d0fb_0), 0, 53499 }, /* ADDA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_d0fc_0), 0, 53500 }, /* ADDA.W #.W,An */ +{ CPUFUNC(op_d100_0), 0, 53504 }, /* ADDX.B Dn,Dn */ +{ CPUFUNC(op_d108_0), 0, 53512 }, /* ADDX.B -(An),-(An) */ +{ CPUFUNC(op_d110_0), 0, 53520 }, /* ADD.B Dn,(An) */ +{ CPUFUNC(op_d118_0), 0, 53528 }, /* ADD.B Dn,(An)+ */ +{ CPUFUNC(op_d120_0), 0, 53536 }, /* ADD.B Dn,-(An) */ +{ CPUFUNC(op_d128_0), 0, 53544 }, /* ADD.B Dn,(d16,An) */ +{ CPUFUNC(op_d130_0), 0, 53552 }, /* ADD.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d138_0), 0, 53560 }, /* ADD.B Dn,(xxx).W */ +{ CPUFUNC(op_d139_0), 0, 53561 }, /* ADD.B Dn,(xxx).L */ +{ CPUFUNC(op_d140_0), 0, 53568 }, /* ADDX.W Dn,Dn */ +{ CPUFUNC(op_d148_0), 0, 53576 }, /* ADDX.W -(An),-(An) */ +{ CPUFUNC(op_d150_0), 0, 53584 }, /* ADD.W Dn,(An) */ +{ CPUFUNC(op_d158_0), 0, 53592 }, /* ADD.W Dn,(An)+ */ +{ CPUFUNC(op_d160_0), 0, 53600 }, /* ADD.W Dn,-(An) */ +{ CPUFUNC(op_d168_0), 0, 53608 }, /* ADD.W Dn,(d16,An) */ +{ CPUFUNC(op_d170_0), 0, 53616 }, /* ADD.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d178_0), 0, 53624 }, /* ADD.W Dn,(xxx).W */ +{ CPUFUNC(op_d179_0), 0, 53625 }, /* ADD.W Dn,(xxx).L */ +{ CPUFUNC(op_d180_0), 0, 53632 }, /* ADDX.L Dn,Dn */ +{ CPUFUNC(op_d188_0), 0, 53640 }, /* ADDX.L -(An),-(An) */ +{ CPUFUNC(op_d190_0), 0, 53648 }, /* ADD.L Dn,(An) */ +{ CPUFUNC(op_d198_0), 0, 53656 }, /* ADD.L Dn,(An)+ */ +{ CPUFUNC(op_d1a0_0), 0, 53664 }, /* ADD.L Dn,-(An) */ +{ CPUFUNC(op_d1a8_0), 0, 53672 }, /* ADD.L Dn,(d16,An) */ +{ CPUFUNC(op_d1b0_0), 0, 53680 }, /* ADD.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d1b8_0), 0, 53688 }, /* ADD.L Dn,(xxx).W */ +{ CPUFUNC(op_d1b9_0), 0, 53689 }, /* ADD.L Dn,(xxx).L */ +{ CPUFUNC_FF(op_d1c0_0), 0, 53696 }, /* ADDA.L Dn,An */ +{ CPUFUNC_FF(op_d1c8_0), 0, 53704 }, /* ADDA.L An,An */ +{ CPUFUNC_FF(op_d1d0_0), 0, 53712 }, /* ADDA.L (An),An */ +{ CPUFUNC_FF(op_d1d8_0), 0, 53720 }, /* ADDA.L (An)+,An */ +{ CPUFUNC_FF(op_d1e0_0), 0, 53728 }, /* ADDA.L -(An),An */ +{ CPUFUNC_FF(op_d1e8_0), 0, 53736 }, /* ADDA.L (d16,An),An */ +{ CPUFUNC_FF(op_d1f0_0), 0, 53744 }, /* ADDA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_d1f8_0), 0, 53752 }, /* ADDA.L (xxx).W,An */ +{ CPUFUNC_FF(op_d1f9_0), 0, 53753 }, /* ADDA.L (xxx).L,An */ +{ CPUFUNC_FF(op_d1fa_0), 0, 53754 }, /* ADDA.L (d16,PC),An */ +{ CPUFUNC_FF(op_d1fb_0), 0, 53755 }, /* ADDA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_d1fc_0), 0, 53756 }, /* ADDA.L #.L,An */ +{ CPUFUNC(op_e000_0), 0, 57344 }, /* ASR.B #,Dn */ +{ CPUFUNC(op_e008_0), 0, 57352 }, /* LSR.B #,Dn */ +{ CPUFUNC(op_e010_0), 0, 57360 }, /* ROXR.B #,Dn */ +{ CPUFUNC(op_e018_0), 0, 57368 }, /* ROR.B #,Dn */ +{ CPUFUNC(op_e020_0), 0, 57376 }, /* ASR.B Dn,Dn */ +{ CPUFUNC(op_e028_0), 0, 57384 }, /* LSR.B Dn,Dn */ +{ CPUFUNC(op_e030_0), 0, 57392 }, /* ROXR.B Dn,Dn */ +{ CPUFUNC(op_e038_0), 0, 57400 }, /* ROR.B Dn,Dn */ +{ CPUFUNC(op_e040_0), 0, 57408 }, /* ASR.W #,Dn */ +{ CPUFUNC(op_e048_0), 0, 57416 }, /* LSR.W #,Dn */ +{ CPUFUNC(op_e050_0), 0, 57424 }, /* ROXR.W #,Dn */ +{ CPUFUNC(op_e058_0), 0, 57432 }, /* ROR.W #,Dn */ +{ CPUFUNC(op_e060_0), 0, 57440 }, /* ASR.W Dn,Dn */ +{ CPUFUNC(op_e068_0), 0, 57448 }, /* LSR.W Dn,Dn */ +{ CPUFUNC(op_e070_0), 0, 57456 }, /* ROXR.W Dn,Dn */ +{ CPUFUNC(op_e078_0), 0, 57464 }, /* ROR.W Dn,Dn */ +{ CPUFUNC(op_e080_0), 0, 57472 }, /* ASR.L #,Dn */ +{ CPUFUNC(op_e088_0), 0, 57480 }, /* LSR.L #,Dn */ +{ CPUFUNC(op_e090_0), 0, 57488 }, /* ROXR.L #,Dn */ +{ CPUFUNC(op_e098_0), 0, 57496 }, /* ROR.L #,Dn */ +{ CPUFUNC(op_e0a0_0), 0, 57504 }, /* ASR.L Dn,Dn */ +{ CPUFUNC(op_e0a8_0), 0, 57512 }, /* LSR.L Dn,Dn */ +{ CPUFUNC(op_e0b0_0), 0, 57520 }, /* ROXR.L Dn,Dn */ +{ CPUFUNC(op_e0b8_0), 0, 57528 }, /* ROR.L Dn,Dn */ +{ CPUFUNC(op_e0d0_0), 0, 57552 }, /* ASRW.W (An) */ +{ CPUFUNC(op_e0d8_0), 0, 57560 }, /* ASRW.W (An)+ */ +{ CPUFUNC(op_e0e0_0), 0, 57568 }, /* ASRW.W -(An) */ +{ CPUFUNC(op_e0e8_0), 0, 57576 }, /* ASRW.W (d16,An) */ +{ CPUFUNC(op_e0f0_0), 0, 57584 }, /* ASRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e0f8_0), 0, 57592 }, /* ASRW.W (xxx).W */ +{ CPUFUNC(op_e0f9_0), 0, 57593 }, /* ASRW.W (xxx).L */ +{ CPUFUNC(op_e100_0), 0, 57600 }, /* ASL.B #,Dn */ +{ CPUFUNC(op_e108_0), 0, 57608 }, /* LSL.B #,Dn */ +{ CPUFUNC(op_e110_0), 0, 57616 }, /* ROXL.B #,Dn */ +{ CPUFUNC(op_e118_0), 0, 57624 }, /* ROL.B #,Dn */ +{ CPUFUNC(op_e120_0), 0, 57632 }, /* ASL.B Dn,Dn */ +{ CPUFUNC(op_e128_0), 0, 57640 }, /* LSL.B Dn,Dn */ +{ CPUFUNC(op_e130_0), 0, 57648 }, /* ROXL.B Dn,Dn */ +{ CPUFUNC(op_e138_0), 0, 57656 }, /* ROL.B Dn,Dn */ +{ CPUFUNC(op_e140_0), 0, 57664 }, /* ASL.W #,Dn */ +{ CPUFUNC(op_e148_0), 0, 57672 }, /* LSL.W #,Dn */ +{ CPUFUNC(op_e150_0), 0, 57680 }, /* ROXL.W #,Dn */ +{ CPUFUNC(op_e158_0), 0, 57688 }, /* ROL.W #,Dn */ +{ CPUFUNC(op_e160_0), 0, 57696 }, /* ASL.W Dn,Dn */ +{ CPUFUNC(op_e168_0), 0, 57704 }, /* LSL.W Dn,Dn */ +{ CPUFUNC(op_e170_0), 0, 57712 }, /* ROXL.W Dn,Dn */ +{ CPUFUNC(op_e178_0), 0, 57720 }, /* ROL.W Dn,Dn */ +{ CPUFUNC(op_e180_0), 0, 57728 }, /* ASL.L #,Dn */ +{ CPUFUNC(op_e188_0), 0, 57736 }, /* LSL.L #,Dn */ +{ CPUFUNC(op_e190_0), 0, 57744 }, /* ROXL.L #,Dn */ +{ CPUFUNC(op_e198_0), 0, 57752 }, /* ROL.L #,Dn */ +{ CPUFUNC(op_e1a0_0), 0, 57760 }, /* ASL.L Dn,Dn */ +{ CPUFUNC(op_e1a8_0), 0, 57768 }, /* LSL.L Dn,Dn */ +{ CPUFUNC(op_e1b0_0), 0, 57776 }, /* ROXL.L Dn,Dn */ +{ CPUFUNC(op_e1b8_0), 0, 57784 }, /* ROL.L Dn,Dn */ +{ CPUFUNC(op_e1d0_0), 0, 57808 }, /* ASLW.W (An) */ +{ CPUFUNC(op_e1d8_0), 0, 57816 }, /* ASLW.W (An)+ */ +{ CPUFUNC(op_e1e0_0), 0, 57824 }, /* ASLW.W -(An) */ +{ CPUFUNC(op_e1e8_0), 0, 57832 }, /* ASLW.W (d16,An) */ +{ CPUFUNC(op_e1f0_0), 0, 57840 }, /* ASLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e1f8_0), 0, 57848 }, /* ASLW.W (xxx).W */ +{ CPUFUNC(op_e1f9_0), 0, 57849 }, /* ASLW.W (xxx).L */ +{ CPUFUNC(op_e2d0_0), 0, 58064 }, /* LSRW.W (An) */ +{ CPUFUNC(op_e2d8_0), 0, 58072 }, /* LSRW.W (An)+ */ +{ CPUFUNC(op_e2e0_0), 0, 58080 }, /* LSRW.W -(An) */ +{ CPUFUNC(op_e2e8_0), 0, 58088 }, /* LSRW.W (d16,An) */ +{ CPUFUNC(op_e2f0_0), 0, 58096 }, /* LSRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e2f8_0), 0, 58104 }, /* LSRW.W (xxx).W */ +{ CPUFUNC(op_e2f9_0), 0, 58105 }, /* LSRW.W (xxx).L */ +{ CPUFUNC(op_e3d0_0), 0, 58320 }, /* LSLW.W (An) */ +{ CPUFUNC(op_e3d8_0), 0, 58328 }, /* LSLW.W (An)+ */ +{ CPUFUNC(op_e3e0_0), 0, 58336 }, /* LSLW.W -(An) */ +{ CPUFUNC(op_e3e8_0), 0, 58344 }, /* LSLW.W (d16,An) */ +{ CPUFUNC(op_e3f0_0), 0, 58352 }, /* LSLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e3f8_0), 0, 58360 }, /* LSLW.W (xxx).W */ +{ CPUFUNC(op_e3f9_0), 0, 58361 }, /* LSLW.W (xxx).L */ +{ CPUFUNC(op_e4d0_0), 0, 58576 }, /* ROXRW.W (An) */ +{ CPUFUNC(op_e4d8_0), 0, 58584 }, /* ROXRW.W (An)+ */ +{ CPUFUNC(op_e4e0_0), 0, 58592 }, /* ROXRW.W -(An) */ +{ CPUFUNC(op_e4e8_0), 0, 58600 }, /* ROXRW.W (d16,An) */ +{ CPUFUNC(op_e4f0_0), 0, 58608 }, /* ROXRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e4f8_0), 0, 58616 }, /* ROXRW.W (xxx).W */ +{ CPUFUNC(op_e4f9_0), 0, 58617 }, /* ROXRW.W (xxx).L */ +{ CPUFUNC(op_e5d0_0), 0, 58832 }, /* ROXLW.W (An) */ +{ CPUFUNC(op_e5d8_0), 0, 58840 }, /* ROXLW.W (An)+ */ +{ CPUFUNC(op_e5e0_0), 0, 58848 }, /* ROXLW.W -(An) */ +{ CPUFUNC(op_e5e8_0), 0, 58856 }, /* ROXLW.W (d16,An) */ +{ CPUFUNC(op_e5f0_0), 0, 58864 }, /* ROXLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e5f8_0), 0, 58872 }, /* ROXLW.W (xxx).W */ +{ CPUFUNC(op_e5f9_0), 0, 58873 }, /* ROXLW.W (xxx).L */ +{ CPUFUNC(op_e6d0_0), 0, 59088 }, /* RORW.W (An) */ +{ CPUFUNC(op_e6d8_0), 0, 59096 }, /* RORW.W (An)+ */ +{ CPUFUNC(op_e6e0_0), 0, 59104 }, /* RORW.W -(An) */ +{ CPUFUNC(op_e6e8_0), 0, 59112 }, /* RORW.W (d16,An) */ +{ CPUFUNC(op_e6f0_0), 0, 59120 }, /* RORW.W (d8,An,Xn) */ +{ CPUFUNC(op_e6f8_0), 0, 59128 }, /* RORW.W (xxx).W */ +{ CPUFUNC(op_e6f9_0), 0, 59129 }, /* RORW.W (xxx).L */ +{ CPUFUNC(op_e7d0_0), 0, 59344 }, /* ROLW.W (An) */ +{ CPUFUNC(op_e7d8_0), 0, 59352 }, /* ROLW.W (An)+ */ +{ CPUFUNC(op_e7e0_0), 0, 59360 }, /* ROLW.W -(An) */ +{ CPUFUNC(op_e7e8_0), 0, 59368 }, /* ROLW.W (d16,An) */ +{ CPUFUNC(op_e7f0_0), 0, 59376 }, /* ROLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e7f8_0), 0, 59384 }, /* ROLW.W (xxx).W */ +{ CPUFUNC(op_e7f9_0), 0, 59385 }, /* ROLW.W (xxx).L */ +{ CPUFUNC(op_e8c0_0), 0, 59584 }, /* BFTST.L #.W,Dn */ +{ CPUFUNC(op_e8d0_0), 0, 59600 }, /* BFTST.L #.W,(An) */ +{ CPUFUNC(op_e8e8_0), 0, 59624 }, /* BFTST.L #.W,(d16,An) */ +{ CPUFUNC(op_e8f0_0), 0, 59632 }, /* BFTST.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_e8f8_0), 0, 59640 }, /* BFTST.L #.W,(xxx).W */ +{ CPUFUNC(op_e8f9_0), 0, 59641 }, /* BFTST.L #.W,(xxx).L */ +{ CPUFUNC(op_e8fa_0), 0, 59642 }, /* BFTST.L #.W,(d16,PC) */ +{ CPUFUNC(op_e8fb_0), 0, 59643 }, /* BFTST.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_e9c0_0), 0, 59840 }, /* BFEXTU.L #.W,Dn */ +{ CPUFUNC(op_e9d0_0), 0, 59856 }, /* BFEXTU.L #.W,(An) */ +{ CPUFUNC(op_e9e8_0), 0, 59880 }, /* BFEXTU.L #.W,(d16,An) */ +{ CPUFUNC(op_e9f0_0), 0, 59888 }, /* BFEXTU.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_e9f8_0), 0, 59896 }, /* BFEXTU.L #.W,(xxx).W */ +{ CPUFUNC(op_e9f9_0), 0, 59897 }, /* BFEXTU.L #.W,(xxx).L */ +{ CPUFUNC(op_e9fa_0), 0, 59898 }, /* BFEXTU.L #.W,(d16,PC) */ +{ CPUFUNC(op_e9fb_0), 0, 59899 }, /* BFEXTU.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_eac0_0), 0, 60096 }, /* BFCHG.L #.W,Dn */ +{ CPUFUNC(op_ead0_0), 0, 60112 }, /* BFCHG.L #.W,(An) */ +{ CPUFUNC(op_eae8_0), 0, 60136 }, /* BFCHG.L #.W,(d16,An) */ +{ CPUFUNC(op_eaf0_0), 0, 60144 }, /* BFCHG.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_eaf8_0), 0, 60152 }, /* BFCHG.L #.W,(xxx).W */ +{ CPUFUNC(op_eaf9_0), 0, 60153 }, /* BFCHG.L #.W,(xxx).L */ +{ CPUFUNC(op_ebc0_0), 0, 60352 }, /* BFEXTS.L #.W,Dn */ +{ CPUFUNC(op_ebd0_0), 0, 60368 }, /* BFEXTS.L #.W,(An) */ +{ CPUFUNC(op_ebe8_0), 0, 60392 }, /* BFEXTS.L #.W,(d16,An) */ +{ CPUFUNC(op_ebf0_0), 0, 60400 }, /* BFEXTS.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_ebf8_0), 0, 60408 }, /* BFEXTS.L #.W,(xxx).W */ +{ CPUFUNC(op_ebf9_0), 0, 60409 }, /* BFEXTS.L #.W,(xxx).L */ +{ CPUFUNC(op_ebfa_0), 0, 60410 }, /* BFEXTS.L #.W,(d16,PC) */ +{ CPUFUNC(op_ebfb_0), 0, 60411 }, /* BFEXTS.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_ecc0_0), 0, 60608 }, /* BFCLR.L #.W,Dn */ +{ CPUFUNC(op_ecd0_0), 0, 60624 }, /* BFCLR.L #.W,(An) */ +{ CPUFUNC(op_ece8_0), 0, 60648 }, /* BFCLR.L #.W,(d16,An) */ +{ CPUFUNC(op_ecf0_0), 0, 60656 }, /* BFCLR.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_ecf8_0), 0, 60664 }, /* BFCLR.L #.W,(xxx).W */ +{ CPUFUNC(op_ecf9_0), 0, 60665 }, /* BFCLR.L #.W,(xxx).L */ +{ CPUFUNC(op_edc0_0), 0, 60864 }, /* BFFFO.L #.W,Dn */ +{ CPUFUNC(op_edd0_0), 0, 60880 }, /* BFFFO.L #.W,(An) */ +{ CPUFUNC(op_ede8_0), 0, 60904 }, /* BFFFO.L #.W,(d16,An) */ +{ CPUFUNC(op_edf0_0), 0, 60912 }, /* BFFFO.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_edf8_0), 0, 60920 }, /* BFFFO.L #.W,(xxx).W */ +{ CPUFUNC(op_edf9_0), 0, 60921 }, /* BFFFO.L #.W,(xxx).L */ +{ CPUFUNC(op_edfa_0), 0, 60922 }, /* BFFFO.L #.W,(d16,PC) */ +{ CPUFUNC(op_edfb_0), 0, 60923 }, /* BFFFO.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_eec0_0), 0, 61120 }, /* BFSET.L #.W,Dn */ +{ CPUFUNC(op_eed0_0), 0, 61136 }, /* BFSET.L #.W,(An) */ +{ CPUFUNC(op_eee8_0), 0, 61160 }, /* BFSET.L #.W,(d16,An) */ +{ CPUFUNC(op_eef0_0), 0, 61168 }, /* BFSET.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_eef8_0), 0, 61176 }, /* BFSET.L #.W,(xxx).W */ +{ CPUFUNC(op_eef9_0), 0, 61177 }, /* BFSET.L #.W,(xxx).L */ +{ CPUFUNC(op_efc0_0), 0, 61376 }, /* BFINS.L #.W,Dn */ +{ CPUFUNC(op_efd0_0), 0, 61392 }, /* BFINS.L #.W,(An) */ +{ CPUFUNC(op_efe8_0), 0, 61416 }, /* BFINS.L #.W,(d16,An) */ +{ CPUFUNC(op_eff0_0), 0, 61424 }, /* BFINS.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_eff8_0), 0, 61432 }, /* BFINS.L #.W,(xxx).W */ +{ CPUFUNC(op_eff9_0), 0, 61433 }, /* BFINS.L #.W,(xxx).L */ +{ CPUFUNC_FF(op_f200_0), 0, 61952 }, /* FPP.L #.W,Dn */ +{ CPUFUNC_FF(op_f208_0), 0, 61960 }, /* FPP.L #.W,An */ +{ CPUFUNC_FF(op_f210_0), 0, 61968 }, /* FPP.L #.W,(An) */ +{ CPUFUNC_FF(op_f218_0), 0, 61976 }, /* FPP.L #.W,(An)+ */ +{ CPUFUNC_FF(op_f220_0), 0, 61984 }, /* FPP.L #.W,-(An) */ +{ CPUFUNC_FF(op_f228_0), 0, 61992 }, /* FPP.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_f230_0), 0, 62000 }, /* FPP.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_f238_0), 0, 62008 }, /* FPP.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_f239_0), 0, 62009 }, /* FPP.L #.W,(xxx).L */ +{ CPUFUNC_FF(op_f23a_0), 0, 62010 }, /* FPP.L #.W,(d16,PC) */ +{ CPUFUNC_FF(op_f23b_0), 0, 62011 }, /* FPP.L #.W,(d8,PC,Xn) */ +{ CPUFUNC_FF(op_f23c_0), 0, 62012 }, /* FPP.L #.W,#.L */ +{ CPUFUNC_FF(op_f240_0), 0, 62016 }, /* FScc.L #.W,Dn */ +{ CPUFUNC_FF(op_f248_0), 0, 62024 }, /* FDBcc.L #.W,Dn */ +{ CPUFUNC_FF(op_f250_0), 0, 62032 }, /* FScc.L #.W,(An) */ +{ CPUFUNC_FF(op_f258_0), 0, 62040 }, /* FScc.L #.W,(An)+ */ +{ CPUFUNC_FF(op_f260_0), 0, 62048 }, /* FScc.L #.W,-(An) */ +{ CPUFUNC_FF(op_f268_0), 0, 62056 }, /* FScc.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_f270_0), 0, 62064 }, /* FScc.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_f278_0), 0, 62072 }, /* FScc.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_f279_0), 0, 62073 }, /* FScc.L #.W,(xxx).L */ +{ CPUFUNC_FF(op_f27a_0), 0, 62074 }, /* FTRAPcc.L #.W */ +{ CPUFUNC_FF(op_f27b_0), 0, 62075 }, /* FTRAPcc.L #.L */ +{ CPUFUNC_FF(op_f27c_0), 0, 62076 }, /* FTRAPcc.L */ +{ CPUFUNC_FF(op_f280_0), 0, 62080 }, /* FBcc.L #,#.W */ +{ CPUFUNC_FF(op_f2c0_0), 0, 62144 }, /* FBcc.L #,#.L */ +{ CPUFUNC_FF(op_f310_0), 0, 62224 }, /* FSAVE.L (An) */ +{ CPUFUNC_FF(op_f320_0), 0, 62240 }, /* FSAVE.L -(An) */ +{ CPUFUNC_FF(op_f328_0), 0, 62248 }, /* FSAVE.L (d16,An) */ +{ CPUFUNC_FF(op_f330_0), 0, 62256 }, /* FSAVE.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_f338_0), 0, 62264 }, /* FSAVE.L (xxx).W */ +{ CPUFUNC_FF(op_f339_0), 0, 62265 }, /* FSAVE.L (xxx).L */ +{ CPUFUNC_FF(op_f350_0), 0, 62288 }, /* FRESTORE.L (An) */ +{ CPUFUNC_FF(op_f358_0), 0, 62296 }, /* FRESTORE.L (An)+ */ +{ CPUFUNC_FF(op_f368_0), 0, 62312 }, /* FRESTORE.L (d16,An) */ +{ CPUFUNC_FF(op_f370_0), 0, 62320 }, /* FRESTORE.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_f378_0), 0, 62328 }, /* FRESTORE.L (xxx).W */ +{ CPUFUNC_FF(op_f379_0), 0, 62329 }, /* FRESTORE.L (xxx).L */ +{ CPUFUNC_FF(op_f37a_0), 0, 62330 }, /* FRESTORE.L (d16,PC) */ +{ CPUFUNC_FF(op_f37b_0), 0, 62331 }, /* FRESTORE.L (d8,PC,Xn) */ +{ 0, 0, 0 }}; +struct cputbl CPUFUNC(op_smalltbl_2)[] = { +{ CPUFUNC(op_0_0), 0, 0 }, /* OR.B #.B,Dn */ +{ CPUFUNC(op_10_0), 0, 16 }, /* OR.B #.B,(An) */ +{ CPUFUNC(op_18_0), 0, 24 }, /* OR.B #.B,(An)+ */ +{ CPUFUNC(op_20_0), 0, 32 }, /* OR.B #.B,-(An) */ +{ CPUFUNC(op_28_0), 0, 40 }, /* OR.B #.B,(d16,An) */ +{ CPUFUNC(op_30_0), 0, 48 }, /* OR.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_38_0), 0, 56 }, /* OR.B #.B,(xxx).W */ +{ CPUFUNC(op_39_0), 0, 57 }, /* OR.B #.B,(xxx).L */ +{ CPUFUNC(op_3c_0), 0, 60 }, /* ORSR.B #.W */ +{ CPUFUNC(op_40_0), 0, 64 }, /* OR.W #.W,Dn */ +{ CPUFUNC(op_50_0), 0, 80 }, /* OR.W #.W,(An) */ +{ CPUFUNC(op_58_0), 0, 88 }, /* OR.W #.W,(An)+ */ +{ CPUFUNC(op_60_0), 0, 96 }, /* OR.W #.W,-(An) */ +{ CPUFUNC(op_68_0), 0, 104 }, /* OR.W #.W,(d16,An) */ +{ CPUFUNC(op_70_0), 0, 112 }, /* OR.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_78_0), 0, 120 }, /* OR.W #.W,(xxx).W */ +{ CPUFUNC(op_79_0), 0, 121 }, /* OR.W #.W,(xxx).L */ +{ CPUFUNC(op_7c_0), 0, 124 }, /* ORSR.W #.W */ +{ CPUFUNC(op_80_0), 0, 128 }, /* OR.L #.L,Dn */ +{ CPUFUNC(op_90_0), 0, 144 }, /* OR.L #.L,(An) */ +{ CPUFUNC(op_98_0), 0, 152 }, /* OR.L #.L,(An)+ */ +{ CPUFUNC(op_a0_0), 0, 160 }, /* OR.L #.L,-(An) */ +{ CPUFUNC(op_a8_0), 0, 168 }, /* OR.L #.L,(d16,An) */ +{ CPUFUNC(op_b0_0), 0, 176 }, /* OR.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_b8_0), 0, 184 }, /* OR.L #.L,(xxx).W */ +{ CPUFUNC(op_b9_0), 0, 185 }, /* OR.L #.L,(xxx).L */ +{ CPUFUNC(op_d0_0), 0, 208 }, /* CHK2.B #.W,(An) */ +{ CPUFUNC(op_e8_0), 0, 232 }, /* CHK2.B #.W,(d16,An) */ +{ CPUFUNC(op_f0_0), 0, 240 }, /* CHK2.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_f8_0), 0, 248 }, /* CHK2.B #.W,(xxx).W */ +{ CPUFUNC(op_f9_0), 0, 249 }, /* CHK2.B #.W,(xxx).L */ +{ CPUFUNC(op_fa_0), 0, 250 }, /* CHK2.B #.W,(d16,PC) */ +{ CPUFUNC(op_fb_0), 0, 251 }, /* CHK2.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_100_0), 0, 256 }, /* BTST.L Dn,Dn */ +{ CPUFUNC_FF(op_108_0), 0, 264 }, /* MVPMR.W (d16,An),Dn */ +{ CPUFUNC(op_110_0), 0, 272 }, /* BTST.B Dn,(An) */ +{ CPUFUNC(op_118_0), 0, 280 }, /* BTST.B Dn,(An)+ */ +{ CPUFUNC(op_120_0), 0, 288 }, /* BTST.B Dn,-(An) */ +{ CPUFUNC(op_128_0), 0, 296 }, /* BTST.B Dn,(d16,An) */ +{ CPUFUNC(op_130_0), 0, 304 }, /* BTST.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_138_0), 0, 312 }, /* BTST.B Dn,(xxx).W */ +{ CPUFUNC(op_139_0), 0, 313 }, /* BTST.B Dn,(xxx).L */ +{ CPUFUNC(op_13a_0), 0, 314 }, /* BTST.B Dn,(d16,PC) */ +{ CPUFUNC(op_13b_0), 0, 315 }, /* BTST.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_13c_0), 0, 316 }, /* BTST.B Dn,#.B */ +{ CPUFUNC(op_140_0), 0, 320 }, /* BCHG.L Dn,Dn */ +{ CPUFUNC_FF(op_148_0), 0, 328 }, /* MVPMR.L (d16,An),Dn */ +{ CPUFUNC(op_150_0), 0, 336 }, /* BCHG.B Dn,(An) */ +{ CPUFUNC(op_158_0), 0, 344 }, /* BCHG.B Dn,(An)+ */ +{ CPUFUNC(op_160_0), 0, 352 }, /* BCHG.B Dn,-(An) */ +{ CPUFUNC(op_168_0), 0, 360 }, /* BCHG.B Dn,(d16,An) */ +{ CPUFUNC(op_170_0), 0, 368 }, /* BCHG.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_178_0), 0, 376 }, /* BCHG.B Dn,(xxx).W */ +{ CPUFUNC(op_179_0), 0, 377 }, /* BCHG.B Dn,(xxx).L */ +{ CPUFUNC(op_17a_0), 0, 378 }, /* BCHG.B Dn,(d16,PC) */ +{ CPUFUNC(op_17b_0), 0, 379 }, /* BCHG.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_180_0), 0, 384 }, /* BCLR.L Dn,Dn */ +{ CPUFUNC_FF(op_188_0), 0, 392 }, /* MVPRM.W Dn,(d16,An) */ +{ CPUFUNC(op_190_0), 0, 400 }, /* BCLR.B Dn,(An) */ +{ CPUFUNC(op_198_0), 0, 408 }, /* BCLR.B Dn,(An)+ */ +{ CPUFUNC(op_1a0_0), 0, 416 }, /* BCLR.B Dn,-(An) */ +{ CPUFUNC(op_1a8_0), 0, 424 }, /* BCLR.B Dn,(d16,An) */ +{ CPUFUNC(op_1b0_0), 0, 432 }, /* BCLR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1b8_0), 0, 440 }, /* BCLR.B Dn,(xxx).W */ +{ CPUFUNC(op_1b9_0), 0, 441 }, /* BCLR.B Dn,(xxx).L */ +{ CPUFUNC(op_1ba_0), 0, 442 }, /* BCLR.B Dn,(d16,PC) */ +{ CPUFUNC(op_1bb_0), 0, 443 }, /* BCLR.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_1c0_0), 0, 448 }, /* BSET.L Dn,Dn */ +{ CPUFUNC_FF(op_1c8_0), 0, 456 }, /* MVPRM.L Dn,(d16,An) */ +{ CPUFUNC(op_1d0_0), 0, 464 }, /* BSET.B Dn,(An) */ +{ CPUFUNC(op_1d8_0), 0, 472 }, /* BSET.B Dn,(An)+ */ +{ CPUFUNC(op_1e0_0), 0, 480 }, /* BSET.B Dn,-(An) */ +{ CPUFUNC(op_1e8_0), 0, 488 }, /* BSET.B Dn,(d16,An) */ +{ CPUFUNC(op_1f0_0), 0, 496 }, /* BSET.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1f8_0), 0, 504 }, /* BSET.B Dn,(xxx).W */ +{ CPUFUNC(op_1f9_0), 0, 505 }, /* BSET.B Dn,(xxx).L */ +{ CPUFUNC(op_1fa_0), 0, 506 }, /* BSET.B Dn,(d16,PC) */ +{ CPUFUNC(op_1fb_0), 0, 507 }, /* BSET.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_200_0), 0, 512 }, /* AND.B #.B,Dn */ +{ CPUFUNC(op_210_0), 0, 528 }, /* AND.B #.B,(An) */ +{ CPUFUNC(op_218_0), 0, 536 }, /* AND.B #.B,(An)+ */ +{ CPUFUNC(op_220_0), 0, 544 }, /* AND.B #.B,-(An) */ +{ CPUFUNC(op_228_0), 0, 552 }, /* AND.B #.B,(d16,An) */ +{ CPUFUNC(op_230_0), 0, 560 }, /* AND.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_238_0), 0, 568 }, /* AND.B #.B,(xxx).W */ +{ CPUFUNC(op_239_0), 0, 569 }, /* AND.B #.B,(xxx).L */ +{ CPUFUNC(op_23c_0), 0, 572 }, /* ANDSR.B #.W */ +{ CPUFUNC(op_240_0), 0, 576 }, /* AND.W #.W,Dn */ +{ CPUFUNC(op_250_0), 0, 592 }, /* AND.W #.W,(An) */ +{ CPUFUNC(op_258_0), 0, 600 }, /* AND.W #.W,(An)+ */ +{ CPUFUNC(op_260_0), 0, 608 }, /* AND.W #.W,-(An) */ +{ CPUFUNC(op_268_0), 0, 616 }, /* AND.W #.W,(d16,An) */ +{ CPUFUNC(op_270_0), 0, 624 }, /* AND.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_278_0), 0, 632 }, /* AND.W #.W,(xxx).W */ +{ CPUFUNC(op_279_0), 0, 633 }, /* AND.W #.W,(xxx).L */ +{ CPUFUNC(op_27c_0), 0, 636 }, /* ANDSR.W #.W */ +{ CPUFUNC(op_280_0), 0, 640 }, /* AND.L #.L,Dn */ +{ CPUFUNC(op_290_0), 0, 656 }, /* AND.L #.L,(An) */ +{ CPUFUNC(op_298_0), 0, 664 }, /* AND.L #.L,(An)+ */ +{ CPUFUNC(op_2a0_0), 0, 672 }, /* AND.L #.L,-(An) */ +{ CPUFUNC(op_2a8_0), 0, 680 }, /* AND.L #.L,(d16,An) */ +{ CPUFUNC(op_2b0_0), 0, 688 }, /* AND.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_2b8_0), 0, 696 }, /* AND.L #.L,(xxx).W */ +{ CPUFUNC(op_2b9_0), 0, 697 }, /* AND.L #.L,(xxx).L */ +{ CPUFUNC(op_2d0_0), 0, 720 }, /* CHK2.W #.W,(An) */ +{ CPUFUNC(op_2e8_0), 0, 744 }, /* CHK2.W #.W,(d16,An) */ +{ CPUFUNC(op_2f0_0), 0, 752 }, /* CHK2.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_2f8_0), 0, 760 }, /* CHK2.W #.W,(xxx).W */ +{ CPUFUNC(op_2f9_0), 0, 761 }, /* CHK2.W #.W,(xxx).L */ +{ CPUFUNC(op_2fa_0), 0, 762 }, /* CHK2.W #.W,(d16,PC) */ +{ CPUFUNC(op_2fb_0), 0, 763 }, /* CHK2.W #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_400_0), 0, 1024 }, /* SUB.B #.B,Dn */ +{ CPUFUNC(op_410_0), 0, 1040 }, /* SUB.B #.B,(An) */ +{ CPUFUNC(op_418_0), 0, 1048 }, /* SUB.B #.B,(An)+ */ +{ CPUFUNC(op_420_0), 0, 1056 }, /* SUB.B #.B,-(An) */ +{ CPUFUNC(op_428_0), 0, 1064 }, /* SUB.B #.B,(d16,An) */ +{ CPUFUNC(op_430_0), 0, 1072 }, /* SUB.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_438_0), 0, 1080 }, /* SUB.B #.B,(xxx).W */ +{ CPUFUNC(op_439_0), 0, 1081 }, /* SUB.B #.B,(xxx).L */ +{ CPUFUNC(op_440_0), 0, 1088 }, /* SUB.W #.W,Dn */ +{ CPUFUNC(op_450_0), 0, 1104 }, /* SUB.W #.W,(An) */ +{ CPUFUNC(op_458_0), 0, 1112 }, /* SUB.W #.W,(An)+ */ +{ CPUFUNC(op_460_0), 0, 1120 }, /* SUB.W #.W,-(An) */ +{ CPUFUNC(op_468_0), 0, 1128 }, /* SUB.W #.W,(d16,An) */ +{ CPUFUNC(op_470_0), 0, 1136 }, /* SUB.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_478_0), 0, 1144 }, /* SUB.W #.W,(xxx).W */ +{ CPUFUNC(op_479_0), 0, 1145 }, /* SUB.W #.W,(xxx).L */ +{ CPUFUNC(op_480_0), 0, 1152 }, /* SUB.L #.L,Dn */ +{ CPUFUNC(op_490_0), 0, 1168 }, /* SUB.L #.L,(An) */ +{ CPUFUNC(op_498_0), 0, 1176 }, /* SUB.L #.L,(An)+ */ +{ CPUFUNC(op_4a0_0), 0, 1184 }, /* SUB.L #.L,-(An) */ +{ CPUFUNC(op_4a8_0), 0, 1192 }, /* SUB.L #.L,(d16,An) */ +{ CPUFUNC(op_4b0_0), 0, 1200 }, /* SUB.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_4b8_0), 0, 1208 }, /* SUB.L #.L,(xxx).W */ +{ CPUFUNC(op_4b9_0), 0, 1209 }, /* SUB.L #.L,(xxx).L */ +{ CPUFUNC(op_4d0_0), 0, 1232 }, /* CHK2.L #.W,(An) */ +{ CPUFUNC(op_4e8_0), 0, 1256 }, /* CHK2.L #.W,(d16,An) */ +{ CPUFUNC(op_4f0_0), 0, 1264 }, /* CHK2.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_4f8_0), 0, 1272 }, /* CHK2.L #.W,(xxx).W */ +{ CPUFUNC(op_4f9_0), 0, 1273 }, /* CHK2.L #.W,(xxx).L */ +{ CPUFUNC(op_4fa_0), 0, 1274 }, /* CHK2.L #.W,(d16,PC) */ +{ CPUFUNC(op_4fb_0), 0, 1275 }, /* CHK2.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_600_0), 0, 1536 }, /* ADD.B #.B,Dn */ +{ CPUFUNC(op_610_0), 0, 1552 }, /* ADD.B #.B,(An) */ +{ CPUFUNC(op_618_0), 0, 1560 }, /* ADD.B #.B,(An)+ */ +{ CPUFUNC(op_620_0), 0, 1568 }, /* ADD.B #.B,-(An) */ +{ CPUFUNC(op_628_0), 0, 1576 }, /* ADD.B #.B,(d16,An) */ +{ CPUFUNC(op_630_0), 0, 1584 }, /* ADD.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_638_0), 0, 1592 }, /* ADD.B #.B,(xxx).W */ +{ CPUFUNC(op_639_0), 0, 1593 }, /* ADD.B #.B,(xxx).L */ +{ CPUFUNC(op_640_0), 0, 1600 }, /* ADD.W #.W,Dn */ +{ CPUFUNC(op_650_0), 0, 1616 }, /* ADD.W #.W,(An) */ +{ CPUFUNC(op_658_0), 0, 1624 }, /* ADD.W #.W,(An)+ */ +{ CPUFUNC(op_660_0), 0, 1632 }, /* ADD.W #.W,-(An) */ +{ CPUFUNC(op_668_0), 0, 1640 }, /* ADD.W #.W,(d16,An) */ +{ CPUFUNC(op_670_0), 0, 1648 }, /* ADD.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_678_0), 0, 1656 }, /* ADD.W #.W,(xxx).W */ +{ CPUFUNC(op_679_0), 0, 1657 }, /* ADD.W #.W,(xxx).L */ +{ CPUFUNC(op_680_0), 0, 1664 }, /* ADD.L #.L,Dn */ +{ CPUFUNC(op_690_0), 0, 1680 }, /* ADD.L #.L,(An) */ +{ CPUFUNC(op_698_0), 0, 1688 }, /* ADD.L #.L,(An)+ */ +{ CPUFUNC(op_6a0_0), 0, 1696 }, /* ADD.L #.L,-(An) */ +{ CPUFUNC(op_6a8_0), 0, 1704 }, /* ADD.L #.L,(d16,An) */ +{ CPUFUNC(op_6b0_0), 0, 1712 }, /* ADD.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_6b8_0), 0, 1720 }, /* ADD.L #.L,(xxx).W */ +{ CPUFUNC(op_6b9_0), 0, 1721 }, /* ADD.L #.L,(xxx).L */ +{ CPUFUNC(op_6c0_0), 0, 1728 }, /* RTM.L Dn */ +{ CPUFUNC(op_6c8_0), 0, 1736 }, /* RTM.L An */ +{ CPUFUNC_FF(op_6d0_0), 0, 1744 }, /* CALLM.L (An) */ +{ CPUFUNC_FF(op_6e8_0), 0, 1768 }, /* CALLM.L (d16,An) */ +{ CPUFUNC_FF(op_6f0_0), 0, 1776 }, /* CALLM.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_6f8_0), 0, 1784 }, /* CALLM.L (xxx).W */ +{ CPUFUNC_FF(op_6f9_0), 0, 1785 }, /* CALLM.L (xxx).L */ +{ CPUFUNC_FF(op_6fa_0), 0, 1786 }, /* CALLM.L (d16,PC) */ +{ CPUFUNC_FF(op_6fb_0), 0, 1787 }, /* CALLM.L (d8,PC,Xn) */ +{ CPUFUNC(op_800_0), 0, 2048 }, /* BTST.L #.W,Dn */ +{ CPUFUNC(op_810_0), 0, 2064 }, /* BTST.B #.W,(An) */ +{ CPUFUNC(op_818_0), 0, 2072 }, /* BTST.B #.W,(An)+ */ +{ CPUFUNC(op_820_0), 0, 2080 }, /* BTST.B #.W,-(An) */ +{ CPUFUNC(op_828_0), 0, 2088 }, /* BTST.B #.W,(d16,An) */ +{ CPUFUNC(op_830_0), 0, 2096 }, /* BTST.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_838_0), 0, 2104 }, /* BTST.B #.W,(xxx).W */ +{ CPUFUNC(op_839_0), 0, 2105 }, /* BTST.B #.W,(xxx).L */ +{ CPUFUNC(op_83a_0), 0, 2106 }, /* BTST.B #.W,(d16,PC) */ +{ CPUFUNC(op_83b_0), 0, 2107 }, /* BTST.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_83c_0), 0, 2108 }, /* BTST.B #.W,#.B */ +{ CPUFUNC(op_840_0), 0, 2112 }, /* BCHG.L #.W,Dn */ +{ CPUFUNC(op_850_0), 0, 2128 }, /* BCHG.B #.W,(An) */ +{ CPUFUNC(op_858_0), 0, 2136 }, /* BCHG.B #.W,(An)+ */ +{ CPUFUNC(op_860_0), 0, 2144 }, /* BCHG.B #.W,-(An) */ +{ CPUFUNC(op_868_0), 0, 2152 }, /* BCHG.B #.W,(d16,An) */ +{ CPUFUNC(op_870_0), 0, 2160 }, /* BCHG.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_878_0), 0, 2168 }, /* BCHG.B #.W,(xxx).W */ +{ CPUFUNC(op_879_0), 0, 2169 }, /* BCHG.B #.W,(xxx).L */ +{ CPUFUNC(op_87a_0), 0, 2170 }, /* BCHG.B #.W,(d16,PC) */ +{ CPUFUNC(op_87b_0), 0, 2171 }, /* BCHG.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_880_0), 0, 2176 }, /* BCLR.L #.W,Dn */ +{ CPUFUNC(op_890_0), 0, 2192 }, /* BCLR.B #.W,(An) */ +{ CPUFUNC(op_898_0), 0, 2200 }, /* BCLR.B #.W,(An)+ */ +{ CPUFUNC(op_8a0_0), 0, 2208 }, /* BCLR.B #.W,-(An) */ +{ CPUFUNC(op_8a8_0), 0, 2216 }, /* BCLR.B #.W,(d16,An) */ +{ CPUFUNC(op_8b0_0), 0, 2224 }, /* BCLR.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_8b8_0), 0, 2232 }, /* BCLR.B #.W,(xxx).W */ +{ CPUFUNC(op_8b9_0), 0, 2233 }, /* BCLR.B #.W,(xxx).L */ +{ CPUFUNC(op_8ba_0), 0, 2234 }, /* BCLR.B #.W,(d16,PC) */ +{ CPUFUNC(op_8bb_0), 0, 2235 }, /* BCLR.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_8c0_0), 0, 2240 }, /* BSET.L #.W,Dn */ +{ CPUFUNC(op_8d0_0), 0, 2256 }, /* BSET.B #.W,(An) */ +{ CPUFUNC(op_8d8_0), 0, 2264 }, /* BSET.B #.W,(An)+ */ +{ CPUFUNC(op_8e0_0), 0, 2272 }, /* BSET.B #.W,-(An) */ +{ CPUFUNC(op_8e8_0), 0, 2280 }, /* BSET.B #.W,(d16,An) */ +{ CPUFUNC(op_8f0_0), 0, 2288 }, /* BSET.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_8f8_0), 0, 2296 }, /* BSET.B #.W,(xxx).W */ +{ CPUFUNC(op_8f9_0), 0, 2297 }, /* BSET.B #.W,(xxx).L */ +{ CPUFUNC(op_8fa_0), 0, 2298 }, /* BSET.B #.W,(d16,PC) */ +{ CPUFUNC(op_8fb_0), 0, 2299 }, /* BSET.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_a00_0), 0, 2560 }, /* EOR.B #.B,Dn */ +{ CPUFUNC(op_a10_0), 0, 2576 }, /* EOR.B #.B,(An) */ +{ CPUFUNC(op_a18_0), 0, 2584 }, /* EOR.B #.B,(An)+ */ +{ CPUFUNC(op_a20_0), 0, 2592 }, /* EOR.B #.B,-(An) */ +{ CPUFUNC(op_a28_0), 0, 2600 }, /* EOR.B #.B,(d16,An) */ +{ CPUFUNC(op_a30_0), 0, 2608 }, /* EOR.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_a38_0), 0, 2616 }, /* EOR.B #.B,(xxx).W */ +{ CPUFUNC(op_a39_0), 0, 2617 }, /* EOR.B #.B,(xxx).L */ +{ CPUFUNC(op_a3c_0), 0, 2620 }, /* EORSR.B #.W */ +{ CPUFUNC(op_a40_0), 0, 2624 }, /* EOR.W #.W,Dn */ +{ CPUFUNC(op_a50_0), 0, 2640 }, /* EOR.W #.W,(An) */ +{ CPUFUNC(op_a58_0), 0, 2648 }, /* EOR.W #.W,(An)+ */ +{ CPUFUNC(op_a60_0), 0, 2656 }, /* EOR.W #.W,-(An) */ +{ CPUFUNC(op_a68_0), 0, 2664 }, /* EOR.W #.W,(d16,An) */ +{ CPUFUNC(op_a70_0), 0, 2672 }, /* EOR.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_a78_0), 0, 2680 }, /* EOR.W #.W,(xxx).W */ +{ CPUFUNC(op_a79_0), 0, 2681 }, /* EOR.W #.W,(xxx).L */ +{ CPUFUNC(op_a7c_0), 0, 2684 }, /* EORSR.W #.W */ +{ CPUFUNC(op_a80_0), 0, 2688 }, /* EOR.L #.L,Dn */ +{ CPUFUNC(op_a90_0), 0, 2704 }, /* EOR.L #.L,(An) */ +{ CPUFUNC(op_a98_0), 0, 2712 }, /* EOR.L #.L,(An)+ */ +{ CPUFUNC(op_aa0_0), 0, 2720 }, /* EOR.L #.L,-(An) */ +{ CPUFUNC(op_aa8_0), 0, 2728 }, /* EOR.L #.L,(d16,An) */ +{ CPUFUNC(op_ab0_0), 0, 2736 }, /* EOR.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_ab8_0), 0, 2744 }, /* EOR.L #.L,(xxx).W */ +{ CPUFUNC(op_ab9_0), 0, 2745 }, /* EOR.L #.L,(xxx).L */ +{ CPUFUNC(op_ad0_0), 0, 2768 }, /* CAS.B #.W,(An) */ +{ CPUFUNC(op_ad8_0), 0, 2776 }, /* CAS.B #.W,(An)+ */ +{ CPUFUNC(op_ae0_0), 0, 2784 }, /* CAS.B #.W,-(An) */ +{ CPUFUNC(op_ae8_0), 0, 2792 }, /* CAS.B #.W,(d16,An) */ +{ CPUFUNC(op_af0_0), 0, 2800 }, /* CAS.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_af8_0), 0, 2808 }, /* CAS.B #.W,(xxx).W */ +{ CPUFUNC(op_af9_0), 0, 2809 }, /* CAS.B #.W,(xxx).L */ +{ CPUFUNC(op_c00_0), 0, 3072 }, /* CMP.B #.B,Dn */ +{ CPUFUNC(op_c10_0), 0, 3088 }, /* CMP.B #.B,(An) */ +{ CPUFUNC(op_c18_0), 0, 3096 }, /* CMP.B #.B,(An)+ */ +{ CPUFUNC(op_c20_0), 0, 3104 }, /* CMP.B #.B,-(An) */ +{ CPUFUNC(op_c28_0), 0, 3112 }, /* CMP.B #.B,(d16,An) */ +{ CPUFUNC(op_c30_0), 0, 3120 }, /* CMP.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_c38_0), 0, 3128 }, /* CMP.B #.B,(xxx).W */ +{ CPUFUNC(op_c39_0), 0, 3129 }, /* CMP.B #.B,(xxx).L */ +{ CPUFUNC(op_c3a_0), 0, 3130 }, /* CMP.B #.B,(d16,PC) */ +{ CPUFUNC(op_c3b_0), 0, 3131 }, /* CMP.B #.B,(d8,PC,Xn) */ +{ CPUFUNC(op_c40_0), 0, 3136 }, /* CMP.W #.W,Dn */ +{ CPUFUNC(op_c50_0), 0, 3152 }, /* CMP.W #.W,(An) */ +{ CPUFUNC(op_c58_0), 0, 3160 }, /* CMP.W #.W,(An)+ */ +{ CPUFUNC(op_c60_0), 0, 3168 }, /* CMP.W #.W,-(An) */ +{ CPUFUNC(op_c68_0), 0, 3176 }, /* CMP.W #.W,(d16,An) */ +{ CPUFUNC(op_c70_0), 0, 3184 }, /* CMP.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_c78_0), 0, 3192 }, /* CMP.W #.W,(xxx).W */ +{ CPUFUNC(op_c79_0), 0, 3193 }, /* CMP.W #.W,(xxx).L */ +{ CPUFUNC(op_c7a_0), 0, 3194 }, /* CMP.W #.W,(d16,PC) */ +{ CPUFUNC(op_c7b_0), 0, 3195 }, /* CMP.W #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_c80_0), 0, 3200 }, /* CMP.L #.L,Dn */ +{ CPUFUNC(op_c90_0), 0, 3216 }, /* CMP.L #.L,(An) */ +{ CPUFUNC(op_c98_0), 0, 3224 }, /* CMP.L #.L,(An)+ */ +{ CPUFUNC(op_ca0_0), 0, 3232 }, /* CMP.L #.L,-(An) */ +{ CPUFUNC(op_ca8_0), 0, 3240 }, /* CMP.L #.L,(d16,An) */ +{ CPUFUNC(op_cb0_0), 0, 3248 }, /* CMP.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_cb8_0), 0, 3256 }, /* CMP.L #.L,(xxx).W */ +{ CPUFUNC(op_cb9_0), 0, 3257 }, /* CMP.L #.L,(xxx).L */ +{ CPUFUNC(op_cba_0), 0, 3258 }, /* CMP.L #.L,(d16,PC) */ +{ CPUFUNC(op_cbb_0), 0, 3259 }, /* CMP.L #.L,(d8,PC,Xn) */ +{ CPUFUNC(op_cd0_0), 0, 3280 }, /* CAS.W #.W,(An) */ +{ CPUFUNC(op_cd8_0), 0, 3288 }, /* CAS.W #.W,(An)+ */ +{ CPUFUNC(op_ce0_0), 0, 3296 }, /* CAS.W #.W,-(An) */ +{ CPUFUNC(op_ce8_0), 0, 3304 }, /* CAS.W #.W,(d16,An) */ +{ CPUFUNC(op_cf0_0), 0, 3312 }, /* CAS.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_cf8_0), 0, 3320 }, /* CAS.W #.W,(xxx).W */ +{ CPUFUNC(op_cf9_0), 0, 3321 }, /* CAS.W #.W,(xxx).L */ +{ CPUFUNC(op_cfc_0), 0, 3324 }, /* CAS2.W #.L */ +{ CPUFUNC_FF(op_e10_0), 0, 3600 }, /* MOVES.B #.W,(An) */ +{ CPUFUNC_FF(op_e18_0), 0, 3608 }, /* MOVES.B #.W,(An)+ */ +{ CPUFUNC_FF(op_e20_0), 0, 3616 }, /* MOVES.B #.W,-(An) */ +{ CPUFUNC_FF(op_e28_0), 0, 3624 }, /* MOVES.B #.W,(d16,An) */ +{ CPUFUNC_FF(op_e30_0), 0, 3632 }, /* MOVES.B #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_e38_0), 0, 3640 }, /* MOVES.B #.W,(xxx).W */ +{ CPUFUNC_FF(op_e39_0), 0, 3641 }, /* MOVES.B #.W,(xxx).L */ +{ CPUFUNC_FF(op_e50_0), 0, 3664 }, /* MOVES.W #.W,(An) */ +{ CPUFUNC_FF(op_e58_0), 0, 3672 }, /* MOVES.W #.W,(An)+ */ +{ CPUFUNC_FF(op_e60_0), 0, 3680 }, /* MOVES.W #.W,-(An) */ +{ CPUFUNC_FF(op_e68_0), 0, 3688 }, /* MOVES.W #.W,(d16,An) */ +{ CPUFUNC_FF(op_e70_0), 0, 3696 }, /* MOVES.W #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_e78_0), 0, 3704 }, /* MOVES.W #.W,(xxx).W */ +{ CPUFUNC_FF(op_e79_0), 0, 3705 }, /* MOVES.W #.W,(xxx).L */ +{ CPUFUNC_FF(op_e90_0), 0, 3728 }, /* MOVES.L #.W,(An) */ +{ CPUFUNC_FF(op_e98_0), 0, 3736 }, /* MOVES.L #.W,(An)+ */ +{ CPUFUNC_FF(op_ea0_0), 0, 3744 }, /* MOVES.L #.W,-(An) */ +{ CPUFUNC_FF(op_ea8_0), 0, 3752 }, /* MOVES.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_eb0_0), 0, 3760 }, /* MOVES.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_eb8_0), 0, 3768 }, /* MOVES.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_eb9_0), 0, 3769 }, /* MOVES.L #.W,(xxx).L */ +{ CPUFUNC(op_ed0_0), 0, 3792 }, /* CAS.L #.W,(An) */ +{ CPUFUNC(op_ed8_0), 0, 3800 }, /* CAS.L #.W,(An)+ */ +{ CPUFUNC(op_ee0_0), 0, 3808 }, /* CAS.L #.W,-(An) */ +{ CPUFUNC(op_ee8_0), 0, 3816 }, /* CAS.L #.W,(d16,An) */ +{ CPUFUNC(op_ef0_0), 0, 3824 }, /* CAS.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_ef8_0), 0, 3832 }, /* CAS.L #.W,(xxx).W */ +{ CPUFUNC(op_ef9_0), 0, 3833 }, /* CAS.L #.W,(xxx).L */ +{ CPUFUNC(op_efc_0), 0, 3836 }, /* CAS2.L #.L */ +{ CPUFUNC(op_1000_0), 0, 4096 }, /* MOVE.B Dn,Dn */ +{ CPUFUNC(op_1010_0), 0, 4112 }, /* MOVE.B (An),Dn */ +{ CPUFUNC(op_1018_0), 0, 4120 }, /* MOVE.B (An)+,Dn */ +{ CPUFUNC(op_1020_0), 0, 4128 }, /* MOVE.B -(An),Dn */ +{ CPUFUNC(op_1028_0), 0, 4136 }, /* MOVE.B (d16,An),Dn */ +{ CPUFUNC(op_1030_0), 0, 4144 }, /* MOVE.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_1038_0), 0, 4152 }, /* MOVE.B (xxx).W,Dn */ +{ CPUFUNC(op_1039_0), 0, 4153 }, /* MOVE.B (xxx).L,Dn */ +{ CPUFUNC(op_103a_0), 0, 4154 }, /* MOVE.B (d16,PC),Dn */ +{ CPUFUNC(op_103b_0), 0, 4155 }, /* MOVE.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_103c_0), 0, 4156 }, /* MOVE.B #.B,Dn */ +{ CPUFUNC(op_1080_0), 0, 4224 }, /* MOVE.B Dn,(An) */ +{ CPUFUNC(op_1090_0), 0, 4240 }, /* MOVE.B (An),(An) */ +{ CPUFUNC(op_1098_0), 0, 4248 }, /* MOVE.B (An)+,(An) */ +{ CPUFUNC(op_10a0_0), 0, 4256 }, /* MOVE.B -(An),(An) */ +{ CPUFUNC(op_10a8_0), 0, 4264 }, /* MOVE.B (d16,An),(An) */ +{ CPUFUNC(op_10b0_0), 0, 4272 }, /* MOVE.B (d8,An,Xn),(An) */ +{ CPUFUNC(op_10b8_0), 0, 4280 }, /* MOVE.B (xxx).W,(An) */ +{ CPUFUNC(op_10b9_0), 0, 4281 }, /* MOVE.B (xxx).L,(An) */ +{ CPUFUNC(op_10ba_0), 0, 4282 }, /* MOVE.B (d16,PC),(An) */ +{ CPUFUNC(op_10bb_0), 0, 4283 }, /* MOVE.B (d8,PC,Xn),(An) */ +{ CPUFUNC(op_10bc_0), 0, 4284 }, /* MOVE.B #.B,(An) */ +{ CPUFUNC(op_10c0_0), 0, 4288 }, /* MOVE.B Dn,(An)+ */ +{ CPUFUNC(op_10d0_0), 0, 4304 }, /* MOVE.B (An),(An)+ */ +{ CPUFUNC(op_10d8_0), 0, 4312 }, /* MOVE.B (An)+,(An)+ */ +{ CPUFUNC(op_10e0_0), 0, 4320 }, /* MOVE.B -(An),(An)+ */ +{ CPUFUNC(op_10e8_0), 0, 4328 }, /* MOVE.B (d16,An),(An)+ */ +{ CPUFUNC(op_10f0_0), 0, 4336 }, /* MOVE.B (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_10f8_0), 0, 4344 }, /* MOVE.B (xxx).W,(An)+ */ +{ CPUFUNC(op_10f9_0), 0, 4345 }, /* MOVE.B (xxx).L,(An)+ */ +{ CPUFUNC(op_10fa_0), 0, 4346 }, /* MOVE.B (d16,PC),(An)+ */ +{ CPUFUNC(op_10fb_0), 0, 4347 }, /* MOVE.B (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_10fc_0), 0, 4348 }, /* MOVE.B #.B,(An)+ */ +{ CPUFUNC(op_1100_0), 0, 4352 }, /* MOVE.B Dn,-(An) */ +{ CPUFUNC(op_1110_0), 0, 4368 }, /* MOVE.B (An),-(An) */ +{ CPUFUNC(op_1118_0), 0, 4376 }, /* MOVE.B (An)+,-(An) */ +{ CPUFUNC(op_1120_0), 0, 4384 }, /* MOVE.B -(An),-(An) */ +{ CPUFUNC(op_1128_0), 0, 4392 }, /* MOVE.B (d16,An),-(An) */ +{ CPUFUNC(op_1130_0), 0, 4400 }, /* MOVE.B (d8,An,Xn),-(An) */ +{ CPUFUNC(op_1138_0), 0, 4408 }, /* MOVE.B (xxx).W,-(An) */ +{ CPUFUNC(op_1139_0), 0, 4409 }, /* MOVE.B (xxx).L,-(An) */ +{ CPUFUNC(op_113a_0), 0, 4410 }, /* MOVE.B (d16,PC),-(An) */ +{ CPUFUNC(op_113b_0), 0, 4411 }, /* MOVE.B (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_113c_0), 0, 4412 }, /* MOVE.B #.B,-(An) */ +{ CPUFUNC(op_1140_0), 0, 4416 }, /* MOVE.B Dn,(d16,An) */ +{ CPUFUNC(op_1150_0), 0, 4432 }, /* MOVE.B (An),(d16,An) */ +{ CPUFUNC(op_1158_0), 0, 4440 }, /* MOVE.B (An)+,(d16,An) */ +{ CPUFUNC(op_1160_0), 0, 4448 }, /* MOVE.B -(An),(d16,An) */ +{ CPUFUNC(op_1168_0), 0, 4456 }, /* MOVE.B (d16,An),(d16,An) */ +{ CPUFUNC(op_1170_0), 0, 4464 }, /* MOVE.B (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_1178_0), 0, 4472 }, /* MOVE.B (xxx).W,(d16,An) */ +{ CPUFUNC(op_1179_0), 0, 4473 }, /* MOVE.B (xxx).L,(d16,An) */ +{ CPUFUNC(op_117a_0), 0, 4474 }, /* MOVE.B (d16,PC),(d16,An) */ +{ CPUFUNC(op_117b_0), 0, 4475 }, /* MOVE.B (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_117c_0), 0, 4476 }, /* MOVE.B #.B,(d16,An) */ +{ CPUFUNC(op_1180_0), 0, 4480 }, /* MOVE.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1190_0), 0, 4496 }, /* MOVE.B (An),(d8,An,Xn) */ +{ CPUFUNC(op_1198_0), 0, 4504 }, /* MOVE.B (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_11a0_0), 0, 4512 }, /* MOVE.B -(An),(d8,An,Xn) */ +{ CPUFUNC(op_11a8_0), 0, 4520 }, /* MOVE.B (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_11b0_0), 0, 4528 }, /* MOVE.B (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_11b8_0), 0, 4536 }, /* MOVE.B (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_11b9_0), 0, 4537 }, /* MOVE.B (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_11ba_0), 0, 4538 }, /* MOVE.B (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_11bb_0), 0, 4539 }, /* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_11bc_0), 0, 4540 }, /* MOVE.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_11c0_0), 0, 4544 }, /* MOVE.B Dn,(xxx).W */ +{ CPUFUNC(op_11d0_0), 0, 4560 }, /* MOVE.B (An),(xxx).W */ +{ CPUFUNC(op_11d8_0), 0, 4568 }, /* MOVE.B (An)+,(xxx).W */ +{ CPUFUNC(op_11e0_0), 0, 4576 }, /* MOVE.B -(An),(xxx).W */ +{ CPUFUNC(op_11e8_0), 0, 4584 }, /* MOVE.B (d16,An),(xxx).W */ +{ CPUFUNC(op_11f0_0), 0, 4592 }, /* MOVE.B (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_11f8_0), 0, 4600 }, /* MOVE.B (xxx).W,(xxx).W */ +{ CPUFUNC(op_11f9_0), 0, 4601 }, /* MOVE.B (xxx).L,(xxx).W */ +{ CPUFUNC(op_11fa_0), 0, 4602 }, /* MOVE.B (d16,PC),(xxx).W */ +{ CPUFUNC(op_11fb_0), 0, 4603 }, /* MOVE.B (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_11fc_0), 0, 4604 }, /* MOVE.B #.B,(xxx).W */ +{ CPUFUNC(op_13c0_0), 0, 5056 }, /* MOVE.B Dn,(xxx).L */ +{ CPUFUNC(op_13d0_0), 0, 5072 }, /* MOVE.B (An),(xxx).L */ +{ CPUFUNC(op_13d8_0), 0, 5080 }, /* MOVE.B (An)+,(xxx).L */ +{ CPUFUNC(op_13e0_0), 0, 5088 }, /* MOVE.B -(An),(xxx).L */ +{ CPUFUNC(op_13e8_0), 0, 5096 }, /* MOVE.B (d16,An),(xxx).L */ +{ CPUFUNC(op_13f0_0), 0, 5104 }, /* MOVE.B (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_13f8_0), 0, 5112 }, /* MOVE.B (xxx).W,(xxx).L */ +{ CPUFUNC(op_13f9_0), 0, 5113 }, /* MOVE.B (xxx).L,(xxx).L */ +{ CPUFUNC(op_13fa_0), 0, 5114 }, /* MOVE.B (d16,PC),(xxx).L */ +{ CPUFUNC(op_13fb_0), 0, 5115 }, /* MOVE.B (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_13fc_0), 0, 5116 }, /* MOVE.B #.B,(xxx).L */ +{ CPUFUNC(op_2000_0), 0, 8192 }, /* MOVE.L Dn,Dn */ +{ CPUFUNC(op_2008_0), 0, 8200 }, /* MOVE.L An,Dn */ +{ CPUFUNC(op_2010_0), 0, 8208 }, /* MOVE.L (An),Dn */ +{ CPUFUNC(op_2018_0), 0, 8216 }, /* MOVE.L (An)+,Dn */ +{ CPUFUNC(op_2020_0), 0, 8224 }, /* MOVE.L -(An),Dn */ +{ CPUFUNC(op_2028_0), 0, 8232 }, /* MOVE.L (d16,An),Dn */ +{ CPUFUNC(op_2030_0), 0, 8240 }, /* MOVE.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_2038_0), 0, 8248 }, /* MOVE.L (xxx).W,Dn */ +{ CPUFUNC(op_2039_0), 0, 8249 }, /* MOVE.L (xxx).L,Dn */ +{ CPUFUNC(op_203a_0), 0, 8250 }, /* MOVE.L (d16,PC),Dn */ +{ CPUFUNC(op_203b_0), 0, 8251 }, /* MOVE.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_203c_0), 0, 8252 }, /* MOVE.L #.L,Dn */ +{ CPUFUNC_FF(op_2040_0), 0, 8256 }, /* MOVEA.L Dn,An */ +{ CPUFUNC_FF(op_2048_0), 0, 8264 }, /* MOVEA.L An,An */ +{ CPUFUNC_FF(op_2050_0), 0, 8272 }, /* MOVEA.L (An),An */ +{ CPUFUNC_FF(op_2058_0), 0, 8280 }, /* MOVEA.L (An)+,An */ +{ CPUFUNC_FF(op_2060_0), 0, 8288 }, /* MOVEA.L -(An),An */ +{ CPUFUNC_FF(op_2068_0), 0, 8296 }, /* MOVEA.L (d16,An),An */ +{ CPUFUNC_FF(op_2070_0), 0, 8304 }, /* MOVEA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_2078_0), 0, 8312 }, /* MOVEA.L (xxx).W,An */ +{ CPUFUNC_FF(op_2079_0), 0, 8313 }, /* MOVEA.L (xxx).L,An */ +{ CPUFUNC_FF(op_207a_0), 0, 8314 }, /* MOVEA.L (d16,PC),An */ +{ CPUFUNC_FF(op_207b_0), 0, 8315 }, /* MOVEA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_207c_0), 0, 8316 }, /* MOVEA.L #.L,An */ +{ CPUFUNC(op_2080_0), 0, 8320 }, /* MOVE.L Dn,(An) */ +{ CPUFUNC(op_2088_0), 0, 8328 }, /* MOVE.L An,(An) */ +{ CPUFUNC(op_2090_0), 0, 8336 }, /* MOVE.L (An),(An) */ +{ CPUFUNC(op_2098_0), 0, 8344 }, /* MOVE.L (An)+,(An) */ +{ CPUFUNC(op_20a0_0), 0, 8352 }, /* MOVE.L -(An),(An) */ +{ CPUFUNC(op_20a8_0), 0, 8360 }, /* MOVE.L (d16,An),(An) */ +{ CPUFUNC(op_20b0_0), 0, 8368 }, /* MOVE.L (d8,An,Xn),(An) */ +{ CPUFUNC(op_20b8_0), 0, 8376 }, /* MOVE.L (xxx).W,(An) */ +{ CPUFUNC(op_20b9_0), 0, 8377 }, /* MOVE.L (xxx).L,(An) */ +{ CPUFUNC(op_20ba_0), 0, 8378 }, /* MOVE.L (d16,PC),(An) */ +{ CPUFUNC(op_20bb_0), 0, 8379 }, /* MOVE.L (d8,PC,Xn),(An) */ +{ CPUFUNC(op_20bc_0), 0, 8380 }, /* MOVE.L #.L,(An) */ +{ CPUFUNC(op_20c0_0), 0, 8384 }, /* MOVE.L Dn,(An)+ */ +{ CPUFUNC(op_20c8_0), 0, 8392 }, /* MOVE.L An,(An)+ */ +{ CPUFUNC(op_20d0_0), 0, 8400 }, /* MOVE.L (An),(An)+ */ +{ CPUFUNC(op_20d8_0), 0, 8408 }, /* MOVE.L (An)+,(An)+ */ +{ CPUFUNC(op_20e0_0), 0, 8416 }, /* MOVE.L -(An),(An)+ */ +{ CPUFUNC(op_20e8_0), 0, 8424 }, /* MOVE.L (d16,An),(An)+ */ +{ CPUFUNC(op_20f0_0), 0, 8432 }, /* MOVE.L (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_20f8_0), 0, 8440 }, /* MOVE.L (xxx).W,(An)+ */ +{ CPUFUNC(op_20f9_0), 0, 8441 }, /* MOVE.L (xxx).L,(An)+ */ +{ CPUFUNC(op_20fa_0), 0, 8442 }, /* MOVE.L (d16,PC),(An)+ */ +{ CPUFUNC(op_20fb_0), 0, 8443 }, /* MOVE.L (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_20fc_0), 0, 8444 }, /* MOVE.L #.L,(An)+ */ +{ CPUFUNC(op_2100_0), 0, 8448 }, /* MOVE.L Dn,-(An) */ +{ CPUFUNC(op_2108_0), 0, 8456 }, /* MOVE.L An,-(An) */ +{ CPUFUNC(op_2110_0), 0, 8464 }, /* MOVE.L (An),-(An) */ +{ CPUFUNC(op_2118_0), 0, 8472 }, /* MOVE.L (An)+,-(An) */ +{ CPUFUNC(op_2120_0), 0, 8480 }, /* MOVE.L -(An),-(An) */ +{ CPUFUNC(op_2128_0), 0, 8488 }, /* MOVE.L (d16,An),-(An) */ +{ CPUFUNC(op_2130_0), 0, 8496 }, /* MOVE.L (d8,An,Xn),-(An) */ +{ CPUFUNC(op_2138_0), 0, 8504 }, /* MOVE.L (xxx).W,-(An) */ +{ CPUFUNC(op_2139_0), 0, 8505 }, /* MOVE.L (xxx).L,-(An) */ +{ CPUFUNC(op_213a_0), 0, 8506 }, /* MOVE.L (d16,PC),-(An) */ +{ CPUFUNC(op_213b_0), 0, 8507 }, /* MOVE.L (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_213c_0), 0, 8508 }, /* MOVE.L #.L,-(An) */ +{ CPUFUNC(op_2140_0), 0, 8512 }, /* MOVE.L Dn,(d16,An) */ +{ CPUFUNC(op_2148_0), 0, 8520 }, /* MOVE.L An,(d16,An) */ +{ CPUFUNC(op_2150_0), 0, 8528 }, /* MOVE.L (An),(d16,An) */ +{ CPUFUNC(op_2158_0), 0, 8536 }, /* MOVE.L (An)+,(d16,An) */ +{ CPUFUNC(op_2160_0), 0, 8544 }, /* MOVE.L -(An),(d16,An) */ +{ CPUFUNC(op_2168_0), 0, 8552 }, /* MOVE.L (d16,An),(d16,An) */ +{ CPUFUNC(op_2170_0), 0, 8560 }, /* MOVE.L (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_2178_0), 0, 8568 }, /* MOVE.L (xxx).W,(d16,An) */ +{ CPUFUNC(op_2179_0), 0, 8569 }, /* MOVE.L (xxx).L,(d16,An) */ +{ CPUFUNC(op_217a_0), 0, 8570 }, /* MOVE.L (d16,PC),(d16,An) */ +{ CPUFUNC(op_217b_0), 0, 8571 }, /* MOVE.L (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_217c_0), 0, 8572 }, /* MOVE.L #.L,(d16,An) */ +{ CPUFUNC(op_2180_0), 0, 8576 }, /* MOVE.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_2188_0), 0, 8584 }, /* MOVE.L An,(d8,An,Xn) */ +{ CPUFUNC(op_2190_0), 0, 8592 }, /* MOVE.L (An),(d8,An,Xn) */ +{ CPUFUNC(op_2198_0), 0, 8600 }, /* MOVE.L (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_21a0_0), 0, 8608 }, /* MOVE.L -(An),(d8,An,Xn) */ +{ CPUFUNC(op_21a8_0), 0, 8616 }, /* MOVE.L (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_21b0_0), 0, 8624 }, /* MOVE.L (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_21b8_0), 0, 8632 }, /* MOVE.L (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_21b9_0), 0, 8633 }, /* MOVE.L (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_21ba_0), 0, 8634 }, /* MOVE.L (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_21bb_0), 0, 8635 }, /* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_21bc_0), 0, 8636 }, /* MOVE.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_21c0_0), 0, 8640 }, /* MOVE.L Dn,(xxx).W */ +{ CPUFUNC(op_21c8_0), 0, 8648 }, /* MOVE.L An,(xxx).W */ +{ CPUFUNC(op_21d0_0), 0, 8656 }, /* MOVE.L (An),(xxx).W */ +{ CPUFUNC(op_21d8_0), 0, 8664 }, /* MOVE.L (An)+,(xxx).W */ +{ CPUFUNC(op_21e0_0), 0, 8672 }, /* MOVE.L -(An),(xxx).W */ +{ CPUFUNC(op_21e8_0), 0, 8680 }, /* MOVE.L (d16,An),(xxx).W */ +{ CPUFUNC(op_21f0_0), 0, 8688 }, /* MOVE.L (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_21f8_0), 0, 8696 }, /* MOVE.L (xxx).W,(xxx).W */ +{ CPUFUNC(op_21f9_0), 0, 8697 }, /* MOVE.L (xxx).L,(xxx).W */ +{ CPUFUNC(op_21fa_0), 0, 8698 }, /* MOVE.L (d16,PC),(xxx).W */ +{ CPUFUNC(op_21fb_0), 0, 8699 }, /* MOVE.L (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_21fc_0), 0, 8700 }, /* MOVE.L #.L,(xxx).W */ +{ CPUFUNC(op_23c0_0), 0, 9152 }, /* MOVE.L Dn,(xxx).L */ +{ CPUFUNC(op_23c8_0), 0, 9160 }, /* MOVE.L An,(xxx).L */ +{ CPUFUNC(op_23d0_0), 0, 9168 }, /* MOVE.L (An),(xxx).L */ +{ CPUFUNC(op_23d8_0), 0, 9176 }, /* MOVE.L (An)+,(xxx).L */ +{ CPUFUNC(op_23e0_0), 0, 9184 }, /* MOVE.L -(An),(xxx).L */ +{ CPUFUNC(op_23e8_0), 0, 9192 }, /* MOVE.L (d16,An),(xxx).L */ +{ CPUFUNC(op_23f0_0), 0, 9200 }, /* MOVE.L (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_23f8_0), 0, 9208 }, /* MOVE.L (xxx).W,(xxx).L */ +{ CPUFUNC(op_23f9_0), 0, 9209 }, /* MOVE.L (xxx).L,(xxx).L */ +{ CPUFUNC(op_23fa_0), 0, 9210 }, /* MOVE.L (d16,PC),(xxx).L */ +{ CPUFUNC(op_23fb_0), 0, 9211 }, /* MOVE.L (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_23fc_0), 0, 9212 }, /* MOVE.L #.L,(xxx).L */ +{ CPUFUNC(op_3000_0), 0, 12288 }, /* MOVE.W Dn,Dn */ +{ CPUFUNC(op_3008_0), 0, 12296 }, /* MOVE.W An,Dn */ +{ CPUFUNC(op_3010_0), 0, 12304 }, /* MOVE.W (An),Dn */ +{ CPUFUNC(op_3018_0), 0, 12312 }, /* MOVE.W (An)+,Dn */ +{ CPUFUNC(op_3020_0), 0, 12320 }, /* MOVE.W -(An),Dn */ +{ CPUFUNC(op_3028_0), 0, 12328 }, /* MOVE.W (d16,An),Dn */ +{ CPUFUNC(op_3030_0), 0, 12336 }, /* MOVE.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_3038_0), 0, 12344 }, /* MOVE.W (xxx).W,Dn */ +{ CPUFUNC(op_3039_0), 0, 12345 }, /* MOVE.W (xxx).L,Dn */ +{ CPUFUNC(op_303a_0), 0, 12346 }, /* MOVE.W (d16,PC),Dn */ +{ CPUFUNC(op_303b_0), 0, 12347 }, /* MOVE.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_303c_0), 0, 12348 }, /* MOVE.W #.W,Dn */ +{ CPUFUNC_FF(op_3040_0), 0, 12352 }, /* MOVEA.W Dn,An */ +{ CPUFUNC_FF(op_3048_0), 0, 12360 }, /* MOVEA.W An,An */ +{ CPUFUNC_FF(op_3050_0), 0, 12368 }, /* MOVEA.W (An),An */ +{ CPUFUNC_FF(op_3058_0), 0, 12376 }, /* MOVEA.W (An)+,An */ +{ CPUFUNC_FF(op_3060_0), 0, 12384 }, /* MOVEA.W -(An),An */ +{ CPUFUNC_FF(op_3068_0), 0, 12392 }, /* MOVEA.W (d16,An),An */ +{ CPUFUNC_FF(op_3070_0), 0, 12400 }, /* MOVEA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_3078_0), 0, 12408 }, /* MOVEA.W (xxx).W,An */ +{ CPUFUNC_FF(op_3079_0), 0, 12409 }, /* MOVEA.W (xxx).L,An */ +{ CPUFUNC_FF(op_307a_0), 0, 12410 }, /* MOVEA.W (d16,PC),An */ +{ CPUFUNC_FF(op_307b_0), 0, 12411 }, /* MOVEA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_307c_0), 0, 12412 }, /* MOVEA.W #.W,An */ +{ CPUFUNC(op_3080_0), 0, 12416 }, /* MOVE.W Dn,(An) */ +{ CPUFUNC(op_3088_0), 0, 12424 }, /* MOVE.W An,(An) */ +{ CPUFUNC(op_3090_0), 0, 12432 }, /* MOVE.W (An),(An) */ +{ CPUFUNC(op_3098_0), 0, 12440 }, /* MOVE.W (An)+,(An) */ +{ CPUFUNC(op_30a0_0), 0, 12448 }, /* MOVE.W -(An),(An) */ +{ CPUFUNC(op_30a8_0), 0, 12456 }, /* MOVE.W (d16,An),(An) */ +{ CPUFUNC(op_30b0_0), 0, 12464 }, /* MOVE.W (d8,An,Xn),(An) */ +{ CPUFUNC(op_30b8_0), 0, 12472 }, /* MOVE.W (xxx).W,(An) */ +{ CPUFUNC(op_30b9_0), 0, 12473 }, /* MOVE.W (xxx).L,(An) */ +{ CPUFUNC(op_30ba_0), 0, 12474 }, /* MOVE.W (d16,PC),(An) */ +{ CPUFUNC(op_30bb_0), 0, 12475 }, /* MOVE.W (d8,PC,Xn),(An) */ +{ CPUFUNC(op_30bc_0), 0, 12476 }, /* MOVE.W #.W,(An) */ +{ CPUFUNC(op_30c0_0), 0, 12480 }, /* MOVE.W Dn,(An)+ */ +{ CPUFUNC(op_30c8_0), 0, 12488 }, /* MOVE.W An,(An)+ */ +{ CPUFUNC(op_30d0_0), 0, 12496 }, /* MOVE.W (An),(An)+ */ +{ CPUFUNC(op_30d8_0), 0, 12504 }, /* MOVE.W (An)+,(An)+ */ +{ CPUFUNC(op_30e0_0), 0, 12512 }, /* MOVE.W -(An),(An)+ */ +{ CPUFUNC(op_30e8_0), 0, 12520 }, /* MOVE.W (d16,An),(An)+ */ +{ CPUFUNC(op_30f0_0), 0, 12528 }, /* MOVE.W (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_30f8_0), 0, 12536 }, /* MOVE.W (xxx).W,(An)+ */ +{ CPUFUNC(op_30f9_0), 0, 12537 }, /* MOVE.W (xxx).L,(An)+ */ +{ CPUFUNC(op_30fa_0), 0, 12538 }, /* MOVE.W (d16,PC),(An)+ */ +{ CPUFUNC(op_30fb_0), 0, 12539 }, /* MOVE.W (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_30fc_0), 0, 12540 }, /* MOVE.W #.W,(An)+ */ +{ CPUFUNC(op_3100_0), 0, 12544 }, /* MOVE.W Dn,-(An) */ +{ CPUFUNC(op_3108_0), 0, 12552 }, /* MOVE.W An,-(An) */ +{ CPUFUNC(op_3110_0), 0, 12560 }, /* MOVE.W (An),-(An) */ +{ CPUFUNC(op_3118_0), 0, 12568 }, /* MOVE.W (An)+,-(An) */ +{ CPUFUNC(op_3120_0), 0, 12576 }, /* MOVE.W -(An),-(An) */ +{ CPUFUNC(op_3128_0), 0, 12584 }, /* MOVE.W (d16,An),-(An) */ +{ CPUFUNC(op_3130_0), 0, 12592 }, /* MOVE.W (d8,An,Xn),-(An) */ +{ CPUFUNC(op_3138_0), 0, 12600 }, /* MOVE.W (xxx).W,-(An) */ +{ CPUFUNC(op_3139_0), 0, 12601 }, /* MOVE.W (xxx).L,-(An) */ +{ CPUFUNC(op_313a_0), 0, 12602 }, /* MOVE.W (d16,PC),-(An) */ +{ CPUFUNC(op_313b_0), 0, 12603 }, /* MOVE.W (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_313c_0), 0, 12604 }, /* MOVE.W #.W,-(An) */ +{ CPUFUNC(op_3140_0), 0, 12608 }, /* MOVE.W Dn,(d16,An) */ +{ CPUFUNC(op_3148_0), 0, 12616 }, /* MOVE.W An,(d16,An) */ +{ CPUFUNC(op_3150_0), 0, 12624 }, /* MOVE.W (An),(d16,An) */ +{ CPUFUNC(op_3158_0), 0, 12632 }, /* MOVE.W (An)+,(d16,An) */ +{ CPUFUNC(op_3160_0), 0, 12640 }, /* MOVE.W -(An),(d16,An) */ +{ CPUFUNC(op_3168_0), 0, 12648 }, /* MOVE.W (d16,An),(d16,An) */ +{ CPUFUNC(op_3170_0), 0, 12656 }, /* MOVE.W (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_3178_0), 0, 12664 }, /* MOVE.W (xxx).W,(d16,An) */ +{ CPUFUNC(op_3179_0), 0, 12665 }, /* MOVE.W (xxx).L,(d16,An) */ +{ CPUFUNC(op_317a_0), 0, 12666 }, /* MOVE.W (d16,PC),(d16,An) */ +{ CPUFUNC(op_317b_0), 0, 12667 }, /* MOVE.W (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_317c_0), 0, 12668 }, /* MOVE.W #.W,(d16,An) */ +{ CPUFUNC(op_3180_0), 0, 12672 }, /* MOVE.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_3188_0), 0, 12680 }, /* MOVE.W An,(d8,An,Xn) */ +{ CPUFUNC(op_3190_0), 0, 12688 }, /* MOVE.W (An),(d8,An,Xn) */ +{ CPUFUNC(op_3198_0), 0, 12696 }, /* MOVE.W (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_31a0_0), 0, 12704 }, /* MOVE.W -(An),(d8,An,Xn) */ +{ CPUFUNC(op_31a8_0), 0, 12712 }, /* MOVE.W (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_31b0_0), 0, 12720 }, /* MOVE.W (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_31b8_0), 0, 12728 }, /* MOVE.W (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_31b9_0), 0, 12729 }, /* MOVE.W (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_31ba_0), 0, 12730 }, /* MOVE.W (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_31bb_0), 0, 12731 }, /* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_31bc_0), 0, 12732 }, /* MOVE.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_31c0_0), 0, 12736 }, /* MOVE.W Dn,(xxx).W */ +{ CPUFUNC(op_31c8_0), 0, 12744 }, /* MOVE.W An,(xxx).W */ +{ CPUFUNC(op_31d0_0), 0, 12752 }, /* MOVE.W (An),(xxx).W */ +{ CPUFUNC(op_31d8_0), 0, 12760 }, /* MOVE.W (An)+,(xxx).W */ +{ CPUFUNC(op_31e0_0), 0, 12768 }, /* MOVE.W -(An),(xxx).W */ +{ CPUFUNC(op_31e8_0), 0, 12776 }, /* MOVE.W (d16,An),(xxx).W */ +{ CPUFUNC(op_31f0_0), 0, 12784 }, /* MOVE.W (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_31f8_0), 0, 12792 }, /* MOVE.W (xxx).W,(xxx).W */ +{ CPUFUNC(op_31f9_0), 0, 12793 }, /* MOVE.W (xxx).L,(xxx).W */ +{ CPUFUNC(op_31fa_0), 0, 12794 }, /* MOVE.W (d16,PC),(xxx).W */ +{ CPUFUNC(op_31fb_0), 0, 12795 }, /* MOVE.W (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_31fc_0), 0, 12796 }, /* MOVE.W #.W,(xxx).W */ +{ CPUFUNC(op_33c0_0), 0, 13248 }, /* MOVE.W Dn,(xxx).L */ +{ CPUFUNC(op_33c8_0), 0, 13256 }, /* MOVE.W An,(xxx).L */ +{ CPUFUNC(op_33d0_0), 0, 13264 }, /* MOVE.W (An),(xxx).L */ +{ CPUFUNC(op_33d8_0), 0, 13272 }, /* MOVE.W (An)+,(xxx).L */ +{ CPUFUNC(op_33e0_0), 0, 13280 }, /* MOVE.W -(An),(xxx).L */ +{ CPUFUNC(op_33e8_0), 0, 13288 }, /* MOVE.W (d16,An),(xxx).L */ +{ CPUFUNC(op_33f0_0), 0, 13296 }, /* MOVE.W (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_33f8_0), 0, 13304 }, /* MOVE.W (xxx).W,(xxx).L */ +{ CPUFUNC(op_33f9_0), 0, 13305 }, /* MOVE.W (xxx).L,(xxx).L */ +{ CPUFUNC(op_33fa_0), 0, 13306 }, /* MOVE.W (d16,PC),(xxx).L */ +{ CPUFUNC(op_33fb_0), 0, 13307 }, /* MOVE.W (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_33fc_0), 0, 13308 }, /* MOVE.W #.W,(xxx).L */ +{ CPUFUNC(op_4000_0), 0, 16384 }, /* NEGX.B Dn */ +{ CPUFUNC(op_4010_0), 0, 16400 }, /* NEGX.B (An) */ +{ CPUFUNC(op_4018_0), 0, 16408 }, /* NEGX.B (An)+ */ +{ CPUFUNC(op_4020_0), 0, 16416 }, /* NEGX.B -(An) */ +{ CPUFUNC(op_4028_0), 0, 16424 }, /* NEGX.B (d16,An) */ +{ CPUFUNC(op_4030_0), 0, 16432 }, /* NEGX.B (d8,An,Xn) */ +{ CPUFUNC(op_4038_0), 0, 16440 }, /* NEGX.B (xxx).W */ +{ CPUFUNC(op_4039_0), 0, 16441 }, /* NEGX.B (xxx).L */ +{ CPUFUNC(op_4040_0), 0, 16448 }, /* NEGX.W Dn */ +{ CPUFUNC(op_4050_0), 0, 16464 }, /* NEGX.W (An) */ +{ CPUFUNC(op_4058_0), 0, 16472 }, /* NEGX.W (An)+ */ +{ CPUFUNC(op_4060_0), 0, 16480 }, /* NEGX.W -(An) */ +{ CPUFUNC(op_4068_0), 0, 16488 }, /* NEGX.W (d16,An) */ +{ CPUFUNC(op_4070_0), 0, 16496 }, /* NEGX.W (d8,An,Xn) */ +{ CPUFUNC(op_4078_0), 0, 16504 }, /* NEGX.W (xxx).W */ +{ CPUFUNC(op_4079_0), 0, 16505 }, /* NEGX.W (xxx).L */ +{ CPUFUNC(op_4080_0), 0, 16512 }, /* NEGX.L Dn */ +{ CPUFUNC(op_4090_0), 0, 16528 }, /* NEGX.L (An) */ +{ CPUFUNC(op_4098_0), 0, 16536 }, /* NEGX.L (An)+ */ +{ CPUFUNC(op_40a0_0), 0, 16544 }, /* NEGX.L -(An) */ +{ CPUFUNC(op_40a8_0), 0, 16552 }, /* NEGX.L (d16,An) */ +{ CPUFUNC(op_40b0_0), 0, 16560 }, /* NEGX.L (d8,An,Xn) */ +{ CPUFUNC(op_40b8_0), 0, 16568 }, /* NEGX.L (xxx).W */ +{ CPUFUNC(op_40b9_0), 0, 16569 }, /* NEGX.L (xxx).L */ +{ CPUFUNC_FF(op_40c0_0), 0, 16576 }, /* MVSR2.W Dn */ +{ CPUFUNC_FF(op_40d0_0), 0, 16592 }, /* MVSR2.W (An) */ +{ CPUFUNC_FF(op_40d8_0), 0, 16600 }, /* MVSR2.W (An)+ */ +{ CPUFUNC_FF(op_40e0_0), 0, 16608 }, /* MVSR2.W -(An) */ +{ CPUFUNC_FF(op_40e8_0), 0, 16616 }, /* MVSR2.W (d16,An) */ +{ CPUFUNC_FF(op_40f0_0), 0, 16624 }, /* MVSR2.W (d8,An,Xn) */ +{ CPUFUNC_FF(op_40f8_0), 0, 16632 }, /* MVSR2.W (xxx).W */ +{ CPUFUNC_FF(op_40f9_0), 0, 16633 }, /* MVSR2.W (xxx).L */ +{ CPUFUNC(op_4100_0), 0, 16640 }, /* CHK.L Dn,Dn */ +{ CPUFUNC(op_4110_0), 0, 16656 }, /* CHK.L (An),Dn */ +{ CPUFUNC(op_4118_0), 0, 16664 }, /* CHK.L (An)+,Dn */ +{ CPUFUNC(op_4120_0), 0, 16672 }, /* CHK.L -(An),Dn */ +{ CPUFUNC(op_4128_0), 0, 16680 }, /* CHK.L (d16,An),Dn */ +{ CPUFUNC(op_4130_0), 0, 16688 }, /* CHK.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_4138_0), 0, 16696 }, /* CHK.L (xxx).W,Dn */ +{ CPUFUNC(op_4139_0), 0, 16697 }, /* CHK.L (xxx).L,Dn */ +{ CPUFUNC(op_413a_0), 0, 16698 }, /* CHK.L (d16,PC),Dn */ +{ CPUFUNC(op_413b_0), 0, 16699 }, /* CHK.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_413c_0), 0, 16700 }, /* CHK.L #.L,Dn */ +{ CPUFUNC(op_4180_0), 0, 16768 }, /* CHK.W Dn,Dn */ +{ CPUFUNC(op_4190_0), 0, 16784 }, /* CHK.W (An),Dn */ +{ CPUFUNC(op_4198_0), 0, 16792 }, /* CHK.W (An)+,Dn */ +{ CPUFUNC(op_41a0_0), 0, 16800 }, /* CHK.W -(An),Dn */ +{ CPUFUNC(op_41a8_0), 0, 16808 }, /* CHK.W (d16,An),Dn */ +{ CPUFUNC(op_41b0_0), 0, 16816 }, /* CHK.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_41b8_0), 0, 16824 }, /* CHK.W (xxx).W,Dn */ +{ CPUFUNC(op_41b9_0), 0, 16825 }, /* CHK.W (xxx).L,Dn */ +{ CPUFUNC(op_41ba_0), 0, 16826 }, /* CHK.W (d16,PC),Dn */ +{ CPUFUNC(op_41bb_0), 0, 16827 }, /* CHK.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_41bc_0), 0, 16828 }, /* CHK.W #.W,Dn */ +{ CPUFUNC_FF(op_41d0_0), 0, 16848 }, /* LEA.L (An),An */ +{ CPUFUNC_FF(op_41e8_0), 0, 16872 }, /* LEA.L (d16,An),An */ +{ CPUFUNC_FF(op_41f0_0), 0, 16880 }, /* LEA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_41f8_0), 0, 16888 }, /* LEA.L (xxx).W,An */ +{ CPUFUNC_FF(op_41f9_0), 0, 16889 }, /* LEA.L (xxx).L,An */ +{ CPUFUNC_FF(op_41fa_0), 0, 16890 }, /* LEA.L (d16,PC),An */ +{ CPUFUNC_FF(op_41fb_0), 0, 16891 }, /* LEA.L (d8,PC,Xn),An */ +{ CPUFUNC(op_4200_0), 0, 16896 }, /* CLR.B Dn */ +{ CPUFUNC(op_4210_0), 0, 16912 }, /* CLR.B (An) */ +{ CPUFUNC(op_4218_0), 0, 16920 }, /* CLR.B (An)+ */ +{ CPUFUNC(op_4220_0), 0, 16928 }, /* CLR.B -(An) */ +{ CPUFUNC(op_4228_0), 0, 16936 }, /* CLR.B (d16,An) */ +{ CPUFUNC(op_4230_0), 0, 16944 }, /* CLR.B (d8,An,Xn) */ +{ CPUFUNC(op_4238_0), 0, 16952 }, /* CLR.B (xxx).W */ +{ CPUFUNC(op_4239_0), 0, 16953 }, /* CLR.B (xxx).L */ +{ CPUFUNC(op_4240_0), 0, 16960 }, /* CLR.W Dn */ +{ CPUFUNC(op_4250_0), 0, 16976 }, /* CLR.W (An) */ +{ CPUFUNC(op_4258_0), 0, 16984 }, /* CLR.W (An)+ */ +{ CPUFUNC(op_4260_0), 0, 16992 }, /* CLR.W -(An) */ +{ CPUFUNC(op_4268_0), 0, 17000 }, /* CLR.W (d16,An) */ +{ CPUFUNC(op_4270_0), 0, 17008 }, /* CLR.W (d8,An,Xn) */ +{ CPUFUNC(op_4278_0), 0, 17016 }, /* CLR.W (xxx).W */ +{ CPUFUNC(op_4279_0), 0, 17017 }, /* CLR.W (xxx).L */ +{ CPUFUNC(op_4280_0), 0, 17024 }, /* CLR.L Dn */ +{ CPUFUNC(op_4290_0), 0, 17040 }, /* CLR.L (An) */ +{ CPUFUNC(op_4298_0), 0, 17048 }, /* CLR.L (An)+ */ +{ CPUFUNC(op_42a0_0), 0, 17056 }, /* CLR.L -(An) */ +{ CPUFUNC(op_42a8_0), 0, 17064 }, /* CLR.L (d16,An) */ +{ CPUFUNC(op_42b0_0), 0, 17072 }, /* CLR.L (d8,An,Xn) */ +{ CPUFUNC(op_42b8_0), 0, 17080 }, /* CLR.L (xxx).W */ +{ CPUFUNC(op_42b9_0), 0, 17081 }, /* CLR.L (xxx).L */ +{ CPUFUNC_FF(op_42c0_0), 0, 17088 }, /* MVSR2.B Dn */ +{ CPUFUNC_FF(op_42d0_0), 0, 17104 }, /* MVSR2.B (An) */ +{ CPUFUNC_FF(op_42d8_0), 0, 17112 }, /* MVSR2.B (An)+ */ +{ CPUFUNC_FF(op_42e0_0), 0, 17120 }, /* MVSR2.B -(An) */ +{ CPUFUNC_FF(op_42e8_0), 0, 17128 }, /* MVSR2.B (d16,An) */ +{ CPUFUNC_FF(op_42f0_0), 0, 17136 }, /* MVSR2.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_42f8_0), 0, 17144 }, /* MVSR2.B (xxx).W */ +{ CPUFUNC_FF(op_42f9_0), 0, 17145 }, /* MVSR2.B (xxx).L */ +{ CPUFUNC(op_4400_0), 0, 17408 }, /* NEG.B Dn */ +{ CPUFUNC(op_4410_0), 0, 17424 }, /* NEG.B (An) */ +{ CPUFUNC(op_4418_0), 0, 17432 }, /* NEG.B (An)+ */ +{ CPUFUNC(op_4420_0), 0, 17440 }, /* NEG.B -(An) */ +{ CPUFUNC(op_4428_0), 0, 17448 }, /* NEG.B (d16,An) */ +{ CPUFUNC(op_4430_0), 0, 17456 }, /* NEG.B (d8,An,Xn) */ +{ CPUFUNC(op_4438_0), 0, 17464 }, /* NEG.B (xxx).W */ +{ CPUFUNC(op_4439_0), 0, 17465 }, /* NEG.B (xxx).L */ +{ CPUFUNC(op_4440_0), 0, 17472 }, /* NEG.W Dn */ +{ CPUFUNC(op_4450_0), 0, 17488 }, /* NEG.W (An) */ +{ CPUFUNC(op_4458_0), 0, 17496 }, /* NEG.W (An)+ */ +{ CPUFUNC(op_4460_0), 0, 17504 }, /* NEG.W -(An) */ +{ CPUFUNC(op_4468_0), 0, 17512 }, /* NEG.W (d16,An) */ +{ CPUFUNC(op_4470_0), 0, 17520 }, /* NEG.W (d8,An,Xn) */ +{ CPUFUNC(op_4478_0), 0, 17528 }, /* NEG.W (xxx).W */ +{ CPUFUNC(op_4479_0), 0, 17529 }, /* NEG.W (xxx).L */ +{ CPUFUNC(op_4480_0), 0, 17536 }, /* NEG.L Dn */ +{ CPUFUNC(op_4490_0), 0, 17552 }, /* NEG.L (An) */ +{ CPUFUNC(op_4498_0), 0, 17560 }, /* NEG.L (An)+ */ +{ CPUFUNC(op_44a0_0), 0, 17568 }, /* NEG.L -(An) */ +{ CPUFUNC(op_44a8_0), 0, 17576 }, /* NEG.L (d16,An) */ +{ CPUFUNC(op_44b0_0), 0, 17584 }, /* NEG.L (d8,An,Xn) */ +{ CPUFUNC(op_44b8_0), 0, 17592 }, /* NEG.L (xxx).W */ +{ CPUFUNC(op_44b9_0), 0, 17593 }, /* NEG.L (xxx).L */ +{ CPUFUNC(op_44c0_0), 0, 17600 }, /* MV2SR.B Dn */ +{ CPUFUNC(op_44d0_0), 0, 17616 }, /* MV2SR.B (An) */ +{ CPUFUNC(op_44d8_0), 0, 17624 }, /* MV2SR.B (An)+ */ +{ CPUFUNC(op_44e0_0), 0, 17632 }, /* MV2SR.B -(An) */ +{ CPUFUNC(op_44e8_0), 0, 17640 }, /* MV2SR.B (d16,An) */ +{ CPUFUNC(op_44f0_0), 0, 17648 }, /* MV2SR.B (d8,An,Xn) */ +{ CPUFUNC(op_44f8_0), 0, 17656 }, /* MV2SR.B (xxx).W */ +{ CPUFUNC(op_44f9_0), 0, 17657 }, /* MV2SR.B (xxx).L */ +{ CPUFUNC(op_44fa_0), 0, 17658 }, /* MV2SR.B (d16,PC) */ +{ CPUFUNC(op_44fb_0), 0, 17659 }, /* MV2SR.B (d8,PC,Xn) */ +{ CPUFUNC(op_44fc_0), 0, 17660 }, /* MV2SR.B #.B */ +{ CPUFUNC(op_4600_0), 0, 17920 }, /* NOT.B Dn */ +{ CPUFUNC(op_4610_0), 0, 17936 }, /* NOT.B (An) */ +{ CPUFUNC(op_4618_0), 0, 17944 }, /* NOT.B (An)+ */ +{ CPUFUNC(op_4620_0), 0, 17952 }, /* NOT.B -(An) */ +{ CPUFUNC(op_4628_0), 0, 17960 }, /* NOT.B (d16,An) */ +{ CPUFUNC(op_4630_0), 0, 17968 }, /* NOT.B (d8,An,Xn) */ +{ CPUFUNC(op_4638_0), 0, 17976 }, /* NOT.B (xxx).W */ +{ CPUFUNC(op_4639_0), 0, 17977 }, /* NOT.B (xxx).L */ +{ CPUFUNC(op_4640_0), 0, 17984 }, /* NOT.W Dn */ +{ CPUFUNC(op_4650_0), 0, 18000 }, /* NOT.W (An) */ +{ CPUFUNC(op_4658_0), 0, 18008 }, /* NOT.W (An)+ */ +{ CPUFUNC(op_4660_0), 0, 18016 }, /* NOT.W -(An) */ +{ CPUFUNC(op_4668_0), 0, 18024 }, /* NOT.W (d16,An) */ +{ CPUFUNC(op_4670_0), 0, 18032 }, /* NOT.W (d8,An,Xn) */ +{ CPUFUNC(op_4678_0), 0, 18040 }, /* NOT.W (xxx).W */ +{ CPUFUNC(op_4679_0), 0, 18041 }, /* NOT.W (xxx).L */ +{ CPUFUNC(op_4680_0), 0, 18048 }, /* NOT.L Dn */ +{ CPUFUNC(op_4690_0), 0, 18064 }, /* NOT.L (An) */ +{ CPUFUNC(op_4698_0), 0, 18072 }, /* NOT.L (An)+ */ +{ CPUFUNC(op_46a0_0), 0, 18080 }, /* NOT.L -(An) */ +{ CPUFUNC(op_46a8_0), 0, 18088 }, /* NOT.L (d16,An) */ +{ CPUFUNC(op_46b0_0), 0, 18096 }, /* NOT.L (d8,An,Xn) */ +{ CPUFUNC(op_46b8_0), 0, 18104 }, /* NOT.L (xxx).W */ +{ CPUFUNC(op_46b9_0), 0, 18105 }, /* NOT.L (xxx).L */ +{ CPUFUNC(op_46c0_0), 0, 18112 }, /* MV2SR.W Dn */ +{ CPUFUNC(op_46d0_0), 0, 18128 }, /* MV2SR.W (An) */ +{ CPUFUNC(op_46d8_0), 0, 18136 }, /* MV2SR.W (An)+ */ +{ CPUFUNC(op_46e0_0), 0, 18144 }, /* MV2SR.W -(An) */ +{ CPUFUNC(op_46e8_0), 0, 18152 }, /* MV2SR.W (d16,An) */ +{ CPUFUNC(op_46f0_0), 0, 18160 }, /* MV2SR.W (d8,An,Xn) */ +{ CPUFUNC(op_46f8_0), 0, 18168 }, /* MV2SR.W (xxx).W */ +{ CPUFUNC(op_46f9_0), 0, 18169 }, /* MV2SR.W (xxx).L */ +{ CPUFUNC(op_46fa_0), 0, 18170 }, /* MV2SR.W (d16,PC) */ +{ CPUFUNC(op_46fb_0), 0, 18171 }, /* MV2SR.W (d8,PC,Xn) */ +{ CPUFUNC(op_46fc_0), 0, 18172 }, /* MV2SR.W #.W */ +{ CPUFUNC(op_4800_1), 0, 18432 }, /* NBCD.B Dn */ +{ CPUFUNC_FF(op_4808_0), 0, 18440 }, /* LINK.L An,#.L */ +{ CPUFUNC(op_4810_1), 0, 18448 }, /* NBCD.B (An) */ +{ CPUFUNC(op_4818_1), 0, 18456 }, /* NBCD.B (An)+ */ +{ CPUFUNC(op_4820_1), 0, 18464 }, /* NBCD.B -(An) */ +{ CPUFUNC(op_4828_1), 0, 18472 }, /* NBCD.B (d16,An) */ +{ CPUFUNC(op_4830_1), 0, 18480 }, /* NBCD.B (d8,An,Xn) */ +{ CPUFUNC(op_4838_1), 0, 18488 }, /* NBCD.B (xxx).W */ +{ CPUFUNC(op_4839_1), 0, 18489 }, /* NBCD.B (xxx).L */ +{ CPUFUNC(op_4840_0), 0, 18496 }, /* SWAP.W Dn */ +{ CPUFUNC_FF(op_4848_0), 0, 18504 }, /* BKPT.L # */ +{ CPUFUNC_FF(op_4850_0), 0, 18512 }, /* PEA.L (An) */ +{ CPUFUNC_FF(op_4868_0), 0, 18536 }, /* PEA.L (d16,An) */ +{ CPUFUNC_FF(op_4870_0), 0, 18544 }, /* PEA.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4878_0), 0, 18552 }, /* PEA.L (xxx).W */ +{ CPUFUNC_FF(op_4879_0), 0, 18553 }, /* PEA.L (xxx).L */ +{ CPUFUNC_FF(op_487a_0), 0, 18554 }, /* PEA.L (d16,PC) */ +{ CPUFUNC_FF(op_487b_0), 0, 18555 }, /* PEA.L (d8,PC,Xn) */ +{ CPUFUNC(op_4880_0), 0, 18560 }, /* EXT.W Dn */ +{ CPUFUNC_FF(op_4890_0), 0, 18576 }, /* MVMLE.W #.W,(An) */ +{ CPUFUNC_FF(op_48a0_0), 0, 18592 }, /* MVMLE.W #.W,-(An) */ +{ CPUFUNC_FF(op_48a8_0), 0, 18600 }, /* MVMLE.W #.W,(d16,An) */ +{ CPUFUNC_FF(op_48b0_0), 0, 18608 }, /* MVMLE.W #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_48b8_0), 0, 18616 }, /* MVMLE.W #.W,(xxx).W */ +{ CPUFUNC_FF(op_48b9_0), 0, 18617 }, /* MVMLE.W #.W,(xxx).L */ +{ CPUFUNC(op_48c0_0), 0, 18624 }, /* EXT.L Dn */ +{ CPUFUNC_FF(op_48d0_0), 0, 18640 }, /* MVMLE.L #.W,(An) */ +{ CPUFUNC_FF(op_48e0_0), 0, 18656 }, /* MVMLE.L #.W,-(An) */ +{ CPUFUNC_FF(op_48e8_0), 0, 18664 }, /* MVMLE.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_48f0_0), 0, 18672 }, /* MVMLE.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_48f8_0), 0, 18680 }, /* MVMLE.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_48f9_0), 0, 18681 }, /* MVMLE.L #.W,(xxx).L */ +{ CPUFUNC(op_49c0_0), 0, 18880 }, /* EXT.B Dn */ +{ CPUFUNC(op_4a00_0), 0, 18944 }, /* TST.B Dn */ +{ CPUFUNC(op_4a10_0), 0, 18960 }, /* TST.B (An) */ +{ CPUFUNC(op_4a18_0), 0, 18968 }, /* TST.B (An)+ */ +{ CPUFUNC(op_4a20_0), 0, 18976 }, /* TST.B -(An) */ +{ CPUFUNC(op_4a28_0), 0, 18984 }, /* TST.B (d16,An) */ +{ CPUFUNC(op_4a30_0), 0, 18992 }, /* TST.B (d8,An,Xn) */ +{ CPUFUNC(op_4a38_0), 0, 19000 }, /* TST.B (xxx).W */ +{ CPUFUNC(op_4a39_0), 0, 19001 }, /* TST.B (xxx).L */ +{ CPUFUNC(op_4a3a_0), 0, 19002 }, /* TST.B (d16,PC) */ +{ CPUFUNC(op_4a3b_0), 0, 19003 }, /* TST.B (d8,PC,Xn) */ +{ CPUFUNC(op_4a3c_0), 0, 19004 }, /* TST.B #.B */ +{ CPUFUNC(op_4a40_0), 0, 19008 }, /* TST.W Dn */ +{ CPUFUNC(op_4a48_0), 0, 19016 }, /* TST.W An */ +{ CPUFUNC(op_4a50_0), 0, 19024 }, /* TST.W (An) */ +{ CPUFUNC(op_4a58_0), 0, 19032 }, /* TST.W (An)+ */ +{ CPUFUNC(op_4a60_0), 0, 19040 }, /* TST.W -(An) */ +{ CPUFUNC(op_4a68_0), 0, 19048 }, /* TST.W (d16,An) */ +{ CPUFUNC(op_4a70_0), 0, 19056 }, /* TST.W (d8,An,Xn) */ +{ CPUFUNC(op_4a78_0), 0, 19064 }, /* TST.W (xxx).W */ +{ CPUFUNC(op_4a79_0), 0, 19065 }, /* TST.W (xxx).L */ +{ CPUFUNC(op_4a7a_0), 0, 19066 }, /* TST.W (d16,PC) */ +{ CPUFUNC(op_4a7b_0), 0, 19067 }, /* TST.W (d8,PC,Xn) */ +{ CPUFUNC(op_4a7c_0), 0, 19068 }, /* TST.W #.W */ +{ CPUFUNC(op_4a80_0), 0, 19072 }, /* TST.L Dn */ +{ CPUFUNC(op_4a88_0), 0, 19080 }, /* TST.L An */ +{ CPUFUNC(op_4a90_0), 0, 19088 }, /* TST.L (An) */ +{ CPUFUNC(op_4a98_0), 0, 19096 }, /* TST.L (An)+ */ +{ CPUFUNC(op_4aa0_0), 0, 19104 }, /* TST.L -(An) */ +{ CPUFUNC(op_4aa8_0), 0, 19112 }, /* TST.L (d16,An) */ +{ CPUFUNC(op_4ab0_0), 0, 19120 }, /* TST.L (d8,An,Xn) */ +{ CPUFUNC(op_4ab8_0), 0, 19128 }, /* TST.L (xxx).W */ +{ CPUFUNC(op_4ab9_0), 0, 19129 }, /* TST.L (xxx).L */ +{ CPUFUNC(op_4aba_0), 0, 19130 }, /* TST.L (d16,PC) */ +{ CPUFUNC(op_4abb_0), 0, 19131 }, /* TST.L (d8,PC,Xn) */ +{ CPUFUNC(op_4abc_0), 0, 19132 }, /* TST.L #.L */ +{ CPUFUNC(op_4ac0_0), 0, 19136 }, /* TAS.B Dn */ +{ CPUFUNC(op_4ad0_0), 0, 19152 }, /* TAS.B (An) */ +{ CPUFUNC(op_4ad8_0), 0, 19160 }, /* TAS.B (An)+ */ +{ CPUFUNC(op_4ae0_0), 0, 19168 }, /* TAS.B -(An) */ +{ CPUFUNC(op_4ae8_0), 0, 19176 }, /* TAS.B (d16,An) */ +{ CPUFUNC(op_4af0_0), 0, 19184 }, /* TAS.B (d8,An,Xn) */ +{ CPUFUNC(op_4af8_0), 0, 19192 }, /* TAS.B (xxx).W */ +{ CPUFUNC(op_4af9_0), 0, 19193 }, /* TAS.B (xxx).L */ +{ CPUFUNC(op_4c00_0), 0, 19456 }, /* MULL.L #.W,Dn */ +{ CPUFUNC(op_4c10_0), 0, 19472 }, /* MULL.L #.W,(An) */ +{ CPUFUNC(op_4c18_0), 0, 19480 }, /* MULL.L #.W,(An)+ */ +{ CPUFUNC(op_4c20_0), 0, 19488 }, /* MULL.L #.W,-(An) */ +{ CPUFUNC(op_4c28_0), 0, 19496 }, /* MULL.L #.W,(d16,An) */ +{ CPUFUNC(op_4c30_0), 0, 19504 }, /* MULL.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_4c38_0), 0, 19512 }, /* MULL.L #.W,(xxx).W */ +{ CPUFUNC(op_4c39_0), 0, 19513 }, /* MULL.L #.W,(xxx).L */ +{ CPUFUNC(op_4c3a_0), 0, 19514 }, /* MULL.L #.W,(d16,PC) */ +{ CPUFUNC(op_4c3b_0), 0, 19515 }, /* MULL.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_4c3c_0), 0, 19516 }, /* MULL.L #.W,#.L */ +{ CPUFUNC(op_4c40_0), 0, 19520 }, /* DIVL.L #.W,Dn */ +{ CPUFUNC(op_4c50_0), 0, 19536 }, /* DIVL.L #.W,(An) */ +{ CPUFUNC(op_4c58_0), 0, 19544 }, /* DIVL.L #.W,(An)+ */ +{ CPUFUNC(op_4c60_0), 0, 19552 }, /* DIVL.L #.W,-(An) */ +{ CPUFUNC(op_4c68_0), 0, 19560 }, /* DIVL.L #.W,(d16,An) */ +{ CPUFUNC(op_4c70_0), 0, 19568 }, /* DIVL.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_4c78_0), 0, 19576 }, /* DIVL.L #.W,(xxx).W */ +{ CPUFUNC(op_4c79_0), 0, 19577 }, /* DIVL.L #.W,(xxx).L */ +{ CPUFUNC(op_4c7a_0), 0, 19578 }, /* DIVL.L #.W,(d16,PC) */ +{ CPUFUNC(op_4c7b_0), 0, 19579 }, /* DIVL.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_4c7c_0), 0, 19580 }, /* DIVL.L #.W,#.L */ +{ CPUFUNC_FF(op_4c90_0), 0, 19600 }, /* MVMEL.W #.W,(An) */ +{ CPUFUNC_FF(op_4c98_0), 0, 19608 }, /* MVMEL.W #.W,(An)+ */ +{ CPUFUNC_FF(op_4ca8_0), 0, 19624 }, /* MVMEL.W #.W,(d16,An) */ +{ CPUFUNC_FF(op_4cb0_0), 0, 19632 }, /* MVMEL.W #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_4cb8_0), 0, 19640 }, /* MVMEL.W #.W,(xxx).W */ +{ CPUFUNC_FF(op_4cb9_0), 0, 19641 }, /* MVMEL.W #.W,(xxx).L */ +{ CPUFUNC_FF(op_4cba_0), 0, 19642 }, /* MVMEL.W #.W,(d16,PC) */ +{ CPUFUNC_FF(op_4cbb_0), 0, 19643 }, /* MVMEL.W #.W,(d8,PC,Xn) */ +{ CPUFUNC_FF(op_4cd0_0), 0, 19664 }, /* MVMEL.L #.W,(An) */ +{ CPUFUNC_FF(op_4cd8_0), 0, 19672 }, /* MVMEL.L #.W,(An)+ */ +{ CPUFUNC_FF(op_4ce8_0), 0, 19688 }, /* MVMEL.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_4cf0_0), 0, 19696 }, /* MVMEL.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_4cf8_0), 0, 19704 }, /* MVMEL.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_4cf9_0), 0, 19705 }, /* MVMEL.L #.W,(xxx).L */ +{ CPUFUNC_FF(op_4cfa_0), 0, 19706 }, /* MVMEL.L #.W,(d16,PC) */ +{ CPUFUNC_FF(op_4cfb_0), 0, 19707 }, /* MVMEL.L #.W,(d8,PC,Xn) */ +{ CPUFUNC_FF(op_4e40_0), 0, 20032 }, /* TRAP.L # */ +{ CPUFUNC_FF(op_4e50_0), 0, 20048 }, /* LINK.W An,#.W */ +{ CPUFUNC_FF(op_4e58_0), 0, 20056 }, /* UNLK.L An */ +{ CPUFUNC_FF(op_4e60_0), 0, 20064 }, /* MVR2USP.L An */ +{ CPUFUNC_FF(op_4e68_0), 0, 20072 }, /* MVUSP2R.L An */ +{ CPUFUNC_FF(op_4e70_0), 0, 20080 }, /* RESET.L */ +{ CPUFUNC_FF(op_4e71_0), 0, 20081 }, /* NOP.L */ +{ CPUFUNC(op_4e72_0), 0, 20082 }, /* STOP.L #.W */ +{ CPUFUNC(op_4e73_0), 0, 20083 }, /* RTE.L */ +{ CPUFUNC_FF(op_4e74_0), 0, 20084 }, /* RTD.L #.W */ +{ CPUFUNC_FF(op_4e75_0), 0, 20085 }, /* RTS.L */ +{ CPUFUNC_FF(op_4e76_0), 0, 20086 }, /* TRAPV.L */ +{ CPUFUNC(op_4e77_0), 0, 20087 }, /* RTR.L */ +{ CPUFUNC_FF(op_4e7a_0), 0, 20090 }, /* MOVEC2.L #.W */ +{ CPUFUNC_FF(op_4e7b_0), 0, 20091 }, /* MOVE2C.L #.W */ +{ CPUFUNC_FF(op_4e90_0), 0, 20112 }, /* JSR.L (An) */ +{ CPUFUNC_FF(op_4ea8_0), 0, 20136 }, /* JSR.L (d16,An) */ +{ CPUFUNC_FF(op_4eb0_0), 0, 20144 }, /* JSR.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4eb8_0), 0, 20152 }, /* JSR.L (xxx).W */ +{ CPUFUNC_FF(op_4eb9_0), 0, 20153 }, /* JSR.L (xxx).L */ +{ CPUFUNC_FF(op_4eba_0), 0, 20154 }, /* JSR.L (d16,PC) */ +{ CPUFUNC_FF(op_4ebb_0), 0, 20155 }, /* JSR.L (d8,PC,Xn) */ +{ CPUFUNC_FF(op_4ed0_0), 0, 20176 }, /* JMP.L (An) */ +{ CPUFUNC_FF(op_4ee8_0), 0, 20200 }, /* JMP.L (d16,An) */ +{ CPUFUNC_FF(op_4ef0_0), 0, 20208 }, /* JMP.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4ef8_0), 0, 20216 }, /* JMP.L (xxx).W */ +{ CPUFUNC_FF(op_4ef9_0), 0, 20217 }, /* JMP.L (xxx).L */ +{ CPUFUNC_FF(op_4efa_0), 0, 20218 }, /* JMP.L (d16,PC) */ +{ CPUFUNC_FF(op_4efb_0), 0, 20219 }, /* JMP.L (d8,PC,Xn) */ +{ CPUFUNC(op_5000_0), 0, 20480 }, /* ADD.B #,Dn */ +{ CPUFUNC(op_5010_0), 0, 20496 }, /* ADD.B #,(An) */ +{ CPUFUNC(op_5018_0), 0, 20504 }, /* ADD.B #,(An)+ */ +{ CPUFUNC(op_5020_0), 0, 20512 }, /* ADD.B #,-(An) */ +{ CPUFUNC(op_5028_0), 0, 20520 }, /* ADD.B #,(d16,An) */ +{ CPUFUNC(op_5030_0), 0, 20528 }, /* ADD.B #,(d8,An,Xn) */ +{ CPUFUNC(op_5038_0), 0, 20536 }, /* ADD.B #,(xxx).W */ +{ CPUFUNC(op_5039_0), 0, 20537 }, /* ADD.B #,(xxx).L */ +{ CPUFUNC(op_5040_0), 0, 20544 }, /* ADD.W #,Dn */ +{ CPUFUNC_FF(op_5048_0), 0, 20552 }, /* ADDA.W #,An */ +{ CPUFUNC(op_5050_0), 0, 20560 }, /* ADD.W #,(An) */ +{ CPUFUNC(op_5058_0), 0, 20568 }, /* ADD.W #,(An)+ */ +{ CPUFUNC(op_5060_0), 0, 20576 }, /* ADD.W #,-(An) */ +{ CPUFUNC(op_5068_0), 0, 20584 }, /* ADD.W #,(d16,An) */ +{ CPUFUNC(op_5070_0), 0, 20592 }, /* ADD.W #,(d8,An,Xn) */ +{ CPUFUNC(op_5078_0), 0, 20600 }, /* ADD.W #,(xxx).W */ +{ CPUFUNC(op_5079_0), 0, 20601 }, /* ADD.W #,(xxx).L */ +{ CPUFUNC(op_5080_0), 0, 20608 }, /* ADD.L #,Dn */ +{ CPUFUNC_FF(op_5088_0), 0, 20616 }, /* ADDA.L #,An */ +{ CPUFUNC(op_5090_0), 0, 20624 }, /* ADD.L #,(An) */ +{ CPUFUNC(op_5098_0), 0, 20632 }, /* ADD.L #,(An)+ */ +{ CPUFUNC(op_50a0_0), 0, 20640 }, /* ADD.L #,-(An) */ +{ CPUFUNC(op_50a8_0), 0, 20648 }, /* ADD.L #,(d16,An) */ +{ CPUFUNC(op_50b0_0), 0, 20656 }, /* ADD.L #,(d8,An,Xn) */ +{ CPUFUNC(op_50b8_0), 0, 20664 }, /* ADD.L #,(xxx).W */ +{ CPUFUNC(op_50b9_0), 0, 20665 }, /* ADD.L #,(xxx).L */ +{ CPUFUNC_FF(op_50c0_0), 0, 20672 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_50c8_0), 0, 20680 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_50d0_0), 0, 20688 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_50d8_0), 0, 20696 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_50e0_0), 0, 20704 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_50e8_0), 0, 20712 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_50f0_0), 0, 20720 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_50f8_0), 0, 20728 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_50f9_0), 0, 20729 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_50fa_0), 0, 20730 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_50fb_0), 0, 20731 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_50fc_0), 0, 20732 }, /* TRAPcc.L */ +{ CPUFUNC(op_5100_0), 0, 20736 }, /* SUB.B #,Dn */ +{ CPUFUNC(op_5110_0), 0, 20752 }, /* SUB.B #,(An) */ +{ CPUFUNC(op_5118_0), 0, 20760 }, /* SUB.B #,(An)+ */ +{ CPUFUNC(op_5120_0), 0, 20768 }, /* SUB.B #,-(An) */ +{ CPUFUNC(op_5128_0), 0, 20776 }, /* SUB.B #,(d16,An) */ +{ CPUFUNC(op_5130_0), 0, 20784 }, /* SUB.B #,(d8,An,Xn) */ +{ CPUFUNC(op_5138_0), 0, 20792 }, /* SUB.B #,(xxx).W */ +{ CPUFUNC(op_5139_0), 0, 20793 }, /* SUB.B #,(xxx).L */ +{ CPUFUNC(op_5140_0), 0, 20800 }, /* SUB.W #,Dn */ +{ CPUFUNC_FF(op_5148_0), 0, 20808 }, /* SUBA.W #,An */ +{ CPUFUNC(op_5150_0), 0, 20816 }, /* SUB.W #,(An) */ +{ CPUFUNC(op_5158_0), 0, 20824 }, /* SUB.W #,(An)+ */ +{ CPUFUNC(op_5160_0), 0, 20832 }, /* SUB.W #,-(An) */ +{ CPUFUNC(op_5168_0), 0, 20840 }, /* SUB.W #,(d16,An) */ +{ CPUFUNC(op_5170_0), 0, 20848 }, /* SUB.W #,(d8,An,Xn) */ +{ CPUFUNC(op_5178_0), 0, 20856 }, /* SUB.W #,(xxx).W */ +{ CPUFUNC(op_5179_0), 0, 20857 }, /* SUB.W #,(xxx).L */ +{ CPUFUNC(op_5180_0), 0, 20864 }, /* SUB.L #,Dn */ +{ CPUFUNC_FF(op_5188_0), 0, 20872 }, /* SUBA.L #,An */ +{ CPUFUNC(op_5190_0), 0, 20880 }, /* SUB.L #,(An) */ +{ CPUFUNC(op_5198_0), 0, 20888 }, /* SUB.L #,(An)+ */ +{ CPUFUNC(op_51a0_0), 0, 20896 }, /* SUB.L #,-(An) */ +{ CPUFUNC(op_51a8_0), 0, 20904 }, /* SUB.L #,(d16,An) */ +{ CPUFUNC(op_51b0_0), 0, 20912 }, /* SUB.L #,(d8,An,Xn) */ +{ CPUFUNC(op_51b8_0), 0, 20920 }, /* SUB.L #,(xxx).W */ +{ CPUFUNC(op_51b9_0), 0, 20921 }, /* SUB.L #,(xxx).L */ +{ CPUFUNC_FF(op_51c0_0), 0, 20928 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_51c8_0), 0, 20936 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_51d0_0), 0, 20944 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_51d8_0), 0, 20952 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_51e0_0), 0, 20960 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_51e8_0), 0, 20968 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_51f0_0), 0, 20976 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_51f8_0), 0, 20984 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_51f9_0), 0, 20985 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_51fa_0), 0, 20986 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_51fb_0), 0, 20987 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_51fc_0), 0, 20988 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_52c0_0), 0, 21184 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_52c8_0), 0, 21192 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_52d0_0), 0, 21200 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_52d8_0), 0, 21208 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_52e0_0), 0, 21216 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_52e8_0), 0, 21224 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_52f0_0), 0, 21232 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_52f8_0), 0, 21240 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_52f9_0), 0, 21241 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_52fa_0), 0, 21242 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_52fb_0), 0, 21243 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_52fc_0), 0, 21244 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_53c0_0), 0, 21440 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_53c8_0), 0, 21448 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_53d0_0), 0, 21456 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_53d8_0), 0, 21464 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_53e0_0), 0, 21472 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_53e8_0), 0, 21480 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_53f0_0), 0, 21488 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_53f8_0), 0, 21496 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_53f9_0), 0, 21497 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_53fa_0), 0, 21498 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_53fb_0), 0, 21499 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_53fc_0), 0, 21500 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_54c0_0), 0, 21696 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_54c8_0), 0, 21704 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_54d0_0), 0, 21712 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_54d8_0), 0, 21720 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_54e0_0), 0, 21728 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_54e8_0), 0, 21736 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_54f0_0), 0, 21744 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_54f8_0), 0, 21752 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_54f9_0), 0, 21753 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_54fa_0), 0, 21754 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_54fb_0), 0, 21755 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_54fc_0), 0, 21756 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_55c0_0), 0, 21952 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_55c8_0), 0, 21960 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_55d0_0), 0, 21968 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_55d8_0), 0, 21976 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_55e0_0), 0, 21984 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_55e8_0), 0, 21992 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_55f0_0), 0, 22000 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_55f8_0), 0, 22008 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_55f9_0), 0, 22009 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_55fa_0), 0, 22010 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_55fb_0), 0, 22011 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_55fc_0), 0, 22012 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_56c0_0), 0, 22208 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_56c8_0), 0, 22216 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_56d0_0), 0, 22224 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_56d8_0), 0, 22232 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_56e0_0), 0, 22240 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_56e8_0), 0, 22248 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_56f0_0), 0, 22256 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_56f8_0), 0, 22264 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_56f9_0), 0, 22265 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_56fa_0), 0, 22266 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_56fb_0), 0, 22267 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_56fc_0), 0, 22268 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_57c0_0), 0, 22464 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_57c8_0), 0, 22472 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_57d0_0), 0, 22480 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_57d8_0), 0, 22488 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_57e0_0), 0, 22496 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_57e8_0), 0, 22504 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_57f0_0), 0, 22512 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_57f8_0), 0, 22520 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_57f9_0), 0, 22521 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_57fa_0), 0, 22522 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_57fb_0), 0, 22523 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_57fc_0), 0, 22524 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_58c0_0), 0, 22720 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_58c8_0), 0, 22728 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_58d0_0), 0, 22736 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_58d8_0), 0, 22744 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_58e0_0), 0, 22752 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_58e8_0), 0, 22760 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_58f0_0), 0, 22768 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_58f8_0), 0, 22776 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_58f9_0), 0, 22777 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_58fa_0), 0, 22778 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_58fb_0), 0, 22779 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_58fc_0), 0, 22780 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_59c0_0), 0, 22976 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_59c8_0), 0, 22984 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_59d0_0), 0, 22992 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_59d8_0), 0, 23000 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_59e0_0), 0, 23008 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_59e8_0), 0, 23016 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_59f0_0), 0, 23024 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_59f8_0), 0, 23032 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_59f9_0), 0, 23033 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_59fa_0), 0, 23034 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_59fb_0), 0, 23035 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_59fc_0), 0, 23036 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5ac0_0), 0, 23232 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5ac8_0), 0, 23240 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5ad0_0), 0, 23248 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5ad8_0), 0, 23256 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ae0_0), 0, 23264 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ae8_0), 0, 23272 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5af0_0), 0, 23280 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5af8_0), 0, 23288 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5af9_0), 0, 23289 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5afa_0), 0, 23290 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5afb_0), 0, 23291 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5afc_0), 0, 23292 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5bc0_0), 0, 23488 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5bc8_0), 0, 23496 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5bd0_0), 0, 23504 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5bd8_0), 0, 23512 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5be0_0), 0, 23520 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5be8_0), 0, 23528 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5bf0_0), 0, 23536 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5bf8_0), 0, 23544 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5bf9_0), 0, 23545 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5bfa_0), 0, 23546 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5bfb_0), 0, 23547 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5bfc_0), 0, 23548 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5cc0_0), 0, 23744 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5cc8_0), 0, 23752 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5cd0_0), 0, 23760 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5cd8_0), 0, 23768 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ce0_0), 0, 23776 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ce8_0), 0, 23784 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5cf0_0), 0, 23792 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5cf8_0), 0, 23800 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5cf9_0), 0, 23801 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5cfa_0), 0, 23802 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5cfb_0), 0, 23803 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5cfc_0), 0, 23804 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5dc0_0), 0, 24000 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5dc8_0), 0, 24008 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5dd0_0), 0, 24016 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5dd8_0), 0, 24024 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5de0_0), 0, 24032 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5de8_0), 0, 24040 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5df0_0), 0, 24048 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5df8_0), 0, 24056 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5df9_0), 0, 24057 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5dfa_0), 0, 24058 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5dfb_0), 0, 24059 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5dfc_0), 0, 24060 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5ec0_0), 0, 24256 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5ec8_0), 0, 24264 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5ed0_0), 0, 24272 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5ed8_0), 0, 24280 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ee0_0), 0, 24288 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ee8_0), 0, 24296 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5ef0_0), 0, 24304 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5ef8_0), 0, 24312 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5ef9_0), 0, 24313 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5efa_0), 0, 24314 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5efb_0), 0, 24315 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5efc_0), 0, 24316 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_5fc0_0), 0, 24512 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5fc8_0), 0, 24520 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5fd0_0), 0, 24528 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5fd8_0), 0, 24536 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5fe0_0), 0, 24544 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5fe8_0), 0, 24552 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5ff0_0), 0, 24560 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5ff8_0), 0, 24568 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5ff9_0), 0, 24569 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5ffa_0), 0, 24570 }, /* TRAPcc.L #.W */ +{ CPUFUNC_FF(op_5ffb_0), 0, 24571 }, /* TRAPcc.L #.L */ +{ CPUFUNC_FF(op_5ffc_0), 0, 24572 }, /* TRAPcc.L */ +{ CPUFUNC_FF(op_6000_0), 0, 24576 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6001_0), 0, 24577 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_60ff_0), 0, 24831 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6100_0), 0, 24832 }, /* BSR.W #.W */ +{ CPUFUNC_FF(op_6101_0), 0, 24833 }, /* BSR.B # */ +{ CPUFUNC_FF(op_61ff_0), 0, 25087 }, /* BSR.L #.L */ +{ CPUFUNC_FF(op_6200_0), 0, 25088 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6201_0), 0, 25089 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_62ff_0), 0, 25343 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6300_0), 0, 25344 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6301_0), 0, 25345 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_63ff_0), 0, 25599 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6400_0), 0, 25600 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6401_0), 0, 25601 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_64ff_0), 0, 25855 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6500_0), 0, 25856 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6501_0), 0, 25857 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_65ff_0), 0, 26111 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6600_0), 0, 26112 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6601_0), 0, 26113 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_66ff_0), 0, 26367 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6700_0), 0, 26368 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6701_0), 0, 26369 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_67ff_0), 0, 26623 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6800_0), 0, 26624 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6801_0), 0, 26625 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_68ff_0), 0, 26879 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6900_0), 0, 26880 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6901_0), 0, 26881 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_69ff_0), 0, 27135 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6a00_0), 0, 27136 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6a01_0), 0, 27137 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6aff_0), 0, 27391 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6b00_0), 0, 27392 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6b01_0), 0, 27393 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6bff_0), 0, 27647 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6c00_0), 0, 27648 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6c01_0), 0, 27649 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6cff_0), 0, 27903 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6d00_0), 0, 27904 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6d01_0), 0, 27905 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6dff_0), 0, 28159 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6e00_0), 0, 28160 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6e01_0), 0, 28161 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6eff_0), 0, 28415 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6f00_0), 0, 28416 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6f01_0), 0, 28417 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6fff_0), 0, 28671 }, /* Bcc.L #.L */ +{ CPUFUNC(op_7000_0), 0, 28672 }, /* MOVE.L #,Dn */ +{ CPUFUNC_FF(op_7100_0), 0, 28928 }, /* EMULOP_RETURN.L */ +{ CPUFUNC_FF(op_7101_0), 0, 28929 }, /* EMULOP.L # */ +{ CPUFUNC(op_8000_0), 0, 32768 }, /* OR.B Dn,Dn */ +{ CPUFUNC(op_8010_0), 0, 32784 }, /* OR.B (An),Dn */ +{ CPUFUNC(op_8018_0), 0, 32792 }, /* OR.B (An)+,Dn */ +{ CPUFUNC(op_8020_0), 0, 32800 }, /* OR.B -(An),Dn */ +{ CPUFUNC(op_8028_0), 0, 32808 }, /* OR.B (d16,An),Dn */ +{ CPUFUNC(op_8030_0), 0, 32816 }, /* OR.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_8038_0), 0, 32824 }, /* OR.B (xxx).W,Dn */ +{ CPUFUNC(op_8039_0), 0, 32825 }, /* OR.B (xxx).L,Dn */ +{ CPUFUNC(op_803a_0), 0, 32826 }, /* OR.B (d16,PC),Dn */ +{ CPUFUNC(op_803b_0), 0, 32827 }, /* OR.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_803c_0), 0, 32828 }, /* OR.B #.B,Dn */ +{ CPUFUNC(op_8040_0), 0, 32832 }, /* OR.W Dn,Dn */ +{ CPUFUNC(op_8050_0), 0, 32848 }, /* OR.W (An),Dn */ +{ CPUFUNC(op_8058_0), 0, 32856 }, /* OR.W (An)+,Dn */ +{ CPUFUNC(op_8060_0), 0, 32864 }, /* OR.W -(An),Dn */ +{ CPUFUNC(op_8068_0), 0, 32872 }, /* OR.W (d16,An),Dn */ +{ CPUFUNC(op_8070_0), 0, 32880 }, /* OR.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_8078_0), 0, 32888 }, /* OR.W (xxx).W,Dn */ +{ CPUFUNC(op_8079_0), 0, 32889 }, /* OR.W (xxx).L,Dn */ +{ CPUFUNC(op_807a_0), 0, 32890 }, /* OR.W (d16,PC),Dn */ +{ CPUFUNC(op_807b_0), 0, 32891 }, /* OR.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_807c_0), 0, 32892 }, /* OR.W #.W,Dn */ +{ CPUFUNC(op_8080_0), 0, 32896 }, /* OR.L Dn,Dn */ +{ CPUFUNC(op_8090_0), 0, 32912 }, /* OR.L (An),Dn */ +{ CPUFUNC(op_8098_0), 0, 32920 }, /* OR.L (An)+,Dn */ +{ CPUFUNC(op_80a0_0), 0, 32928 }, /* OR.L -(An),Dn */ +{ CPUFUNC(op_80a8_0), 0, 32936 }, /* OR.L (d16,An),Dn */ +{ CPUFUNC(op_80b0_0), 0, 32944 }, /* OR.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_80b8_0), 0, 32952 }, /* OR.L (xxx).W,Dn */ +{ CPUFUNC(op_80b9_0), 0, 32953 }, /* OR.L (xxx).L,Dn */ +{ CPUFUNC(op_80ba_0), 0, 32954 }, /* OR.L (d16,PC),Dn */ +{ CPUFUNC(op_80bb_0), 0, 32955 }, /* OR.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_80bc_0), 0, 32956 }, /* OR.L #.L,Dn */ +{ CPUFUNC(op_80c0_0), 0, 32960 }, /* DIVU.W Dn,Dn */ +{ CPUFUNC(op_80d0_0), 0, 32976 }, /* DIVU.W (An),Dn */ +{ CPUFUNC(op_80d8_0), 0, 32984 }, /* DIVU.W (An)+,Dn */ +{ CPUFUNC(op_80e0_0), 0, 32992 }, /* DIVU.W -(An),Dn */ +{ CPUFUNC(op_80e8_0), 0, 33000 }, /* DIVU.W (d16,An),Dn */ +{ CPUFUNC(op_80f0_0), 0, 33008 }, /* DIVU.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_80f8_0), 0, 33016 }, /* DIVU.W (xxx).W,Dn */ +{ CPUFUNC(op_80f9_0), 0, 33017 }, /* DIVU.W (xxx).L,Dn */ +{ CPUFUNC(op_80fa_0), 0, 33018 }, /* DIVU.W (d16,PC),Dn */ +{ CPUFUNC(op_80fb_0), 0, 33019 }, /* DIVU.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_80fc_0), 0, 33020 }, /* DIVU.W #.W,Dn */ +{ CPUFUNC(op_8100_1), 0, 33024 }, /* SBCD.B Dn,Dn */ +{ CPUFUNC(op_8108_1), 0, 33032 }, /* SBCD.B -(An),-(An) */ +{ CPUFUNC(op_8110_0), 0, 33040 }, /* OR.B Dn,(An) */ +{ CPUFUNC(op_8118_0), 0, 33048 }, /* OR.B Dn,(An)+ */ +{ CPUFUNC(op_8120_0), 0, 33056 }, /* OR.B Dn,-(An) */ +{ CPUFUNC(op_8128_0), 0, 33064 }, /* OR.B Dn,(d16,An) */ +{ CPUFUNC(op_8130_0), 0, 33072 }, /* OR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_8138_0), 0, 33080 }, /* OR.B Dn,(xxx).W */ +{ CPUFUNC(op_8139_0), 0, 33081 }, /* OR.B Dn,(xxx).L */ +{ CPUFUNC_FF(op_8140_0), 0, 33088 }, /* PACK.L Dn,Dn */ +{ CPUFUNC_FF(op_8148_0), 0, 33096 }, /* PACK.L -(An),-(An) */ +{ CPUFUNC(op_8150_0), 0, 33104 }, /* OR.W Dn,(An) */ +{ CPUFUNC(op_8158_0), 0, 33112 }, /* OR.W Dn,(An)+ */ +{ CPUFUNC(op_8160_0), 0, 33120 }, /* OR.W Dn,-(An) */ +{ CPUFUNC(op_8168_0), 0, 33128 }, /* OR.W Dn,(d16,An) */ +{ CPUFUNC(op_8170_0), 0, 33136 }, /* OR.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_8178_0), 0, 33144 }, /* OR.W Dn,(xxx).W */ +{ CPUFUNC(op_8179_0), 0, 33145 }, /* OR.W Dn,(xxx).L */ +{ CPUFUNC_FF(op_8180_0), 0, 33152 }, /* UNPK.L Dn,Dn */ +{ CPUFUNC_FF(op_8188_0), 0, 33160 }, /* UNPK.L -(An),-(An) */ +{ CPUFUNC(op_8190_0), 0, 33168 }, /* OR.L Dn,(An) */ +{ CPUFUNC(op_8198_0), 0, 33176 }, /* OR.L Dn,(An)+ */ +{ CPUFUNC(op_81a0_0), 0, 33184 }, /* OR.L Dn,-(An) */ +{ CPUFUNC(op_81a8_0), 0, 33192 }, /* OR.L Dn,(d16,An) */ +{ CPUFUNC(op_81b0_0), 0, 33200 }, /* OR.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_81b8_0), 0, 33208 }, /* OR.L Dn,(xxx).W */ +{ CPUFUNC(op_81b9_0), 0, 33209 }, /* OR.L Dn,(xxx).L */ +{ CPUFUNC(op_81c0_0), 0, 33216 }, /* DIVS.W Dn,Dn */ +{ CPUFUNC(op_81d0_0), 0, 33232 }, /* DIVS.W (An),Dn */ +{ CPUFUNC(op_81d8_0), 0, 33240 }, /* DIVS.W (An)+,Dn */ +{ CPUFUNC(op_81e0_0), 0, 33248 }, /* DIVS.W -(An),Dn */ +{ CPUFUNC(op_81e8_0), 0, 33256 }, /* DIVS.W (d16,An),Dn */ +{ CPUFUNC(op_81f0_0), 0, 33264 }, /* DIVS.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_81f8_0), 0, 33272 }, /* DIVS.W (xxx).W,Dn */ +{ CPUFUNC(op_81f9_0), 0, 33273 }, /* DIVS.W (xxx).L,Dn */ +{ CPUFUNC(op_81fa_0), 0, 33274 }, /* DIVS.W (d16,PC),Dn */ +{ CPUFUNC(op_81fb_0), 0, 33275 }, /* DIVS.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_81fc_0), 0, 33276 }, /* DIVS.W #.W,Dn */ +{ CPUFUNC(op_9000_0), 0, 36864 }, /* SUB.B Dn,Dn */ +{ CPUFUNC(op_9010_0), 0, 36880 }, /* SUB.B (An),Dn */ +{ CPUFUNC(op_9018_0), 0, 36888 }, /* SUB.B (An)+,Dn */ +{ CPUFUNC(op_9020_0), 0, 36896 }, /* SUB.B -(An),Dn */ +{ CPUFUNC(op_9028_0), 0, 36904 }, /* SUB.B (d16,An),Dn */ +{ CPUFUNC(op_9030_0), 0, 36912 }, /* SUB.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_9038_0), 0, 36920 }, /* SUB.B (xxx).W,Dn */ +{ CPUFUNC(op_9039_0), 0, 36921 }, /* SUB.B (xxx).L,Dn */ +{ CPUFUNC(op_903a_0), 0, 36922 }, /* SUB.B (d16,PC),Dn */ +{ CPUFUNC(op_903b_0), 0, 36923 }, /* SUB.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_903c_0), 0, 36924 }, /* SUB.B #.B,Dn */ +{ CPUFUNC(op_9040_0), 0, 36928 }, /* SUB.W Dn,Dn */ +{ CPUFUNC(op_9048_0), 0, 36936 }, /* SUB.W An,Dn */ +{ CPUFUNC(op_9050_0), 0, 36944 }, /* SUB.W (An),Dn */ +{ CPUFUNC(op_9058_0), 0, 36952 }, /* SUB.W (An)+,Dn */ +{ CPUFUNC(op_9060_0), 0, 36960 }, /* SUB.W -(An),Dn */ +{ CPUFUNC(op_9068_0), 0, 36968 }, /* SUB.W (d16,An),Dn */ +{ CPUFUNC(op_9070_0), 0, 36976 }, /* SUB.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_9078_0), 0, 36984 }, /* SUB.W (xxx).W,Dn */ +{ CPUFUNC(op_9079_0), 0, 36985 }, /* SUB.W (xxx).L,Dn */ +{ CPUFUNC(op_907a_0), 0, 36986 }, /* SUB.W (d16,PC),Dn */ +{ CPUFUNC(op_907b_0), 0, 36987 }, /* SUB.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_907c_0), 0, 36988 }, /* SUB.W #.W,Dn */ +{ CPUFUNC(op_9080_0), 0, 36992 }, /* SUB.L Dn,Dn */ +{ CPUFUNC(op_9088_0), 0, 37000 }, /* SUB.L An,Dn */ +{ CPUFUNC(op_9090_0), 0, 37008 }, /* SUB.L (An),Dn */ +{ CPUFUNC(op_9098_0), 0, 37016 }, /* SUB.L (An)+,Dn */ +{ CPUFUNC(op_90a0_0), 0, 37024 }, /* SUB.L -(An),Dn */ +{ CPUFUNC(op_90a8_0), 0, 37032 }, /* SUB.L (d16,An),Dn */ +{ CPUFUNC(op_90b0_0), 0, 37040 }, /* SUB.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_90b8_0), 0, 37048 }, /* SUB.L (xxx).W,Dn */ +{ CPUFUNC(op_90b9_0), 0, 37049 }, /* SUB.L (xxx).L,Dn */ +{ CPUFUNC(op_90ba_0), 0, 37050 }, /* SUB.L (d16,PC),Dn */ +{ CPUFUNC(op_90bb_0), 0, 37051 }, /* SUB.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_90bc_0), 0, 37052 }, /* SUB.L #.L,Dn */ +{ CPUFUNC_FF(op_90c0_0), 0, 37056 }, /* SUBA.W Dn,An */ +{ CPUFUNC_FF(op_90c8_0), 0, 37064 }, /* SUBA.W An,An */ +{ CPUFUNC_FF(op_90d0_0), 0, 37072 }, /* SUBA.W (An),An */ +{ CPUFUNC_FF(op_90d8_0), 0, 37080 }, /* SUBA.W (An)+,An */ +{ CPUFUNC_FF(op_90e0_0), 0, 37088 }, /* SUBA.W -(An),An */ +{ CPUFUNC_FF(op_90e8_0), 0, 37096 }, /* SUBA.W (d16,An),An */ +{ CPUFUNC_FF(op_90f0_0), 0, 37104 }, /* SUBA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_90f8_0), 0, 37112 }, /* SUBA.W (xxx).W,An */ +{ CPUFUNC_FF(op_90f9_0), 0, 37113 }, /* SUBA.W (xxx).L,An */ +{ CPUFUNC_FF(op_90fa_0), 0, 37114 }, /* SUBA.W (d16,PC),An */ +{ CPUFUNC_FF(op_90fb_0), 0, 37115 }, /* SUBA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_90fc_0), 0, 37116 }, /* SUBA.W #.W,An */ +{ CPUFUNC(op_9100_0), 0, 37120 }, /* SUBX.B Dn,Dn */ +{ CPUFUNC(op_9108_0), 0, 37128 }, /* SUBX.B -(An),-(An) */ +{ CPUFUNC(op_9110_0), 0, 37136 }, /* SUB.B Dn,(An) */ +{ CPUFUNC(op_9118_0), 0, 37144 }, /* SUB.B Dn,(An)+ */ +{ CPUFUNC(op_9120_0), 0, 37152 }, /* SUB.B Dn,-(An) */ +{ CPUFUNC(op_9128_0), 0, 37160 }, /* SUB.B Dn,(d16,An) */ +{ CPUFUNC(op_9130_0), 0, 37168 }, /* SUB.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_9138_0), 0, 37176 }, /* SUB.B Dn,(xxx).W */ +{ CPUFUNC(op_9139_0), 0, 37177 }, /* SUB.B Dn,(xxx).L */ +{ CPUFUNC(op_9140_0), 0, 37184 }, /* SUBX.W Dn,Dn */ +{ CPUFUNC(op_9148_0), 0, 37192 }, /* SUBX.W -(An),-(An) */ +{ CPUFUNC(op_9150_0), 0, 37200 }, /* SUB.W Dn,(An) */ +{ CPUFUNC(op_9158_0), 0, 37208 }, /* SUB.W Dn,(An)+ */ +{ CPUFUNC(op_9160_0), 0, 37216 }, /* SUB.W Dn,-(An) */ +{ CPUFUNC(op_9168_0), 0, 37224 }, /* SUB.W Dn,(d16,An) */ +{ CPUFUNC(op_9170_0), 0, 37232 }, /* SUB.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_9178_0), 0, 37240 }, /* SUB.W Dn,(xxx).W */ +{ CPUFUNC(op_9179_0), 0, 37241 }, /* SUB.W Dn,(xxx).L */ +{ CPUFUNC(op_9180_0), 0, 37248 }, /* SUBX.L Dn,Dn */ +{ CPUFUNC(op_9188_0), 0, 37256 }, /* SUBX.L -(An),-(An) */ +{ CPUFUNC(op_9190_0), 0, 37264 }, /* SUB.L Dn,(An) */ +{ CPUFUNC(op_9198_0), 0, 37272 }, /* SUB.L Dn,(An)+ */ +{ CPUFUNC(op_91a0_0), 0, 37280 }, /* SUB.L Dn,-(An) */ +{ CPUFUNC(op_91a8_0), 0, 37288 }, /* SUB.L Dn,(d16,An) */ +{ CPUFUNC(op_91b0_0), 0, 37296 }, /* SUB.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_91b8_0), 0, 37304 }, /* SUB.L Dn,(xxx).W */ +{ CPUFUNC(op_91b9_0), 0, 37305 }, /* SUB.L Dn,(xxx).L */ +{ CPUFUNC_FF(op_91c0_0), 0, 37312 }, /* SUBA.L Dn,An */ +{ CPUFUNC_FF(op_91c8_0), 0, 37320 }, /* SUBA.L An,An */ +{ CPUFUNC_FF(op_91d0_0), 0, 37328 }, /* SUBA.L (An),An */ +{ CPUFUNC_FF(op_91d8_0), 0, 37336 }, /* SUBA.L (An)+,An */ +{ CPUFUNC_FF(op_91e0_0), 0, 37344 }, /* SUBA.L -(An),An */ +{ CPUFUNC_FF(op_91e8_0), 0, 37352 }, /* SUBA.L (d16,An),An */ +{ CPUFUNC_FF(op_91f0_0), 0, 37360 }, /* SUBA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_91f8_0), 0, 37368 }, /* SUBA.L (xxx).W,An */ +{ CPUFUNC_FF(op_91f9_0), 0, 37369 }, /* SUBA.L (xxx).L,An */ +{ CPUFUNC_FF(op_91fa_0), 0, 37370 }, /* SUBA.L (d16,PC),An */ +{ CPUFUNC_FF(op_91fb_0), 0, 37371 }, /* SUBA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_91fc_0), 0, 37372 }, /* SUBA.L #.L,An */ +{ CPUFUNC(op_b000_0), 0, 45056 }, /* CMP.B Dn,Dn */ +{ CPUFUNC(op_b010_0), 0, 45072 }, /* CMP.B (An),Dn */ +{ CPUFUNC(op_b018_0), 0, 45080 }, /* CMP.B (An)+,Dn */ +{ CPUFUNC(op_b020_0), 0, 45088 }, /* CMP.B -(An),Dn */ +{ CPUFUNC(op_b028_0), 0, 45096 }, /* CMP.B (d16,An),Dn */ +{ CPUFUNC(op_b030_0), 0, 45104 }, /* CMP.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_b038_0), 0, 45112 }, /* CMP.B (xxx).W,Dn */ +{ CPUFUNC(op_b039_0), 0, 45113 }, /* CMP.B (xxx).L,Dn */ +{ CPUFUNC(op_b03a_0), 0, 45114 }, /* CMP.B (d16,PC),Dn */ +{ CPUFUNC(op_b03b_0), 0, 45115 }, /* CMP.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b03c_0), 0, 45116 }, /* CMP.B #.B,Dn */ +{ CPUFUNC(op_b040_0), 0, 45120 }, /* CMP.W Dn,Dn */ +{ CPUFUNC(op_b048_0), 0, 45128 }, /* CMP.W An,Dn */ +{ CPUFUNC(op_b050_0), 0, 45136 }, /* CMP.W (An),Dn */ +{ CPUFUNC(op_b058_0), 0, 45144 }, /* CMP.W (An)+,Dn */ +{ CPUFUNC(op_b060_0), 0, 45152 }, /* CMP.W -(An),Dn */ +{ CPUFUNC(op_b068_0), 0, 45160 }, /* CMP.W (d16,An),Dn */ +{ CPUFUNC(op_b070_0), 0, 45168 }, /* CMP.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_b078_0), 0, 45176 }, /* CMP.W (xxx).W,Dn */ +{ CPUFUNC(op_b079_0), 0, 45177 }, /* CMP.W (xxx).L,Dn */ +{ CPUFUNC(op_b07a_0), 0, 45178 }, /* CMP.W (d16,PC),Dn */ +{ CPUFUNC(op_b07b_0), 0, 45179 }, /* CMP.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b07c_0), 0, 45180 }, /* CMP.W #.W,Dn */ +{ CPUFUNC(op_b080_0), 0, 45184 }, /* CMP.L Dn,Dn */ +{ CPUFUNC(op_b088_0), 0, 45192 }, /* CMP.L An,Dn */ +{ CPUFUNC(op_b090_0), 0, 45200 }, /* CMP.L (An),Dn */ +{ CPUFUNC(op_b098_0), 0, 45208 }, /* CMP.L (An)+,Dn */ +{ CPUFUNC(op_b0a0_0), 0, 45216 }, /* CMP.L -(An),Dn */ +{ CPUFUNC(op_b0a8_0), 0, 45224 }, /* CMP.L (d16,An),Dn */ +{ CPUFUNC(op_b0b0_0), 0, 45232 }, /* CMP.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_b0b8_0), 0, 45240 }, /* CMP.L (xxx).W,Dn */ +{ CPUFUNC(op_b0b9_0), 0, 45241 }, /* CMP.L (xxx).L,Dn */ +{ CPUFUNC(op_b0ba_0), 0, 45242 }, /* CMP.L (d16,PC),Dn */ +{ CPUFUNC(op_b0bb_0), 0, 45243 }, /* CMP.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b0bc_0), 0, 45244 }, /* CMP.L #.L,Dn */ +{ CPUFUNC(op_b0c0_0), 0, 45248 }, /* CMPA.W Dn,An */ +{ CPUFUNC(op_b0c8_0), 0, 45256 }, /* CMPA.W An,An */ +{ CPUFUNC(op_b0d0_0), 0, 45264 }, /* CMPA.W (An),An */ +{ CPUFUNC(op_b0d8_0), 0, 45272 }, /* CMPA.W (An)+,An */ +{ CPUFUNC(op_b0e0_0), 0, 45280 }, /* CMPA.W -(An),An */ +{ CPUFUNC(op_b0e8_0), 0, 45288 }, /* CMPA.W (d16,An),An */ +{ CPUFUNC(op_b0f0_0), 0, 45296 }, /* CMPA.W (d8,An,Xn),An */ +{ CPUFUNC(op_b0f8_0), 0, 45304 }, /* CMPA.W (xxx).W,An */ +{ CPUFUNC(op_b0f9_0), 0, 45305 }, /* CMPA.W (xxx).L,An */ +{ CPUFUNC(op_b0fa_0), 0, 45306 }, /* CMPA.W (d16,PC),An */ +{ CPUFUNC(op_b0fb_0), 0, 45307 }, /* CMPA.W (d8,PC,Xn),An */ +{ CPUFUNC(op_b0fc_0), 0, 45308 }, /* CMPA.W #.W,An */ +{ CPUFUNC(op_b100_0), 0, 45312 }, /* EOR.B Dn,Dn */ +{ CPUFUNC(op_b108_0), 0, 45320 }, /* CMPM.B (An)+,(An)+ */ +{ CPUFUNC(op_b110_0), 0, 45328 }, /* EOR.B Dn,(An) */ +{ CPUFUNC(op_b118_0), 0, 45336 }, /* EOR.B Dn,(An)+ */ +{ CPUFUNC(op_b120_0), 0, 45344 }, /* EOR.B Dn,-(An) */ +{ CPUFUNC(op_b128_0), 0, 45352 }, /* EOR.B Dn,(d16,An) */ +{ CPUFUNC(op_b130_0), 0, 45360 }, /* EOR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b138_0), 0, 45368 }, /* EOR.B Dn,(xxx).W */ +{ CPUFUNC(op_b139_0), 0, 45369 }, /* EOR.B Dn,(xxx).L */ +{ CPUFUNC(op_b140_0), 0, 45376 }, /* EOR.W Dn,Dn */ +{ CPUFUNC(op_b148_0), 0, 45384 }, /* CMPM.W (An)+,(An)+ */ +{ CPUFUNC(op_b150_0), 0, 45392 }, /* EOR.W Dn,(An) */ +{ CPUFUNC(op_b158_0), 0, 45400 }, /* EOR.W Dn,(An)+ */ +{ CPUFUNC(op_b160_0), 0, 45408 }, /* EOR.W Dn,-(An) */ +{ CPUFUNC(op_b168_0), 0, 45416 }, /* EOR.W Dn,(d16,An) */ +{ CPUFUNC(op_b170_0), 0, 45424 }, /* EOR.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b178_0), 0, 45432 }, /* EOR.W Dn,(xxx).W */ +{ CPUFUNC(op_b179_0), 0, 45433 }, /* EOR.W Dn,(xxx).L */ +{ CPUFUNC(op_b180_0), 0, 45440 }, /* EOR.L Dn,Dn */ +{ CPUFUNC(op_b188_0), 0, 45448 }, /* CMPM.L (An)+,(An)+ */ +{ CPUFUNC(op_b190_0), 0, 45456 }, /* EOR.L Dn,(An) */ +{ CPUFUNC(op_b198_0), 0, 45464 }, /* EOR.L Dn,(An)+ */ +{ CPUFUNC(op_b1a0_0), 0, 45472 }, /* EOR.L Dn,-(An) */ +{ CPUFUNC(op_b1a8_0), 0, 45480 }, /* EOR.L Dn,(d16,An) */ +{ CPUFUNC(op_b1b0_0), 0, 45488 }, /* EOR.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b1b8_0), 0, 45496 }, /* EOR.L Dn,(xxx).W */ +{ CPUFUNC(op_b1b9_0), 0, 45497 }, /* EOR.L Dn,(xxx).L */ +{ CPUFUNC(op_b1c0_0), 0, 45504 }, /* CMPA.L Dn,An */ +{ CPUFUNC(op_b1c8_0), 0, 45512 }, /* CMPA.L An,An */ +{ CPUFUNC(op_b1d0_0), 0, 45520 }, /* CMPA.L (An),An */ +{ CPUFUNC(op_b1d8_0), 0, 45528 }, /* CMPA.L (An)+,An */ +{ CPUFUNC(op_b1e0_0), 0, 45536 }, /* CMPA.L -(An),An */ +{ CPUFUNC(op_b1e8_0), 0, 45544 }, /* CMPA.L (d16,An),An */ +{ CPUFUNC(op_b1f0_0), 0, 45552 }, /* CMPA.L (d8,An,Xn),An */ +{ CPUFUNC(op_b1f8_0), 0, 45560 }, /* CMPA.L (xxx).W,An */ +{ CPUFUNC(op_b1f9_0), 0, 45561 }, /* CMPA.L (xxx).L,An */ +{ CPUFUNC(op_b1fa_0), 0, 45562 }, /* CMPA.L (d16,PC),An */ +{ CPUFUNC(op_b1fb_0), 0, 45563 }, /* CMPA.L (d8,PC,Xn),An */ +{ CPUFUNC(op_b1fc_0), 0, 45564 }, /* CMPA.L #.L,An */ +{ CPUFUNC(op_c000_0), 0, 49152 }, /* AND.B Dn,Dn */ +{ CPUFUNC(op_c010_0), 0, 49168 }, /* AND.B (An),Dn */ +{ CPUFUNC(op_c018_0), 0, 49176 }, /* AND.B (An)+,Dn */ +{ CPUFUNC(op_c020_0), 0, 49184 }, /* AND.B -(An),Dn */ +{ CPUFUNC(op_c028_0), 0, 49192 }, /* AND.B (d16,An),Dn */ +{ CPUFUNC(op_c030_0), 0, 49200 }, /* AND.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_c038_0), 0, 49208 }, /* AND.B (xxx).W,Dn */ +{ CPUFUNC(op_c039_0), 0, 49209 }, /* AND.B (xxx).L,Dn */ +{ CPUFUNC(op_c03a_0), 0, 49210 }, /* AND.B (d16,PC),Dn */ +{ CPUFUNC(op_c03b_0), 0, 49211 }, /* AND.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c03c_0), 0, 49212 }, /* AND.B #.B,Dn */ +{ CPUFUNC(op_c040_0), 0, 49216 }, /* AND.W Dn,Dn */ +{ CPUFUNC(op_c050_0), 0, 49232 }, /* AND.W (An),Dn */ +{ CPUFUNC(op_c058_0), 0, 49240 }, /* AND.W (An)+,Dn */ +{ CPUFUNC(op_c060_0), 0, 49248 }, /* AND.W -(An),Dn */ +{ CPUFUNC(op_c068_0), 0, 49256 }, /* AND.W (d16,An),Dn */ +{ CPUFUNC(op_c070_0), 0, 49264 }, /* AND.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c078_0), 0, 49272 }, /* AND.W (xxx).W,Dn */ +{ CPUFUNC(op_c079_0), 0, 49273 }, /* AND.W (xxx).L,Dn */ +{ CPUFUNC(op_c07a_0), 0, 49274 }, /* AND.W (d16,PC),Dn */ +{ CPUFUNC(op_c07b_0), 0, 49275 }, /* AND.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c07c_0), 0, 49276 }, /* AND.W #.W,Dn */ +{ CPUFUNC(op_c080_0), 0, 49280 }, /* AND.L Dn,Dn */ +{ CPUFUNC(op_c090_0), 0, 49296 }, /* AND.L (An),Dn */ +{ CPUFUNC(op_c098_0), 0, 49304 }, /* AND.L (An)+,Dn */ +{ CPUFUNC(op_c0a0_0), 0, 49312 }, /* AND.L -(An),Dn */ +{ CPUFUNC(op_c0a8_0), 0, 49320 }, /* AND.L (d16,An),Dn */ +{ CPUFUNC(op_c0b0_0), 0, 49328 }, /* AND.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_c0b8_0), 0, 49336 }, /* AND.L (xxx).W,Dn */ +{ CPUFUNC(op_c0b9_0), 0, 49337 }, /* AND.L (xxx).L,Dn */ +{ CPUFUNC(op_c0ba_0), 0, 49338 }, /* AND.L (d16,PC),Dn */ +{ CPUFUNC(op_c0bb_0), 0, 49339 }, /* AND.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c0bc_0), 0, 49340 }, /* AND.L #.L,Dn */ +{ CPUFUNC(op_c0c0_0), 0, 49344 }, /* MULU.W Dn,Dn */ +{ CPUFUNC(op_c0d0_0), 0, 49360 }, /* MULU.W (An),Dn */ +{ CPUFUNC(op_c0d8_0), 0, 49368 }, /* MULU.W (An)+,Dn */ +{ CPUFUNC(op_c0e0_0), 0, 49376 }, /* MULU.W -(An),Dn */ +{ CPUFUNC(op_c0e8_0), 0, 49384 }, /* MULU.W (d16,An),Dn */ +{ CPUFUNC(op_c0f0_0), 0, 49392 }, /* MULU.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c0f8_0), 0, 49400 }, /* MULU.W (xxx).W,Dn */ +{ CPUFUNC(op_c0f9_0), 0, 49401 }, /* MULU.W (xxx).L,Dn */ +{ CPUFUNC(op_c0fa_0), 0, 49402 }, /* MULU.W (d16,PC),Dn */ +{ CPUFUNC(op_c0fb_0), 0, 49403 }, /* MULU.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c0fc_0), 0, 49404 }, /* MULU.W #.W,Dn */ +{ CPUFUNC(op_c100_1), 0, 49408 }, /* ABCD.B Dn,Dn */ +{ CPUFUNC(op_c108_1), 0, 49416 }, /* ABCD.B -(An),-(An) */ +{ CPUFUNC(op_c110_0), 0, 49424 }, /* AND.B Dn,(An) */ +{ CPUFUNC(op_c118_0), 0, 49432 }, /* AND.B Dn,(An)+ */ +{ CPUFUNC(op_c120_0), 0, 49440 }, /* AND.B Dn,-(An) */ +{ CPUFUNC(op_c128_0), 0, 49448 }, /* AND.B Dn,(d16,An) */ +{ CPUFUNC(op_c130_0), 0, 49456 }, /* AND.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c138_0), 0, 49464 }, /* AND.B Dn,(xxx).W */ +{ CPUFUNC(op_c139_0), 0, 49465 }, /* AND.B Dn,(xxx).L */ +{ CPUFUNC_FF(op_c140_0), 0, 49472 }, /* EXG.L Dn,Dn */ +{ CPUFUNC_FF(op_c148_0), 0, 49480 }, /* EXG.L An,An */ +{ CPUFUNC(op_c150_0), 0, 49488 }, /* AND.W Dn,(An) */ +{ CPUFUNC(op_c158_0), 0, 49496 }, /* AND.W Dn,(An)+ */ +{ CPUFUNC(op_c160_0), 0, 49504 }, /* AND.W Dn,-(An) */ +{ CPUFUNC(op_c168_0), 0, 49512 }, /* AND.W Dn,(d16,An) */ +{ CPUFUNC(op_c170_0), 0, 49520 }, /* AND.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c178_0), 0, 49528 }, /* AND.W Dn,(xxx).W */ +{ CPUFUNC(op_c179_0), 0, 49529 }, /* AND.W Dn,(xxx).L */ +{ CPUFUNC_FF(op_c188_0), 0, 49544 }, /* EXG.L Dn,An */ +{ CPUFUNC(op_c190_0), 0, 49552 }, /* AND.L Dn,(An) */ +{ CPUFUNC(op_c198_0), 0, 49560 }, /* AND.L Dn,(An)+ */ +{ CPUFUNC(op_c1a0_0), 0, 49568 }, /* AND.L Dn,-(An) */ +{ CPUFUNC(op_c1a8_0), 0, 49576 }, /* AND.L Dn,(d16,An) */ +{ CPUFUNC(op_c1b0_0), 0, 49584 }, /* AND.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c1b8_0), 0, 49592 }, /* AND.L Dn,(xxx).W */ +{ CPUFUNC(op_c1b9_0), 0, 49593 }, /* AND.L Dn,(xxx).L */ +{ CPUFUNC(op_c1c0_0), 0, 49600 }, /* MULS.W Dn,Dn */ +{ CPUFUNC(op_c1d0_0), 0, 49616 }, /* MULS.W (An),Dn */ +{ CPUFUNC(op_c1d8_0), 0, 49624 }, /* MULS.W (An)+,Dn */ +{ CPUFUNC(op_c1e0_0), 0, 49632 }, /* MULS.W -(An),Dn */ +{ CPUFUNC(op_c1e8_0), 0, 49640 }, /* MULS.W (d16,An),Dn */ +{ CPUFUNC(op_c1f0_0), 0, 49648 }, /* MULS.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c1f8_0), 0, 49656 }, /* MULS.W (xxx).W,Dn */ +{ CPUFUNC(op_c1f9_0), 0, 49657 }, /* MULS.W (xxx).L,Dn */ +{ CPUFUNC(op_c1fa_0), 0, 49658 }, /* MULS.W (d16,PC),Dn */ +{ CPUFUNC(op_c1fb_0), 0, 49659 }, /* MULS.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c1fc_0), 0, 49660 }, /* MULS.W #.W,Dn */ +{ CPUFUNC(op_d000_0), 0, 53248 }, /* ADD.B Dn,Dn */ +{ CPUFUNC(op_d010_0), 0, 53264 }, /* ADD.B (An),Dn */ +{ CPUFUNC(op_d018_0), 0, 53272 }, /* ADD.B (An)+,Dn */ +{ CPUFUNC(op_d020_0), 0, 53280 }, /* ADD.B -(An),Dn */ +{ CPUFUNC(op_d028_0), 0, 53288 }, /* ADD.B (d16,An),Dn */ +{ CPUFUNC(op_d030_0), 0, 53296 }, /* ADD.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_d038_0), 0, 53304 }, /* ADD.B (xxx).W,Dn */ +{ CPUFUNC(op_d039_0), 0, 53305 }, /* ADD.B (xxx).L,Dn */ +{ CPUFUNC(op_d03a_0), 0, 53306 }, /* ADD.B (d16,PC),Dn */ +{ CPUFUNC(op_d03b_0), 0, 53307 }, /* ADD.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d03c_0), 0, 53308 }, /* ADD.B #.B,Dn */ +{ CPUFUNC(op_d040_0), 0, 53312 }, /* ADD.W Dn,Dn */ +{ CPUFUNC(op_d048_0), 0, 53320 }, /* ADD.W An,Dn */ +{ CPUFUNC(op_d050_0), 0, 53328 }, /* ADD.W (An),Dn */ +{ CPUFUNC(op_d058_0), 0, 53336 }, /* ADD.W (An)+,Dn */ +{ CPUFUNC(op_d060_0), 0, 53344 }, /* ADD.W -(An),Dn */ +{ CPUFUNC(op_d068_0), 0, 53352 }, /* ADD.W (d16,An),Dn */ +{ CPUFUNC(op_d070_0), 0, 53360 }, /* ADD.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_d078_0), 0, 53368 }, /* ADD.W (xxx).W,Dn */ +{ CPUFUNC(op_d079_0), 0, 53369 }, /* ADD.W (xxx).L,Dn */ +{ CPUFUNC(op_d07a_0), 0, 53370 }, /* ADD.W (d16,PC),Dn */ +{ CPUFUNC(op_d07b_0), 0, 53371 }, /* ADD.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d07c_0), 0, 53372 }, /* ADD.W #.W,Dn */ +{ CPUFUNC(op_d080_0), 0, 53376 }, /* ADD.L Dn,Dn */ +{ CPUFUNC(op_d088_0), 0, 53384 }, /* ADD.L An,Dn */ +{ CPUFUNC(op_d090_0), 0, 53392 }, /* ADD.L (An),Dn */ +{ CPUFUNC(op_d098_0), 0, 53400 }, /* ADD.L (An)+,Dn */ +{ CPUFUNC(op_d0a0_0), 0, 53408 }, /* ADD.L -(An),Dn */ +{ CPUFUNC(op_d0a8_0), 0, 53416 }, /* ADD.L (d16,An),Dn */ +{ CPUFUNC(op_d0b0_0), 0, 53424 }, /* ADD.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_d0b8_0), 0, 53432 }, /* ADD.L (xxx).W,Dn */ +{ CPUFUNC(op_d0b9_0), 0, 53433 }, /* ADD.L (xxx).L,Dn */ +{ CPUFUNC(op_d0ba_0), 0, 53434 }, /* ADD.L (d16,PC),Dn */ +{ CPUFUNC(op_d0bb_0), 0, 53435 }, /* ADD.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d0bc_0), 0, 53436 }, /* ADD.L #.L,Dn */ +{ CPUFUNC_FF(op_d0c0_0), 0, 53440 }, /* ADDA.W Dn,An */ +{ CPUFUNC_FF(op_d0c8_0), 0, 53448 }, /* ADDA.W An,An */ +{ CPUFUNC_FF(op_d0d0_0), 0, 53456 }, /* ADDA.W (An),An */ +{ CPUFUNC_FF(op_d0d8_0), 0, 53464 }, /* ADDA.W (An)+,An */ +{ CPUFUNC_FF(op_d0e0_0), 0, 53472 }, /* ADDA.W -(An),An */ +{ CPUFUNC_FF(op_d0e8_0), 0, 53480 }, /* ADDA.W (d16,An),An */ +{ CPUFUNC_FF(op_d0f0_0), 0, 53488 }, /* ADDA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_d0f8_0), 0, 53496 }, /* ADDA.W (xxx).W,An */ +{ CPUFUNC_FF(op_d0f9_0), 0, 53497 }, /* ADDA.W (xxx).L,An */ +{ CPUFUNC_FF(op_d0fa_0), 0, 53498 }, /* ADDA.W (d16,PC),An */ +{ CPUFUNC_FF(op_d0fb_0), 0, 53499 }, /* ADDA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_d0fc_0), 0, 53500 }, /* ADDA.W #.W,An */ +{ CPUFUNC(op_d100_0), 0, 53504 }, /* ADDX.B Dn,Dn */ +{ CPUFUNC(op_d108_0), 0, 53512 }, /* ADDX.B -(An),-(An) */ +{ CPUFUNC(op_d110_0), 0, 53520 }, /* ADD.B Dn,(An) */ +{ CPUFUNC(op_d118_0), 0, 53528 }, /* ADD.B Dn,(An)+ */ +{ CPUFUNC(op_d120_0), 0, 53536 }, /* ADD.B Dn,-(An) */ +{ CPUFUNC(op_d128_0), 0, 53544 }, /* ADD.B Dn,(d16,An) */ +{ CPUFUNC(op_d130_0), 0, 53552 }, /* ADD.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d138_0), 0, 53560 }, /* ADD.B Dn,(xxx).W */ +{ CPUFUNC(op_d139_0), 0, 53561 }, /* ADD.B Dn,(xxx).L */ +{ CPUFUNC(op_d140_0), 0, 53568 }, /* ADDX.W Dn,Dn */ +{ CPUFUNC(op_d148_0), 0, 53576 }, /* ADDX.W -(An),-(An) */ +{ CPUFUNC(op_d150_0), 0, 53584 }, /* ADD.W Dn,(An) */ +{ CPUFUNC(op_d158_0), 0, 53592 }, /* ADD.W Dn,(An)+ */ +{ CPUFUNC(op_d160_0), 0, 53600 }, /* ADD.W Dn,-(An) */ +{ CPUFUNC(op_d168_0), 0, 53608 }, /* ADD.W Dn,(d16,An) */ +{ CPUFUNC(op_d170_0), 0, 53616 }, /* ADD.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d178_0), 0, 53624 }, /* ADD.W Dn,(xxx).W */ +{ CPUFUNC(op_d179_0), 0, 53625 }, /* ADD.W Dn,(xxx).L */ +{ CPUFUNC(op_d180_0), 0, 53632 }, /* ADDX.L Dn,Dn */ +{ CPUFUNC(op_d188_0), 0, 53640 }, /* ADDX.L -(An),-(An) */ +{ CPUFUNC(op_d190_0), 0, 53648 }, /* ADD.L Dn,(An) */ +{ CPUFUNC(op_d198_0), 0, 53656 }, /* ADD.L Dn,(An)+ */ +{ CPUFUNC(op_d1a0_0), 0, 53664 }, /* ADD.L Dn,-(An) */ +{ CPUFUNC(op_d1a8_0), 0, 53672 }, /* ADD.L Dn,(d16,An) */ +{ CPUFUNC(op_d1b0_0), 0, 53680 }, /* ADD.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d1b8_0), 0, 53688 }, /* ADD.L Dn,(xxx).W */ +{ CPUFUNC(op_d1b9_0), 0, 53689 }, /* ADD.L Dn,(xxx).L */ +{ CPUFUNC_FF(op_d1c0_0), 0, 53696 }, /* ADDA.L Dn,An */ +{ CPUFUNC_FF(op_d1c8_0), 0, 53704 }, /* ADDA.L An,An */ +{ CPUFUNC_FF(op_d1d0_0), 0, 53712 }, /* ADDA.L (An),An */ +{ CPUFUNC_FF(op_d1d8_0), 0, 53720 }, /* ADDA.L (An)+,An */ +{ CPUFUNC_FF(op_d1e0_0), 0, 53728 }, /* ADDA.L -(An),An */ +{ CPUFUNC_FF(op_d1e8_0), 0, 53736 }, /* ADDA.L (d16,An),An */ +{ CPUFUNC_FF(op_d1f0_0), 0, 53744 }, /* ADDA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_d1f8_0), 0, 53752 }, /* ADDA.L (xxx).W,An */ +{ CPUFUNC_FF(op_d1f9_0), 0, 53753 }, /* ADDA.L (xxx).L,An */ +{ CPUFUNC_FF(op_d1fa_0), 0, 53754 }, /* ADDA.L (d16,PC),An */ +{ CPUFUNC_FF(op_d1fb_0), 0, 53755 }, /* ADDA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_d1fc_0), 0, 53756 }, /* ADDA.L #.L,An */ +{ CPUFUNC(op_e000_0), 0, 57344 }, /* ASR.B #,Dn */ +{ CPUFUNC(op_e008_0), 0, 57352 }, /* LSR.B #,Dn */ +{ CPUFUNC(op_e010_0), 0, 57360 }, /* ROXR.B #,Dn */ +{ CPUFUNC(op_e018_0), 0, 57368 }, /* ROR.B #,Dn */ +{ CPUFUNC(op_e020_0), 0, 57376 }, /* ASR.B Dn,Dn */ +{ CPUFUNC(op_e028_0), 0, 57384 }, /* LSR.B Dn,Dn */ +{ CPUFUNC(op_e030_0), 0, 57392 }, /* ROXR.B Dn,Dn */ +{ CPUFUNC(op_e038_0), 0, 57400 }, /* ROR.B Dn,Dn */ +{ CPUFUNC(op_e040_0), 0, 57408 }, /* ASR.W #,Dn */ +{ CPUFUNC(op_e048_0), 0, 57416 }, /* LSR.W #,Dn */ +{ CPUFUNC(op_e050_0), 0, 57424 }, /* ROXR.W #,Dn */ +{ CPUFUNC(op_e058_0), 0, 57432 }, /* ROR.W #,Dn */ +{ CPUFUNC(op_e060_0), 0, 57440 }, /* ASR.W Dn,Dn */ +{ CPUFUNC(op_e068_0), 0, 57448 }, /* LSR.W Dn,Dn */ +{ CPUFUNC(op_e070_0), 0, 57456 }, /* ROXR.W Dn,Dn */ +{ CPUFUNC(op_e078_0), 0, 57464 }, /* ROR.W Dn,Dn */ +{ CPUFUNC(op_e080_0), 0, 57472 }, /* ASR.L #,Dn */ +{ CPUFUNC(op_e088_0), 0, 57480 }, /* LSR.L #,Dn */ +{ CPUFUNC(op_e090_0), 0, 57488 }, /* ROXR.L #,Dn */ +{ CPUFUNC(op_e098_0), 0, 57496 }, /* ROR.L #,Dn */ +{ CPUFUNC(op_e0a0_0), 0, 57504 }, /* ASR.L Dn,Dn */ +{ CPUFUNC(op_e0a8_0), 0, 57512 }, /* LSR.L Dn,Dn */ +{ CPUFUNC(op_e0b0_0), 0, 57520 }, /* ROXR.L Dn,Dn */ +{ CPUFUNC(op_e0b8_0), 0, 57528 }, /* ROR.L Dn,Dn */ +{ CPUFUNC(op_e0d0_0), 0, 57552 }, /* ASRW.W (An) */ +{ CPUFUNC(op_e0d8_0), 0, 57560 }, /* ASRW.W (An)+ */ +{ CPUFUNC(op_e0e0_0), 0, 57568 }, /* ASRW.W -(An) */ +{ CPUFUNC(op_e0e8_0), 0, 57576 }, /* ASRW.W (d16,An) */ +{ CPUFUNC(op_e0f0_0), 0, 57584 }, /* ASRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e0f8_0), 0, 57592 }, /* ASRW.W (xxx).W */ +{ CPUFUNC(op_e0f9_0), 0, 57593 }, /* ASRW.W (xxx).L */ +{ CPUFUNC(op_e100_0), 0, 57600 }, /* ASL.B #,Dn */ +{ CPUFUNC(op_e108_0), 0, 57608 }, /* LSL.B #,Dn */ +{ CPUFUNC(op_e110_0), 0, 57616 }, /* ROXL.B #,Dn */ +{ CPUFUNC(op_e118_0), 0, 57624 }, /* ROL.B #,Dn */ +{ CPUFUNC(op_e120_0), 0, 57632 }, /* ASL.B Dn,Dn */ +{ CPUFUNC(op_e128_0), 0, 57640 }, /* LSL.B Dn,Dn */ +{ CPUFUNC(op_e130_0), 0, 57648 }, /* ROXL.B Dn,Dn */ +{ CPUFUNC(op_e138_0), 0, 57656 }, /* ROL.B Dn,Dn */ +{ CPUFUNC(op_e140_0), 0, 57664 }, /* ASL.W #,Dn */ +{ CPUFUNC(op_e148_0), 0, 57672 }, /* LSL.W #,Dn */ +{ CPUFUNC(op_e150_0), 0, 57680 }, /* ROXL.W #,Dn */ +{ CPUFUNC(op_e158_0), 0, 57688 }, /* ROL.W #,Dn */ +{ CPUFUNC(op_e160_0), 0, 57696 }, /* ASL.W Dn,Dn */ +{ CPUFUNC(op_e168_0), 0, 57704 }, /* LSL.W Dn,Dn */ +{ CPUFUNC(op_e170_0), 0, 57712 }, /* ROXL.W Dn,Dn */ +{ CPUFUNC(op_e178_0), 0, 57720 }, /* ROL.W Dn,Dn */ +{ CPUFUNC(op_e180_0), 0, 57728 }, /* ASL.L #,Dn */ +{ CPUFUNC(op_e188_0), 0, 57736 }, /* LSL.L #,Dn */ +{ CPUFUNC(op_e190_0), 0, 57744 }, /* ROXL.L #,Dn */ +{ CPUFUNC(op_e198_0), 0, 57752 }, /* ROL.L #,Dn */ +{ CPUFUNC(op_e1a0_0), 0, 57760 }, /* ASL.L Dn,Dn */ +{ CPUFUNC(op_e1a8_0), 0, 57768 }, /* LSL.L Dn,Dn */ +{ CPUFUNC(op_e1b0_0), 0, 57776 }, /* ROXL.L Dn,Dn */ +{ CPUFUNC(op_e1b8_0), 0, 57784 }, /* ROL.L Dn,Dn */ +{ CPUFUNC(op_e1d0_0), 0, 57808 }, /* ASLW.W (An) */ +{ CPUFUNC(op_e1d8_0), 0, 57816 }, /* ASLW.W (An)+ */ +{ CPUFUNC(op_e1e0_0), 0, 57824 }, /* ASLW.W -(An) */ +{ CPUFUNC(op_e1e8_0), 0, 57832 }, /* ASLW.W (d16,An) */ +{ CPUFUNC(op_e1f0_0), 0, 57840 }, /* ASLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e1f8_0), 0, 57848 }, /* ASLW.W (xxx).W */ +{ CPUFUNC(op_e1f9_0), 0, 57849 }, /* ASLW.W (xxx).L */ +{ CPUFUNC(op_e2d0_0), 0, 58064 }, /* LSRW.W (An) */ +{ CPUFUNC(op_e2d8_0), 0, 58072 }, /* LSRW.W (An)+ */ +{ CPUFUNC(op_e2e0_0), 0, 58080 }, /* LSRW.W -(An) */ +{ CPUFUNC(op_e2e8_0), 0, 58088 }, /* LSRW.W (d16,An) */ +{ CPUFUNC(op_e2f0_0), 0, 58096 }, /* LSRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e2f8_0), 0, 58104 }, /* LSRW.W (xxx).W */ +{ CPUFUNC(op_e2f9_0), 0, 58105 }, /* LSRW.W (xxx).L */ +{ CPUFUNC(op_e3d0_0), 0, 58320 }, /* LSLW.W (An) */ +{ CPUFUNC(op_e3d8_0), 0, 58328 }, /* LSLW.W (An)+ */ +{ CPUFUNC(op_e3e0_0), 0, 58336 }, /* LSLW.W -(An) */ +{ CPUFUNC(op_e3e8_0), 0, 58344 }, /* LSLW.W (d16,An) */ +{ CPUFUNC(op_e3f0_0), 0, 58352 }, /* LSLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e3f8_0), 0, 58360 }, /* LSLW.W (xxx).W */ +{ CPUFUNC(op_e3f9_0), 0, 58361 }, /* LSLW.W (xxx).L */ +{ CPUFUNC(op_e4d0_0), 0, 58576 }, /* ROXRW.W (An) */ +{ CPUFUNC(op_e4d8_0), 0, 58584 }, /* ROXRW.W (An)+ */ +{ CPUFUNC(op_e4e0_0), 0, 58592 }, /* ROXRW.W -(An) */ +{ CPUFUNC(op_e4e8_0), 0, 58600 }, /* ROXRW.W (d16,An) */ +{ CPUFUNC(op_e4f0_0), 0, 58608 }, /* ROXRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e4f8_0), 0, 58616 }, /* ROXRW.W (xxx).W */ +{ CPUFUNC(op_e4f9_0), 0, 58617 }, /* ROXRW.W (xxx).L */ +{ CPUFUNC(op_e5d0_0), 0, 58832 }, /* ROXLW.W (An) */ +{ CPUFUNC(op_e5d8_0), 0, 58840 }, /* ROXLW.W (An)+ */ +{ CPUFUNC(op_e5e0_0), 0, 58848 }, /* ROXLW.W -(An) */ +{ CPUFUNC(op_e5e8_0), 0, 58856 }, /* ROXLW.W (d16,An) */ +{ CPUFUNC(op_e5f0_0), 0, 58864 }, /* ROXLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e5f8_0), 0, 58872 }, /* ROXLW.W (xxx).W */ +{ CPUFUNC(op_e5f9_0), 0, 58873 }, /* ROXLW.W (xxx).L */ +{ CPUFUNC(op_e6d0_0), 0, 59088 }, /* RORW.W (An) */ +{ CPUFUNC(op_e6d8_0), 0, 59096 }, /* RORW.W (An)+ */ +{ CPUFUNC(op_e6e0_0), 0, 59104 }, /* RORW.W -(An) */ +{ CPUFUNC(op_e6e8_0), 0, 59112 }, /* RORW.W (d16,An) */ +{ CPUFUNC(op_e6f0_0), 0, 59120 }, /* RORW.W (d8,An,Xn) */ +{ CPUFUNC(op_e6f8_0), 0, 59128 }, /* RORW.W (xxx).W */ +{ CPUFUNC(op_e6f9_0), 0, 59129 }, /* RORW.W (xxx).L */ +{ CPUFUNC(op_e7d0_0), 0, 59344 }, /* ROLW.W (An) */ +{ CPUFUNC(op_e7d8_0), 0, 59352 }, /* ROLW.W (An)+ */ +{ CPUFUNC(op_e7e0_0), 0, 59360 }, /* ROLW.W -(An) */ +{ CPUFUNC(op_e7e8_0), 0, 59368 }, /* ROLW.W (d16,An) */ +{ CPUFUNC(op_e7f0_0), 0, 59376 }, /* ROLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e7f8_0), 0, 59384 }, /* ROLW.W (xxx).W */ +{ CPUFUNC(op_e7f9_0), 0, 59385 }, /* ROLW.W (xxx).L */ +{ CPUFUNC(op_e8c0_0), 0, 59584 }, /* BFTST.L #.W,Dn */ +{ CPUFUNC(op_e8d0_0), 0, 59600 }, /* BFTST.L #.W,(An) */ +{ CPUFUNC(op_e8e8_0), 0, 59624 }, /* BFTST.L #.W,(d16,An) */ +{ CPUFUNC(op_e8f0_0), 0, 59632 }, /* BFTST.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_e8f8_0), 0, 59640 }, /* BFTST.L #.W,(xxx).W */ +{ CPUFUNC(op_e8f9_0), 0, 59641 }, /* BFTST.L #.W,(xxx).L */ +{ CPUFUNC(op_e8fa_0), 0, 59642 }, /* BFTST.L #.W,(d16,PC) */ +{ CPUFUNC(op_e8fb_0), 0, 59643 }, /* BFTST.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_e9c0_0), 0, 59840 }, /* BFEXTU.L #.W,Dn */ +{ CPUFUNC(op_e9d0_0), 0, 59856 }, /* BFEXTU.L #.W,(An) */ +{ CPUFUNC(op_e9e8_0), 0, 59880 }, /* BFEXTU.L #.W,(d16,An) */ +{ CPUFUNC(op_e9f0_0), 0, 59888 }, /* BFEXTU.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_e9f8_0), 0, 59896 }, /* BFEXTU.L #.W,(xxx).W */ +{ CPUFUNC(op_e9f9_0), 0, 59897 }, /* BFEXTU.L #.W,(xxx).L */ +{ CPUFUNC(op_e9fa_0), 0, 59898 }, /* BFEXTU.L #.W,(d16,PC) */ +{ CPUFUNC(op_e9fb_0), 0, 59899 }, /* BFEXTU.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_eac0_0), 0, 60096 }, /* BFCHG.L #.W,Dn */ +{ CPUFUNC(op_ead0_0), 0, 60112 }, /* BFCHG.L #.W,(An) */ +{ CPUFUNC(op_eae8_0), 0, 60136 }, /* BFCHG.L #.W,(d16,An) */ +{ CPUFUNC(op_eaf0_0), 0, 60144 }, /* BFCHG.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_eaf8_0), 0, 60152 }, /* BFCHG.L #.W,(xxx).W */ +{ CPUFUNC(op_eaf9_0), 0, 60153 }, /* BFCHG.L #.W,(xxx).L */ +{ CPUFUNC(op_ebc0_0), 0, 60352 }, /* BFEXTS.L #.W,Dn */ +{ CPUFUNC(op_ebd0_0), 0, 60368 }, /* BFEXTS.L #.W,(An) */ +{ CPUFUNC(op_ebe8_0), 0, 60392 }, /* BFEXTS.L #.W,(d16,An) */ +{ CPUFUNC(op_ebf0_0), 0, 60400 }, /* BFEXTS.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_ebf8_0), 0, 60408 }, /* BFEXTS.L #.W,(xxx).W */ +{ CPUFUNC(op_ebf9_0), 0, 60409 }, /* BFEXTS.L #.W,(xxx).L */ +{ CPUFUNC(op_ebfa_0), 0, 60410 }, /* BFEXTS.L #.W,(d16,PC) */ +{ CPUFUNC(op_ebfb_0), 0, 60411 }, /* BFEXTS.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_ecc0_0), 0, 60608 }, /* BFCLR.L #.W,Dn */ +{ CPUFUNC(op_ecd0_0), 0, 60624 }, /* BFCLR.L #.W,(An) */ +{ CPUFUNC(op_ece8_0), 0, 60648 }, /* BFCLR.L #.W,(d16,An) */ +{ CPUFUNC(op_ecf0_0), 0, 60656 }, /* BFCLR.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_ecf8_0), 0, 60664 }, /* BFCLR.L #.W,(xxx).W */ +{ CPUFUNC(op_ecf9_0), 0, 60665 }, /* BFCLR.L #.W,(xxx).L */ +{ CPUFUNC(op_edc0_0), 0, 60864 }, /* BFFFO.L #.W,Dn */ +{ CPUFUNC(op_edd0_0), 0, 60880 }, /* BFFFO.L #.W,(An) */ +{ CPUFUNC(op_ede8_0), 0, 60904 }, /* BFFFO.L #.W,(d16,An) */ +{ CPUFUNC(op_edf0_0), 0, 60912 }, /* BFFFO.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_edf8_0), 0, 60920 }, /* BFFFO.L #.W,(xxx).W */ +{ CPUFUNC(op_edf9_0), 0, 60921 }, /* BFFFO.L #.W,(xxx).L */ +{ CPUFUNC(op_edfa_0), 0, 60922 }, /* BFFFO.L #.W,(d16,PC) */ +{ CPUFUNC(op_edfb_0), 0, 60923 }, /* BFFFO.L #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_eec0_0), 0, 61120 }, /* BFSET.L #.W,Dn */ +{ CPUFUNC(op_eed0_0), 0, 61136 }, /* BFSET.L #.W,(An) */ +{ CPUFUNC(op_eee8_0), 0, 61160 }, /* BFSET.L #.W,(d16,An) */ +{ CPUFUNC(op_eef0_0), 0, 61168 }, /* BFSET.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_eef8_0), 0, 61176 }, /* BFSET.L #.W,(xxx).W */ +{ CPUFUNC(op_eef9_0), 0, 61177 }, /* BFSET.L #.W,(xxx).L */ +{ CPUFUNC(op_efc0_0), 0, 61376 }, /* BFINS.L #.W,Dn */ +{ CPUFUNC(op_efd0_0), 0, 61392 }, /* BFINS.L #.W,(An) */ +{ CPUFUNC(op_efe8_0), 0, 61416 }, /* BFINS.L #.W,(d16,An) */ +{ CPUFUNC(op_eff0_0), 0, 61424 }, /* BFINS.L #.W,(d8,An,Xn) */ +{ CPUFUNC(op_eff8_0), 0, 61432 }, /* BFINS.L #.W,(xxx).W */ +{ CPUFUNC(op_eff9_0), 0, 61433 }, /* BFINS.L #.W,(xxx).L */ +{ 0, 0, 0 }}; +struct cputbl CPUFUNC(op_smalltbl_3)[] = { +{ CPUFUNC(op_0_0), 0, 0 }, /* OR.B #.B,Dn */ +{ CPUFUNC(op_10_0), 0, 16 }, /* OR.B #.B,(An) */ +{ CPUFUNC(op_18_0), 0, 24 }, /* OR.B #.B,(An)+ */ +{ CPUFUNC(op_20_0), 0, 32 }, /* OR.B #.B,-(An) */ +{ CPUFUNC(op_28_0), 0, 40 }, /* OR.B #.B,(d16,An) */ +{ CPUFUNC(op_30_3), 0, 48 }, /* OR.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_38_0), 0, 56 }, /* OR.B #.B,(xxx).W */ +{ CPUFUNC(op_39_0), 0, 57 }, /* OR.B #.B,(xxx).L */ +{ CPUFUNC(op_3c_0), 0, 60 }, /* ORSR.B #.W */ +{ CPUFUNC(op_40_0), 0, 64 }, /* OR.W #.W,Dn */ +{ CPUFUNC(op_50_0), 0, 80 }, /* OR.W #.W,(An) */ +{ CPUFUNC(op_58_0), 0, 88 }, /* OR.W #.W,(An)+ */ +{ CPUFUNC(op_60_0), 0, 96 }, /* OR.W #.W,-(An) */ +{ CPUFUNC(op_68_0), 0, 104 }, /* OR.W #.W,(d16,An) */ +{ CPUFUNC(op_70_3), 0, 112 }, /* OR.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_78_0), 0, 120 }, /* OR.W #.W,(xxx).W */ +{ CPUFUNC(op_79_0), 0, 121 }, /* OR.W #.W,(xxx).L */ +{ CPUFUNC(op_7c_0), 0, 124 }, /* ORSR.W #.W */ +{ CPUFUNC(op_80_0), 0, 128 }, /* OR.L #.L,Dn */ +{ CPUFUNC(op_90_0), 0, 144 }, /* OR.L #.L,(An) */ +{ CPUFUNC(op_98_0), 0, 152 }, /* OR.L #.L,(An)+ */ +{ CPUFUNC(op_a0_0), 0, 160 }, /* OR.L #.L,-(An) */ +{ CPUFUNC(op_a8_0), 0, 168 }, /* OR.L #.L,(d16,An) */ +{ CPUFUNC(op_b0_3), 0, 176 }, /* OR.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_b8_0), 0, 184 }, /* OR.L #.L,(xxx).W */ +{ CPUFUNC(op_b9_0), 0, 185 }, /* OR.L #.L,(xxx).L */ +{ CPUFUNC(op_100_0), 0, 256 }, /* BTST.L Dn,Dn */ +{ CPUFUNC_FF(op_108_0), 0, 264 }, /* MVPMR.W (d16,An),Dn */ +{ CPUFUNC(op_110_0), 0, 272 }, /* BTST.B Dn,(An) */ +{ CPUFUNC(op_118_0), 0, 280 }, /* BTST.B Dn,(An)+ */ +{ CPUFUNC(op_120_0), 0, 288 }, /* BTST.B Dn,-(An) */ +{ CPUFUNC(op_128_0), 0, 296 }, /* BTST.B Dn,(d16,An) */ +{ CPUFUNC(op_130_3), 0, 304 }, /* BTST.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_138_0), 0, 312 }, /* BTST.B Dn,(xxx).W */ +{ CPUFUNC(op_139_0), 0, 313 }, /* BTST.B Dn,(xxx).L */ +{ CPUFUNC(op_13a_0), 0, 314 }, /* BTST.B Dn,(d16,PC) */ +{ CPUFUNC(op_13b_3), 0, 315 }, /* BTST.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_13c_0), 0, 316 }, /* BTST.B Dn,#.B */ +{ CPUFUNC(op_140_0), 0, 320 }, /* BCHG.L Dn,Dn */ +{ CPUFUNC_FF(op_148_0), 0, 328 }, /* MVPMR.L (d16,An),Dn */ +{ CPUFUNC(op_150_0), 0, 336 }, /* BCHG.B Dn,(An) */ +{ CPUFUNC(op_158_0), 0, 344 }, /* BCHG.B Dn,(An)+ */ +{ CPUFUNC(op_160_0), 0, 352 }, /* BCHG.B Dn,-(An) */ +{ CPUFUNC(op_168_0), 0, 360 }, /* BCHG.B Dn,(d16,An) */ +{ CPUFUNC(op_170_3), 0, 368 }, /* BCHG.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_178_0), 0, 376 }, /* BCHG.B Dn,(xxx).W */ +{ CPUFUNC(op_179_0), 0, 377 }, /* BCHG.B Dn,(xxx).L */ +{ CPUFUNC(op_17a_0), 0, 378 }, /* BCHG.B Dn,(d16,PC) */ +{ CPUFUNC(op_17b_3), 0, 379 }, /* BCHG.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_180_0), 0, 384 }, /* BCLR.L Dn,Dn */ +{ CPUFUNC_FF(op_188_0), 0, 392 }, /* MVPRM.W Dn,(d16,An) */ +{ CPUFUNC(op_190_0), 0, 400 }, /* BCLR.B Dn,(An) */ +{ CPUFUNC(op_198_0), 0, 408 }, /* BCLR.B Dn,(An)+ */ +{ CPUFUNC(op_1a0_0), 0, 416 }, /* BCLR.B Dn,-(An) */ +{ CPUFUNC(op_1a8_0), 0, 424 }, /* BCLR.B Dn,(d16,An) */ +{ CPUFUNC(op_1b0_3), 0, 432 }, /* BCLR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1b8_0), 0, 440 }, /* BCLR.B Dn,(xxx).W */ +{ CPUFUNC(op_1b9_0), 0, 441 }, /* BCLR.B Dn,(xxx).L */ +{ CPUFUNC(op_1ba_0), 0, 442 }, /* BCLR.B Dn,(d16,PC) */ +{ CPUFUNC(op_1bb_3), 0, 443 }, /* BCLR.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_1c0_0), 0, 448 }, /* BSET.L Dn,Dn */ +{ CPUFUNC_FF(op_1c8_0), 0, 456 }, /* MVPRM.L Dn,(d16,An) */ +{ CPUFUNC(op_1d0_0), 0, 464 }, /* BSET.B Dn,(An) */ +{ CPUFUNC(op_1d8_0), 0, 472 }, /* BSET.B Dn,(An)+ */ +{ CPUFUNC(op_1e0_0), 0, 480 }, /* BSET.B Dn,-(An) */ +{ CPUFUNC(op_1e8_0), 0, 488 }, /* BSET.B Dn,(d16,An) */ +{ CPUFUNC(op_1f0_3), 0, 496 }, /* BSET.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1f8_0), 0, 504 }, /* BSET.B Dn,(xxx).W */ +{ CPUFUNC(op_1f9_0), 0, 505 }, /* BSET.B Dn,(xxx).L */ +{ CPUFUNC(op_1fa_0), 0, 506 }, /* BSET.B Dn,(d16,PC) */ +{ CPUFUNC(op_1fb_3), 0, 507 }, /* BSET.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_200_0), 0, 512 }, /* AND.B #.B,Dn */ +{ CPUFUNC(op_210_0), 0, 528 }, /* AND.B #.B,(An) */ +{ CPUFUNC(op_218_0), 0, 536 }, /* AND.B #.B,(An)+ */ +{ CPUFUNC(op_220_0), 0, 544 }, /* AND.B #.B,-(An) */ +{ CPUFUNC(op_228_0), 0, 552 }, /* AND.B #.B,(d16,An) */ +{ CPUFUNC(op_230_3), 0, 560 }, /* AND.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_238_0), 0, 568 }, /* AND.B #.B,(xxx).W */ +{ CPUFUNC(op_239_0), 0, 569 }, /* AND.B #.B,(xxx).L */ +{ CPUFUNC(op_23c_0), 0, 572 }, /* ANDSR.B #.W */ +{ CPUFUNC(op_240_0), 0, 576 }, /* AND.W #.W,Dn */ +{ CPUFUNC(op_250_0), 0, 592 }, /* AND.W #.W,(An) */ +{ CPUFUNC(op_258_0), 0, 600 }, /* AND.W #.W,(An)+ */ +{ CPUFUNC(op_260_0), 0, 608 }, /* AND.W #.W,-(An) */ +{ CPUFUNC(op_268_0), 0, 616 }, /* AND.W #.W,(d16,An) */ +{ CPUFUNC(op_270_3), 0, 624 }, /* AND.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_278_0), 0, 632 }, /* AND.W #.W,(xxx).W */ +{ CPUFUNC(op_279_0), 0, 633 }, /* AND.W #.W,(xxx).L */ +{ CPUFUNC(op_27c_0), 0, 636 }, /* ANDSR.W #.W */ +{ CPUFUNC(op_280_0), 0, 640 }, /* AND.L #.L,Dn */ +{ CPUFUNC(op_290_0), 0, 656 }, /* AND.L #.L,(An) */ +{ CPUFUNC(op_298_0), 0, 664 }, /* AND.L #.L,(An)+ */ +{ CPUFUNC(op_2a0_0), 0, 672 }, /* AND.L #.L,-(An) */ +{ CPUFUNC(op_2a8_0), 0, 680 }, /* AND.L #.L,(d16,An) */ +{ CPUFUNC(op_2b0_3), 0, 688 }, /* AND.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_2b8_0), 0, 696 }, /* AND.L #.L,(xxx).W */ +{ CPUFUNC(op_2b9_0), 0, 697 }, /* AND.L #.L,(xxx).L */ +{ CPUFUNC(op_400_0), 0, 1024 }, /* SUB.B #.B,Dn */ +{ CPUFUNC(op_410_0), 0, 1040 }, /* SUB.B #.B,(An) */ +{ CPUFUNC(op_418_0), 0, 1048 }, /* SUB.B #.B,(An)+ */ +{ CPUFUNC(op_420_0), 0, 1056 }, /* SUB.B #.B,-(An) */ +{ CPUFUNC(op_428_0), 0, 1064 }, /* SUB.B #.B,(d16,An) */ +{ CPUFUNC(op_430_3), 0, 1072 }, /* SUB.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_438_0), 0, 1080 }, /* SUB.B #.B,(xxx).W */ +{ CPUFUNC(op_439_0), 0, 1081 }, /* SUB.B #.B,(xxx).L */ +{ CPUFUNC(op_440_0), 0, 1088 }, /* SUB.W #.W,Dn */ +{ CPUFUNC(op_450_0), 0, 1104 }, /* SUB.W #.W,(An) */ +{ CPUFUNC(op_458_0), 0, 1112 }, /* SUB.W #.W,(An)+ */ +{ CPUFUNC(op_460_0), 0, 1120 }, /* SUB.W #.W,-(An) */ +{ CPUFUNC(op_468_0), 0, 1128 }, /* SUB.W #.W,(d16,An) */ +{ CPUFUNC(op_470_3), 0, 1136 }, /* SUB.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_478_0), 0, 1144 }, /* SUB.W #.W,(xxx).W */ +{ CPUFUNC(op_479_0), 0, 1145 }, /* SUB.W #.W,(xxx).L */ +{ CPUFUNC(op_480_0), 0, 1152 }, /* SUB.L #.L,Dn */ +{ CPUFUNC(op_490_0), 0, 1168 }, /* SUB.L #.L,(An) */ +{ CPUFUNC(op_498_0), 0, 1176 }, /* SUB.L #.L,(An)+ */ +{ CPUFUNC(op_4a0_0), 0, 1184 }, /* SUB.L #.L,-(An) */ +{ CPUFUNC(op_4a8_0), 0, 1192 }, /* SUB.L #.L,(d16,An) */ +{ CPUFUNC(op_4b0_3), 0, 1200 }, /* SUB.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_4b8_0), 0, 1208 }, /* SUB.L #.L,(xxx).W */ +{ CPUFUNC(op_4b9_0), 0, 1209 }, /* SUB.L #.L,(xxx).L */ +{ CPUFUNC(op_600_0), 0, 1536 }, /* ADD.B #.B,Dn */ +{ CPUFUNC(op_610_0), 0, 1552 }, /* ADD.B #.B,(An) */ +{ CPUFUNC(op_618_0), 0, 1560 }, /* ADD.B #.B,(An)+ */ +{ CPUFUNC(op_620_0), 0, 1568 }, /* ADD.B #.B,-(An) */ +{ CPUFUNC(op_628_0), 0, 1576 }, /* ADD.B #.B,(d16,An) */ +{ CPUFUNC(op_630_3), 0, 1584 }, /* ADD.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_638_0), 0, 1592 }, /* ADD.B #.B,(xxx).W */ +{ CPUFUNC(op_639_0), 0, 1593 }, /* ADD.B #.B,(xxx).L */ +{ CPUFUNC(op_640_0), 0, 1600 }, /* ADD.W #.W,Dn */ +{ CPUFUNC(op_650_0), 0, 1616 }, /* ADD.W #.W,(An) */ +{ CPUFUNC(op_658_0), 0, 1624 }, /* ADD.W #.W,(An)+ */ +{ CPUFUNC(op_660_0), 0, 1632 }, /* ADD.W #.W,-(An) */ +{ CPUFUNC(op_668_0), 0, 1640 }, /* ADD.W #.W,(d16,An) */ +{ CPUFUNC(op_670_3), 0, 1648 }, /* ADD.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_678_0), 0, 1656 }, /* ADD.W #.W,(xxx).W */ +{ CPUFUNC(op_679_0), 0, 1657 }, /* ADD.W #.W,(xxx).L */ +{ CPUFUNC(op_680_0), 0, 1664 }, /* ADD.L #.L,Dn */ +{ CPUFUNC(op_690_0), 0, 1680 }, /* ADD.L #.L,(An) */ +{ CPUFUNC(op_698_0), 0, 1688 }, /* ADD.L #.L,(An)+ */ +{ CPUFUNC(op_6a0_0), 0, 1696 }, /* ADD.L #.L,-(An) */ +{ CPUFUNC(op_6a8_0), 0, 1704 }, /* ADD.L #.L,(d16,An) */ +{ CPUFUNC(op_6b0_3), 0, 1712 }, /* ADD.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_6b8_0), 0, 1720 }, /* ADD.L #.L,(xxx).W */ +{ CPUFUNC(op_6b9_0), 0, 1721 }, /* ADD.L #.L,(xxx).L */ +{ CPUFUNC(op_800_0), 0, 2048 }, /* BTST.L #.W,Dn */ +{ CPUFUNC(op_810_0), 0, 2064 }, /* BTST.B #.W,(An) */ +{ CPUFUNC(op_818_0), 0, 2072 }, /* BTST.B #.W,(An)+ */ +{ CPUFUNC(op_820_0), 0, 2080 }, /* BTST.B #.W,-(An) */ +{ CPUFUNC(op_828_0), 0, 2088 }, /* BTST.B #.W,(d16,An) */ +{ CPUFUNC(op_830_3), 0, 2096 }, /* BTST.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_838_0), 0, 2104 }, /* BTST.B #.W,(xxx).W */ +{ CPUFUNC(op_839_0), 0, 2105 }, /* BTST.B #.W,(xxx).L */ +{ CPUFUNC(op_83a_0), 0, 2106 }, /* BTST.B #.W,(d16,PC) */ +{ CPUFUNC(op_83b_3), 0, 2107 }, /* BTST.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_83c_0), 0, 2108 }, /* BTST.B #.W,#.B */ +{ CPUFUNC(op_840_0), 0, 2112 }, /* BCHG.L #.W,Dn */ +{ CPUFUNC(op_850_0), 0, 2128 }, /* BCHG.B #.W,(An) */ +{ CPUFUNC(op_858_0), 0, 2136 }, /* BCHG.B #.W,(An)+ */ +{ CPUFUNC(op_860_0), 0, 2144 }, /* BCHG.B #.W,-(An) */ +{ CPUFUNC(op_868_0), 0, 2152 }, /* BCHG.B #.W,(d16,An) */ +{ CPUFUNC(op_870_3), 0, 2160 }, /* BCHG.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_878_0), 0, 2168 }, /* BCHG.B #.W,(xxx).W */ +{ CPUFUNC(op_879_0), 0, 2169 }, /* BCHG.B #.W,(xxx).L */ +{ CPUFUNC(op_87a_0), 0, 2170 }, /* BCHG.B #.W,(d16,PC) */ +{ CPUFUNC(op_87b_3), 0, 2171 }, /* BCHG.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_880_0), 0, 2176 }, /* BCLR.L #.W,Dn */ +{ CPUFUNC(op_890_0), 0, 2192 }, /* BCLR.B #.W,(An) */ +{ CPUFUNC(op_898_0), 0, 2200 }, /* BCLR.B #.W,(An)+ */ +{ CPUFUNC(op_8a0_0), 0, 2208 }, /* BCLR.B #.W,-(An) */ +{ CPUFUNC(op_8a8_0), 0, 2216 }, /* BCLR.B #.W,(d16,An) */ +{ CPUFUNC(op_8b0_3), 0, 2224 }, /* BCLR.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_8b8_0), 0, 2232 }, /* BCLR.B #.W,(xxx).W */ +{ CPUFUNC(op_8b9_0), 0, 2233 }, /* BCLR.B #.W,(xxx).L */ +{ CPUFUNC(op_8ba_0), 0, 2234 }, /* BCLR.B #.W,(d16,PC) */ +{ CPUFUNC(op_8bb_3), 0, 2235 }, /* BCLR.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_8c0_0), 0, 2240 }, /* BSET.L #.W,Dn */ +{ CPUFUNC(op_8d0_0), 0, 2256 }, /* BSET.B #.W,(An) */ +{ CPUFUNC(op_8d8_0), 0, 2264 }, /* BSET.B #.W,(An)+ */ +{ CPUFUNC(op_8e0_0), 0, 2272 }, /* BSET.B #.W,-(An) */ +{ CPUFUNC(op_8e8_0), 0, 2280 }, /* BSET.B #.W,(d16,An) */ +{ CPUFUNC(op_8f0_3), 0, 2288 }, /* BSET.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_8f8_0), 0, 2296 }, /* BSET.B #.W,(xxx).W */ +{ CPUFUNC(op_8f9_0), 0, 2297 }, /* BSET.B #.W,(xxx).L */ +{ CPUFUNC(op_8fa_0), 0, 2298 }, /* BSET.B #.W,(d16,PC) */ +{ CPUFUNC(op_8fb_3), 0, 2299 }, /* BSET.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_a00_0), 0, 2560 }, /* EOR.B #.B,Dn */ +{ CPUFUNC(op_a10_0), 0, 2576 }, /* EOR.B #.B,(An) */ +{ CPUFUNC(op_a18_0), 0, 2584 }, /* EOR.B #.B,(An)+ */ +{ CPUFUNC(op_a20_0), 0, 2592 }, /* EOR.B #.B,-(An) */ +{ CPUFUNC(op_a28_0), 0, 2600 }, /* EOR.B #.B,(d16,An) */ +{ CPUFUNC(op_a30_3), 0, 2608 }, /* EOR.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_a38_0), 0, 2616 }, /* EOR.B #.B,(xxx).W */ +{ CPUFUNC(op_a39_0), 0, 2617 }, /* EOR.B #.B,(xxx).L */ +{ CPUFUNC(op_a3c_0), 0, 2620 }, /* EORSR.B #.W */ +{ CPUFUNC(op_a40_0), 0, 2624 }, /* EOR.W #.W,Dn */ +{ CPUFUNC(op_a50_0), 0, 2640 }, /* EOR.W #.W,(An) */ +{ CPUFUNC(op_a58_0), 0, 2648 }, /* EOR.W #.W,(An)+ */ +{ CPUFUNC(op_a60_0), 0, 2656 }, /* EOR.W #.W,-(An) */ +{ CPUFUNC(op_a68_0), 0, 2664 }, /* EOR.W #.W,(d16,An) */ +{ CPUFUNC(op_a70_3), 0, 2672 }, /* EOR.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_a78_0), 0, 2680 }, /* EOR.W #.W,(xxx).W */ +{ CPUFUNC(op_a79_0), 0, 2681 }, /* EOR.W #.W,(xxx).L */ +{ CPUFUNC(op_a7c_0), 0, 2684 }, /* EORSR.W #.W */ +{ CPUFUNC(op_a80_0), 0, 2688 }, /* EOR.L #.L,Dn */ +{ CPUFUNC(op_a90_0), 0, 2704 }, /* EOR.L #.L,(An) */ +{ CPUFUNC(op_a98_0), 0, 2712 }, /* EOR.L #.L,(An)+ */ +{ CPUFUNC(op_aa0_0), 0, 2720 }, /* EOR.L #.L,-(An) */ +{ CPUFUNC(op_aa8_0), 0, 2728 }, /* EOR.L #.L,(d16,An) */ +{ CPUFUNC(op_ab0_3), 0, 2736 }, /* EOR.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_ab8_0), 0, 2744 }, /* EOR.L #.L,(xxx).W */ +{ CPUFUNC(op_ab9_0), 0, 2745 }, /* EOR.L #.L,(xxx).L */ +{ CPUFUNC(op_c00_0), 0, 3072 }, /* CMP.B #.B,Dn */ +{ CPUFUNC(op_c10_0), 0, 3088 }, /* CMP.B #.B,(An) */ +{ CPUFUNC(op_c18_0), 0, 3096 }, /* CMP.B #.B,(An)+ */ +{ CPUFUNC(op_c20_0), 0, 3104 }, /* CMP.B #.B,-(An) */ +{ CPUFUNC(op_c28_0), 0, 3112 }, /* CMP.B #.B,(d16,An) */ +{ CPUFUNC(op_c30_3), 0, 3120 }, /* CMP.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_c38_0), 0, 3128 }, /* CMP.B #.B,(xxx).W */ +{ CPUFUNC(op_c39_0), 0, 3129 }, /* CMP.B #.B,(xxx).L */ +{ CPUFUNC(op_c3a_0), 0, 3130 }, /* CMP.B #.B,(d16,PC) */ +{ CPUFUNC(op_c3b_3), 0, 3131 }, /* CMP.B #.B,(d8,PC,Xn) */ +{ CPUFUNC(op_c40_0), 0, 3136 }, /* CMP.W #.W,Dn */ +{ CPUFUNC(op_c50_0), 0, 3152 }, /* CMP.W #.W,(An) */ +{ CPUFUNC(op_c58_0), 0, 3160 }, /* CMP.W #.W,(An)+ */ +{ CPUFUNC(op_c60_0), 0, 3168 }, /* CMP.W #.W,-(An) */ +{ CPUFUNC(op_c68_0), 0, 3176 }, /* CMP.W #.W,(d16,An) */ +{ CPUFUNC(op_c70_3), 0, 3184 }, /* CMP.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_c78_0), 0, 3192 }, /* CMP.W #.W,(xxx).W */ +{ CPUFUNC(op_c79_0), 0, 3193 }, /* CMP.W #.W,(xxx).L */ +{ CPUFUNC(op_c7a_0), 0, 3194 }, /* CMP.W #.W,(d16,PC) */ +{ CPUFUNC(op_c7b_3), 0, 3195 }, /* CMP.W #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_c80_0), 0, 3200 }, /* CMP.L #.L,Dn */ +{ CPUFUNC(op_c90_0), 0, 3216 }, /* CMP.L #.L,(An) */ +{ CPUFUNC(op_c98_0), 0, 3224 }, /* CMP.L #.L,(An)+ */ +{ CPUFUNC(op_ca0_0), 0, 3232 }, /* CMP.L #.L,-(An) */ +{ CPUFUNC(op_ca8_0), 0, 3240 }, /* CMP.L #.L,(d16,An) */ +{ CPUFUNC(op_cb0_3), 0, 3248 }, /* CMP.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_cb8_0), 0, 3256 }, /* CMP.L #.L,(xxx).W */ +{ CPUFUNC(op_cb9_0), 0, 3257 }, /* CMP.L #.L,(xxx).L */ +{ CPUFUNC(op_cba_0), 0, 3258 }, /* CMP.L #.L,(d16,PC) */ +{ CPUFUNC(op_cbb_3), 0, 3259 }, /* CMP.L #.L,(d8,PC,Xn) */ +{ CPUFUNC(op_1000_0), 0, 4096 }, /* MOVE.B Dn,Dn */ +{ CPUFUNC(op_1010_0), 0, 4112 }, /* MOVE.B (An),Dn */ +{ CPUFUNC(op_1018_0), 0, 4120 }, /* MOVE.B (An)+,Dn */ +{ CPUFUNC(op_1020_0), 0, 4128 }, /* MOVE.B -(An),Dn */ +{ CPUFUNC(op_1028_0), 0, 4136 }, /* MOVE.B (d16,An),Dn */ +{ CPUFUNC(op_1030_3), 0, 4144 }, /* MOVE.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_1038_0), 0, 4152 }, /* MOVE.B (xxx).W,Dn */ +{ CPUFUNC(op_1039_0), 0, 4153 }, /* MOVE.B (xxx).L,Dn */ +{ CPUFUNC(op_103a_0), 0, 4154 }, /* MOVE.B (d16,PC),Dn */ +{ CPUFUNC(op_103b_3), 0, 4155 }, /* MOVE.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_103c_0), 0, 4156 }, /* MOVE.B #.B,Dn */ +{ CPUFUNC(op_1080_0), 0, 4224 }, /* MOVE.B Dn,(An) */ +{ CPUFUNC(op_1090_0), 0, 4240 }, /* MOVE.B (An),(An) */ +{ CPUFUNC(op_1098_0), 0, 4248 }, /* MOVE.B (An)+,(An) */ +{ CPUFUNC(op_10a0_0), 0, 4256 }, /* MOVE.B -(An),(An) */ +{ CPUFUNC(op_10a8_0), 0, 4264 }, /* MOVE.B (d16,An),(An) */ +{ CPUFUNC(op_10b0_3), 0, 4272 }, /* MOVE.B (d8,An,Xn),(An) */ +{ CPUFUNC(op_10b8_0), 0, 4280 }, /* MOVE.B (xxx).W,(An) */ +{ CPUFUNC(op_10b9_0), 0, 4281 }, /* MOVE.B (xxx).L,(An) */ +{ CPUFUNC(op_10ba_0), 0, 4282 }, /* MOVE.B (d16,PC),(An) */ +{ CPUFUNC(op_10bb_3), 0, 4283 }, /* MOVE.B (d8,PC,Xn),(An) */ +{ CPUFUNC(op_10bc_0), 0, 4284 }, /* MOVE.B #.B,(An) */ +{ CPUFUNC(op_10c0_0), 0, 4288 }, /* MOVE.B Dn,(An)+ */ +{ CPUFUNC(op_10d0_0), 0, 4304 }, /* MOVE.B (An),(An)+ */ +{ CPUFUNC(op_10d8_0), 0, 4312 }, /* MOVE.B (An)+,(An)+ */ +{ CPUFUNC(op_10e0_0), 0, 4320 }, /* MOVE.B -(An),(An)+ */ +{ CPUFUNC(op_10e8_0), 0, 4328 }, /* MOVE.B (d16,An),(An)+ */ +{ CPUFUNC(op_10f0_3), 0, 4336 }, /* MOVE.B (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_10f8_0), 0, 4344 }, /* MOVE.B (xxx).W,(An)+ */ +{ CPUFUNC(op_10f9_0), 0, 4345 }, /* MOVE.B (xxx).L,(An)+ */ +{ CPUFUNC(op_10fa_0), 0, 4346 }, /* MOVE.B (d16,PC),(An)+ */ +{ CPUFUNC(op_10fb_3), 0, 4347 }, /* MOVE.B (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_10fc_0), 0, 4348 }, /* MOVE.B #.B,(An)+ */ +{ CPUFUNC(op_1100_0), 0, 4352 }, /* MOVE.B Dn,-(An) */ +{ CPUFUNC(op_1110_0), 0, 4368 }, /* MOVE.B (An),-(An) */ +{ CPUFUNC(op_1118_0), 0, 4376 }, /* MOVE.B (An)+,-(An) */ +{ CPUFUNC(op_1120_0), 0, 4384 }, /* MOVE.B -(An),-(An) */ +{ CPUFUNC(op_1128_0), 0, 4392 }, /* MOVE.B (d16,An),-(An) */ +{ CPUFUNC(op_1130_3), 0, 4400 }, /* MOVE.B (d8,An,Xn),-(An) */ +{ CPUFUNC(op_1138_0), 0, 4408 }, /* MOVE.B (xxx).W,-(An) */ +{ CPUFUNC(op_1139_0), 0, 4409 }, /* MOVE.B (xxx).L,-(An) */ +{ CPUFUNC(op_113a_0), 0, 4410 }, /* MOVE.B (d16,PC),-(An) */ +{ CPUFUNC(op_113b_3), 0, 4411 }, /* MOVE.B (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_113c_0), 0, 4412 }, /* MOVE.B #.B,-(An) */ +{ CPUFUNC(op_1140_0), 0, 4416 }, /* MOVE.B Dn,(d16,An) */ +{ CPUFUNC(op_1150_0), 0, 4432 }, /* MOVE.B (An),(d16,An) */ +{ CPUFUNC(op_1158_0), 0, 4440 }, /* MOVE.B (An)+,(d16,An) */ +{ CPUFUNC(op_1160_0), 0, 4448 }, /* MOVE.B -(An),(d16,An) */ +{ CPUFUNC(op_1168_0), 0, 4456 }, /* MOVE.B (d16,An),(d16,An) */ +{ CPUFUNC(op_1170_3), 0, 4464 }, /* MOVE.B (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_1178_0), 0, 4472 }, /* MOVE.B (xxx).W,(d16,An) */ +{ CPUFUNC(op_1179_0), 0, 4473 }, /* MOVE.B (xxx).L,(d16,An) */ +{ CPUFUNC(op_117a_0), 0, 4474 }, /* MOVE.B (d16,PC),(d16,An) */ +{ CPUFUNC(op_117b_3), 0, 4475 }, /* MOVE.B (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_117c_0), 0, 4476 }, /* MOVE.B #.B,(d16,An) */ +{ CPUFUNC(op_1180_3), 0, 4480 }, /* MOVE.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1190_3), 0, 4496 }, /* MOVE.B (An),(d8,An,Xn) */ +{ CPUFUNC(op_1198_3), 0, 4504 }, /* MOVE.B (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_11a0_3), 0, 4512 }, /* MOVE.B -(An),(d8,An,Xn) */ +{ CPUFUNC(op_11a8_3), 0, 4520 }, /* MOVE.B (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_11b0_3), 0, 4528 }, /* MOVE.B (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_11b8_3), 0, 4536 }, /* MOVE.B (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_11b9_3), 0, 4537 }, /* MOVE.B (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_11ba_3), 0, 4538 }, /* MOVE.B (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_11bb_3), 0, 4539 }, /* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_11bc_3), 0, 4540 }, /* MOVE.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_11c0_0), 0, 4544 }, /* MOVE.B Dn,(xxx).W */ +{ CPUFUNC(op_11d0_0), 0, 4560 }, /* MOVE.B (An),(xxx).W */ +{ CPUFUNC(op_11d8_0), 0, 4568 }, /* MOVE.B (An)+,(xxx).W */ +{ CPUFUNC(op_11e0_0), 0, 4576 }, /* MOVE.B -(An),(xxx).W */ +{ CPUFUNC(op_11e8_0), 0, 4584 }, /* MOVE.B (d16,An),(xxx).W */ +{ CPUFUNC(op_11f0_3), 0, 4592 }, /* MOVE.B (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_11f8_0), 0, 4600 }, /* MOVE.B (xxx).W,(xxx).W */ +{ CPUFUNC(op_11f9_0), 0, 4601 }, /* MOVE.B (xxx).L,(xxx).W */ +{ CPUFUNC(op_11fa_0), 0, 4602 }, /* MOVE.B (d16,PC),(xxx).W */ +{ CPUFUNC(op_11fb_3), 0, 4603 }, /* MOVE.B (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_11fc_0), 0, 4604 }, /* MOVE.B #.B,(xxx).W */ +{ CPUFUNC(op_13c0_0), 0, 5056 }, /* MOVE.B Dn,(xxx).L */ +{ CPUFUNC(op_13d0_0), 0, 5072 }, /* MOVE.B (An),(xxx).L */ +{ CPUFUNC(op_13d8_0), 0, 5080 }, /* MOVE.B (An)+,(xxx).L */ +{ CPUFUNC(op_13e0_0), 0, 5088 }, /* MOVE.B -(An),(xxx).L */ +{ CPUFUNC(op_13e8_0), 0, 5096 }, /* MOVE.B (d16,An),(xxx).L */ +{ CPUFUNC(op_13f0_3), 0, 5104 }, /* MOVE.B (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_13f8_0), 0, 5112 }, /* MOVE.B (xxx).W,(xxx).L */ +{ CPUFUNC(op_13f9_0), 0, 5113 }, /* MOVE.B (xxx).L,(xxx).L */ +{ CPUFUNC(op_13fa_0), 0, 5114 }, /* MOVE.B (d16,PC),(xxx).L */ +{ CPUFUNC(op_13fb_3), 0, 5115 }, /* MOVE.B (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_13fc_0), 0, 5116 }, /* MOVE.B #.B,(xxx).L */ +{ CPUFUNC(op_2000_0), 0, 8192 }, /* MOVE.L Dn,Dn */ +{ CPUFUNC(op_2008_0), 0, 8200 }, /* MOVE.L An,Dn */ +{ CPUFUNC(op_2010_0), 0, 8208 }, /* MOVE.L (An),Dn */ +{ CPUFUNC(op_2018_0), 0, 8216 }, /* MOVE.L (An)+,Dn */ +{ CPUFUNC(op_2020_0), 0, 8224 }, /* MOVE.L -(An),Dn */ +{ CPUFUNC(op_2028_0), 0, 8232 }, /* MOVE.L (d16,An),Dn */ +{ CPUFUNC(op_2030_3), 0, 8240 }, /* MOVE.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_2038_0), 0, 8248 }, /* MOVE.L (xxx).W,Dn */ +{ CPUFUNC(op_2039_0), 0, 8249 }, /* MOVE.L (xxx).L,Dn */ +{ CPUFUNC(op_203a_0), 0, 8250 }, /* MOVE.L (d16,PC),Dn */ +{ CPUFUNC(op_203b_3), 0, 8251 }, /* MOVE.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_203c_0), 0, 8252 }, /* MOVE.L #.L,Dn */ +{ CPUFUNC_FF(op_2040_0), 0, 8256 }, /* MOVEA.L Dn,An */ +{ CPUFUNC_FF(op_2048_0), 0, 8264 }, /* MOVEA.L An,An */ +{ CPUFUNC_FF(op_2050_0), 0, 8272 }, /* MOVEA.L (An),An */ +{ CPUFUNC_FF(op_2058_0), 0, 8280 }, /* MOVEA.L (An)+,An */ +{ CPUFUNC_FF(op_2060_0), 0, 8288 }, /* MOVEA.L -(An),An */ +{ CPUFUNC_FF(op_2068_0), 0, 8296 }, /* MOVEA.L (d16,An),An */ +{ CPUFUNC_FF(op_2070_3), 0, 8304 }, /* MOVEA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_2078_0), 0, 8312 }, /* MOVEA.L (xxx).W,An */ +{ CPUFUNC_FF(op_2079_0), 0, 8313 }, /* MOVEA.L (xxx).L,An */ +{ CPUFUNC_FF(op_207a_0), 0, 8314 }, /* MOVEA.L (d16,PC),An */ +{ CPUFUNC_FF(op_207b_3), 0, 8315 }, /* MOVEA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_207c_0), 0, 8316 }, /* MOVEA.L #.L,An */ +{ CPUFUNC(op_2080_0), 0, 8320 }, /* MOVE.L Dn,(An) */ +{ CPUFUNC(op_2088_0), 0, 8328 }, /* MOVE.L An,(An) */ +{ CPUFUNC(op_2090_0), 0, 8336 }, /* MOVE.L (An),(An) */ +{ CPUFUNC(op_2098_0), 0, 8344 }, /* MOVE.L (An)+,(An) */ +{ CPUFUNC(op_20a0_0), 0, 8352 }, /* MOVE.L -(An),(An) */ +{ CPUFUNC(op_20a8_0), 0, 8360 }, /* MOVE.L (d16,An),(An) */ +{ CPUFUNC(op_20b0_3), 0, 8368 }, /* MOVE.L (d8,An,Xn),(An) */ +{ CPUFUNC(op_20b8_0), 0, 8376 }, /* MOVE.L (xxx).W,(An) */ +{ CPUFUNC(op_20b9_0), 0, 8377 }, /* MOVE.L (xxx).L,(An) */ +{ CPUFUNC(op_20ba_0), 0, 8378 }, /* MOVE.L (d16,PC),(An) */ +{ CPUFUNC(op_20bb_3), 0, 8379 }, /* MOVE.L (d8,PC,Xn),(An) */ +{ CPUFUNC(op_20bc_0), 0, 8380 }, /* MOVE.L #.L,(An) */ +{ CPUFUNC(op_20c0_0), 0, 8384 }, /* MOVE.L Dn,(An)+ */ +{ CPUFUNC(op_20c8_0), 0, 8392 }, /* MOVE.L An,(An)+ */ +{ CPUFUNC(op_20d0_0), 0, 8400 }, /* MOVE.L (An),(An)+ */ +{ CPUFUNC(op_20d8_0), 0, 8408 }, /* MOVE.L (An)+,(An)+ */ +{ CPUFUNC(op_20e0_0), 0, 8416 }, /* MOVE.L -(An),(An)+ */ +{ CPUFUNC(op_20e8_0), 0, 8424 }, /* MOVE.L (d16,An),(An)+ */ +{ CPUFUNC(op_20f0_3), 0, 8432 }, /* MOVE.L (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_20f8_0), 0, 8440 }, /* MOVE.L (xxx).W,(An)+ */ +{ CPUFUNC(op_20f9_0), 0, 8441 }, /* MOVE.L (xxx).L,(An)+ */ +{ CPUFUNC(op_20fa_0), 0, 8442 }, /* MOVE.L (d16,PC),(An)+ */ +{ CPUFUNC(op_20fb_3), 0, 8443 }, /* MOVE.L (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_20fc_0), 0, 8444 }, /* MOVE.L #.L,(An)+ */ +{ CPUFUNC(op_2100_0), 0, 8448 }, /* MOVE.L Dn,-(An) */ +{ CPUFUNC(op_2108_0), 0, 8456 }, /* MOVE.L An,-(An) */ +{ CPUFUNC(op_2110_0), 0, 8464 }, /* MOVE.L (An),-(An) */ +{ CPUFUNC(op_2118_0), 0, 8472 }, /* MOVE.L (An)+,-(An) */ +{ CPUFUNC(op_2120_0), 0, 8480 }, /* MOVE.L -(An),-(An) */ +{ CPUFUNC(op_2128_0), 0, 8488 }, /* MOVE.L (d16,An),-(An) */ +{ CPUFUNC(op_2130_3), 0, 8496 }, /* MOVE.L (d8,An,Xn),-(An) */ +{ CPUFUNC(op_2138_0), 0, 8504 }, /* MOVE.L (xxx).W,-(An) */ +{ CPUFUNC(op_2139_0), 0, 8505 }, /* MOVE.L (xxx).L,-(An) */ +{ CPUFUNC(op_213a_0), 0, 8506 }, /* MOVE.L (d16,PC),-(An) */ +{ CPUFUNC(op_213b_3), 0, 8507 }, /* MOVE.L (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_213c_0), 0, 8508 }, /* MOVE.L #.L,-(An) */ +{ CPUFUNC(op_2140_0), 0, 8512 }, /* MOVE.L Dn,(d16,An) */ +{ CPUFUNC(op_2148_0), 0, 8520 }, /* MOVE.L An,(d16,An) */ +{ CPUFUNC(op_2150_0), 0, 8528 }, /* MOVE.L (An),(d16,An) */ +{ CPUFUNC(op_2158_0), 0, 8536 }, /* MOVE.L (An)+,(d16,An) */ +{ CPUFUNC(op_2160_0), 0, 8544 }, /* MOVE.L -(An),(d16,An) */ +{ CPUFUNC(op_2168_0), 0, 8552 }, /* MOVE.L (d16,An),(d16,An) */ +{ CPUFUNC(op_2170_3), 0, 8560 }, /* MOVE.L (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_2178_0), 0, 8568 }, /* MOVE.L (xxx).W,(d16,An) */ +{ CPUFUNC(op_2179_0), 0, 8569 }, /* MOVE.L (xxx).L,(d16,An) */ +{ CPUFUNC(op_217a_0), 0, 8570 }, /* MOVE.L (d16,PC),(d16,An) */ +{ CPUFUNC(op_217b_3), 0, 8571 }, /* MOVE.L (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_217c_0), 0, 8572 }, /* MOVE.L #.L,(d16,An) */ +{ CPUFUNC(op_2180_3), 0, 8576 }, /* MOVE.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_2188_3), 0, 8584 }, /* MOVE.L An,(d8,An,Xn) */ +{ CPUFUNC(op_2190_3), 0, 8592 }, /* MOVE.L (An),(d8,An,Xn) */ +{ CPUFUNC(op_2198_3), 0, 8600 }, /* MOVE.L (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_21a0_3), 0, 8608 }, /* MOVE.L -(An),(d8,An,Xn) */ +{ CPUFUNC(op_21a8_3), 0, 8616 }, /* MOVE.L (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_21b0_3), 0, 8624 }, /* MOVE.L (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_21b8_3), 0, 8632 }, /* MOVE.L (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_21b9_3), 0, 8633 }, /* MOVE.L (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_21ba_3), 0, 8634 }, /* MOVE.L (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_21bb_3), 0, 8635 }, /* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_21bc_3), 0, 8636 }, /* MOVE.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_21c0_0), 0, 8640 }, /* MOVE.L Dn,(xxx).W */ +{ CPUFUNC(op_21c8_0), 0, 8648 }, /* MOVE.L An,(xxx).W */ +{ CPUFUNC(op_21d0_0), 0, 8656 }, /* MOVE.L (An),(xxx).W */ +{ CPUFUNC(op_21d8_0), 0, 8664 }, /* MOVE.L (An)+,(xxx).W */ +{ CPUFUNC(op_21e0_0), 0, 8672 }, /* MOVE.L -(An),(xxx).W */ +{ CPUFUNC(op_21e8_0), 0, 8680 }, /* MOVE.L (d16,An),(xxx).W */ +{ CPUFUNC(op_21f0_3), 0, 8688 }, /* MOVE.L (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_21f8_0), 0, 8696 }, /* MOVE.L (xxx).W,(xxx).W */ +{ CPUFUNC(op_21f9_0), 0, 8697 }, /* MOVE.L (xxx).L,(xxx).W */ +{ CPUFUNC(op_21fa_0), 0, 8698 }, /* MOVE.L (d16,PC),(xxx).W */ +{ CPUFUNC(op_21fb_3), 0, 8699 }, /* MOVE.L (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_21fc_0), 0, 8700 }, /* MOVE.L #.L,(xxx).W */ +{ CPUFUNC(op_23c0_0), 0, 9152 }, /* MOVE.L Dn,(xxx).L */ +{ CPUFUNC(op_23c8_0), 0, 9160 }, /* MOVE.L An,(xxx).L */ +{ CPUFUNC(op_23d0_0), 0, 9168 }, /* MOVE.L (An),(xxx).L */ +{ CPUFUNC(op_23d8_0), 0, 9176 }, /* MOVE.L (An)+,(xxx).L */ +{ CPUFUNC(op_23e0_0), 0, 9184 }, /* MOVE.L -(An),(xxx).L */ +{ CPUFUNC(op_23e8_0), 0, 9192 }, /* MOVE.L (d16,An),(xxx).L */ +{ CPUFUNC(op_23f0_3), 0, 9200 }, /* MOVE.L (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_23f8_0), 0, 9208 }, /* MOVE.L (xxx).W,(xxx).L */ +{ CPUFUNC(op_23f9_0), 0, 9209 }, /* MOVE.L (xxx).L,(xxx).L */ +{ CPUFUNC(op_23fa_0), 0, 9210 }, /* MOVE.L (d16,PC),(xxx).L */ +{ CPUFUNC(op_23fb_3), 0, 9211 }, /* MOVE.L (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_23fc_0), 0, 9212 }, /* MOVE.L #.L,(xxx).L */ +{ CPUFUNC(op_3000_0), 0, 12288 }, /* MOVE.W Dn,Dn */ +{ CPUFUNC(op_3008_0), 0, 12296 }, /* MOVE.W An,Dn */ +{ CPUFUNC(op_3010_0), 0, 12304 }, /* MOVE.W (An),Dn */ +{ CPUFUNC(op_3018_0), 0, 12312 }, /* MOVE.W (An)+,Dn */ +{ CPUFUNC(op_3020_0), 0, 12320 }, /* MOVE.W -(An),Dn */ +{ CPUFUNC(op_3028_0), 0, 12328 }, /* MOVE.W (d16,An),Dn */ +{ CPUFUNC(op_3030_3), 0, 12336 }, /* MOVE.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_3038_0), 0, 12344 }, /* MOVE.W (xxx).W,Dn */ +{ CPUFUNC(op_3039_0), 0, 12345 }, /* MOVE.W (xxx).L,Dn */ +{ CPUFUNC(op_303a_0), 0, 12346 }, /* MOVE.W (d16,PC),Dn */ +{ CPUFUNC(op_303b_3), 0, 12347 }, /* MOVE.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_303c_0), 0, 12348 }, /* MOVE.W #.W,Dn */ +{ CPUFUNC_FF(op_3040_0), 0, 12352 }, /* MOVEA.W Dn,An */ +{ CPUFUNC_FF(op_3048_0), 0, 12360 }, /* MOVEA.W An,An */ +{ CPUFUNC_FF(op_3050_0), 0, 12368 }, /* MOVEA.W (An),An */ +{ CPUFUNC_FF(op_3058_0), 0, 12376 }, /* MOVEA.W (An)+,An */ +{ CPUFUNC_FF(op_3060_0), 0, 12384 }, /* MOVEA.W -(An),An */ +{ CPUFUNC_FF(op_3068_0), 0, 12392 }, /* MOVEA.W (d16,An),An */ +{ CPUFUNC_FF(op_3070_3), 0, 12400 }, /* MOVEA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_3078_0), 0, 12408 }, /* MOVEA.W (xxx).W,An */ +{ CPUFUNC_FF(op_3079_0), 0, 12409 }, /* MOVEA.W (xxx).L,An */ +{ CPUFUNC_FF(op_307a_0), 0, 12410 }, /* MOVEA.W (d16,PC),An */ +{ CPUFUNC_FF(op_307b_3), 0, 12411 }, /* MOVEA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_307c_0), 0, 12412 }, /* MOVEA.W #.W,An */ +{ CPUFUNC(op_3080_0), 0, 12416 }, /* MOVE.W Dn,(An) */ +{ CPUFUNC(op_3088_0), 0, 12424 }, /* MOVE.W An,(An) */ +{ CPUFUNC(op_3090_0), 0, 12432 }, /* MOVE.W (An),(An) */ +{ CPUFUNC(op_3098_0), 0, 12440 }, /* MOVE.W (An)+,(An) */ +{ CPUFUNC(op_30a0_0), 0, 12448 }, /* MOVE.W -(An),(An) */ +{ CPUFUNC(op_30a8_0), 0, 12456 }, /* MOVE.W (d16,An),(An) */ +{ CPUFUNC(op_30b0_3), 0, 12464 }, /* MOVE.W (d8,An,Xn),(An) */ +{ CPUFUNC(op_30b8_0), 0, 12472 }, /* MOVE.W (xxx).W,(An) */ +{ CPUFUNC(op_30b9_0), 0, 12473 }, /* MOVE.W (xxx).L,(An) */ +{ CPUFUNC(op_30ba_0), 0, 12474 }, /* MOVE.W (d16,PC),(An) */ +{ CPUFUNC(op_30bb_3), 0, 12475 }, /* MOVE.W (d8,PC,Xn),(An) */ +{ CPUFUNC(op_30bc_0), 0, 12476 }, /* MOVE.W #.W,(An) */ +{ CPUFUNC(op_30c0_0), 0, 12480 }, /* MOVE.W Dn,(An)+ */ +{ CPUFUNC(op_30c8_0), 0, 12488 }, /* MOVE.W An,(An)+ */ +{ CPUFUNC(op_30d0_0), 0, 12496 }, /* MOVE.W (An),(An)+ */ +{ CPUFUNC(op_30d8_0), 0, 12504 }, /* MOVE.W (An)+,(An)+ */ +{ CPUFUNC(op_30e0_0), 0, 12512 }, /* MOVE.W -(An),(An)+ */ +{ CPUFUNC(op_30e8_0), 0, 12520 }, /* MOVE.W (d16,An),(An)+ */ +{ CPUFUNC(op_30f0_3), 0, 12528 }, /* MOVE.W (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_30f8_0), 0, 12536 }, /* MOVE.W (xxx).W,(An)+ */ +{ CPUFUNC(op_30f9_0), 0, 12537 }, /* MOVE.W (xxx).L,(An)+ */ +{ CPUFUNC(op_30fa_0), 0, 12538 }, /* MOVE.W (d16,PC),(An)+ */ +{ CPUFUNC(op_30fb_3), 0, 12539 }, /* MOVE.W (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_30fc_0), 0, 12540 }, /* MOVE.W #.W,(An)+ */ +{ CPUFUNC(op_3100_0), 0, 12544 }, /* MOVE.W Dn,-(An) */ +{ CPUFUNC(op_3108_0), 0, 12552 }, /* MOVE.W An,-(An) */ +{ CPUFUNC(op_3110_0), 0, 12560 }, /* MOVE.W (An),-(An) */ +{ CPUFUNC(op_3118_0), 0, 12568 }, /* MOVE.W (An)+,-(An) */ +{ CPUFUNC(op_3120_0), 0, 12576 }, /* MOVE.W -(An),-(An) */ +{ CPUFUNC(op_3128_0), 0, 12584 }, /* MOVE.W (d16,An),-(An) */ +{ CPUFUNC(op_3130_3), 0, 12592 }, /* MOVE.W (d8,An,Xn),-(An) */ +{ CPUFUNC(op_3138_0), 0, 12600 }, /* MOVE.W (xxx).W,-(An) */ +{ CPUFUNC(op_3139_0), 0, 12601 }, /* MOVE.W (xxx).L,-(An) */ +{ CPUFUNC(op_313a_0), 0, 12602 }, /* MOVE.W (d16,PC),-(An) */ +{ CPUFUNC(op_313b_3), 0, 12603 }, /* MOVE.W (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_313c_0), 0, 12604 }, /* MOVE.W #.W,-(An) */ +{ CPUFUNC(op_3140_0), 0, 12608 }, /* MOVE.W Dn,(d16,An) */ +{ CPUFUNC(op_3148_0), 0, 12616 }, /* MOVE.W An,(d16,An) */ +{ CPUFUNC(op_3150_0), 0, 12624 }, /* MOVE.W (An),(d16,An) */ +{ CPUFUNC(op_3158_0), 0, 12632 }, /* MOVE.W (An)+,(d16,An) */ +{ CPUFUNC(op_3160_0), 0, 12640 }, /* MOVE.W -(An),(d16,An) */ +{ CPUFUNC(op_3168_0), 0, 12648 }, /* MOVE.W (d16,An),(d16,An) */ +{ CPUFUNC(op_3170_3), 0, 12656 }, /* MOVE.W (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_3178_0), 0, 12664 }, /* MOVE.W (xxx).W,(d16,An) */ +{ CPUFUNC(op_3179_0), 0, 12665 }, /* MOVE.W (xxx).L,(d16,An) */ +{ CPUFUNC(op_317a_0), 0, 12666 }, /* MOVE.W (d16,PC),(d16,An) */ +{ CPUFUNC(op_317b_3), 0, 12667 }, /* MOVE.W (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_317c_0), 0, 12668 }, /* MOVE.W #.W,(d16,An) */ +{ CPUFUNC(op_3180_3), 0, 12672 }, /* MOVE.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_3188_3), 0, 12680 }, /* MOVE.W An,(d8,An,Xn) */ +{ CPUFUNC(op_3190_3), 0, 12688 }, /* MOVE.W (An),(d8,An,Xn) */ +{ CPUFUNC(op_3198_3), 0, 12696 }, /* MOVE.W (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_31a0_3), 0, 12704 }, /* MOVE.W -(An),(d8,An,Xn) */ +{ CPUFUNC(op_31a8_3), 0, 12712 }, /* MOVE.W (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_31b0_3), 0, 12720 }, /* MOVE.W (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_31b8_3), 0, 12728 }, /* MOVE.W (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_31b9_3), 0, 12729 }, /* MOVE.W (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_31ba_3), 0, 12730 }, /* MOVE.W (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_31bb_3), 0, 12731 }, /* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_31bc_3), 0, 12732 }, /* MOVE.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_31c0_0), 0, 12736 }, /* MOVE.W Dn,(xxx).W */ +{ CPUFUNC(op_31c8_0), 0, 12744 }, /* MOVE.W An,(xxx).W */ +{ CPUFUNC(op_31d0_0), 0, 12752 }, /* MOVE.W (An),(xxx).W */ +{ CPUFUNC(op_31d8_0), 0, 12760 }, /* MOVE.W (An)+,(xxx).W */ +{ CPUFUNC(op_31e0_0), 0, 12768 }, /* MOVE.W -(An),(xxx).W */ +{ CPUFUNC(op_31e8_0), 0, 12776 }, /* MOVE.W (d16,An),(xxx).W */ +{ CPUFUNC(op_31f0_3), 0, 12784 }, /* MOVE.W (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_31f8_0), 0, 12792 }, /* MOVE.W (xxx).W,(xxx).W */ +{ CPUFUNC(op_31f9_0), 0, 12793 }, /* MOVE.W (xxx).L,(xxx).W */ +{ CPUFUNC(op_31fa_0), 0, 12794 }, /* MOVE.W (d16,PC),(xxx).W */ +{ CPUFUNC(op_31fb_3), 0, 12795 }, /* MOVE.W (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_31fc_0), 0, 12796 }, /* MOVE.W #.W,(xxx).W */ +{ CPUFUNC(op_33c0_0), 0, 13248 }, /* MOVE.W Dn,(xxx).L */ +{ CPUFUNC(op_33c8_0), 0, 13256 }, /* MOVE.W An,(xxx).L */ +{ CPUFUNC(op_33d0_0), 0, 13264 }, /* MOVE.W (An),(xxx).L */ +{ CPUFUNC(op_33d8_0), 0, 13272 }, /* MOVE.W (An)+,(xxx).L */ +{ CPUFUNC(op_33e0_0), 0, 13280 }, /* MOVE.W -(An),(xxx).L */ +{ CPUFUNC(op_33e8_0), 0, 13288 }, /* MOVE.W (d16,An),(xxx).L */ +{ CPUFUNC(op_33f0_3), 0, 13296 }, /* MOVE.W (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_33f8_0), 0, 13304 }, /* MOVE.W (xxx).W,(xxx).L */ +{ CPUFUNC(op_33f9_0), 0, 13305 }, /* MOVE.W (xxx).L,(xxx).L */ +{ CPUFUNC(op_33fa_0), 0, 13306 }, /* MOVE.W (d16,PC),(xxx).L */ +{ CPUFUNC(op_33fb_3), 0, 13307 }, /* MOVE.W (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_33fc_0), 0, 13308 }, /* MOVE.W #.W,(xxx).L */ +{ CPUFUNC(op_4000_0), 0, 16384 }, /* NEGX.B Dn */ +{ CPUFUNC(op_4010_0), 0, 16400 }, /* NEGX.B (An) */ +{ CPUFUNC(op_4018_0), 0, 16408 }, /* NEGX.B (An)+ */ +{ CPUFUNC(op_4020_0), 0, 16416 }, /* NEGX.B -(An) */ +{ CPUFUNC(op_4028_0), 0, 16424 }, /* NEGX.B (d16,An) */ +{ CPUFUNC(op_4030_3), 0, 16432 }, /* NEGX.B (d8,An,Xn) */ +{ CPUFUNC(op_4038_0), 0, 16440 }, /* NEGX.B (xxx).W */ +{ CPUFUNC(op_4039_0), 0, 16441 }, /* NEGX.B (xxx).L */ +{ CPUFUNC(op_4040_0), 0, 16448 }, /* NEGX.W Dn */ +{ CPUFUNC(op_4050_0), 0, 16464 }, /* NEGX.W (An) */ +{ CPUFUNC(op_4058_0), 0, 16472 }, /* NEGX.W (An)+ */ +{ CPUFUNC(op_4060_0), 0, 16480 }, /* NEGX.W -(An) */ +{ CPUFUNC(op_4068_0), 0, 16488 }, /* NEGX.W (d16,An) */ +{ CPUFUNC(op_4070_3), 0, 16496 }, /* NEGX.W (d8,An,Xn) */ +{ CPUFUNC(op_4078_0), 0, 16504 }, /* NEGX.W (xxx).W */ +{ CPUFUNC(op_4079_0), 0, 16505 }, /* NEGX.W (xxx).L */ +{ CPUFUNC(op_4080_0), 0, 16512 }, /* NEGX.L Dn */ +{ CPUFUNC(op_4090_0), 0, 16528 }, /* NEGX.L (An) */ +{ CPUFUNC(op_4098_0), 0, 16536 }, /* NEGX.L (An)+ */ +{ CPUFUNC(op_40a0_0), 0, 16544 }, /* NEGX.L -(An) */ +{ CPUFUNC(op_40a8_0), 0, 16552 }, /* NEGX.L (d16,An) */ +{ CPUFUNC(op_40b0_3), 0, 16560 }, /* NEGX.L (d8,An,Xn) */ +{ CPUFUNC(op_40b8_0), 0, 16568 }, /* NEGX.L (xxx).W */ +{ CPUFUNC(op_40b9_0), 0, 16569 }, /* NEGX.L (xxx).L */ +{ CPUFUNC_FF(op_40c0_0), 0, 16576 }, /* MVSR2.W Dn */ +{ CPUFUNC_FF(op_40d0_0), 0, 16592 }, /* MVSR2.W (An) */ +{ CPUFUNC_FF(op_40d8_0), 0, 16600 }, /* MVSR2.W (An)+ */ +{ CPUFUNC_FF(op_40e0_0), 0, 16608 }, /* MVSR2.W -(An) */ +{ CPUFUNC_FF(op_40e8_0), 0, 16616 }, /* MVSR2.W (d16,An) */ +{ CPUFUNC_FF(op_40f0_3), 0, 16624 }, /* MVSR2.W (d8,An,Xn) */ +{ CPUFUNC_FF(op_40f8_0), 0, 16632 }, /* MVSR2.W (xxx).W */ +{ CPUFUNC_FF(op_40f9_0), 0, 16633 }, /* MVSR2.W (xxx).L */ +{ CPUFUNC(op_4100_0), 0, 16640 }, /* CHK.L Dn,Dn */ +{ CPUFUNC(op_4110_0), 0, 16656 }, /* CHK.L (An),Dn */ +{ CPUFUNC(op_4118_0), 0, 16664 }, /* CHK.L (An)+,Dn */ +{ CPUFUNC(op_4120_0), 0, 16672 }, /* CHK.L -(An),Dn */ +{ CPUFUNC(op_4128_0), 0, 16680 }, /* CHK.L (d16,An),Dn */ +{ CPUFUNC(op_4130_3), 0, 16688 }, /* CHK.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_4138_0), 0, 16696 }, /* CHK.L (xxx).W,Dn */ +{ CPUFUNC(op_4139_0), 0, 16697 }, /* CHK.L (xxx).L,Dn */ +{ CPUFUNC(op_413a_0), 0, 16698 }, /* CHK.L (d16,PC),Dn */ +{ CPUFUNC(op_413b_3), 0, 16699 }, /* CHK.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_413c_0), 0, 16700 }, /* CHK.L #.L,Dn */ +{ CPUFUNC(op_4180_0), 0, 16768 }, /* CHK.W Dn,Dn */ +{ CPUFUNC(op_4190_0), 0, 16784 }, /* CHK.W (An),Dn */ +{ CPUFUNC(op_4198_0), 0, 16792 }, /* CHK.W (An)+,Dn */ +{ CPUFUNC(op_41a0_0), 0, 16800 }, /* CHK.W -(An),Dn */ +{ CPUFUNC(op_41a8_0), 0, 16808 }, /* CHK.W (d16,An),Dn */ +{ CPUFUNC(op_41b0_3), 0, 16816 }, /* CHK.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_41b8_0), 0, 16824 }, /* CHK.W (xxx).W,Dn */ +{ CPUFUNC(op_41b9_0), 0, 16825 }, /* CHK.W (xxx).L,Dn */ +{ CPUFUNC(op_41ba_0), 0, 16826 }, /* CHK.W (d16,PC),Dn */ +{ CPUFUNC(op_41bb_3), 0, 16827 }, /* CHK.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_41bc_0), 0, 16828 }, /* CHK.W #.W,Dn */ +{ CPUFUNC_FF(op_41d0_0), 0, 16848 }, /* LEA.L (An),An */ +{ CPUFUNC_FF(op_41e8_0), 0, 16872 }, /* LEA.L (d16,An),An */ +{ CPUFUNC_FF(op_41f0_3), 0, 16880 }, /* LEA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_41f8_0), 0, 16888 }, /* LEA.L (xxx).W,An */ +{ CPUFUNC_FF(op_41f9_0), 0, 16889 }, /* LEA.L (xxx).L,An */ +{ CPUFUNC_FF(op_41fa_0), 0, 16890 }, /* LEA.L (d16,PC),An */ +{ CPUFUNC_FF(op_41fb_3), 0, 16891 }, /* LEA.L (d8,PC,Xn),An */ +{ CPUFUNC(op_4200_0), 0, 16896 }, /* CLR.B Dn */ +{ CPUFUNC(op_4210_0), 0, 16912 }, /* CLR.B (An) */ +{ CPUFUNC(op_4218_0), 0, 16920 }, /* CLR.B (An)+ */ +{ CPUFUNC(op_4220_0), 0, 16928 }, /* CLR.B -(An) */ +{ CPUFUNC(op_4228_0), 0, 16936 }, /* CLR.B (d16,An) */ +{ CPUFUNC(op_4230_3), 0, 16944 }, /* CLR.B (d8,An,Xn) */ +{ CPUFUNC(op_4238_0), 0, 16952 }, /* CLR.B (xxx).W */ +{ CPUFUNC(op_4239_0), 0, 16953 }, /* CLR.B (xxx).L */ +{ CPUFUNC(op_4240_0), 0, 16960 }, /* CLR.W Dn */ +{ CPUFUNC(op_4250_0), 0, 16976 }, /* CLR.W (An) */ +{ CPUFUNC(op_4258_0), 0, 16984 }, /* CLR.W (An)+ */ +{ CPUFUNC(op_4260_0), 0, 16992 }, /* CLR.W -(An) */ +{ CPUFUNC(op_4268_0), 0, 17000 }, /* CLR.W (d16,An) */ +{ CPUFUNC(op_4270_3), 0, 17008 }, /* CLR.W (d8,An,Xn) */ +{ CPUFUNC(op_4278_0), 0, 17016 }, /* CLR.W (xxx).W */ +{ CPUFUNC(op_4279_0), 0, 17017 }, /* CLR.W (xxx).L */ +{ CPUFUNC(op_4280_0), 0, 17024 }, /* CLR.L Dn */ +{ CPUFUNC(op_4290_0), 0, 17040 }, /* CLR.L (An) */ +{ CPUFUNC(op_4298_0), 0, 17048 }, /* CLR.L (An)+ */ +{ CPUFUNC(op_42a0_0), 0, 17056 }, /* CLR.L -(An) */ +{ CPUFUNC(op_42a8_0), 0, 17064 }, /* CLR.L (d16,An) */ +{ CPUFUNC(op_42b0_3), 0, 17072 }, /* CLR.L (d8,An,Xn) */ +{ CPUFUNC(op_42b8_0), 0, 17080 }, /* CLR.L (xxx).W */ +{ CPUFUNC(op_42b9_0), 0, 17081 }, /* CLR.L (xxx).L */ +{ CPUFUNC_FF(op_42c0_0), 0, 17088 }, /* MVSR2.B Dn */ +{ CPUFUNC_FF(op_42d0_0), 0, 17104 }, /* MVSR2.B (An) */ +{ CPUFUNC_FF(op_42d8_0), 0, 17112 }, /* MVSR2.B (An)+ */ +{ CPUFUNC_FF(op_42e0_0), 0, 17120 }, /* MVSR2.B -(An) */ +{ CPUFUNC_FF(op_42e8_0), 0, 17128 }, /* MVSR2.B (d16,An) */ +{ CPUFUNC_FF(op_42f0_3), 0, 17136 }, /* MVSR2.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_42f8_0), 0, 17144 }, /* MVSR2.B (xxx).W */ +{ CPUFUNC_FF(op_42f9_0), 0, 17145 }, /* MVSR2.B (xxx).L */ +{ CPUFUNC(op_4400_0), 0, 17408 }, /* NEG.B Dn */ +{ CPUFUNC(op_4410_0), 0, 17424 }, /* NEG.B (An) */ +{ CPUFUNC(op_4418_0), 0, 17432 }, /* NEG.B (An)+ */ +{ CPUFUNC(op_4420_0), 0, 17440 }, /* NEG.B -(An) */ +{ CPUFUNC(op_4428_0), 0, 17448 }, /* NEG.B (d16,An) */ +{ CPUFUNC(op_4430_3), 0, 17456 }, /* NEG.B (d8,An,Xn) */ +{ CPUFUNC(op_4438_0), 0, 17464 }, /* NEG.B (xxx).W */ +{ CPUFUNC(op_4439_0), 0, 17465 }, /* NEG.B (xxx).L */ +{ CPUFUNC(op_4440_0), 0, 17472 }, /* NEG.W Dn */ +{ CPUFUNC(op_4450_0), 0, 17488 }, /* NEG.W (An) */ +{ CPUFUNC(op_4458_0), 0, 17496 }, /* NEG.W (An)+ */ +{ CPUFUNC(op_4460_0), 0, 17504 }, /* NEG.W -(An) */ +{ CPUFUNC(op_4468_0), 0, 17512 }, /* NEG.W (d16,An) */ +{ CPUFUNC(op_4470_3), 0, 17520 }, /* NEG.W (d8,An,Xn) */ +{ CPUFUNC(op_4478_0), 0, 17528 }, /* NEG.W (xxx).W */ +{ CPUFUNC(op_4479_0), 0, 17529 }, /* NEG.W (xxx).L */ +{ CPUFUNC(op_4480_0), 0, 17536 }, /* NEG.L Dn */ +{ CPUFUNC(op_4490_0), 0, 17552 }, /* NEG.L (An) */ +{ CPUFUNC(op_4498_0), 0, 17560 }, /* NEG.L (An)+ */ +{ CPUFUNC(op_44a0_0), 0, 17568 }, /* NEG.L -(An) */ +{ CPUFUNC(op_44a8_0), 0, 17576 }, /* NEG.L (d16,An) */ +{ CPUFUNC(op_44b0_3), 0, 17584 }, /* NEG.L (d8,An,Xn) */ +{ CPUFUNC(op_44b8_0), 0, 17592 }, /* NEG.L (xxx).W */ +{ CPUFUNC(op_44b9_0), 0, 17593 }, /* NEG.L (xxx).L */ +{ CPUFUNC(op_44c0_0), 0, 17600 }, /* MV2SR.B Dn */ +{ CPUFUNC(op_44d0_0), 0, 17616 }, /* MV2SR.B (An) */ +{ CPUFUNC(op_44d8_0), 0, 17624 }, /* MV2SR.B (An)+ */ +{ CPUFUNC(op_44e0_0), 0, 17632 }, /* MV2SR.B -(An) */ +{ CPUFUNC(op_44e8_0), 0, 17640 }, /* MV2SR.B (d16,An) */ +{ CPUFUNC(op_44f0_3), 0, 17648 }, /* MV2SR.B (d8,An,Xn) */ +{ CPUFUNC(op_44f8_0), 0, 17656 }, /* MV2SR.B (xxx).W */ +{ CPUFUNC(op_44f9_0), 0, 17657 }, /* MV2SR.B (xxx).L */ +{ CPUFUNC(op_44fa_0), 0, 17658 }, /* MV2SR.B (d16,PC) */ +{ CPUFUNC(op_44fb_3), 0, 17659 }, /* MV2SR.B (d8,PC,Xn) */ +{ CPUFUNC(op_44fc_0), 0, 17660 }, /* MV2SR.B #.B */ +{ CPUFUNC(op_4600_0), 0, 17920 }, /* NOT.B Dn */ +{ CPUFUNC(op_4610_0), 0, 17936 }, /* NOT.B (An) */ +{ CPUFUNC(op_4618_0), 0, 17944 }, /* NOT.B (An)+ */ +{ CPUFUNC(op_4620_0), 0, 17952 }, /* NOT.B -(An) */ +{ CPUFUNC(op_4628_0), 0, 17960 }, /* NOT.B (d16,An) */ +{ CPUFUNC(op_4630_3), 0, 17968 }, /* NOT.B (d8,An,Xn) */ +{ CPUFUNC(op_4638_0), 0, 17976 }, /* NOT.B (xxx).W */ +{ CPUFUNC(op_4639_0), 0, 17977 }, /* NOT.B (xxx).L */ +{ CPUFUNC(op_4640_0), 0, 17984 }, /* NOT.W Dn */ +{ CPUFUNC(op_4650_0), 0, 18000 }, /* NOT.W (An) */ +{ CPUFUNC(op_4658_0), 0, 18008 }, /* NOT.W (An)+ */ +{ CPUFUNC(op_4660_0), 0, 18016 }, /* NOT.W -(An) */ +{ CPUFUNC(op_4668_0), 0, 18024 }, /* NOT.W (d16,An) */ +{ CPUFUNC(op_4670_3), 0, 18032 }, /* NOT.W (d8,An,Xn) */ +{ CPUFUNC(op_4678_0), 0, 18040 }, /* NOT.W (xxx).W */ +{ CPUFUNC(op_4679_0), 0, 18041 }, /* NOT.W (xxx).L */ +{ CPUFUNC(op_4680_0), 0, 18048 }, /* NOT.L Dn */ +{ CPUFUNC(op_4690_0), 0, 18064 }, /* NOT.L (An) */ +{ CPUFUNC(op_4698_0), 0, 18072 }, /* NOT.L (An)+ */ +{ CPUFUNC(op_46a0_0), 0, 18080 }, /* NOT.L -(An) */ +{ CPUFUNC(op_46a8_0), 0, 18088 }, /* NOT.L (d16,An) */ +{ CPUFUNC(op_46b0_3), 0, 18096 }, /* NOT.L (d8,An,Xn) */ +{ CPUFUNC(op_46b8_0), 0, 18104 }, /* NOT.L (xxx).W */ +{ CPUFUNC(op_46b9_0), 0, 18105 }, /* NOT.L (xxx).L */ +{ CPUFUNC(op_46c0_0), 0, 18112 }, /* MV2SR.W Dn */ +{ CPUFUNC(op_46d0_0), 0, 18128 }, /* MV2SR.W (An) */ +{ CPUFUNC(op_46d8_0), 0, 18136 }, /* MV2SR.W (An)+ */ +{ CPUFUNC(op_46e0_0), 0, 18144 }, /* MV2SR.W -(An) */ +{ CPUFUNC(op_46e8_0), 0, 18152 }, /* MV2SR.W (d16,An) */ +{ CPUFUNC(op_46f0_3), 0, 18160 }, /* MV2SR.W (d8,An,Xn) */ +{ CPUFUNC(op_46f8_0), 0, 18168 }, /* MV2SR.W (xxx).W */ +{ CPUFUNC(op_46f9_0), 0, 18169 }, /* MV2SR.W (xxx).L */ +{ CPUFUNC(op_46fa_0), 0, 18170 }, /* MV2SR.W (d16,PC) */ +{ CPUFUNC(op_46fb_3), 0, 18171 }, /* MV2SR.W (d8,PC,Xn) */ +{ CPUFUNC(op_46fc_0), 0, 18172 }, /* MV2SR.W #.W */ +{ CPUFUNC(op_4800_1), 0, 18432 }, /* NBCD.B Dn */ +{ CPUFUNC(op_4810_1), 0, 18448 }, /* NBCD.B (An) */ +{ CPUFUNC(op_4818_1), 0, 18456 }, /* NBCD.B (An)+ */ +{ CPUFUNC(op_4820_1), 0, 18464 }, /* NBCD.B -(An) */ +{ CPUFUNC(op_4828_1), 0, 18472 }, /* NBCD.B (d16,An) */ +{ CPUFUNC(op_4830_3), 0, 18480 }, /* NBCD.B (d8,An,Xn) */ +{ CPUFUNC(op_4838_1), 0, 18488 }, /* NBCD.B (xxx).W */ +{ CPUFUNC(op_4839_1), 0, 18489 }, /* NBCD.B (xxx).L */ +{ CPUFUNC(op_4840_0), 0, 18496 }, /* SWAP.W Dn */ +{ CPUFUNC_FF(op_4850_0), 0, 18512 }, /* PEA.L (An) */ +{ CPUFUNC_FF(op_4868_0), 0, 18536 }, /* PEA.L (d16,An) */ +{ CPUFUNC_FF(op_4870_3), 0, 18544 }, /* PEA.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4878_0), 0, 18552 }, /* PEA.L (xxx).W */ +{ CPUFUNC_FF(op_4879_0), 0, 18553 }, /* PEA.L (xxx).L */ +{ CPUFUNC_FF(op_487a_0), 0, 18554 }, /* PEA.L (d16,PC) */ +{ CPUFUNC_FF(op_487b_3), 0, 18555 }, /* PEA.L (d8,PC,Xn) */ +{ CPUFUNC(op_4880_0), 0, 18560 }, /* EXT.W Dn */ +{ CPUFUNC_FF(op_4890_0), 0, 18576 }, /* MVMLE.W #.W,(An) */ +{ CPUFUNC_FF(op_48a0_0), 0, 18592 }, /* MVMLE.W #.W,-(An) */ +{ CPUFUNC_FF(op_48a8_0), 0, 18600 }, /* MVMLE.W #.W,(d16,An) */ +{ CPUFUNC_FF(op_48b0_3), 0, 18608 }, /* MVMLE.W #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_48b8_0), 0, 18616 }, /* MVMLE.W #.W,(xxx).W */ +{ CPUFUNC_FF(op_48b9_0), 0, 18617 }, /* MVMLE.W #.W,(xxx).L */ +{ CPUFUNC(op_48c0_0), 0, 18624 }, /* EXT.L Dn */ +{ CPUFUNC_FF(op_48d0_0), 0, 18640 }, /* MVMLE.L #.W,(An) */ +{ CPUFUNC_FF(op_48e0_0), 0, 18656 }, /* MVMLE.L #.W,-(An) */ +{ CPUFUNC_FF(op_48e8_0), 0, 18664 }, /* MVMLE.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_48f0_3), 0, 18672 }, /* MVMLE.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_48f8_0), 0, 18680 }, /* MVMLE.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_48f9_0), 0, 18681 }, /* MVMLE.L #.W,(xxx).L */ +{ CPUFUNC(op_49c0_0), 0, 18880 }, /* EXT.B Dn */ +{ CPUFUNC(op_4a00_0), 0, 18944 }, /* TST.B Dn */ +{ CPUFUNC(op_4a10_0), 0, 18960 }, /* TST.B (An) */ +{ CPUFUNC(op_4a18_0), 0, 18968 }, /* TST.B (An)+ */ +{ CPUFUNC(op_4a20_0), 0, 18976 }, /* TST.B -(An) */ +{ CPUFUNC(op_4a28_0), 0, 18984 }, /* TST.B (d16,An) */ +{ CPUFUNC(op_4a30_3), 0, 18992 }, /* TST.B (d8,An,Xn) */ +{ CPUFUNC(op_4a38_0), 0, 19000 }, /* TST.B (xxx).W */ +{ CPUFUNC(op_4a39_0), 0, 19001 }, /* TST.B (xxx).L */ +{ CPUFUNC(op_4a3a_0), 0, 19002 }, /* TST.B (d16,PC) */ +{ CPUFUNC(op_4a3b_3), 0, 19003 }, /* TST.B (d8,PC,Xn) */ +{ CPUFUNC(op_4a3c_0), 0, 19004 }, /* TST.B #.B */ +{ CPUFUNC(op_4a40_0), 0, 19008 }, /* TST.W Dn */ +{ CPUFUNC(op_4a48_0), 0, 19016 }, /* TST.W An */ +{ CPUFUNC(op_4a50_0), 0, 19024 }, /* TST.W (An) */ +{ CPUFUNC(op_4a58_0), 0, 19032 }, /* TST.W (An)+ */ +{ CPUFUNC(op_4a60_0), 0, 19040 }, /* TST.W -(An) */ +{ CPUFUNC(op_4a68_0), 0, 19048 }, /* TST.W (d16,An) */ +{ CPUFUNC(op_4a70_3), 0, 19056 }, /* TST.W (d8,An,Xn) */ +{ CPUFUNC(op_4a78_0), 0, 19064 }, /* TST.W (xxx).W */ +{ CPUFUNC(op_4a79_0), 0, 19065 }, /* TST.W (xxx).L */ +{ CPUFUNC(op_4a7a_0), 0, 19066 }, /* TST.W (d16,PC) */ +{ CPUFUNC(op_4a7b_3), 0, 19067 }, /* TST.W (d8,PC,Xn) */ +{ CPUFUNC(op_4a7c_0), 0, 19068 }, /* TST.W #.W */ +{ CPUFUNC(op_4a80_0), 0, 19072 }, /* TST.L Dn */ +{ CPUFUNC(op_4a88_0), 0, 19080 }, /* TST.L An */ +{ CPUFUNC(op_4a90_0), 0, 19088 }, /* TST.L (An) */ +{ CPUFUNC(op_4a98_0), 0, 19096 }, /* TST.L (An)+ */ +{ CPUFUNC(op_4aa0_0), 0, 19104 }, /* TST.L -(An) */ +{ CPUFUNC(op_4aa8_0), 0, 19112 }, /* TST.L (d16,An) */ +{ CPUFUNC(op_4ab0_3), 0, 19120 }, /* TST.L (d8,An,Xn) */ +{ CPUFUNC(op_4ab8_0), 0, 19128 }, /* TST.L (xxx).W */ +{ CPUFUNC(op_4ab9_0), 0, 19129 }, /* TST.L (xxx).L */ +{ CPUFUNC(op_4aba_0), 0, 19130 }, /* TST.L (d16,PC) */ +{ CPUFUNC(op_4abb_3), 0, 19131 }, /* TST.L (d8,PC,Xn) */ +{ CPUFUNC(op_4abc_0), 0, 19132 }, /* TST.L #.L */ +{ CPUFUNC(op_4ac0_0), 0, 19136 }, /* TAS.B Dn */ +{ CPUFUNC(op_4ad0_0), 0, 19152 }, /* TAS.B (An) */ +{ CPUFUNC(op_4ad8_0), 0, 19160 }, /* TAS.B (An)+ */ +{ CPUFUNC(op_4ae0_0), 0, 19168 }, /* TAS.B -(An) */ +{ CPUFUNC(op_4ae8_0), 0, 19176 }, /* TAS.B (d16,An) */ +{ CPUFUNC(op_4af0_3), 0, 19184 }, /* TAS.B (d8,An,Xn) */ +{ CPUFUNC(op_4af8_0), 0, 19192 }, /* TAS.B (xxx).W */ +{ CPUFUNC(op_4af9_0), 0, 19193 }, /* TAS.B (xxx).L */ +{ CPUFUNC_FF(op_4c90_0), 0, 19600 }, /* MVMEL.W #.W,(An) */ +{ CPUFUNC_FF(op_4c98_0), 0, 19608 }, /* MVMEL.W #.W,(An)+ */ +{ CPUFUNC_FF(op_4ca8_0), 0, 19624 }, /* MVMEL.W #.W,(d16,An) */ +{ CPUFUNC_FF(op_4cb0_3), 0, 19632 }, /* MVMEL.W #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_4cb8_0), 0, 19640 }, /* MVMEL.W #.W,(xxx).W */ +{ CPUFUNC_FF(op_4cb9_0), 0, 19641 }, /* MVMEL.W #.W,(xxx).L */ +{ CPUFUNC_FF(op_4cba_0), 0, 19642 }, /* MVMEL.W #.W,(d16,PC) */ +{ CPUFUNC_FF(op_4cbb_3), 0, 19643 }, /* MVMEL.W #.W,(d8,PC,Xn) */ +{ CPUFUNC_FF(op_4cd0_0), 0, 19664 }, /* MVMEL.L #.W,(An) */ +{ CPUFUNC_FF(op_4cd8_0), 0, 19672 }, /* MVMEL.L #.W,(An)+ */ +{ CPUFUNC_FF(op_4ce8_0), 0, 19688 }, /* MVMEL.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_4cf0_3), 0, 19696 }, /* MVMEL.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_4cf8_0), 0, 19704 }, /* MVMEL.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_4cf9_0), 0, 19705 }, /* MVMEL.L #.W,(xxx).L */ +{ CPUFUNC_FF(op_4cfa_0), 0, 19706 }, /* MVMEL.L #.W,(d16,PC) */ +{ CPUFUNC_FF(op_4cfb_3), 0, 19707 }, /* MVMEL.L #.W,(d8,PC,Xn) */ +{ CPUFUNC_FF(op_4e40_0), 0, 20032 }, /* TRAP.L # */ +{ CPUFUNC_FF(op_4e50_0), 0, 20048 }, /* LINK.W An,#.W */ +{ CPUFUNC_FF(op_4e58_0), 0, 20056 }, /* UNLK.L An */ +{ CPUFUNC_FF(op_4e60_0), 0, 20064 }, /* MVR2USP.L An */ +{ CPUFUNC_FF(op_4e68_0), 0, 20072 }, /* MVUSP2R.L An */ +{ CPUFUNC_FF(op_4e70_0), 0, 20080 }, /* RESET.L */ +{ CPUFUNC_FF(op_4e71_0), 0, 20081 }, /* NOP.L */ +{ CPUFUNC(op_4e72_0), 0, 20082 }, /* STOP.L #.W */ +{ CPUFUNC(op_4e73_0), 0, 20083 }, /* RTE.L */ +{ CPUFUNC_FF(op_4e74_0), 0, 20084 }, /* RTD.L #.W */ +{ CPUFUNC_FF(op_4e75_0), 0, 20085 }, /* RTS.L */ +{ CPUFUNC_FF(op_4e76_0), 0, 20086 }, /* TRAPV.L */ +{ CPUFUNC(op_4e77_0), 0, 20087 }, /* RTR.L */ +{ CPUFUNC_FF(op_4e7a_0), 0, 20090 }, /* MOVEC2.L #.W */ +{ CPUFUNC_FF(op_4e7b_0), 0, 20091 }, /* MOVE2C.L #.W */ +{ CPUFUNC_FF(op_4e90_0), 0, 20112 }, /* JSR.L (An) */ +{ CPUFUNC_FF(op_4ea8_0), 0, 20136 }, /* JSR.L (d16,An) */ +{ CPUFUNC_FF(op_4eb0_3), 0, 20144 }, /* JSR.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4eb8_0), 0, 20152 }, /* JSR.L (xxx).W */ +{ CPUFUNC_FF(op_4eb9_0), 0, 20153 }, /* JSR.L (xxx).L */ +{ CPUFUNC_FF(op_4eba_0), 0, 20154 }, /* JSR.L (d16,PC) */ +{ CPUFUNC_FF(op_4ebb_3), 0, 20155 }, /* JSR.L (d8,PC,Xn) */ +{ CPUFUNC_FF(op_4ed0_0), 0, 20176 }, /* JMP.L (An) */ +{ CPUFUNC_FF(op_4ee8_0), 0, 20200 }, /* JMP.L (d16,An) */ +{ CPUFUNC_FF(op_4ef0_3), 0, 20208 }, /* JMP.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4ef8_0), 0, 20216 }, /* JMP.L (xxx).W */ +{ CPUFUNC_FF(op_4ef9_0), 0, 20217 }, /* JMP.L (xxx).L */ +{ CPUFUNC_FF(op_4efa_0), 0, 20218 }, /* JMP.L (d16,PC) */ +{ CPUFUNC_FF(op_4efb_3), 0, 20219 }, /* JMP.L (d8,PC,Xn) */ +{ CPUFUNC(op_5000_0), 0, 20480 }, /* ADD.B #,Dn */ +{ CPUFUNC(op_5010_0), 0, 20496 }, /* ADD.B #,(An) */ +{ CPUFUNC(op_5018_0), 0, 20504 }, /* ADD.B #,(An)+ */ +{ CPUFUNC(op_5020_0), 0, 20512 }, /* ADD.B #,-(An) */ +{ CPUFUNC(op_5028_0), 0, 20520 }, /* ADD.B #,(d16,An) */ +{ CPUFUNC(op_5030_3), 0, 20528 }, /* ADD.B #,(d8,An,Xn) */ +{ CPUFUNC(op_5038_0), 0, 20536 }, /* ADD.B #,(xxx).W */ +{ CPUFUNC(op_5039_0), 0, 20537 }, /* ADD.B #,(xxx).L */ +{ CPUFUNC(op_5040_0), 0, 20544 }, /* ADD.W #,Dn */ +{ CPUFUNC_FF(op_5048_0), 0, 20552 }, /* ADDA.W #,An */ +{ CPUFUNC(op_5050_0), 0, 20560 }, /* ADD.W #,(An) */ +{ CPUFUNC(op_5058_0), 0, 20568 }, /* ADD.W #,(An)+ */ +{ CPUFUNC(op_5060_0), 0, 20576 }, /* ADD.W #,-(An) */ +{ CPUFUNC(op_5068_0), 0, 20584 }, /* ADD.W #,(d16,An) */ +{ CPUFUNC(op_5070_3), 0, 20592 }, /* ADD.W #,(d8,An,Xn) */ +{ CPUFUNC(op_5078_0), 0, 20600 }, /* ADD.W #,(xxx).W */ +{ CPUFUNC(op_5079_0), 0, 20601 }, /* ADD.W #,(xxx).L */ +{ CPUFUNC(op_5080_0), 0, 20608 }, /* ADD.L #,Dn */ +{ CPUFUNC_FF(op_5088_0), 0, 20616 }, /* ADDA.L #,An */ +{ CPUFUNC(op_5090_0), 0, 20624 }, /* ADD.L #,(An) */ +{ CPUFUNC(op_5098_0), 0, 20632 }, /* ADD.L #,(An)+ */ +{ CPUFUNC(op_50a0_0), 0, 20640 }, /* ADD.L #,-(An) */ +{ CPUFUNC(op_50a8_0), 0, 20648 }, /* ADD.L #,(d16,An) */ +{ CPUFUNC(op_50b0_3), 0, 20656 }, /* ADD.L #,(d8,An,Xn) */ +{ CPUFUNC(op_50b8_0), 0, 20664 }, /* ADD.L #,(xxx).W */ +{ CPUFUNC(op_50b9_0), 0, 20665 }, /* ADD.L #,(xxx).L */ +{ CPUFUNC_FF(op_50c0_0), 0, 20672 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_50c8_0), 0, 20680 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_50d0_0), 0, 20688 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_50d8_0), 0, 20696 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_50e0_0), 0, 20704 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_50e8_0), 0, 20712 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_50f0_3), 0, 20720 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_50f8_0), 0, 20728 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_50f9_0), 0, 20729 }, /* Scc.B (xxx).L */ +{ CPUFUNC(op_5100_0), 0, 20736 }, /* SUB.B #,Dn */ +{ CPUFUNC(op_5110_0), 0, 20752 }, /* SUB.B #,(An) */ +{ CPUFUNC(op_5118_0), 0, 20760 }, /* SUB.B #,(An)+ */ +{ CPUFUNC(op_5120_0), 0, 20768 }, /* SUB.B #,-(An) */ +{ CPUFUNC(op_5128_0), 0, 20776 }, /* SUB.B #,(d16,An) */ +{ CPUFUNC(op_5130_3), 0, 20784 }, /* SUB.B #,(d8,An,Xn) */ +{ CPUFUNC(op_5138_0), 0, 20792 }, /* SUB.B #,(xxx).W */ +{ CPUFUNC(op_5139_0), 0, 20793 }, /* SUB.B #,(xxx).L */ +{ CPUFUNC(op_5140_0), 0, 20800 }, /* SUB.W #,Dn */ +{ CPUFUNC_FF(op_5148_0), 0, 20808 }, /* SUBA.W #,An */ +{ CPUFUNC(op_5150_0), 0, 20816 }, /* SUB.W #,(An) */ +{ CPUFUNC(op_5158_0), 0, 20824 }, /* SUB.W #,(An)+ */ +{ CPUFUNC(op_5160_0), 0, 20832 }, /* SUB.W #,-(An) */ +{ CPUFUNC(op_5168_0), 0, 20840 }, /* SUB.W #,(d16,An) */ +{ CPUFUNC(op_5170_3), 0, 20848 }, /* SUB.W #,(d8,An,Xn) */ +{ CPUFUNC(op_5178_0), 0, 20856 }, /* SUB.W #,(xxx).W */ +{ CPUFUNC(op_5179_0), 0, 20857 }, /* SUB.W #,(xxx).L */ +{ CPUFUNC(op_5180_0), 0, 20864 }, /* SUB.L #,Dn */ +{ CPUFUNC_FF(op_5188_0), 0, 20872 }, /* SUBA.L #,An */ +{ CPUFUNC(op_5190_0), 0, 20880 }, /* SUB.L #,(An) */ +{ CPUFUNC(op_5198_0), 0, 20888 }, /* SUB.L #,(An)+ */ +{ CPUFUNC(op_51a0_0), 0, 20896 }, /* SUB.L #,-(An) */ +{ CPUFUNC(op_51a8_0), 0, 20904 }, /* SUB.L #,(d16,An) */ +{ CPUFUNC(op_51b0_3), 0, 20912 }, /* SUB.L #,(d8,An,Xn) */ +{ CPUFUNC(op_51b8_0), 0, 20920 }, /* SUB.L #,(xxx).W */ +{ CPUFUNC(op_51b9_0), 0, 20921 }, /* SUB.L #,(xxx).L */ +{ CPUFUNC_FF(op_51c0_0), 0, 20928 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_51c8_0), 0, 20936 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_51d0_0), 0, 20944 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_51d8_0), 0, 20952 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_51e0_0), 0, 20960 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_51e8_0), 0, 20968 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_51f0_3), 0, 20976 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_51f8_0), 0, 20984 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_51f9_0), 0, 20985 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_52c0_0), 0, 21184 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_52c8_0), 0, 21192 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_52d0_0), 0, 21200 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_52d8_0), 0, 21208 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_52e0_0), 0, 21216 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_52e8_0), 0, 21224 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_52f0_3), 0, 21232 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_52f8_0), 0, 21240 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_52f9_0), 0, 21241 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_53c0_0), 0, 21440 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_53c8_0), 0, 21448 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_53d0_0), 0, 21456 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_53d8_0), 0, 21464 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_53e0_0), 0, 21472 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_53e8_0), 0, 21480 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_53f0_3), 0, 21488 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_53f8_0), 0, 21496 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_53f9_0), 0, 21497 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_54c0_0), 0, 21696 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_54c8_0), 0, 21704 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_54d0_0), 0, 21712 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_54d8_0), 0, 21720 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_54e0_0), 0, 21728 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_54e8_0), 0, 21736 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_54f0_3), 0, 21744 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_54f8_0), 0, 21752 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_54f9_0), 0, 21753 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_55c0_0), 0, 21952 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_55c8_0), 0, 21960 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_55d0_0), 0, 21968 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_55d8_0), 0, 21976 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_55e0_0), 0, 21984 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_55e8_0), 0, 21992 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_55f0_3), 0, 22000 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_55f8_0), 0, 22008 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_55f9_0), 0, 22009 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_56c0_0), 0, 22208 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_56c8_0), 0, 22216 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_56d0_0), 0, 22224 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_56d8_0), 0, 22232 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_56e0_0), 0, 22240 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_56e8_0), 0, 22248 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_56f0_3), 0, 22256 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_56f8_0), 0, 22264 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_56f9_0), 0, 22265 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_57c0_0), 0, 22464 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_57c8_0), 0, 22472 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_57d0_0), 0, 22480 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_57d8_0), 0, 22488 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_57e0_0), 0, 22496 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_57e8_0), 0, 22504 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_57f0_3), 0, 22512 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_57f8_0), 0, 22520 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_57f9_0), 0, 22521 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_58c0_0), 0, 22720 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_58c8_0), 0, 22728 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_58d0_0), 0, 22736 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_58d8_0), 0, 22744 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_58e0_0), 0, 22752 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_58e8_0), 0, 22760 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_58f0_3), 0, 22768 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_58f8_0), 0, 22776 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_58f9_0), 0, 22777 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_59c0_0), 0, 22976 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_59c8_0), 0, 22984 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_59d0_0), 0, 22992 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_59d8_0), 0, 23000 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_59e0_0), 0, 23008 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_59e8_0), 0, 23016 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_59f0_3), 0, 23024 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_59f8_0), 0, 23032 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_59f9_0), 0, 23033 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5ac0_0), 0, 23232 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5ac8_0), 0, 23240 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5ad0_0), 0, 23248 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5ad8_0), 0, 23256 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ae0_0), 0, 23264 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ae8_0), 0, 23272 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5af0_3), 0, 23280 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5af8_0), 0, 23288 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5af9_0), 0, 23289 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5bc0_0), 0, 23488 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5bc8_0), 0, 23496 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5bd0_0), 0, 23504 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5bd8_0), 0, 23512 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5be0_0), 0, 23520 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5be8_0), 0, 23528 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5bf0_3), 0, 23536 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5bf8_0), 0, 23544 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5bf9_0), 0, 23545 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5cc0_0), 0, 23744 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5cc8_0), 0, 23752 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5cd0_0), 0, 23760 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5cd8_0), 0, 23768 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ce0_0), 0, 23776 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ce8_0), 0, 23784 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5cf0_3), 0, 23792 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5cf8_0), 0, 23800 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5cf9_0), 0, 23801 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5dc0_0), 0, 24000 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5dc8_0), 0, 24008 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5dd0_0), 0, 24016 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5dd8_0), 0, 24024 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5de0_0), 0, 24032 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5de8_0), 0, 24040 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5df0_3), 0, 24048 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5df8_0), 0, 24056 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5df9_0), 0, 24057 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5ec0_0), 0, 24256 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5ec8_0), 0, 24264 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5ed0_0), 0, 24272 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5ed8_0), 0, 24280 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ee0_0), 0, 24288 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ee8_0), 0, 24296 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5ef0_3), 0, 24304 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5ef8_0), 0, 24312 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5ef9_0), 0, 24313 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5fc0_0), 0, 24512 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5fc8_0), 0, 24520 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5fd0_0), 0, 24528 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5fd8_0), 0, 24536 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5fe0_0), 0, 24544 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5fe8_0), 0, 24552 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5ff0_3), 0, 24560 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5ff8_0), 0, 24568 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5ff9_0), 0, 24569 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_6000_0), 0, 24576 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6001_0), 0, 24577 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_60ff_3), 0, 24831 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6100_0), 0, 24832 }, /* BSR.W #.W */ +{ CPUFUNC_FF(op_6101_0), 0, 24833 }, /* BSR.B # */ +{ CPUFUNC_FF(op_61ff_0), 0, 25087 }, /* BSR.L #.L */ +{ CPUFUNC_FF(op_6200_0), 0, 25088 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6201_0), 0, 25089 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_62ff_3), 0, 25343 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6300_0), 0, 25344 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6301_0), 0, 25345 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_63ff_3), 0, 25599 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6400_0), 0, 25600 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6401_0), 0, 25601 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_64ff_3), 0, 25855 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6500_0), 0, 25856 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6501_0), 0, 25857 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_65ff_3), 0, 26111 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6600_0), 0, 26112 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6601_0), 0, 26113 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_66ff_3), 0, 26367 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6700_0), 0, 26368 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6701_0), 0, 26369 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_67ff_3), 0, 26623 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6800_0), 0, 26624 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6801_0), 0, 26625 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_68ff_3), 0, 26879 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6900_0), 0, 26880 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6901_0), 0, 26881 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_69ff_3), 0, 27135 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6a00_0), 0, 27136 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6a01_0), 0, 27137 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6aff_3), 0, 27391 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6b00_0), 0, 27392 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6b01_0), 0, 27393 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6bff_3), 0, 27647 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6c00_0), 0, 27648 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6c01_0), 0, 27649 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6cff_3), 0, 27903 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6d00_0), 0, 27904 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6d01_0), 0, 27905 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6dff_3), 0, 28159 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6e00_0), 0, 28160 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6e01_0), 0, 28161 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6eff_3), 0, 28415 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6f00_0), 0, 28416 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6f01_0), 0, 28417 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6fff_3), 0, 28671 }, /* Bcc.L #.L */ +{ CPUFUNC(op_7000_0), 0, 28672 }, /* MOVE.L #,Dn */ +{ CPUFUNC_FF(op_7100_0), 0, 28928 }, /* EMULOP_RETURN.L */ +{ CPUFUNC_FF(op_7101_0), 0, 28929 }, /* EMULOP.L # */ +{ CPUFUNC(op_8000_0), 0, 32768 }, /* OR.B Dn,Dn */ +{ CPUFUNC(op_8010_0), 0, 32784 }, /* OR.B (An),Dn */ +{ CPUFUNC(op_8018_0), 0, 32792 }, /* OR.B (An)+,Dn */ +{ CPUFUNC(op_8020_0), 0, 32800 }, /* OR.B -(An),Dn */ +{ CPUFUNC(op_8028_0), 0, 32808 }, /* OR.B (d16,An),Dn */ +{ CPUFUNC(op_8030_3), 0, 32816 }, /* OR.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_8038_0), 0, 32824 }, /* OR.B (xxx).W,Dn */ +{ CPUFUNC(op_8039_0), 0, 32825 }, /* OR.B (xxx).L,Dn */ +{ CPUFUNC(op_803a_0), 0, 32826 }, /* OR.B (d16,PC),Dn */ +{ CPUFUNC(op_803b_3), 0, 32827 }, /* OR.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_803c_0), 0, 32828 }, /* OR.B #.B,Dn */ +{ CPUFUNC(op_8040_0), 0, 32832 }, /* OR.W Dn,Dn */ +{ CPUFUNC(op_8050_0), 0, 32848 }, /* OR.W (An),Dn */ +{ CPUFUNC(op_8058_0), 0, 32856 }, /* OR.W (An)+,Dn */ +{ CPUFUNC(op_8060_0), 0, 32864 }, /* OR.W -(An),Dn */ +{ CPUFUNC(op_8068_0), 0, 32872 }, /* OR.W (d16,An),Dn */ +{ CPUFUNC(op_8070_3), 0, 32880 }, /* OR.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_8078_0), 0, 32888 }, /* OR.W (xxx).W,Dn */ +{ CPUFUNC(op_8079_0), 0, 32889 }, /* OR.W (xxx).L,Dn */ +{ CPUFUNC(op_807a_0), 0, 32890 }, /* OR.W (d16,PC),Dn */ +{ CPUFUNC(op_807b_3), 0, 32891 }, /* OR.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_807c_0), 0, 32892 }, /* OR.W #.W,Dn */ +{ CPUFUNC(op_8080_0), 0, 32896 }, /* OR.L Dn,Dn */ +{ CPUFUNC(op_8090_0), 0, 32912 }, /* OR.L (An),Dn */ +{ CPUFUNC(op_8098_0), 0, 32920 }, /* OR.L (An)+,Dn */ +{ CPUFUNC(op_80a0_0), 0, 32928 }, /* OR.L -(An),Dn */ +{ CPUFUNC(op_80a8_0), 0, 32936 }, /* OR.L (d16,An),Dn */ +{ CPUFUNC(op_80b0_3), 0, 32944 }, /* OR.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_80b8_0), 0, 32952 }, /* OR.L (xxx).W,Dn */ +{ CPUFUNC(op_80b9_0), 0, 32953 }, /* OR.L (xxx).L,Dn */ +{ CPUFUNC(op_80ba_0), 0, 32954 }, /* OR.L (d16,PC),Dn */ +{ CPUFUNC(op_80bb_3), 0, 32955 }, /* OR.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_80bc_0), 0, 32956 }, /* OR.L #.L,Dn */ +{ CPUFUNC(op_80c0_0), 0, 32960 }, /* DIVU.W Dn,Dn */ +{ CPUFUNC(op_80d0_0), 0, 32976 }, /* DIVU.W (An),Dn */ +{ CPUFUNC(op_80d8_0), 0, 32984 }, /* DIVU.W (An)+,Dn */ +{ CPUFUNC(op_80e0_0), 0, 32992 }, /* DIVU.W -(An),Dn */ +{ CPUFUNC(op_80e8_0), 0, 33000 }, /* DIVU.W (d16,An),Dn */ +{ CPUFUNC(op_80f0_3), 0, 33008 }, /* DIVU.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_80f8_0), 0, 33016 }, /* DIVU.W (xxx).W,Dn */ +{ CPUFUNC(op_80f9_0), 0, 33017 }, /* DIVU.W (xxx).L,Dn */ +{ CPUFUNC(op_80fa_0), 0, 33018 }, /* DIVU.W (d16,PC),Dn */ +{ CPUFUNC(op_80fb_3), 0, 33019 }, /* DIVU.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_80fc_0), 0, 33020 }, /* DIVU.W #.W,Dn */ +{ CPUFUNC(op_8100_1), 0, 33024 }, /* SBCD.B Dn,Dn */ +{ CPUFUNC(op_8108_1), 0, 33032 }, /* SBCD.B -(An),-(An) */ +{ CPUFUNC(op_8110_0), 0, 33040 }, /* OR.B Dn,(An) */ +{ CPUFUNC(op_8118_0), 0, 33048 }, /* OR.B Dn,(An)+ */ +{ CPUFUNC(op_8120_0), 0, 33056 }, /* OR.B Dn,-(An) */ +{ CPUFUNC(op_8128_0), 0, 33064 }, /* OR.B Dn,(d16,An) */ +{ CPUFUNC(op_8130_3), 0, 33072 }, /* OR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_8138_0), 0, 33080 }, /* OR.B Dn,(xxx).W */ +{ CPUFUNC(op_8139_0), 0, 33081 }, /* OR.B Dn,(xxx).L */ +{ CPUFUNC(op_8150_0), 0, 33104 }, /* OR.W Dn,(An) */ +{ CPUFUNC(op_8158_0), 0, 33112 }, /* OR.W Dn,(An)+ */ +{ CPUFUNC(op_8160_0), 0, 33120 }, /* OR.W Dn,-(An) */ +{ CPUFUNC(op_8168_0), 0, 33128 }, /* OR.W Dn,(d16,An) */ +{ CPUFUNC(op_8170_3), 0, 33136 }, /* OR.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_8178_0), 0, 33144 }, /* OR.W Dn,(xxx).W */ +{ CPUFUNC(op_8179_0), 0, 33145 }, /* OR.W Dn,(xxx).L */ +{ CPUFUNC(op_8190_0), 0, 33168 }, /* OR.L Dn,(An) */ +{ CPUFUNC(op_8198_0), 0, 33176 }, /* OR.L Dn,(An)+ */ +{ CPUFUNC(op_81a0_0), 0, 33184 }, /* OR.L Dn,-(An) */ +{ CPUFUNC(op_81a8_0), 0, 33192 }, /* OR.L Dn,(d16,An) */ +{ CPUFUNC(op_81b0_3), 0, 33200 }, /* OR.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_81b8_0), 0, 33208 }, /* OR.L Dn,(xxx).W */ +{ CPUFUNC(op_81b9_0), 0, 33209 }, /* OR.L Dn,(xxx).L */ +{ CPUFUNC(op_81c0_0), 0, 33216 }, /* DIVS.W Dn,Dn */ +{ CPUFUNC(op_81d0_0), 0, 33232 }, /* DIVS.W (An),Dn */ +{ CPUFUNC(op_81d8_0), 0, 33240 }, /* DIVS.W (An)+,Dn */ +{ CPUFUNC(op_81e0_0), 0, 33248 }, /* DIVS.W -(An),Dn */ +{ CPUFUNC(op_81e8_0), 0, 33256 }, /* DIVS.W (d16,An),Dn */ +{ CPUFUNC(op_81f0_3), 0, 33264 }, /* DIVS.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_81f8_0), 0, 33272 }, /* DIVS.W (xxx).W,Dn */ +{ CPUFUNC(op_81f9_0), 0, 33273 }, /* DIVS.W (xxx).L,Dn */ +{ CPUFUNC(op_81fa_0), 0, 33274 }, /* DIVS.W (d16,PC),Dn */ +{ CPUFUNC(op_81fb_3), 0, 33275 }, /* DIVS.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_81fc_0), 0, 33276 }, /* DIVS.W #.W,Dn */ +{ CPUFUNC(op_9000_0), 0, 36864 }, /* SUB.B Dn,Dn */ +{ CPUFUNC(op_9010_0), 0, 36880 }, /* SUB.B (An),Dn */ +{ CPUFUNC(op_9018_0), 0, 36888 }, /* SUB.B (An)+,Dn */ +{ CPUFUNC(op_9020_0), 0, 36896 }, /* SUB.B -(An),Dn */ +{ CPUFUNC(op_9028_0), 0, 36904 }, /* SUB.B (d16,An),Dn */ +{ CPUFUNC(op_9030_3), 0, 36912 }, /* SUB.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_9038_0), 0, 36920 }, /* SUB.B (xxx).W,Dn */ +{ CPUFUNC(op_9039_0), 0, 36921 }, /* SUB.B (xxx).L,Dn */ +{ CPUFUNC(op_903a_0), 0, 36922 }, /* SUB.B (d16,PC),Dn */ +{ CPUFUNC(op_903b_3), 0, 36923 }, /* SUB.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_903c_0), 0, 36924 }, /* SUB.B #.B,Dn */ +{ CPUFUNC(op_9040_0), 0, 36928 }, /* SUB.W Dn,Dn */ +{ CPUFUNC(op_9048_0), 0, 36936 }, /* SUB.W An,Dn */ +{ CPUFUNC(op_9050_0), 0, 36944 }, /* SUB.W (An),Dn */ +{ CPUFUNC(op_9058_0), 0, 36952 }, /* SUB.W (An)+,Dn */ +{ CPUFUNC(op_9060_0), 0, 36960 }, /* SUB.W -(An),Dn */ +{ CPUFUNC(op_9068_0), 0, 36968 }, /* SUB.W (d16,An),Dn */ +{ CPUFUNC(op_9070_3), 0, 36976 }, /* SUB.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_9078_0), 0, 36984 }, /* SUB.W (xxx).W,Dn */ +{ CPUFUNC(op_9079_0), 0, 36985 }, /* SUB.W (xxx).L,Dn */ +{ CPUFUNC(op_907a_0), 0, 36986 }, /* SUB.W (d16,PC),Dn */ +{ CPUFUNC(op_907b_3), 0, 36987 }, /* SUB.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_907c_0), 0, 36988 }, /* SUB.W #.W,Dn */ +{ CPUFUNC(op_9080_0), 0, 36992 }, /* SUB.L Dn,Dn */ +{ CPUFUNC(op_9088_0), 0, 37000 }, /* SUB.L An,Dn */ +{ CPUFUNC(op_9090_0), 0, 37008 }, /* SUB.L (An),Dn */ +{ CPUFUNC(op_9098_0), 0, 37016 }, /* SUB.L (An)+,Dn */ +{ CPUFUNC(op_90a0_0), 0, 37024 }, /* SUB.L -(An),Dn */ +{ CPUFUNC(op_90a8_0), 0, 37032 }, /* SUB.L (d16,An),Dn */ +{ CPUFUNC(op_90b0_3), 0, 37040 }, /* SUB.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_90b8_0), 0, 37048 }, /* SUB.L (xxx).W,Dn */ +{ CPUFUNC(op_90b9_0), 0, 37049 }, /* SUB.L (xxx).L,Dn */ +{ CPUFUNC(op_90ba_0), 0, 37050 }, /* SUB.L (d16,PC),Dn */ +{ CPUFUNC(op_90bb_3), 0, 37051 }, /* SUB.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_90bc_0), 0, 37052 }, /* SUB.L #.L,Dn */ +{ CPUFUNC_FF(op_90c0_0), 0, 37056 }, /* SUBA.W Dn,An */ +{ CPUFUNC_FF(op_90c8_0), 0, 37064 }, /* SUBA.W An,An */ +{ CPUFUNC_FF(op_90d0_0), 0, 37072 }, /* SUBA.W (An),An */ +{ CPUFUNC_FF(op_90d8_0), 0, 37080 }, /* SUBA.W (An)+,An */ +{ CPUFUNC_FF(op_90e0_0), 0, 37088 }, /* SUBA.W -(An),An */ +{ CPUFUNC_FF(op_90e8_0), 0, 37096 }, /* SUBA.W (d16,An),An */ +{ CPUFUNC_FF(op_90f0_3), 0, 37104 }, /* SUBA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_90f8_0), 0, 37112 }, /* SUBA.W (xxx).W,An */ +{ CPUFUNC_FF(op_90f9_0), 0, 37113 }, /* SUBA.W (xxx).L,An */ +{ CPUFUNC_FF(op_90fa_0), 0, 37114 }, /* SUBA.W (d16,PC),An */ +{ CPUFUNC_FF(op_90fb_3), 0, 37115 }, /* SUBA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_90fc_0), 0, 37116 }, /* SUBA.W #.W,An */ +{ CPUFUNC(op_9100_0), 0, 37120 }, /* SUBX.B Dn,Dn */ +{ CPUFUNC(op_9108_0), 0, 37128 }, /* SUBX.B -(An),-(An) */ +{ CPUFUNC(op_9110_0), 0, 37136 }, /* SUB.B Dn,(An) */ +{ CPUFUNC(op_9118_0), 0, 37144 }, /* SUB.B Dn,(An)+ */ +{ CPUFUNC(op_9120_0), 0, 37152 }, /* SUB.B Dn,-(An) */ +{ CPUFUNC(op_9128_0), 0, 37160 }, /* SUB.B Dn,(d16,An) */ +{ CPUFUNC(op_9130_3), 0, 37168 }, /* SUB.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_9138_0), 0, 37176 }, /* SUB.B Dn,(xxx).W */ +{ CPUFUNC(op_9139_0), 0, 37177 }, /* SUB.B Dn,(xxx).L */ +{ CPUFUNC(op_9140_0), 0, 37184 }, /* SUBX.W Dn,Dn */ +{ CPUFUNC(op_9148_0), 0, 37192 }, /* SUBX.W -(An),-(An) */ +{ CPUFUNC(op_9150_0), 0, 37200 }, /* SUB.W Dn,(An) */ +{ CPUFUNC(op_9158_0), 0, 37208 }, /* SUB.W Dn,(An)+ */ +{ CPUFUNC(op_9160_0), 0, 37216 }, /* SUB.W Dn,-(An) */ +{ CPUFUNC(op_9168_0), 0, 37224 }, /* SUB.W Dn,(d16,An) */ +{ CPUFUNC(op_9170_3), 0, 37232 }, /* SUB.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_9178_0), 0, 37240 }, /* SUB.W Dn,(xxx).W */ +{ CPUFUNC(op_9179_0), 0, 37241 }, /* SUB.W Dn,(xxx).L */ +{ CPUFUNC(op_9180_0), 0, 37248 }, /* SUBX.L Dn,Dn */ +{ CPUFUNC(op_9188_0), 0, 37256 }, /* SUBX.L -(An),-(An) */ +{ CPUFUNC(op_9190_0), 0, 37264 }, /* SUB.L Dn,(An) */ +{ CPUFUNC(op_9198_0), 0, 37272 }, /* SUB.L Dn,(An)+ */ +{ CPUFUNC(op_91a0_0), 0, 37280 }, /* SUB.L Dn,-(An) */ +{ CPUFUNC(op_91a8_0), 0, 37288 }, /* SUB.L Dn,(d16,An) */ +{ CPUFUNC(op_91b0_3), 0, 37296 }, /* SUB.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_91b8_0), 0, 37304 }, /* SUB.L Dn,(xxx).W */ +{ CPUFUNC(op_91b9_0), 0, 37305 }, /* SUB.L Dn,(xxx).L */ +{ CPUFUNC_FF(op_91c0_0), 0, 37312 }, /* SUBA.L Dn,An */ +{ CPUFUNC_FF(op_91c8_0), 0, 37320 }, /* SUBA.L An,An */ +{ CPUFUNC_FF(op_91d0_0), 0, 37328 }, /* SUBA.L (An),An */ +{ CPUFUNC_FF(op_91d8_0), 0, 37336 }, /* SUBA.L (An)+,An */ +{ CPUFUNC_FF(op_91e0_0), 0, 37344 }, /* SUBA.L -(An),An */ +{ CPUFUNC_FF(op_91e8_0), 0, 37352 }, /* SUBA.L (d16,An),An */ +{ CPUFUNC_FF(op_91f0_3), 0, 37360 }, /* SUBA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_91f8_0), 0, 37368 }, /* SUBA.L (xxx).W,An */ +{ CPUFUNC_FF(op_91f9_0), 0, 37369 }, /* SUBA.L (xxx).L,An */ +{ CPUFUNC_FF(op_91fa_0), 0, 37370 }, /* SUBA.L (d16,PC),An */ +{ CPUFUNC_FF(op_91fb_3), 0, 37371 }, /* SUBA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_91fc_0), 0, 37372 }, /* SUBA.L #.L,An */ +{ CPUFUNC(op_b000_0), 0, 45056 }, /* CMP.B Dn,Dn */ +{ CPUFUNC(op_b010_0), 0, 45072 }, /* CMP.B (An),Dn */ +{ CPUFUNC(op_b018_0), 0, 45080 }, /* CMP.B (An)+,Dn */ +{ CPUFUNC(op_b020_0), 0, 45088 }, /* CMP.B -(An),Dn */ +{ CPUFUNC(op_b028_0), 0, 45096 }, /* CMP.B (d16,An),Dn */ +{ CPUFUNC(op_b030_3), 0, 45104 }, /* CMP.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_b038_0), 0, 45112 }, /* CMP.B (xxx).W,Dn */ +{ CPUFUNC(op_b039_0), 0, 45113 }, /* CMP.B (xxx).L,Dn */ +{ CPUFUNC(op_b03a_0), 0, 45114 }, /* CMP.B (d16,PC),Dn */ +{ CPUFUNC(op_b03b_3), 0, 45115 }, /* CMP.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b03c_0), 0, 45116 }, /* CMP.B #.B,Dn */ +{ CPUFUNC(op_b040_0), 0, 45120 }, /* CMP.W Dn,Dn */ +{ CPUFUNC(op_b048_0), 0, 45128 }, /* CMP.W An,Dn */ +{ CPUFUNC(op_b050_0), 0, 45136 }, /* CMP.W (An),Dn */ +{ CPUFUNC(op_b058_0), 0, 45144 }, /* CMP.W (An)+,Dn */ +{ CPUFUNC(op_b060_0), 0, 45152 }, /* CMP.W -(An),Dn */ +{ CPUFUNC(op_b068_0), 0, 45160 }, /* CMP.W (d16,An),Dn */ +{ CPUFUNC(op_b070_3), 0, 45168 }, /* CMP.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_b078_0), 0, 45176 }, /* CMP.W (xxx).W,Dn */ +{ CPUFUNC(op_b079_0), 0, 45177 }, /* CMP.W (xxx).L,Dn */ +{ CPUFUNC(op_b07a_0), 0, 45178 }, /* CMP.W (d16,PC),Dn */ +{ CPUFUNC(op_b07b_3), 0, 45179 }, /* CMP.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b07c_0), 0, 45180 }, /* CMP.W #.W,Dn */ +{ CPUFUNC(op_b080_0), 0, 45184 }, /* CMP.L Dn,Dn */ +{ CPUFUNC(op_b088_0), 0, 45192 }, /* CMP.L An,Dn */ +{ CPUFUNC(op_b090_0), 0, 45200 }, /* CMP.L (An),Dn */ +{ CPUFUNC(op_b098_0), 0, 45208 }, /* CMP.L (An)+,Dn */ +{ CPUFUNC(op_b0a0_0), 0, 45216 }, /* CMP.L -(An),Dn */ +{ CPUFUNC(op_b0a8_0), 0, 45224 }, /* CMP.L (d16,An),Dn */ +{ CPUFUNC(op_b0b0_3), 0, 45232 }, /* CMP.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_b0b8_0), 0, 45240 }, /* CMP.L (xxx).W,Dn */ +{ CPUFUNC(op_b0b9_0), 0, 45241 }, /* CMP.L (xxx).L,Dn */ +{ CPUFUNC(op_b0ba_0), 0, 45242 }, /* CMP.L (d16,PC),Dn */ +{ CPUFUNC(op_b0bb_3), 0, 45243 }, /* CMP.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b0bc_0), 0, 45244 }, /* CMP.L #.L,Dn */ +{ CPUFUNC(op_b0c0_0), 0, 45248 }, /* CMPA.W Dn,An */ +{ CPUFUNC(op_b0c8_0), 0, 45256 }, /* CMPA.W An,An */ +{ CPUFUNC(op_b0d0_0), 0, 45264 }, /* CMPA.W (An),An */ +{ CPUFUNC(op_b0d8_0), 0, 45272 }, /* CMPA.W (An)+,An */ +{ CPUFUNC(op_b0e0_0), 0, 45280 }, /* CMPA.W -(An),An */ +{ CPUFUNC(op_b0e8_0), 0, 45288 }, /* CMPA.W (d16,An),An */ +{ CPUFUNC(op_b0f0_3), 0, 45296 }, /* CMPA.W (d8,An,Xn),An */ +{ CPUFUNC(op_b0f8_0), 0, 45304 }, /* CMPA.W (xxx).W,An */ +{ CPUFUNC(op_b0f9_0), 0, 45305 }, /* CMPA.W (xxx).L,An */ +{ CPUFUNC(op_b0fa_0), 0, 45306 }, /* CMPA.W (d16,PC),An */ +{ CPUFUNC(op_b0fb_3), 0, 45307 }, /* CMPA.W (d8,PC,Xn),An */ +{ CPUFUNC(op_b0fc_0), 0, 45308 }, /* CMPA.W #.W,An */ +{ CPUFUNC(op_b100_0), 0, 45312 }, /* EOR.B Dn,Dn */ +{ CPUFUNC(op_b108_0), 0, 45320 }, /* CMPM.B (An)+,(An)+ */ +{ CPUFUNC(op_b110_0), 0, 45328 }, /* EOR.B Dn,(An) */ +{ CPUFUNC(op_b118_0), 0, 45336 }, /* EOR.B Dn,(An)+ */ +{ CPUFUNC(op_b120_0), 0, 45344 }, /* EOR.B Dn,-(An) */ +{ CPUFUNC(op_b128_0), 0, 45352 }, /* EOR.B Dn,(d16,An) */ +{ CPUFUNC(op_b130_3), 0, 45360 }, /* EOR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b138_0), 0, 45368 }, /* EOR.B Dn,(xxx).W */ +{ CPUFUNC(op_b139_0), 0, 45369 }, /* EOR.B Dn,(xxx).L */ +{ CPUFUNC(op_b140_0), 0, 45376 }, /* EOR.W Dn,Dn */ +{ CPUFUNC(op_b148_0), 0, 45384 }, /* CMPM.W (An)+,(An)+ */ +{ CPUFUNC(op_b150_0), 0, 45392 }, /* EOR.W Dn,(An) */ +{ CPUFUNC(op_b158_0), 0, 45400 }, /* EOR.W Dn,(An)+ */ +{ CPUFUNC(op_b160_0), 0, 45408 }, /* EOR.W Dn,-(An) */ +{ CPUFUNC(op_b168_0), 0, 45416 }, /* EOR.W Dn,(d16,An) */ +{ CPUFUNC(op_b170_3), 0, 45424 }, /* EOR.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b178_0), 0, 45432 }, /* EOR.W Dn,(xxx).W */ +{ CPUFUNC(op_b179_0), 0, 45433 }, /* EOR.W Dn,(xxx).L */ +{ CPUFUNC(op_b180_0), 0, 45440 }, /* EOR.L Dn,Dn */ +{ CPUFUNC(op_b188_0), 0, 45448 }, /* CMPM.L (An)+,(An)+ */ +{ CPUFUNC(op_b190_0), 0, 45456 }, /* EOR.L Dn,(An) */ +{ CPUFUNC(op_b198_0), 0, 45464 }, /* EOR.L Dn,(An)+ */ +{ CPUFUNC(op_b1a0_0), 0, 45472 }, /* EOR.L Dn,-(An) */ +{ CPUFUNC(op_b1a8_0), 0, 45480 }, /* EOR.L Dn,(d16,An) */ +{ CPUFUNC(op_b1b0_3), 0, 45488 }, /* EOR.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b1b8_0), 0, 45496 }, /* EOR.L Dn,(xxx).W */ +{ CPUFUNC(op_b1b9_0), 0, 45497 }, /* EOR.L Dn,(xxx).L */ +{ CPUFUNC(op_b1c0_0), 0, 45504 }, /* CMPA.L Dn,An */ +{ CPUFUNC(op_b1c8_0), 0, 45512 }, /* CMPA.L An,An */ +{ CPUFUNC(op_b1d0_0), 0, 45520 }, /* CMPA.L (An),An */ +{ CPUFUNC(op_b1d8_0), 0, 45528 }, /* CMPA.L (An)+,An */ +{ CPUFUNC(op_b1e0_0), 0, 45536 }, /* CMPA.L -(An),An */ +{ CPUFUNC(op_b1e8_0), 0, 45544 }, /* CMPA.L (d16,An),An */ +{ CPUFUNC(op_b1f0_3), 0, 45552 }, /* CMPA.L (d8,An,Xn),An */ +{ CPUFUNC(op_b1f8_0), 0, 45560 }, /* CMPA.L (xxx).W,An */ +{ CPUFUNC(op_b1f9_0), 0, 45561 }, /* CMPA.L (xxx).L,An */ +{ CPUFUNC(op_b1fa_0), 0, 45562 }, /* CMPA.L (d16,PC),An */ +{ CPUFUNC(op_b1fb_3), 0, 45563 }, /* CMPA.L (d8,PC,Xn),An */ +{ CPUFUNC(op_b1fc_0), 0, 45564 }, /* CMPA.L #.L,An */ +{ CPUFUNC(op_c000_0), 0, 49152 }, /* AND.B Dn,Dn */ +{ CPUFUNC(op_c010_0), 0, 49168 }, /* AND.B (An),Dn */ +{ CPUFUNC(op_c018_0), 0, 49176 }, /* AND.B (An)+,Dn */ +{ CPUFUNC(op_c020_0), 0, 49184 }, /* AND.B -(An),Dn */ +{ CPUFUNC(op_c028_0), 0, 49192 }, /* AND.B (d16,An),Dn */ +{ CPUFUNC(op_c030_3), 0, 49200 }, /* AND.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_c038_0), 0, 49208 }, /* AND.B (xxx).W,Dn */ +{ CPUFUNC(op_c039_0), 0, 49209 }, /* AND.B (xxx).L,Dn */ +{ CPUFUNC(op_c03a_0), 0, 49210 }, /* AND.B (d16,PC),Dn */ +{ CPUFUNC(op_c03b_3), 0, 49211 }, /* AND.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c03c_0), 0, 49212 }, /* AND.B #.B,Dn */ +{ CPUFUNC(op_c040_0), 0, 49216 }, /* AND.W Dn,Dn */ +{ CPUFUNC(op_c050_0), 0, 49232 }, /* AND.W (An),Dn */ +{ CPUFUNC(op_c058_0), 0, 49240 }, /* AND.W (An)+,Dn */ +{ CPUFUNC(op_c060_0), 0, 49248 }, /* AND.W -(An),Dn */ +{ CPUFUNC(op_c068_0), 0, 49256 }, /* AND.W (d16,An),Dn */ +{ CPUFUNC(op_c070_3), 0, 49264 }, /* AND.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c078_0), 0, 49272 }, /* AND.W (xxx).W,Dn */ +{ CPUFUNC(op_c079_0), 0, 49273 }, /* AND.W (xxx).L,Dn */ +{ CPUFUNC(op_c07a_0), 0, 49274 }, /* AND.W (d16,PC),Dn */ +{ CPUFUNC(op_c07b_3), 0, 49275 }, /* AND.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c07c_0), 0, 49276 }, /* AND.W #.W,Dn */ +{ CPUFUNC(op_c080_0), 0, 49280 }, /* AND.L Dn,Dn */ +{ CPUFUNC(op_c090_0), 0, 49296 }, /* AND.L (An),Dn */ +{ CPUFUNC(op_c098_0), 0, 49304 }, /* AND.L (An)+,Dn */ +{ CPUFUNC(op_c0a0_0), 0, 49312 }, /* AND.L -(An),Dn */ +{ CPUFUNC(op_c0a8_0), 0, 49320 }, /* AND.L (d16,An),Dn */ +{ CPUFUNC(op_c0b0_3), 0, 49328 }, /* AND.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_c0b8_0), 0, 49336 }, /* AND.L (xxx).W,Dn */ +{ CPUFUNC(op_c0b9_0), 0, 49337 }, /* AND.L (xxx).L,Dn */ +{ CPUFUNC(op_c0ba_0), 0, 49338 }, /* AND.L (d16,PC),Dn */ +{ CPUFUNC(op_c0bb_3), 0, 49339 }, /* AND.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c0bc_0), 0, 49340 }, /* AND.L #.L,Dn */ +{ CPUFUNC(op_c0c0_0), 0, 49344 }, /* MULU.W Dn,Dn */ +{ CPUFUNC(op_c0d0_0), 0, 49360 }, /* MULU.W (An),Dn */ +{ CPUFUNC(op_c0d8_0), 0, 49368 }, /* MULU.W (An)+,Dn */ +{ CPUFUNC(op_c0e0_0), 0, 49376 }, /* MULU.W -(An),Dn */ +{ CPUFUNC(op_c0e8_0), 0, 49384 }, /* MULU.W (d16,An),Dn */ +{ CPUFUNC(op_c0f0_3), 0, 49392 }, /* MULU.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c0f8_0), 0, 49400 }, /* MULU.W (xxx).W,Dn */ +{ CPUFUNC(op_c0f9_0), 0, 49401 }, /* MULU.W (xxx).L,Dn */ +{ CPUFUNC(op_c0fa_0), 0, 49402 }, /* MULU.W (d16,PC),Dn */ +{ CPUFUNC(op_c0fb_3), 0, 49403 }, /* MULU.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c0fc_0), 0, 49404 }, /* MULU.W #.W,Dn */ +{ CPUFUNC(op_c100_1), 0, 49408 }, /* ABCD.B Dn,Dn */ +{ CPUFUNC(op_c108_1), 0, 49416 }, /* ABCD.B -(An),-(An) */ +{ CPUFUNC(op_c110_0), 0, 49424 }, /* AND.B Dn,(An) */ +{ CPUFUNC(op_c118_0), 0, 49432 }, /* AND.B Dn,(An)+ */ +{ CPUFUNC(op_c120_0), 0, 49440 }, /* AND.B Dn,-(An) */ +{ CPUFUNC(op_c128_0), 0, 49448 }, /* AND.B Dn,(d16,An) */ +{ CPUFUNC(op_c130_3), 0, 49456 }, /* AND.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c138_0), 0, 49464 }, /* AND.B Dn,(xxx).W */ +{ CPUFUNC(op_c139_0), 0, 49465 }, /* AND.B Dn,(xxx).L */ +{ CPUFUNC_FF(op_c140_0), 0, 49472 }, /* EXG.L Dn,Dn */ +{ CPUFUNC_FF(op_c148_0), 0, 49480 }, /* EXG.L An,An */ +{ CPUFUNC(op_c150_0), 0, 49488 }, /* AND.W Dn,(An) */ +{ CPUFUNC(op_c158_0), 0, 49496 }, /* AND.W Dn,(An)+ */ +{ CPUFUNC(op_c160_0), 0, 49504 }, /* AND.W Dn,-(An) */ +{ CPUFUNC(op_c168_0), 0, 49512 }, /* AND.W Dn,(d16,An) */ +{ CPUFUNC(op_c170_3), 0, 49520 }, /* AND.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c178_0), 0, 49528 }, /* AND.W Dn,(xxx).W */ +{ CPUFUNC(op_c179_0), 0, 49529 }, /* AND.W Dn,(xxx).L */ +{ CPUFUNC_FF(op_c188_0), 0, 49544 }, /* EXG.L Dn,An */ +{ CPUFUNC(op_c190_0), 0, 49552 }, /* AND.L Dn,(An) */ +{ CPUFUNC(op_c198_0), 0, 49560 }, /* AND.L Dn,(An)+ */ +{ CPUFUNC(op_c1a0_0), 0, 49568 }, /* AND.L Dn,-(An) */ +{ CPUFUNC(op_c1a8_0), 0, 49576 }, /* AND.L Dn,(d16,An) */ +{ CPUFUNC(op_c1b0_3), 0, 49584 }, /* AND.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c1b8_0), 0, 49592 }, /* AND.L Dn,(xxx).W */ +{ CPUFUNC(op_c1b9_0), 0, 49593 }, /* AND.L Dn,(xxx).L */ +{ CPUFUNC(op_c1c0_0), 0, 49600 }, /* MULS.W Dn,Dn */ +{ CPUFUNC(op_c1d0_0), 0, 49616 }, /* MULS.W (An),Dn */ +{ CPUFUNC(op_c1d8_0), 0, 49624 }, /* MULS.W (An)+,Dn */ +{ CPUFUNC(op_c1e0_0), 0, 49632 }, /* MULS.W -(An),Dn */ +{ CPUFUNC(op_c1e8_0), 0, 49640 }, /* MULS.W (d16,An),Dn */ +{ CPUFUNC(op_c1f0_3), 0, 49648 }, /* MULS.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c1f8_0), 0, 49656 }, /* MULS.W (xxx).W,Dn */ +{ CPUFUNC(op_c1f9_0), 0, 49657 }, /* MULS.W (xxx).L,Dn */ +{ CPUFUNC(op_c1fa_0), 0, 49658 }, /* MULS.W (d16,PC),Dn */ +{ CPUFUNC(op_c1fb_3), 0, 49659 }, /* MULS.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c1fc_0), 0, 49660 }, /* MULS.W #.W,Dn */ +{ CPUFUNC(op_d000_0), 0, 53248 }, /* ADD.B Dn,Dn */ +{ CPUFUNC(op_d010_0), 0, 53264 }, /* ADD.B (An),Dn */ +{ CPUFUNC(op_d018_0), 0, 53272 }, /* ADD.B (An)+,Dn */ +{ CPUFUNC(op_d020_0), 0, 53280 }, /* ADD.B -(An),Dn */ +{ CPUFUNC(op_d028_0), 0, 53288 }, /* ADD.B (d16,An),Dn */ +{ CPUFUNC(op_d030_3), 0, 53296 }, /* ADD.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_d038_0), 0, 53304 }, /* ADD.B (xxx).W,Dn */ +{ CPUFUNC(op_d039_0), 0, 53305 }, /* ADD.B (xxx).L,Dn */ +{ CPUFUNC(op_d03a_0), 0, 53306 }, /* ADD.B (d16,PC),Dn */ +{ CPUFUNC(op_d03b_3), 0, 53307 }, /* ADD.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d03c_0), 0, 53308 }, /* ADD.B #.B,Dn */ +{ CPUFUNC(op_d040_0), 0, 53312 }, /* ADD.W Dn,Dn */ +{ CPUFUNC(op_d048_0), 0, 53320 }, /* ADD.W An,Dn */ +{ CPUFUNC(op_d050_0), 0, 53328 }, /* ADD.W (An),Dn */ +{ CPUFUNC(op_d058_0), 0, 53336 }, /* ADD.W (An)+,Dn */ +{ CPUFUNC(op_d060_0), 0, 53344 }, /* ADD.W -(An),Dn */ +{ CPUFUNC(op_d068_0), 0, 53352 }, /* ADD.W (d16,An),Dn */ +{ CPUFUNC(op_d070_3), 0, 53360 }, /* ADD.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_d078_0), 0, 53368 }, /* ADD.W (xxx).W,Dn */ +{ CPUFUNC(op_d079_0), 0, 53369 }, /* ADD.W (xxx).L,Dn */ +{ CPUFUNC(op_d07a_0), 0, 53370 }, /* ADD.W (d16,PC),Dn */ +{ CPUFUNC(op_d07b_3), 0, 53371 }, /* ADD.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d07c_0), 0, 53372 }, /* ADD.W #.W,Dn */ +{ CPUFUNC(op_d080_0), 0, 53376 }, /* ADD.L Dn,Dn */ +{ CPUFUNC(op_d088_0), 0, 53384 }, /* ADD.L An,Dn */ +{ CPUFUNC(op_d090_0), 0, 53392 }, /* ADD.L (An),Dn */ +{ CPUFUNC(op_d098_0), 0, 53400 }, /* ADD.L (An)+,Dn */ +{ CPUFUNC(op_d0a0_0), 0, 53408 }, /* ADD.L -(An),Dn */ +{ CPUFUNC(op_d0a8_0), 0, 53416 }, /* ADD.L (d16,An),Dn */ +{ CPUFUNC(op_d0b0_3), 0, 53424 }, /* ADD.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_d0b8_0), 0, 53432 }, /* ADD.L (xxx).W,Dn */ +{ CPUFUNC(op_d0b9_0), 0, 53433 }, /* ADD.L (xxx).L,Dn */ +{ CPUFUNC(op_d0ba_0), 0, 53434 }, /* ADD.L (d16,PC),Dn */ +{ CPUFUNC(op_d0bb_3), 0, 53435 }, /* ADD.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d0bc_0), 0, 53436 }, /* ADD.L #.L,Dn */ +{ CPUFUNC_FF(op_d0c0_0), 0, 53440 }, /* ADDA.W Dn,An */ +{ CPUFUNC_FF(op_d0c8_0), 0, 53448 }, /* ADDA.W An,An */ +{ CPUFUNC_FF(op_d0d0_0), 0, 53456 }, /* ADDA.W (An),An */ +{ CPUFUNC_FF(op_d0d8_0), 0, 53464 }, /* ADDA.W (An)+,An */ +{ CPUFUNC_FF(op_d0e0_0), 0, 53472 }, /* ADDA.W -(An),An */ +{ CPUFUNC_FF(op_d0e8_0), 0, 53480 }, /* ADDA.W (d16,An),An */ +{ CPUFUNC_FF(op_d0f0_3), 0, 53488 }, /* ADDA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_d0f8_0), 0, 53496 }, /* ADDA.W (xxx).W,An */ +{ CPUFUNC_FF(op_d0f9_0), 0, 53497 }, /* ADDA.W (xxx).L,An */ +{ CPUFUNC_FF(op_d0fa_0), 0, 53498 }, /* ADDA.W (d16,PC),An */ +{ CPUFUNC_FF(op_d0fb_3), 0, 53499 }, /* ADDA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_d0fc_0), 0, 53500 }, /* ADDA.W #.W,An */ +{ CPUFUNC(op_d100_0), 0, 53504 }, /* ADDX.B Dn,Dn */ +{ CPUFUNC(op_d108_0), 0, 53512 }, /* ADDX.B -(An),-(An) */ +{ CPUFUNC(op_d110_0), 0, 53520 }, /* ADD.B Dn,(An) */ +{ CPUFUNC(op_d118_0), 0, 53528 }, /* ADD.B Dn,(An)+ */ +{ CPUFUNC(op_d120_0), 0, 53536 }, /* ADD.B Dn,-(An) */ +{ CPUFUNC(op_d128_0), 0, 53544 }, /* ADD.B Dn,(d16,An) */ +{ CPUFUNC(op_d130_3), 0, 53552 }, /* ADD.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d138_0), 0, 53560 }, /* ADD.B Dn,(xxx).W */ +{ CPUFUNC(op_d139_0), 0, 53561 }, /* ADD.B Dn,(xxx).L */ +{ CPUFUNC(op_d140_0), 0, 53568 }, /* ADDX.W Dn,Dn */ +{ CPUFUNC(op_d148_0), 0, 53576 }, /* ADDX.W -(An),-(An) */ +{ CPUFUNC(op_d150_0), 0, 53584 }, /* ADD.W Dn,(An) */ +{ CPUFUNC(op_d158_0), 0, 53592 }, /* ADD.W Dn,(An)+ */ +{ CPUFUNC(op_d160_0), 0, 53600 }, /* ADD.W Dn,-(An) */ +{ CPUFUNC(op_d168_0), 0, 53608 }, /* ADD.W Dn,(d16,An) */ +{ CPUFUNC(op_d170_3), 0, 53616 }, /* ADD.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d178_0), 0, 53624 }, /* ADD.W Dn,(xxx).W */ +{ CPUFUNC(op_d179_0), 0, 53625 }, /* ADD.W Dn,(xxx).L */ +{ CPUFUNC(op_d180_0), 0, 53632 }, /* ADDX.L Dn,Dn */ +{ CPUFUNC(op_d188_0), 0, 53640 }, /* ADDX.L -(An),-(An) */ +{ CPUFUNC(op_d190_0), 0, 53648 }, /* ADD.L Dn,(An) */ +{ CPUFUNC(op_d198_0), 0, 53656 }, /* ADD.L Dn,(An)+ */ +{ CPUFUNC(op_d1a0_0), 0, 53664 }, /* ADD.L Dn,-(An) */ +{ CPUFUNC(op_d1a8_0), 0, 53672 }, /* ADD.L Dn,(d16,An) */ +{ CPUFUNC(op_d1b0_3), 0, 53680 }, /* ADD.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d1b8_0), 0, 53688 }, /* ADD.L Dn,(xxx).W */ +{ CPUFUNC(op_d1b9_0), 0, 53689 }, /* ADD.L Dn,(xxx).L */ +{ CPUFUNC_FF(op_d1c0_0), 0, 53696 }, /* ADDA.L Dn,An */ +{ CPUFUNC_FF(op_d1c8_0), 0, 53704 }, /* ADDA.L An,An */ +{ CPUFUNC_FF(op_d1d0_0), 0, 53712 }, /* ADDA.L (An),An */ +{ CPUFUNC_FF(op_d1d8_0), 0, 53720 }, /* ADDA.L (An)+,An */ +{ CPUFUNC_FF(op_d1e0_0), 0, 53728 }, /* ADDA.L -(An),An */ +{ CPUFUNC_FF(op_d1e8_0), 0, 53736 }, /* ADDA.L (d16,An),An */ +{ CPUFUNC_FF(op_d1f0_3), 0, 53744 }, /* ADDA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_d1f8_0), 0, 53752 }, /* ADDA.L (xxx).W,An */ +{ CPUFUNC_FF(op_d1f9_0), 0, 53753 }, /* ADDA.L (xxx).L,An */ +{ CPUFUNC_FF(op_d1fa_0), 0, 53754 }, /* ADDA.L (d16,PC),An */ +{ CPUFUNC_FF(op_d1fb_3), 0, 53755 }, /* ADDA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_d1fc_0), 0, 53756 }, /* ADDA.L #.L,An */ +{ CPUFUNC(op_e000_0), 0, 57344 }, /* ASR.B #,Dn */ +{ CPUFUNC(op_e008_0), 0, 57352 }, /* LSR.B #,Dn */ +{ CPUFUNC(op_e010_0), 0, 57360 }, /* ROXR.B #,Dn */ +{ CPUFUNC(op_e018_0), 0, 57368 }, /* ROR.B #,Dn */ +{ CPUFUNC(op_e020_0), 0, 57376 }, /* ASR.B Dn,Dn */ +{ CPUFUNC(op_e028_0), 0, 57384 }, /* LSR.B Dn,Dn */ +{ CPUFUNC(op_e030_0), 0, 57392 }, /* ROXR.B Dn,Dn */ +{ CPUFUNC(op_e038_0), 0, 57400 }, /* ROR.B Dn,Dn */ +{ CPUFUNC(op_e040_0), 0, 57408 }, /* ASR.W #,Dn */ +{ CPUFUNC(op_e048_0), 0, 57416 }, /* LSR.W #,Dn */ +{ CPUFUNC(op_e050_0), 0, 57424 }, /* ROXR.W #,Dn */ +{ CPUFUNC(op_e058_0), 0, 57432 }, /* ROR.W #,Dn */ +{ CPUFUNC(op_e060_0), 0, 57440 }, /* ASR.W Dn,Dn */ +{ CPUFUNC(op_e068_0), 0, 57448 }, /* LSR.W Dn,Dn */ +{ CPUFUNC(op_e070_0), 0, 57456 }, /* ROXR.W Dn,Dn */ +{ CPUFUNC(op_e078_0), 0, 57464 }, /* ROR.W Dn,Dn */ +{ CPUFUNC(op_e080_0), 0, 57472 }, /* ASR.L #,Dn */ +{ CPUFUNC(op_e088_0), 0, 57480 }, /* LSR.L #,Dn */ +{ CPUFUNC(op_e090_0), 0, 57488 }, /* ROXR.L #,Dn */ +{ CPUFUNC(op_e098_0), 0, 57496 }, /* ROR.L #,Dn */ +{ CPUFUNC(op_e0a0_0), 0, 57504 }, /* ASR.L Dn,Dn */ +{ CPUFUNC(op_e0a8_0), 0, 57512 }, /* LSR.L Dn,Dn */ +{ CPUFUNC(op_e0b0_0), 0, 57520 }, /* ROXR.L Dn,Dn */ +{ CPUFUNC(op_e0b8_0), 0, 57528 }, /* ROR.L Dn,Dn */ +{ CPUFUNC(op_e0d0_0), 0, 57552 }, /* ASRW.W (An) */ +{ CPUFUNC(op_e0d8_0), 0, 57560 }, /* ASRW.W (An)+ */ +{ CPUFUNC(op_e0e0_0), 0, 57568 }, /* ASRW.W -(An) */ +{ CPUFUNC(op_e0e8_0), 0, 57576 }, /* ASRW.W (d16,An) */ +{ CPUFUNC(op_e0f0_3), 0, 57584 }, /* ASRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e0f8_0), 0, 57592 }, /* ASRW.W (xxx).W */ +{ CPUFUNC(op_e0f9_0), 0, 57593 }, /* ASRW.W (xxx).L */ +{ CPUFUNC(op_e100_0), 0, 57600 }, /* ASL.B #,Dn */ +{ CPUFUNC(op_e108_0), 0, 57608 }, /* LSL.B #,Dn */ +{ CPUFUNC(op_e110_0), 0, 57616 }, /* ROXL.B #,Dn */ +{ CPUFUNC(op_e118_0), 0, 57624 }, /* ROL.B #,Dn */ +{ CPUFUNC(op_e120_0), 0, 57632 }, /* ASL.B Dn,Dn */ +{ CPUFUNC(op_e128_0), 0, 57640 }, /* LSL.B Dn,Dn */ +{ CPUFUNC(op_e130_0), 0, 57648 }, /* ROXL.B Dn,Dn */ +{ CPUFUNC(op_e138_0), 0, 57656 }, /* ROL.B Dn,Dn */ +{ CPUFUNC(op_e140_0), 0, 57664 }, /* ASL.W #,Dn */ +{ CPUFUNC(op_e148_0), 0, 57672 }, /* LSL.W #,Dn */ +{ CPUFUNC(op_e150_0), 0, 57680 }, /* ROXL.W #,Dn */ +{ CPUFUNC(op_e158_0), 0, 57688 }, /* ROL.W #,Dn */ +{ CPUFUNC(op_e160_0), 0, 57696 }, /* ASL.W Dn,Dn */ +{ CPUFUNC(op_e168_0), 0, 57704 }, /* LSL.W Dn,Dn */ +{ CPUFUNC(op_e170_0), 0, 57712 }, /* ROXL.W Dn,Dn */ +{ CPUFUNC(op_e178_0), 0, 57720 }, /* ROL.W Dn,Dn */ +{ CPUFUNC(op_e180_0), 0, 57728 }, /* ASL.L #,Dn */ +{ CPUFUNC(op_e188_0), 0, 57736 }, /* LSL.L #,Dn */ +{ CPUFUNC(op_e190_0), 0, 57744 }, /* ROXL.L #,Dn */ +{ CPUFUNC(op_e198_0), 0, 57752 }, /* ROL.L #,Dn */ +{ CPUFUNC(op_e1a0_0), 0, 57760 }, /* ASL.L Dn,Dn */ +{ CPUFUNC(op_e1a8_0), 0, 57768 }, /* LSL.L Dn,Dn */ +{ CPUFUNC(op_e1b0_0), 0, 57776 }, /* ROXL.L Dn,Dn */ +{ CPUFUNC(op_e1b8_0), 0, 57784 }, /* ROL.L Dn,Dn */ +{ CPUFUNC(op_e1d0_0), 0, 57808 }, /* ASLW.W (An) */ +{ CPUFUNC(op_e1d8_0), 0, 57816 }, /* ASLW.W (An)+ */ +{ CPUFUNC(op_e1e0_0), 0, 57824 }, /* ASLW.W -(An) */ +{ CPUFUNC(op_e1e8_0), 0, 57832 }, /* ASLW.W (d16,An) */ +{ CPUFUNC(op_e1f0_3), 0, 57840 }, /* ASLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e1f8_0), 0, 57848 }, /* ASLW.W (xxx).W */ +{ CPUFUNC(op_e1f9_0), 0, 57849 }, /* ASLW.W (xxx).L */ +{ CPUFUNC(op_e2d0_0), 0, 58064 }, /* LSRW.W (An) */ +{ CPUFUNC(op_e2d8_0), 0, 58072 }, /* LSRW.W (An)+ */ +{ CPUFUNC(op_e2e0_0), 0, 58080 }, /* LSRW.W -(An) */ +{ CPUFUNC(op_e2e8_0), 0, 58088 }, /* LSRW.W (d16,An) */ +{ CPUFUNC(op_e2f0_3), 0, 58096 }, /* LSRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e2f8_0), 0, 58104 }, /* LSRW.W (xxx).W */ +{ CPUFUNC(op_e2f9_0), 0, 58105 }, /* LSRW.W (xxx).L */ +{ CPUFUNC(op_e3d0_0), 0, 58320 }, /* LSLW.W (An) */ +{ CPUFUNC(op_e3d8_0), 0, 58328 }, /* LSLW.W (An)+ */ +{ CPUFUNC(op_e3e0_0), 0, 58336 }, /* LSLW.W -(An) */ +{ CPUFUNC(op_e3e8_0), 0, 58344 }, /* LSLW.W (d16,An) */ +{ CPUFUNC(op_e3f0_3), 0, 58352 }, /* LSLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e3f8_0), 0, 58360 }, /* LSLW.W (xxx).W */ +{ CPUFUNC(op_e3f9_0), 0, 58361 }, /* LSLW.W (xxx).L */ +{ CPUFUNC(op_e4d0_0), 0, 58576 }, /* ROXRW.W (An) */ +{ CPUFUNC(op_e4d8_0), 0, 58584 }, /* ROXRW.W (An)+ */ +{ CPUFUNC(op_e4e0_0), 0, 58592 }, /* ROXRW.W -(An) */ +{ CPUFUNC(op_e4e8_0), 0, 58600 }, /* ROXRW.W (d16,An) */ +{ CPUFUNC(op_e4f0_3), 0, 58608 }, /* ROXRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e4f8_0), 0, 58616 }, /* ROXRW.W (xxx).W */ +{ CPUFUNC(op_e4f9_0), 0, 58617 }, /* ROXRW.W (xxx).L */ +{ CPUFUNC(op_e5d0_0), 0, 58832 }, /* ROXLW.W (An) */ +{ CPUFUNC(op_e5d8_0), 0, 58840 }, /* ROXLW.W (An)+ */ +{ CPUFUNC(op_e5e0_0), 0, 58848 }, /* ROXLW.W -(An) */ +{ CPUFUNC(op_e5e8_0), 0, 58856 }, /* ROXLW.W (d16,An) */ +{ CPUFUNC(op_e5f0_3), 0, 58864 }, /* ROXLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e5f8_0), 0, 58872 }, /* ROXLW.W (xxx).W */ +{ CPUFUNC(op_e5f9_0), 0, 58873 }, /* ROXLW.W (xxx).L */ +{ CPUFUNC(op_e6d0_0), 0, 59088 }, /* RORW.W (An) */ +{ CPUFUNC(op_e6d8_0), 0, 59096 }, /* RORW.W (An)+ */ +{ CPUFUNC(op_e6e0_0), 0, 59104 }, /* RORW.W -(An) */ +{ CPUFUNC(op_e6e8_0), 0, 59112 }, /* RORW.W (d16,An) */ +{ CPUFUNC(op_e6f0_3), 0, 59120 }, /* RORW.W (d8,An,Xn) */ +{ CPUFUNC(op_e6f8_0), 0, 59128 }, /* RORW.W (xxx).W */ +{ CPUFUNC(op_e6f9_0), 0, 59129 }, /* RORW.W (xxx).L */ +{ CPUFUNC(op_e7d0_0), 0, 59344 }, /* ROLW.W (An) */ +{ CPUFUNC(op_e7d8_0), 0, 59352 }, /* ROLW.W (An)+ */ +{ CPUFUNC(op_e7e0_0), 0, 59360 }, /* ROLW.W -(An) */ +{ CPUFUNC(op_e7e8_0), 0, 59368 }, /* ROLW.W (d16,An) */ +{ CPUFUNC(op_e7f0_3), 0, 59376 }, /* ROLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e7f8_0), 0, 59384 }, /* ROLW.W (xxx).W */ +{ CPUFUNC(op_e7f9_0), 0, 59385 }, /* ROLW.W (xxx).L */ +{ 0, 0, 0 }}; +struct cputbl CPUFUNC(op_smalltbl_4)[] = { +{ CPUFUNC(op_0_0), 0, 0 }, /* OR.B #.B,Dn */ +{ CPUFUNC(op_10_0), 0, 16 }, /* OR.B #.B,(An) */ +{ CPUFUNC(op_18_0), 0, 24 }, /* OR.B #.B,(An)+ */ +{ CPUFUNC(op_20_0), 0, 32 }, /* OR.B #.B,-(An) */ +{ CPUFUNC(op_28_0), 0, 40 }, /* OR.B #.B,(d16,An) */ +{ CPUFUNC(op_30_3), 0, 48 }, /* OR.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_38_0), 0, 56 }, /* OR.B #.B,(xxx).W */ +{ CPUFUNC(op_39_0), 0, 57 }, /* OR.B #.B,(xxx).L */ +{ CPUFUNC(op_3c_0), 0, 60 }, /* ORSR.B #.W */ +{ CPUFUNC(op_40_0), 0, 64 }, /* OR.W #.W,Dn */ +{ CPUFUNC(op_50_0), 0, 80 }, /* OR.W #.W,(An) */ +{ CPUFUNC(op_58_0), 0, 88 }, /* OR.W #.W,(An)+ */ +{ CPUFUNC(op_60_0), 0, 96 }, /* OR.W #.W,-(An) */ +{ CPUFUNC(op_68_0), 0, 104 }, /* OR.W #.W,(d16,An) */ +{ CPUFUNC(op_70_3), 0, 112 }, /* OR.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_78_0), 0, 120 }, /* OR.W #.W,(xxx).W */ +{ CPUFUNC(op_79_0), 0, 121 }, /* OR.W #.W,(xxx).L */ +{ CPUFUNC(op_7c_0), 0, 124 }, /* ORSR.W #.W */ +{ CPUFUNC(op_80_0), 0, 128 }, /* OR.L #.L,Dn */ +{ CPUFUNC(op_90_0), 0, 144 }, /* OR.L #.L,(An) */ +{ CPUFUNC(op_98_0), 0, 152 }, /* OR.L #.L,(An)+ */ +{ CPUFUNC(op_a0_0), 0, 160 }, /* OR.L #.L,-(An) */ +{ CPUFUNC(op_a8_0), 0, 168 }, /* OR.L #.L,(d16,An) */ +{ CPUFUNC(op_b0_3), 0, 176 }, /* OR.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_b8_0), 0, 184 }, /* OR.L #.L,(xxx).W */ +{ CPUFUNC(op_b9_0), 0, 185 }, /* OR.L #.L,(xxx).L */ +{ CPUFUNC(op_100_0), 0, 256 }, /* BTST.L Dn,Dn */ +{ CPUFUNC_FF(op_108_0), 0, 264 }, /* MVPMR.W (d16,An),Dn */ +{ CPUFUNC(op_110_0), 0, 272 }, /* BTST.B Dn,(An) */ +{ CPUFUNC(op_118_0), 0, 280 }, /* BTST.B Dn,(An)+ */ +{ CPUFUNC(op_120_0), 0, 288 }, /* BTST.B Dn,-(An) */ +{ CPUFUNC(op_128_0), 0, 296 }, /* BTST.B Dn,(d16,An) */ +{ CPUFUNC(op_130_3), 0, 304 }, /* BTST.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_138_0), 0, 312 }, /* BTST.B Dn,(xxx).W */ +{ CPUFUNC(op_139_0), 0, 313 }, /* BTST.B Dn,(xxx).L */ +{ CPUFUNC(op_13a_0), 0, 314 }, /* BTST.B Dn,(d16,PC) */ +{ CPUFUNC(op_13b_3), 0, 315 }, /* BTST.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_13c_0), 0, 316 }, /* BTST.B Dn,#.B */ +{ CPUFUNC(op_140_0), 0, 320 }, /* BCHG.L Dn,Dn */ +{ CPUFUNC_FF(op_148_0), 0, 328 }, /* MVPMR.L (d16,An),Dn */ +{ CPUFUNC(op_150_0), 0, 336 }, /* BCHG.B Dn,(An) */ +{ CPUFUNC(op_158_0), 0, 344 }, /* BCHG.B Dn,(An)+ */ +{ CPUFUNC(op_160_0), 0, 352 }, /* BCHG.B Dn,-(An) */ +{ CPUFUNC(op_168_0), 0, 360 }, /* BCHG.B Dn,(d16,An) */ +{ CPUFUNC(op_170_3), 0, 368 }, /* BCHG.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_178_0), 0, 376 }, /* BCHG.B Dn,(xxx).W */ +{ CPUFUNC(op_179_0), 0, 377 }, /* BCHG.B Dn,(xxx).L */ +{ CPUFUNC(op_17a_0), 0, 378 }, /* BCHG.B Dn,(d16,PC) */ +{ CPUFUNC(op_17b_3), 0, 379 }, /* BCHG.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_180_0), 0, 384 }, /* BCLR.L Dn,Dn */ +{ CPUFUNC_FF(op_188_0), 0, 392 }, /* MVPRM.W Dn,(d16,An) */ +{ CPUFUNC(op_190_0), 0, 400 }, /* BCLR.B Dn,(An) */ +{ CPUFUNC(op_198_0), 0, 408 }, /* BCLR.B Dn,(An)+ */ +{ CPUFUNC(op_1a0_0), 0, 416 }, /* BCLR.B Dn,-(An) */ +{ CPUFUNC(op_1a8_0), 0, 424 }, /* BCLR.B Dn,(d16,An) */ +{ CPUFUNC(op_1b0_3), 0, 432 }, /* BCLR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1b8_0), 0, 440 }, /* BCLR.B Dn,(xxx).W */ +{ CPUFUNC(op_1b9_0), 0, 441 }, /* BCLR.B Dn,(xxx).L */ +{ CPUFUNC(op_1ba_0), 0, 442 }, /* BCLR.B Dn,(d16,PC) */ +{ CPUFUNC(op_1bb_3), 0, 443 }, /* BCLR.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_1c0_0), 0, 448 }, /* BSET.L Dn,Dn */ +{ CPUFUNC_FF(op_1c8_0), 0, 456 }, /* MVPRM.L Dn,(d16,An) */ +{ CPUFUNC(op_1d0_0), 0, 464 }, /* BSET.B Dn,(An) */ +{ CPUFUNC(op_1d8_0), 0, 472 }, /* BSET.B Dn,(An)+ */ +{ CPUFUNC(op_1e0_0), 0, 480 }, /* BSET.B Dn,-(An) */ +{ CPUFUNC(op_1e8_0), 0, 488 }, /* BSET.B Dn,(d16,An) */ +{ CPUFUNC(op_1f0_3), 0, 496 }, /* BSET.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1f8_0), 0, 504 }, /* BSET.B Dn,(xxx).W */ +{ CPUFUNC(op_1f9_0), 0, 505 }, /* BSET.B Dn,(xxx).L */ +{ CPUFUNC(op_1fa_0), 0, 506 }, /* BSET.B Dn,(d16,PC) */ +{ CPUFUNC(op_1fb_3), 0, 507 }, /* BSET.B Dn,(d8,PC,Xn) */ +{ CPUFUNC(op_200_0), 0, 512 }, /* AND.B #.B,Dn */ +{ CPUFUNC(op_210_0), 0, 528 }, /* AND.B #.B,(An) */ +{ CPUFUNC(op_218_0), 0, 536 }, /* AND.B #.B,(An)+ */ +{ CPUFUNC(op_220_0), 0, 544 }, /* AND.B #.B,-(An) */ +{ CPUFUNC(op_228_0), 0, 552 }, /* AND.B #.B,(d16,An) */ +{ CPUFUNC(op_230_3), 0, 560 }, /* AND.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_238_0), 0, 568 }, /* AND.B #.B,(xxx).W */ +{ CPUFUNC(op_239_0), 0, 569 }, /* AND.B #.B,(xxx).L */ +{ CPUFUNC(op_23c_0), 0, 572 }, /* ANDSR.B #.W */ +{ CPUFUNC(op_240_0), 0, 576 }, /* AND.W #.W,Dn */ +{ CPUFUNC(op_250_0), 0, 592 }, /* AND.W #.W,(An) */ +{ CPUFUNC(op_258_0), 0, 600 }, /* AND.W #.W,(An)+ */ +{ CPUFUNC(op_260_0), 0, 608 }, /* AND.W #.W,-(An) */ +{ CPUFUNC(op_268_0), 0, 616 }, /* AND.W #.W,(d16,An) */ +{ CPUFUNC(op_270_3), 0, 624 }, /* AND.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_278_0), 0, 632 }, /* AND.W #.W,(xxx).W */ +{ CPUFUNC(op_279_0), 0, 633 }, /* AND.W #.W,(xxx).L */ +{ CPUFUNC(op_27c_0), 0, 636 }, /* ANDSR.W #.W */ +{ CPUFUNC(op_280_0), 0, 640 }, /* AND.L #.L,Dn */ +{ CPUFUNC(op_290_0), 0, 656 }, /* AND.L #.L,(An) */ +{ CPUFUNC(op_298_0), 0, 664 }, /* AND.L #.L,(An)+ */ +{ CPUFUNC(op_2a0_0), 0, 672 }, /* AND.L #.L,-(An) */ +{ CPUFUNC(op_2a8_0), 0, 680 }, /* AND.L #.L,(d16,An) */ +{ CPUFUNC(op_2b0_3), 0, 688 }, /* AND.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_2b8_0), 0, 696 }, /* AND.L #.L,(xxx).W */ +{ CPUFUNC(op_2b9_0), 0, 697 }, /* AND.L #.L,(xxx).L */ +{ CPUFUNC(op_400_0), 0, 1024 }, /* SUB.B #.B,Dn */ +{ CPUFUNC(op_410_0), 0, 1040 }, /* SUB.B #.B,(An) */ +{ CPUFUNC(op_418_0), 0, 1048 }, /* SUB.B #.B,(An)+ */ +{ CPUFUNC(op_420_0), 0, 1056 }, /* SUB.B #.B,-(An) */ +{ CPUFUNC(op_428_0), 0, 1064 }, /* SUB.B #.B,(d16,An) */ +{ CPUFUNC(op_430_3), 0, 1072 }, /* SUB.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_438_0), 0, 1080 }, /* SUB.B #.B,(xxx).W */ +{ CPUFUNC(op_439_0), 0, 1081 }, /* SUB.B #.B,(xxx).L */ +{ CPUFUNC(op_440_0), 0, 1088 }, /* SUB.W #.W,Dn */ +{ CPUFUNC(op_450_0), 0, 1104 }, /* SUB.W #.W,(An) */ +{ CPUFUNC(op_458_0), 0, 1112 }, /* SUB.W #.W,(An)+ */ +{ CPUFUNC(op_460_0), 0, 1120 }, /* SUB.W #.W,-(An) */ +{ CPUFUNC(op_468_0), 0, 1128 }, /* SUB.W #.W,(d16,An) */ +{ CPUFUNC(op_470_3), 0, 1136 }, /* SUB.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_478_0), 0, 1144 }, /* SUB.W #.W,(xxx).W */ +{ CPUFUNC(op_479_0), 0, 1145 }, /* SUB.W #.W,(xxx).L */ +{ CPUFUNC(op_480_0), 0, 1152 }, /* SUB.L #.L,Dn */ +{ CPUFUNC(op_490_0), 0, 1168 }, /* SUB.L #.L,(An) */ +{ CPUFUNC(op_498_0), 0, 1176 }, /* SUB.L #.L,(An)+ */ +{ CPUFUNC(op_4a0_0), 0, 1184 }, /* SUB.L #.L,-(An) */ +{ CPUFUNC(op_4a8_0), 0, 1192 }, /* SUB.L #.L,(d16,An) */ +{ CPUFUNC(op_4b0_3), 0, 1200 }, /* SUB.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_4b8_0), 0, 1208 }, /* SUB.L #.L,(xxx).W */ +{ CPUFUNC(op_4b9_0), 0, 1209 }, /* SUB.L #.L,(xxx).L */ +{ CPUFUNC(op_600_0), 0, 1536 }, /* ADD.B #.B,Dn */ +{ CPUFUNC(op_610_0), 0, 1552 }, /* ADD.B #.B,(An) */ +{ CPUFUNC(op_618_0), 0, 1560 }, /* ADD.B #.B,(An)+ */ +{ CPUFUNC(op_620_0), 0, 1568 }, /* ADD.B #.B,-(An) */ +{ CPUFUNC(op_628_0), 0, 1576 }, /* ADD.B #.B,(d16,An) */ +{ CPUFUNC(op_630_3), 0, 1584 }, /* ADD.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_638_0), 0, 1592 }, /* ADD.B #.B,(xxx).W */ +{ CPUFUNC(op_639_0), 0, 1593 }, /* ADD.B #.B,(xxx).L */ +{ CPUFUNC(op_640_0), 0, 1600 }, /* ADD.W #.W,Dn */ +{ CPUFUNC(op_650_0), 0, 1616 }, /* ADD.W #.W,(An) */ +{ CPUFUNC(op_658_0), 0, 1624 }, /* ADD.W #.W,(An)+ */ +{ CPUFUNC(op_660_0), 0, 1632 }, /* ADD.W #.W,-(An) */ +{ CPUFUNC(op_668_0), 0, 1640 }, /* ADD.W #.W,(d16,An) */ +{ CPUFUNC(op_670_3), 0, 1648 }, /* ADD.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_678_0), 0, 1656 }, /* ADD.W #.W,(xxx).W */ +{ CPUFUNC(op_679_0), 0, 1657 }, /* ADD.W #.W,(xxx).L */ +{ CPUFUNC(op_680_0), 0, 1664 }, /* ADD.L #.L,Dn */ +{ CPUFUNC(op_690_0), 0, 1680 }, /* ADD.L #.L,(An) */ +{ CPUFUNC(op_698_0), 0, 1688 }, /* ADD.L #.L,(An)+ */ +{ CPUFUNC(op_6a0_0), 0, 1696 }, /* ADD.L #.L,-(An) */ +{ CPUFUNC(op_6a8_0), 0, 1704 }, /* ADD.L #.L,(d16,An) */ +{ CPUFUNC(op_6b0_3), 0, 1712 }, /* ADD.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_6b8_0), 0, 1720 }, /* ADD.L #.L,(xxx).W */ +{ CPUFUNC(op_6b9_0), 0, 1721 }, /* ADD.L #.L,(xxx).L */ +{ CPUFUNC(op_800_0), 0, 2048 }, /* BTST.L #.W,Dn */ +{ CPUFUNC(op_810_0), 0, 2064 }, /* BTST.B #.W,(An) */ +{ CPUFUNC(op_818_0), 0, 2072 }, /* BTST.B #.W,(An)+ */ +{ CPUFUNC(op_820_0), 0, 2080 }, /* BTST.B #.W,-(An) */ +{ CPUFUNC(op_828_0), 0, 2088 }, /* BTST.B #.W,(d16,An) */ +{ CPUFUNC(op_830_3), 0, 2096 }, /* BTST.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_838_0), 0, 2104 }, /* BTST.B #.W,(xxx).W */ +{ CPUFUNC(op_839_0), 0, 2105 }, /* BTST.B #.W,(xxx).L */ +{ CPUFUNC(op_83a_0), 0, 2106 }, /* BTST.B #.W,(d16,PC) */ +{ CPUFUNC(op_83b_3), 0, 2107 }, /* BTST.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_83c_0), 0, 2108 }, /* BTST.B #.W,#.B */ +{ CPUFUNC(op_840_0), 0, 2112 }, /* BCHG.L #.W,Dn */ +{ CPUFUNC(op_850_0), 0, 2128 }, /* BCHG.B #.W,(An) */ +{ CPUFUNC(op_858_0), 0, 2136 }, /* BCHG.B #.W,(An)+ */ +{ CPUFUNC(op_860_0), 0, 2144 }, /* BCHG.B #.W,-(An) */ +{ CPUFUNC(op_868_0), 0, 2152 }, /* BCHG.B #.W,(d16,An) */ +{ CPUFUNC(op_870_3), 0, 2160 }, /* BCHG.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_878_0), 0, 2168 }, /* BCHG.B #.W,(xxx).W */ +{ CPUFUNC(op_879_0), 0, 2169 }, /* BCHG.B #.W,(xxx).L */ +{ CPUFUNC(op_87a_0), 0, 2170 }, /* BCHG.B #.W,(d16,PC) */ +{ CPUFUNC(op_87b_3), 0, 2171 }, /* BCHG.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_880_0), 0, 2176 }, /* BCLR.L #.W,Dn */ +{ CPUFUNC(op_890_0), 0, 2192 }, /* BCLR.B #.W,(An) */ +{ CPUFUNC(op_898_0), 0, 2200 }, /* BCLR.B #.W,(An)+ */ +{ CPUFUNC(op_8a0_0), 0, 2208 }, /* BCLR.B #.W,-(An) */ +{ CPUFUNC(op_8a8_0), 0, 2216 }, /* BCLR.B #.W,(d16,An) */ +{ CPUFUNC(op_8b0_3), 0, 2224 }, /* BCLR.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_8b8_0), 0, 2232 }, /* BCLR.B #.W,(xxx).W */ +{ CPUFUNC(op_8b9_0), 0, 2233 }, /* BCLR.B #.W,(xxx).L */ +{ CPUFUNC(op_8ba_0), 0, 2234 }, /* BCLR.B #.W,(d16,PC) */ +{ CPUFUNC(op_8bb_3), 0, 2235 }, /* BCLR.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_8c0_0), 0, 2240 }, /* BSET.L #.W,Dn */ +{ CPUFUNC(op_8d0_0), 0, 2256 }, /* BSET.B #.W,(An) */ +{ CPUFUNC(op_8d8_0), 0, 2264 }, /* BSET.B #.W,(An)+ */ +{ CPUFUNC(op_8e0_0), 0, 2272 }, /* BSET.B #.W,-(An) */ +{ CPUFUNC(op_8e8_0), 0, 2280 }, /* BSET.B #.W,(d16,An) */ +{ CPUFUNC(op_8f0_3), 0, 2288 }, /* BSET.B #.W,(d8,An,Xn) */ +{ CPUFUNC(op_8f8_0), 0, 2296 }, /* BSET.B #.W,(xxx).W */ +{ CPUFUNC(op_8f9_0), 0, 2297 }, /* BSET.B #.W,(xxx).L */ +{ CPUFUNC(op_8fa_0), 0, 2298 }, /* BSET.B #.W,(d16,PC) */ +{ CPUFUNC(op_8fb_3), 0, 2299 }, /* BSET.B #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_a00_0), 0, 2560 }, /* EOR.B #.B,Dn */ +{ CPUFUNC(op_a10_0), 0, 2576 }, /* EOR.B #.B,(An) */ +{ CPUFUNC(op_a18_0), 0, 2584 }, /* EOR.B #.B,(An)+ */ +{ CPUFUNC(op_a20_0), 0, 2592 }, /* EOR.B #.B,-(An) */ +{ CPUFUNC(op_a28_0), 0, 2600 }, /* EOR.B #.B,(d16,An) */ +{ CPUFUNC(op_a30_3), 0, 2608 }, /* EOR.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_a38_0), 0, 2616 }, /* EOR.B #.B,(xxx).W */ +{ CPUFUNC(op_a39_0), 0, 2617 }, /* EOR.B #.B,(xxx).L */ +{ CPUFUNC(op_a3c_0), 0, 2620 }, /* EORSR.B #.W */ +{ CPUFUNC(op_a40_0), 0, 2624 }, /* EOR.W #.W,Dn */ +{ CPUFUNC(op_a50_0), 0, 2640 }, /* EOR.W #.W,(An) */ +{ CPUFUNC(op_a58_0), 0, 2648 }, /* EOR.W #.W,(An)+ */ +{ CPUFUNC(op_a60_0), 0, 2656 }, /* EOR.W #.W,-(An) */ +{ CPUFUNC(op_a68_0), 0, 2664 }, /* EOR.W #.W,(d16,An) */ +{ CPUFUNC(op_a70_3), 0, 2672 }, /* EOR.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_a78_0), 0, 2680 }, /* EOR.W #.W,(xxx).W */ +{ CPUFUNC(op_a79_0), 0, 2681 }, /* EOR.W #.W,(xxx).L */ +{ CPUFUNC(op_a7c_0), 0, 2684 }, /* EORSR.W #.W */ +{ CPUFUNC(op_a80_0), 0, 2688 }, /* EOR.L #.L,Dn */ +{ CPUFUNC(op_a90_0), 0, 2704 }, /* EOR.L #.L,(An) */ +{ CPUFUNC(op_a98_0), 0, 2712 }, /* EOR.L #.L,(An)+ */ +{ CPUFUNC(op_aa0_0), 0, 2720 }, /* EOR.L #.L,-(An) */ +{ CPUFUNC(op_aa8_0), 0, 2728 }, /* EOR.L #.L,(d16,An) */ +{ CPUFUNC(op_ab0_3), 0, 2736 }, /* EOR.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_ab8_0), 0, 2744 }, /* EOR.L #.L,(xxx).W */ +{ CPUFUNC(op_ab9_0), 0, 2745 }, /* EOR.L #.L,(xxx).L */ +{ CPUFUNC(op_c00_0), 0, 3072 }, /* CMP.B #.B,Dn */ +{ CPUFUNC(op_c10_0), 0, 3088 }, /* CMP.B #.B,(An) */ +{ CPUFUNC(op_c18_0), 0, 3096 }, /* CMP.B #.B,(An)+ */ +{ CPUFUNC(op_c20_0), 0, 3104 }, /* CMP.B #.B,-(An) */ +{ CPUFUNC(op_c28_0), 0, 3112 }, /* CMP.B #.B,(d16,An) */ +{ CPUFUNC(op_c30_3), 0, 3120 }, /* CMP.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_c38_0), 0, 3128 }, /* CMP.B #.B,(xxx).W */ +{ CPUFUNC(op_c39_0), 0, 3129 }, /* CMP.B #.B,(xxx).L */ +{ CPUFUNC(op_c3a_0), 0, 3130 }, /* CMP.B #.B,(d16,PC) */ +{ CPUFUNC(op_c3b_3), 0, 3131 }, /* CMP.B #.B,(d8,PC,Xn) */ +{ CPUFUNC(op_c40_0), 0, 3136 }, /* CMP.W #.W,Dn */ +{ CPUFUNC(op_c50_0), 0, 3152 }, /* CMP.W #.W,(An) */ +{ CPUFUNC(op_c58_0), 0, 3160 }, /* CMP.W #.W,(An)+ */ +{ CPUFUNC(op_c60_0), 0, 3168 }, /* CMP.W #.W,-(An) */ +{ CPUFUNC(op_c68_0), 0, 3176 }, /* CMP.W #.W,(d16,An) */ +{ CPUFUNC(op_c70_3), 0, 3184 }, /* CMP.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_c78_0), 0, 3192 }, /* CMP.W #.W,(xxx).W */ +{ CPUFUNC(op_c79_0), 0, 3193 }, /* CMP.W #.W,(xxx).L */ +{ CPUFUNC(op_c7a_0), 0, 3194 }, /* CMP.W #.W,(d16,PC) */ +{ CPUFUNC(op_c7b_3), 0, 3195 }, /* CMP.W #.W,(d8,PC,Xn) */ +{ CPUFUNC(op_c80_0), 0, 3200 }, /* CMP.L #.L,Dn */ +{ CPUFUNC(op_c90_0), 0, 3216 }, /* CMP.L #.L,(An) */ +{ CPUFUNC(op_c98_0), 0, 3224 }, /* CMP.L #.L,(An)+ */ +{ CPUFUNC(op_ca0_0), 0, 3232 }, /* CMP.L #.L,-(An) */ +{ CPUFUNC(op_ca8_0), 0, 3240 }, /* CMP.L #.L,(d16,An) */ +{ CPUFUNC(op_cb0_3), 0, 3248 }, /* CMP.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_cb8_0), 0, 3256 }, /* CMP.L #.L,(xxx).W */ +{ CPUFUNC(op_cb9_0), 0, 3257 }, /* CMP.L #.L,(xxx).L */ +{ CPUFUNC(op_cba_0), 0, 3258 }, /* CMP.L #.L,(d16,PC) */ +{ CPUFUNC(op_cbb_3), 0, 3259 }, /* CMP.L #.L,(d8,PC,Xn) */ +{ CPUFUNC(op_1000_0), 0, 4096 }, /* MOVE.B Dn,Dn */ +{ CPUFUNC(op_1010_0), 0, 4112 }, /* MOVE.B (An),Dn */ +{ CPUFUNC(op_1018_0), 0, 4120 }, /* MOVE.B (An)+,Dn */ +{ CPUFUNC(op_1020_0), 0, 4128 }, /* MOVE.B -(An),Dn */ +{ CPUFUNC(op_1028_0), 0, 4136 }, /* MOVE.B (d16,An),Dn */ +{ CPUFUNC(op_1030_3), 0, 4144 }, /* MOVE.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_1038_0), 0, 4152 }, /* MOVE.B (xxx).W,Dn */ +{ CPUFUNC(op_1039_0), 0, 4153 }, /* MOVE.B (xxx).L,Dn */ +{ CPUFUNC(op_103a_0), 0, 4154 }, /* MOVE.B (d16,PC),Dn */ +{ CPUFUNC(op_103b_3), 0, 4155 }, /* MOVE.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_103c_0), 0, 4156 }, /* MOVE.B #.B,Dn */ +{ CPUFUNC(op_1080_0), 0, 4224 }, /* MOVE.B Dn,(An) */ +{ CPUFUNC(op_1090_0), 0, 4240 }, /* MOVE.B (An),(An) */ +{ CPUFUNC(op_1098_0), 0, 4248 }, /* MOVE.B (An)+,(An) */ +{ CPUFUNC(op_10a0_0), 0, 4256 }, /* MOVE.B -(An),(An) */ +{ CPUFUNC(op_10a8_0), 0, 4264 }, /* MOVE.B (d16,An),(An) */ +{ CPUFUNC(op_10b0_3), 0, 4272 }, /* MOVE.B (d8,An,Xn),(An) */ +{ CPUFUNC(op_10b8_0), 0, 4280 }, /* MOVE.B (xxx).W,(An) */ +{ CPUFUNC(op_10b9_0), 0, 4281 }, /* MOVE.B (xxx).L,(An) */ +{ CPUFUNC(op_10ba_0), 0, 4282 }, /* MOVE.B (d16,PC),(An) */ +{ CPUFUNC(op_10bb_3), 0, 4283 }, /* MOVE.B (d8,PC,Xn),(An) */ +{ CPUFUNC(op_10bc_0), 0, 4284 }, /* MOVE.B #.B,(An) */ +{ CPUFUNC(op_10c0_0), 0, 4288 }, /* MOVE.B Dn,(An)+ */ +{ CPUFUNC(op_10d0_0), 0, 4304 }, /* MOVE.B (An),(An)+ */ +{ CPUFUNC(op_10d8_0), 0, 4312 }, /* MOVE.B (An)+,(An)+ */ +{ CPUFUNC(op_10e0_0), 0, 4320 }, /* MOVE.B -(An),(An)+ */ +{ CPUFUNC(op_10e8_0), 0, 4328 }, /* MOVE.B (d16,An),(An)+ */ +{ CPUFUNC(op_10f0_3), 0, 4336 }, /* MOVE.B (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_10f8_0), 0, 4344 }, /* MOVE.B (xxx).W,(An)+ */ +{ CPUFUNC(op_10f9_0), 0, 4345 }, /* MOVE.B (xxx).L,(An)+ */ +{ CPUFUNC(op_10fa_0), 0, 4346 }, /* MOVE.B (d16,PC),(An)+ */ +{ CPUFUNC(op_10fb_3), 0, 4347 }, /* MOVE.B (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_10fc_0), 0, 4348 }, /* MOVE.B #.B,(An)+ */ +{ CPUFUNC(op_1100_0), 0, 4352 }, /* MOVE.B Dn,-(An) */ +{ CPUFUNC(op_1110_0), 0, 4368 }, /* MOVE.B (An),-(An) */ +{ CPUFUNC(op_1118_0), 0, 4376 }, /* MOVE.B (An)+,-(An) */ +{ CPUFUNC(op_1120_0), 0, 4384 }, /* MOVE.B -(An),-(An) */ +{ CPUFUNC(op_1128_0), 0, 4392 }, /* MOVE.B (d16,An),-(An) */ +{ CPUFUNC(op_1130_3), 0, 4400 }, /* MOVE.B (d8,An,Xn),-(An) */ +{ CPUFUNC(op_1138_0), 0, 4408 }, /* MOVE.B (xxx).W,-(An) */ +{ CPUFUNC(op_1139_0), 0, 4409 }, /* MOVE.B (xxx).L,-(An) */ +{ CPUFUNC(op_113a_0), 0, 4410 }, /* MOVE.B (d16,PC),-(An) */ +{ CPUFUNC(op_113b_3), 0, 4411 }, /* MOVE.B (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_113c_0), 0, 4412 }, /* MOVE.B #.B,-(An) */ +{ CPUFUNC(op_1140_0), 0, 4416 }, /* MOVE.B Dn,(d16,An) */ +{ CPUFUNC(op_1150_0), 0, 4432 }, /* MOVE.B (An),(d16,An) */ +{ CPUFUNC(op_1158_0), 0, 4440 }, /* MOVE.B (An)+,(d16,An) */ +{ CPUFUNC(op_1160_0), 0, 4448 }, /* MOVE.B -(An),(d16,An) */ +{ CPUFUNC(op_1168_0), 0, 4456 }, /* MOVE.B (d16,An),(d16,An) */ +{ CPUFUNC(op_1170_3), 0, 4464 }, /* MOVE.B (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_1178_0), 0, 4472 }, /* MOVE.B (xxx).W,(d16,An) */ +{ CPUFUNC(op_1179_0), 0, 4473 }, /* MOVE.B (xxx).L,(d16,An) */ +{ CPUFUNC(op_117a_0), 0, 4474 }, /* MOVE.B (d16,PC),(d16,An) */ +{ CPUFUNC(op_117b_3), 0, 4475 }, /* MOVE.B (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_117c_0), 0, 4476 }, /* MOVE.B #.B,(d16,An) */ +{ CPUFUNC(op_1180_3), 0, 4480 }, /* MOVE.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_1190_3), 0, 4496 }, /* MOVE.B (An),(d8,An,Xn) */ +{ CPUFUNC(op_1198_3), 0, 4504 }, /* MOVE.B (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_11a0_3), 0, 4512 }, /* MOVE.B -(An),(d8,An,Xn) */ +{ CPUFUNC(op_11a8_3), 0, 4520 }, /* MOVE.B (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_11b0_3), 0, 4528 }, /* MOVE.B (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_11b8_3), 0, 4536 }, /* MOVE.B (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_11b9_3), 0, 4537 }, /* MOVE.B (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_11ba_3), 0, 4538 }, /* MOVE.B (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_11bb_3), 0, 4539 }, /* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_11bc_3), 0, 4540 }, /* MOVE.B #.B,(d8,An,Xn) */ +{ CPUFUNC(op_11c0_0), 0, 4544 }, /* MOVE.B Dn,(xxx).W */ +{ CPUFUNC(op_11d0_0), 0, 4560 }, /* MOVE.B (An),(xxx).W */ +{ CPUFUNC(op_11d8_0), 0, 4568 }, /* MOVE.B (An)+,(xxx).W */ +{ CPUFUNC(op_11e0_0), 0, 4576 }, /* MOVE.B -(An),(xxx).W */ +{ CPUFUNC(op_11e8_0), 0, 4584 }, /* MOVE.B (d16,An),(xxx).W */ +{ CPUFUNC(op_11f0_3), 0, 4592 }, /* MOVE.B (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_11f8_0), 0, 4600 }, /* MOVE.B (xxx).W,(xxx).W */ +{ CPUFUNC(op_11f9_0), 0, 4601 }, /* MOVE.B (xxx).L,(xxx).W */ +{ CPUFUNC(op_11fa_0), 0, 4602 }, /* MOVE.B (d16,PC),(xxx).W */ +{ CPUFUNC(op_11fb_3), 0, 4603 }, /* MOVE.B (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_11fc_0), 0, 4604 }, /* MOVE.B #.B,(xxx).W */ +{ CPUFUNC(op_13c0_0), 0, 5056 }, /* MOVE.B Dn,(xxx).L */ +{ CPUFUNC(op_13d0_0), 0, 5072 }, /* MOVE.B (An),(xxx).L */ +{ CPUFUNC(op_13d8_0), 0, 5080 }, /* MOVE.B (An)+,(xxx).L */ +{ CPUFUNC(op_13e0_0), 0, 5088 }, /* MOVE.B -(An),(xxx).L */ +{ CPUFUNC(op_13e8_0), 0, 5096 }, /* MOVE.B (d16,An),(xxx).L */ +{ CPUFUNC(op_13f0_3), 0, 5104 }, /* MOVE.B (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_13f8_0), 0, 5112 }, /* MOVE.B (xxx).W,(xxx).L */ +{ CPUFUNC(op_13f9_0), 0, 5113 }, /* MOVE.B (xxx).L,(xxx).L */ +{ CPUFUNC(op_13fa_0), 0, 5114 }, /* MOVE.B (d16,PC),(xxx).L */ +{ CPUFUNC(op_13fb_3), 0, 5115 }, /* MOVE.B (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_13fc_0), 0, 5116 }, /* MOVE.B #.B,(xxx).L */ +{ CPUFUNC(op_2000_0), 0, 8192 }, /* MOVE.L Dn,Dn */ +{ CPUFUNC(op_2008_0), 0, 8200 }, /* MOVE.L An,Dn */ +{ CPUFUNC(op_2010_0), 0, 8208 }, /* MOVE.L (An),Dn */ +{ CPUFUNC(op_2018_0), 0, 8216 }, /* MOVE.L (An)+,Dn */ +{ CPUFUNC(op_2020_0), 0, 8224 }, /* MOVE.L -(An),Dn */ +{ CPUFUNC(op_2028_0), 0, 8232 }, /* MOVE.L (d16,An),Dn */ +{ CPUFUNC(op_2030_3), 0, 8240 }, /* MOVE.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_2038_0), 0, 8248 }, /* MOVE.L (xxx).W,Dn */ +{ CPUFUNC(op_2039_0), 0, 8249 }, /* MOVE.L (xxx).L,Dn */ +{ CPUFUNC(op_203a_0), 0, 8250 }, /* MOVE.L (d16,PC),Dn */ +{ CPUFUNC(op_203b_3), 0, 8251 }, /* MOVE.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_203c_0), 0, 8252 }, /* MOVE.L #.L,Dn */ +{ CPUFUNC_FF(op_2040_0), 0, 8256 }, /* MOVEA.L Dn,An */ +{ CPUFUNC_FF(op_2048_0), 0, 8264 }, /* MOVEA.L An,An */ +{ CPUFUNC_FF(op_2050_0), 0, 8272 }, /* MOVEA.L (An),An */ +{ CPUFUNC_FF(op_2058_0), 0, 8280 }, /* MOVEA.L (An)+,An */ +{ CPUFUNC_FF(op_2060_0), 0, 8288 }, /* MOVEA.L -(An),An */ +{ CPUFUNC_FF(op_2068_0), 0, 8296 }, /* MOVEA.L (d16,An),An */ +{ CPUFUNC_FF(op_2070_3), 0, 8304 }, /* MOVEA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_2078_0), 0, 8312 }, /* MOVEA.L (xxx).W,An */ +{ CPUFUNC_FF(op_2079_0), 0, 8313 }, /* MOVEA.L (xxx).L,An */ +{ CPUFUNC_FF(op_207a_0), 0, 8314 }, /* MOVEA.L (d16,PC),An */ +{ CPUFUNC_FF(op_207b_3), 0, 8315 }, /* MOVEA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_207c_0), 0, 8316 }, /* MOVEA.L #.L,An */ +{ CPUFUNC(op_2080_0), 0, 8320 }, /* MOVE.L Dn,(An) */ +{ CPUFUNC(op_2088_0), 0, 8328 }, /* MOVE.L An,(An) */ +{ CPUFUNC(op_2090_0), 0, 8336 }, /* MOVE.L (An),(An) */ +{ CPUFUNC(op_2098_0), 0, 8344 }, /* MOVE.L (An)+,(An) */ +{ CPUFUNC(op_20a0_0), 0, 8352 }, /* MOVE.L -(An),(An) */ +{ CPUFUNC(op_20a8_0), 0, 8360 }, /* MOVE.L (d16,An),(An) */ +{ CPUFUNC(op_20b0_3), 0, 8368 }, /* MOVE.L (d8,An,Xn),(An) */ +{ CPUFUNC(op_20b8_0), 0, 8376 }, /* MOVE.L (xxx).W,(An) */ +{ CPUFUNC(op_20b9_0), 0, 8377 }, /* MOVE.L (xxx).L,(An) */ +{ CPUFUNC(op_20ba_0), 0, 8378 }, /* MOVE.L (d16,PC),(An) */ +{ CPUFUNC(op_20bb_3), 0, 8379 }, /* MOVE.L (d8,PC,Xn),(An) */ +{ CPUFUNC(op_20bc_0), 0, 8380 }, /* MOVE.L #.L,(An) */ +{ CPUFUNC(op_20c0_0), 0, 8384 }, /* MOVE.L Dn,(An)+ */ +{ CPUFUNC(op_20c8_0), 0, 8392 }, /* MOVE.L An,(An)+ */ +{ CPUFUNC(op_20d0_0), 0, 8400 }, /* MOVE.L (An),(An)+ */ +{ CPUFUNC(op_20d8_0), 0, 8408 }, /* MOVE.L (An)+,(An)+ */ +{ CPUFUNC(op_20e0_0), 0, 8416 }, /* MOVE.L -(An),(An)+ */ +{ CPUFUNC(op_20e8_0), 0, 8424 }, /* MOVE.L (d16,An),(An)+ */ +{ CPUFUNC(op_20f0_3), 0, 8432 }, /* MOVE.L (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_20f8_0), 0, 8440 }, /* MOVE.L (xxx).W,(An)+ */ +{ CPUFUNC(op_20f9_0), 0, 8441 }, /* MOVE.L (xxx).L,(An)+ */ +{ CPUFUNC(op_20fa_0), 0, 8442 }, /* MOVE.L (d16,PC),(An)+ */ +{ CPUFUNC(op_20fb_3), 0, 8443 }, /* MOVE.L (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_20fc_0), 0, 8444 }, /* MOVE.L #.L,(An)+ */ +{ CPUFUNC(op_2100_0), 0, 8448 }, /* MOVE.L Dn,-(An) */ +{ CPUFUNC(op_2108_0), 0, 8456 }, /* MOVE.L An,-(An) */ +{ CPUFUNC(op_2110_0), 0, 8464 }, /* MOVE.L (An),-(An) */ +{ CPUFUNC(op_2118_0), 0, 8472 }, /* MOVE.L (An)+,-(An) */ +{ CPUFUNC(op_2120_0), 0, 8480 }, /* MOVE.L -(An),-(An) */ +{ CPUFUNC(op_2128_0), 0, 8488 }, /* MOVE.L (d16,An),-(An) */ +{ CPUFUNC(op_2130_3), 0, 8496 }, /* MOVE.L (d8,An,Xn),-(An) */ +{ CPUFUNC(op_2138_0), 0, 8504 }, /* MOVE.L (xxx).W,-(An) */ +{ CPUFUNC(op_2139_0), 0, 8505 }, /* MOVE.L (xxx).L,-(An) */ +{ CPUFUNC(op_213a_0), 0, 8506 }, /* MOVE.L (d16,PC),-(An) */ +{ CPUFUNC(op_213b_3), 0, 8507 }, /* MOVE.L (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_213c_0), 0, 8508 }, /* MOVE.L #.L,-(An) */ +{ CPUFUNC(op_2140_0), 0, 8512 }, /* MOVE.L Dn,(d16,An) */ +{ CPUFUNC(op_2148_0), 0, 8520 }, /* MOVE.L An,(d16,An) */ +{ CPUFUNC(op_2150_0), 0, 8528 }, /* MOVE.L (An),(d16,An) */ +{ CPUFUNC(op_2158_0), 0, 8536 }, /* MOVE.L (An)+,(d16,An) */ +{ CPUFUNC(op_2160_0), 0, 8544 }, /* MOVE.L -(An),(d16,An) */ +{ CPUFUNC(op_2168_0), 0, 8552 }, /* MOVE.L (d16,An),(d16,An) */ +{ CPUFUNC(op_2170_3), 0, 8560 }, /* MOVE.L (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_2178_0), 0, 8568 }, /* MOVE.L (xxx).W,(d16,An) */ +{ CPUFUNC(op_2179_0), 0, 8569 }, /* MOVE.L (xxx).L,(d16,An) */ +{ CPUFUNC(op_217a_0), 0, 8570 }, /* MOVE.L (d16,PC),(d16,An) */ +{ CPUFUNC(op_217b_3), 0, 8571 }, /* MOVE.L (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_217c_0), 0, 8572 }, /* MOVE.L #.L,(d16,An) */ +{ CPUFUNC(op_2180_3), 0, 8576 }, /* MOVE.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_2188_3), 0, 8584 }, /* MOVE.L An,(d8,An,Xn) */ +{ CPUFUNC(op_2190_3), 0, 8592 }, /* MOVE.L (An),(d8,An,Xn) */ +{ CPUFUNC(op_2198_3), 0, 8600 }, /* MOVE.L (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_21a0_3), 0, 8608 }, /* MOVE.L -(An),(d8,An,Xn) */ +{ CPUFUNC(op_21a8_3), 0, 8616 }, /* MOVE.L (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_21b0_3), 0, 8624 }, /* MOVE.L (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_21b8_3), 0, 8632 }, /* MOVE.L (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_21b9_3), 0, 8633 }, /* MOVE.L (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_21ba_3), 0, 8634 }, /* MOVE.L (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_21bb_3), 0, 8635 }, /* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_21bc_3), 0, 8636 }, /* MOVE.L #.L,(d8,An,Xn) */ +{ CPUFUNC(op_21c0_0), 0, 8640 }, /* MOVE.L Dn,(xxx).W */ +{ CPUFUNC(op_21c8_0), 0, 8648 }, /* MOVE.L An,(xxx).W */ +{ CPUFUNC(op_21d0_0), 0, 8656 }, /* MOVE.L (An),(xxx).W */ +{ CPUFUNC(op_21d8_0), 0, 8664 }, /* MOVE.L (An)+,(xxx).W */ +{ CPUFUNC(op_21e0_0), 0, 8672 }, /* MOVE.L -(An),(xxx).W */ +{ CPUFUNC(op_21e8_0), 0, 8680 }, /* MOVE.L (d16,An),(xxx).W */ +{ CPUFUNC(op_21f0_3), 0, 8688 }, /* MOVE.L (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_21f8_0), 0, 8696 }, /* MOVE.L (xxx).W,(xxx).W */ +{ CPUFUNC(op_21f9_0), 0, 8697 }, /* MOVE.L (xxx).L,(xxx).W */ +{ CPUFUNC(op_21fa_0), 0, 8698 }, /* MOVE.L (d16,PC),(xxx).W */ +{ CPUFUNC(op_21fb_3), 0, 8699 }, /* MOVE.L (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_21fc_0), 0, 8700 }, /* MOVE.L #.L,(xxx).W */ +{ CPUFUNC(op_23c0_0), 0, 9152 }, /* MOVE.L Dn,(xxx).L */ +{ CPUFUNC(op_23c8_0), 0, 9160 }, /* MOVE.L An,(xxx).L */ +{ CPUFUNC(op_23d0_0), 0, 9168 }, /* MOVE.L (An),(xxx).L */ +{ CPUFUNC(op_23d8_0), 0, 9176 }, /* MOVE.L (An)+,(xxx).L */ +{ CPUFUNC(op_23e0_0), 0, 9184 }, /* MOVE.L -(An),(xxx).L */ +{ CPUFUNC(op_23e8_0), 0, 9192 }, /* MOVE.L (d16,An),(xxx).L */ +{ CPUFUNC(op_23f0_3), 0, 9200 }, /* MOVE.L (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_23f8_0), 0, 9208 }, /* MOVE.L (xxx).W,(xxx).L */ +{ CPUFUNC(op_23f9_0), 0, 9209 }, /* MOVE.L (xxx).L,(xxx).L */ +{ CPUFUNC(op_23fa_0), 0, 9210 }, /* MOVE.L (d16,PC),(xxx).L */ +{ CPUFUNC(op_23fb_3), 0, 9211 }, /* MOVE.L (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_23fc_0), 0, 9212 }, /* MOVE.L #.L,(xxx).L */ +{ CPUFUNC(op_3000_0), 0, 12288 }, /* MOVE.W Dn,Dn */ +{ CPUFUNC(op_3008_0), 0, 12296 }, /* MOVE.W An,Dn */ +{ CPUFUNC(op_3010_0), 0, 12304 }, /* MOVE.W (An),Dn */ +{ CPUFUNC(op_3018_0), 0, 12312 }, /* MOVE.W (An)+,Dn */ +{ CPUFUNC(op_3020_0), 0, 12320 }, /* MOVE.W -(An),Dn */ +{ CPUFUNC(op_3028_0), 0, 12328 }, /* MOVE.W (d16,An),Dn */ +{ CPUFUNC(op_3030_3), 0, 12336 }, /* MOVE.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_3038_0), 0, 12344 }, /* MOVE.W (xxx).W,Dn */ +{ CPUFUNC(op_3039_0), 0, 12345 }, /* MOVE.W (xxx).L,Dn */ +{ CPUFUNC(op_303a_0), 0, 12346 }, /* MOVE.W (d16,PC),Dn */ +{ CPUFUNC(op_303b_3), 0, 12347 }, /* MOVE.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_303c_0), 0, 12348 }, /* MOVE.W #.W,Dn */ +{ CPUFUNC_FF(op_3040_0), 0, 12352 }, /* MOVEA.W Dn,An */ +{ CPUFUNC_FF(op_3048_0), 0, 12360 }, /* MOVEA.W An,An */ +{ CPUFUNC_FF(op_3050_0), 0, 12368 }, /* MOVEA.W (An),An */ +{ CPUFUNC_FF(op_3058_0), 0, 12376 }, /* MOVEA.W (An)+,An */ +{ CPUFUNC_FF(op_3060_0), 0, 12384 }, /* MOVEA.W -(An),An */ +{ CPUFUNC_FF(op_3068_0), 0, 12392 }, /* MOVEA.W (d16,An),An */ +{ CPUFUNC_FF(op_3070_3), 0, 12400 }, /* MOVEA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_3078_0), 0, 12408 }, /* MOVEA.W (xxx).W,An */ +{ CPUFUNC_FF(op_3079_0), 0, 12409 }, /* MOVEA.W (xxx).L,An */ +{ CPUFUNC_FF(op_307a_0), 0, 12410 }, /* MOVEA.W (d16,PC),An */ +{ CPUFUNC_FF(op_307b_3), 0, 12411 }, /* MOVEA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_307c_0), 0, 12412 }, /* MOVEA.W #.W,An */ +{ CPUFUNC(op_3080_0), 0, 12416 }, /* MOVE.W Dn,(An) */ +{ CPUFUNC(op_3088_0), 0, 12424 }, /* MOVE.W An,(An) */ +{ CPUFUNC(op_3090_0), 0, 12432 }, /* MOVE.W (An),(An) */ +{ CPUFUNC(op_3098_0), 0, 12440 }, /* MOVE.W (An)+,(An) */ +{ CPUFUNC(op_30a0_0), 0, 12448 }, /* MOVE.W -(An),(An) */ +{ CPUFUNC(op_30a8_0), 0, 12456 }, /* MOVE.W (d16,An),(An) */ +{ CPUFUNC(op_30b0_3), 0, 12464 }, /* MOVE.W (d8,An,Xn),(An) */ +{ CPUFUNC(op_30b8_0), 0, 12472 }, /* MOVE.W (xxx).W,(An) */ +{ CPUFUNC(op_30b9_0), 0, 12473 }, /* MOVE.W (xxx).L,(An) */ +{ CPUFUNC(op_30ba_0), 0, 12474 }, /* MOVE.W (d16,PC),(An) */ +{ CPUFUNC(op_30bb_3), 0, 12475 }, /* MOVE.W (d8,PC,Xn),(An) */ +{ CPUFUNC(op_30bc_0), 0, 12476 }, /* MOVE.W #.W,(An) */ +{ CPUFUNC(op_30c0_0), 0, 12480 }, /* MOVE.W Dn,(An)+ */ +{ CPUFUNC(op_30c8_0), 0, 12488 }, /* MOVE.W An,(An)+ */ +{ CPUFUNC(op_30d0_0), 0, 12496 }, /* MOVE.W (An),(An)+ */ +{ CPUFUNC(op_30d8_0), 0, 12504 }, /* MOVE.W (An)+,(An)+ */ +{ CPUFUNC(op_30e0_0), 0, 12512 }, /* MOVE.W -(An),(An)+ */ +{ CPUFUNC(op_30e8_0), 0, 12520 }, /* MOVE.W (d16,An),(An)+ */ +{ CPUFUNC(op_30f0_3), 0, 12528 }, /* MOVE.W (d8,An,Xn),(An)+ */ +{ CPUFUNC(op_30f8_0), 0, 12536 }, /* MOVE.W (xxx).W,(An)+ */ +{ CPUFUNC(op_30f9_0), 0, 12537 }, /* MOVE.W (xxx).L,(An)+ */ +{ CPUFUNC(op_30fa_0), 0, 12538 }, /* MOVE.W (d16,PC),(An)+ */ +{ CPUFUNC(op_30fb_3), 0, 12539 }, /* MOVE.W (d8,PC,Xn),(An)+ */ +{ CPUFUNC(op_30fc_0), 0, 12540 }, /* MOVE.W #.W,(An)+ */ +{ CPUFUNC(op_3100_0), 0, 12544 }, /* MOVE.W Dn,-(An) */ +{ CPUFUNC(op_3108_0), 0, 12552 }, /* MOVE.W An,-(An) */ +{ CPUFUNC(op_3110_0), 0, 12560 }, /* MOVE.W (An),-(An) */ +{ CPUFUNC(op_3118_0), 0, 12568 }, /* MOVE.W (An)+,-(An) */ +{ CPUFUNC(op_3120_0), 0, 12576 }, /* MOVE.W -(An),-(An) */ +{ CPUFUNC(op_3128_0), 0, 12584 }, /* MOVE.W (d16,An),-(An) */ +{ CPUFUNC(op_3130_3), 0, 12592 }, /* MOVE.W (d8,An,Xn),-(An) */ +{ CPUFUNC(op_3138_0), 0, 12600 }, /* MOVE.W (xxx).W,-(An) */ +{ CPUFUNC(op_3139_0), 0, 12601 }, /* MOVE.W (xxx).L,-(An) */ +{ CPUFUNC(op_313a_0), 0, 12602 }, /* MOVE.W (d16,PC),-(An) */ +{ CPUFUNC(op_313b_3), 0, 12603 }, /* MOVE.W (d8,PC,Xn),-(An) */ +{ CPUFUNC(op_313c_0), 0, 12604 }, /* MOVE.W #.W,-(An) */ +{ CPUFUNC(op_3140_0), 0, 12608 }, /* MOVE.W Dn,(d16,An) */ +{ CPUFUNC(op_3148_0), 0, 12616 }, /* MOVE.W An,(d16,An) */ +{ CPUFUNC(op_3150_0), 0, 12624 }, /* MOVE.W (An),(d16,An) */ +{ CPUFUNC(op_3158_0), 0, 12632 }, /* MOVE.W (An)+,(d16,An) */ +{ CPUFUNC(op_3160_0), 0, 12640 }, /* MOVE.W -(An),(d16,An) */ +{ CPUFUNC(op_3168_0), 0, 12648 }, /* MOVE.W (d16,An),(d16,An) */ +{ CPUFUNC(op_3170_3), 0, 12656 }, /* MOVE.W (d8,An,Xn),(d16,An) */ +{ CPUFUNC(op_3178_0), 0, 12664 }, /* MOVE.W (xxx).W,(d16,An) */ +{ CPUFUNC(op_3179_0), 0, 12665 }, /* MOVE.W (xxx).L,(d16,An) */ +{ CPUFUNC(op_317a_0), 0, 12666 }, /* MOVE.W (d16,PC),(d16,An) */ +{ CPUFUNC(op_317b_3), 0, 12667 }, /* MOVE.W (d8,PC,Xn),(d16,An) */ +{ CPUFUNC(op_317c_0), 0, 12668 }, /* MOVE.W #.W,(d16,An) */ +{ CPUFUNC(op_3180_3), 0, 12672 }, /* MOVE.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_3188_3), 0, 12680 }, /* MOVE.W An,(d8,An,Xn) */ +{ CPUFUNC(op_3190_3), 0, 12688 }, /* MOVE.W (An),(d8,An,Xn) */ +{ CPUFUNC(op_3198_3), 0, 12696 }, /* MOVE.W (An)+,(d8,An,Xn) */ +{ CPUFUNC(op_31a0_3), 0, 12704 }, /* MOVE.W -(An),(d8,An,Xn) */ +{ CPUFUNC(op_31a8_3), 0, 12712 }, /* MOVE.W (d16,An),(d8,An,Xn) */ +{ CPUFUNC(op_31b0_3), 0, 12720 }, /* MOVE.W (d8,An,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_31b8_3), 0, 12728 }, /* MOVE.W (xxx).W,(d8,An,Xn) */ +{ CPUFUNC(op_31b9_3), 0, 12729 }, /* MOVE.W (xxx).L,(d8,An,Xn) */ +{ CPUFUNC(op_31ba_3), 0, 12730 }, /* MOVE.W (d16,PC),(d8,An,Xn) */ +{ CPUFUNC(op_31bb_3), 0, 12731 }, /* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ +{ CPUFUNC(op_31bc_3), 0, 12732 }, /* MOVE.W #.W,(d8,An,Xn) */ +{ CPUFUNC(op_31c0_0), 0, 12736 }, /* MOVE.W Dn,(xxx).W */ +{ CPUFUNC(op_31c8_0), 0, 12744 }, /* MOVE.W An,(xxx).W */ +{ CPUFUNC(op_31d0_0), 0, 12752 }, /* MOVE.W (An),(xxx).W */ +{ CPUFUNC(op_31d8_0), 0, 12760 }, /* MOVE.W (An)+,(xxx).W */ +{ CPUFUNC(op_31e0_0), 0, 12768 }, /* MOVE.W -(An),(xxx).W */ +{ CPUFUNC(op_31e8_0), 0, 12776 }, /* MOVE.W (d16,An),(xxx).W */ +{ CPUFUNC(op_31f0_3), 0, 12784 }, /* MOVE.W (d8,An,Xn),(xxx).W */ +{ CPUFUNC(op_31f8_0), 0, 12792 }, /* MOVE.W (xxx).W,(xxx).W */ +{ CPUFUNC(op_31f9_0), 0, 12793 }, /* MOVE.W (xxx).L,(xxx).W */ +{ CPUFUNC(op_31fa_0), 0, 12794 }, /* MOVE.W (d16,PC),(xxx).W */ +{ CPUFUNC(op_31fb_3), 0, 12795 }, /* MOVE.W (d8,PC,Xn),(xxx).W */ +{ CPUFUNC(op_31fc_0), 0, 12796 }, /* MOVE.W #.W,(xxx).W */ +{ CPUFUNC(op_33c0_0), 0, 13248 }, /* MOVE.W Dn,(xxx).L */ +{ CPUFUNC(op_33c8_0), 0, 13256 }, /* MOVE.W An,(xxx).L */ +{ CPUFUNC(op_33d0_0), 0, 13264 }, /* MOVE.W (An),(xxx).L */ +{ CPUFUNC(op_33d8_0), 0, 13272 }, /* MOVE.W (An)+,(xxx).L */ +{ CPUFUNC(op_33e0_0), 0, 13280 }, /* MOVE.W -(An),(xxx).L */ +{ CPUFUNC(op_33e8_0), 0, 13288 }, /* MOVE.W (d16,An),(xxx).L */ +{ CPUFUNC(op_33f0_3), 0, 13296 }, /* MOVE.W (d8,An,Xn),(xxx).L */ +{ CPUFUNC(op_33f8_0), 0, 13304 }, /* MOVE.W (xxx).W,(xxx).L */ +{ CPUFUNC(op_33f9_0), 0, 13305 }, /* MOVE.W (xxx).L,(xxx).L */ +{ CPUFUNC(op_33fa_0), 0, 13306 }, /* MOVE.W (d16,PC),(xxx).L */ +{ CPUFUNC(op_33fb_3), 0, 13307 }, /* MOVE.W (d8,PC,Xn),(xxx).L */ +{ CPUFUNC(op_33fc_0), 0, 13308 }, /* MOVE.W #.W,(xxx).L */ +{ CPUFUNC(op_4000_0), 0, 16384 }, /* NEGX.B Dn */ +{ CPUFUNC(op_4010_0), 0, 16400 }, /* NEGX.B (An) */ +{ CPUFUNC(op_4018_0), 0, 16408 }, /* NEGX.B (An)+ */ +{ CPUFUNC(op_4020_0), 0, 16416 }, /* NEGX.B -(An) */ +{ CPUFUNC(op_4028_0), 0, 16424 }, /* NEGX.B (d16,An) */ +{ CPUFUNC(op_4030_3), 0, 16432 }, /* NEGX.B (d8,An,Xn) */ +{ CPUFUNC(op_4038_0), 0, 16440 }, /* NEGX.B (xxx).W */ +{ CPUFUNC(op_4039_0), 0, 16441 }, /* NEGX.B (xxx).L */ +{ CPUFUNC(op_4040_0), 0, 16448 }, /* NEGX.W Dn */ +{ CPUFUNC(op_4050_0), 0, 16464 }, /* NEGX.W (An) */ +{ CPUFUNC(op_4058_0), 0, 16472 }, /* NEGX.W (An)+ */ +{ CPUFUNC(op_4060_0), 0, 16480 }, /* NEGX.W -(An) */ +{ CPUFUNC(op_4068_0), 0, 16488 }, /* NEGX.W (d16,An) */ +{ CPUFUNC(op_4070_3), 0, 16496 }, /* NEGX.W (d8,An,Xn) */ +{ CPUFUNC(op_4078_0), 0, 16504 }, /* NEGX.W (xxx).W */ +{ CPUFUNC(op_4079_0), 0, 16505 }, /* NEGX.W (xxx).L */ +{ CPUFUNC(op_4080_0), 0, 16512 }, /* NEGX.L Dn */ +{ CPUFUNC(op_4090_0), 0, 16528 }, /* NEGX.L (An) */ +{ CPUFUNC(op_4098_0), 0, 16536 }, /* NEGX.L (An)+ */ +{ CPUFUNC(op_40a0_0), 0, 16544 }, /* NEGX.L -(An) */ +{ CPUFUNC(op_40a8_0), 0, 16552 }, /* NEGX.L (d16,An) */ +{ CPUFUNC(op_40b0_3), 0, 16560 }, /* NEGX.L (d8,An,Xn) */ +{ CPUFUNC(op_40b8_0), 0, 16568 }, /* NEGX.L (xxx).W */ +{ CPUFUNC(op_40b9_0), 0, 16569 }, /* NEGX.L (xxx).L */ +{ CPUFUNC_FF(op_40c0_4), 0, 16576 }, /* MVSR2.W Dn */ +{ CPUFUNC_FF(op_40d0_4), 0, 16592 }, /* MVSR2.W (An) */ +{ CPUFUNC_FF(op_40d8_4), 0, 16600 }, /* MVSR2.W (An)+ */ +{ CPUFUNC_FF(op_40e0_4), 0, 16608 }, /* MVSR2.W -(An) */ +{ CPUFUNC_FF(op_40e8_4), 0, 16616 }, /* MVSR2.W (d16,An) */ +{ CPUFUNC_FF(op_40f0_4), 0, 16624 }, /* MVSR2.W (d8,An,Xn) */ +{ CPUFUNC_FF(op_40f8_4), 0, 16632 }, /* MVSR2.W (xxx).W */ +{ CPUFUNC_FF(op_40f9_4), 0, 16633 }, /* MVSR2.W (xxx).L */ +{ CPUFUNC(op_4100_0), 0, 16640 }, /* CHK.L Dn,Dn */ +{ CPUFUNC(op_4110_0), 0, 16656 }, /* CHK.L (An),Dn */ +{ CPUFUNC(op_4118_0), 0, 16664 }, /* CHK.L (An)+,Dn */ +{ CPUFUNC(op_4120_0), 0, 16672 }, /* CHK.L -(An),Dn */ +{ CPUFUNC(op_4128_0), 0, 16680 }, /* CHK.L (d16,An),Dn */ +{ CPUFUNC(op_4130_3), 0, 16688 }, /* CHK.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_4138_0), 0, 16696 }, /* CHK.L (xxx).W,Dn */ +{ CPUFUNC(op_4139_0), 0, 16697 }, /* CHK.L (xxx).L,Dn */ +{ CPUFUNC(op_413a_0), 0, 16698 }, /* CHK.L (d16,PC),Dn */ +{ CPUFUNC(op_413b_3), 0, 16699 }, /* CHK.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_413c_0), 0, 16700 }, /* CHK.L #.L,Dn */ +{ CPUFUNC(op_4180_0), 0, 16768 }, /* CHK.W Dn,Dn */ +{ CPUFUNC(op_4190_0), 0, 16784 }, /* CHK.W (An),Dn */ +{ CPUFUNC(op_4198_0), 0, 16792 }, /* CHK.W (An)+,Dn */ +{ CPUFUNC(op_41a0_0), 0, 16800 }, /* CHK.W -(An),Dn */ +{ CPUFUNC(op_41a8_0), 0, 16808 }, /* CHK.W (d16,An),Dn */ +{ CPUFUNC(op_41b0_3), 0, 16816 }, /* CHK.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_41b8_0), 0, 16824 }, /* CHK.W (xxx).W,Dn */ +{ CPUFUNC(op_41b9_0), 0, 16825 }, /* CHK.W (xxx).L,Dn */ +{ CPUFUNC(op_41ba_0), 0, 16826 }, /* CHK.W (d16,PC),Dn */ +{ CPUFUNC(op_41bb_3), 0, 16827 }, /* CHK.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_41bc_0), 0, 16828 }, /* CHK.W #.W,Dn */ +{ CPUFUNC_FF(op_41d0_0), 0, 16848 }, /* LEA.L (An),An */ +{ CPUFUNC_FF(op_41e8_0), 0, 16872 }, /* LEA.L (d16,An),An */ +{ CPUFUNC_FF(op_41f0_3), 0, 16880 }, /* LEA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_41f8_0), 0, 16888 }, /* LEA.L (xxx).W,An */ +{ CPUFUNC_FF(op_41f9_0), 0, 16889 }, /* LEA.L (xxx).L,An */ +{ CPUFUNC_FF(op_41fa_0), 0, 16890 }, /* LEA.L (d16,PC),An */ +{ CPUFUNC_FF(op_41fb_3), 0, 16891 }, /* LEA.L (d8,PC,Xn),An */ +{ CPUFUNC(op_4200_0), 0, 16896 }, /* CLR.B Dn */ +{ CPUFUNC(op_4210_0), 0, 16912 }, /* CLR.B (An) */ +{ CPUFUNC(op_4218_0), 0, 16920 }, /* CLR.B (An)+ */ +{ CPUFUNC(op_4220_0), 0, 16928 }, /* CLR.B -(An) */ +{ CPUFUNC(op_4228_0), 0, 16936 }, /* CLR.B (d16,An) */ +{ CPUFUNC(op_4230_3), 0, 16944 }, /* CLR.B (d8,An,Xn) */ +{ CPUFUNC(op_4238_0), 0, 16952 }, /* CLR.B (xxx).W */ +{ CPUFUNC(op_4239_0), 0, 16953 }, /* CLR.B (xxx).L */ +{ CPUFUNC(op_4240_0), 0, 16960 }, /* CLR.W Dn */ +{ CPUFUNC(op_4250_0), 0, 16976 }, /* CLR.W (An) */ +{ CPUFUNC(op_4258_0), 0, 16984 }, /* CLR.W (An)+ */ +{ CPUFUNC(op_4260_0), 0, 16992 }, /* CLR.W -(An) */ +{ CPUFUNC(op_4268_0), 0, 17000 }, /* CLR.W (d16,An) */ +{ CPUFUNC(op_4270_3), 0, 17008 }, /* CLR.W (d8,An,Xn) */ +{ CPUFUNC(op_4278_0), 0, 17016 }, /* CLR.W (xxx).W */ +{ CPUFUNC(op_4279_0), 0, 17017 }, /* CLR.W (xxx).L */ +{ CPUFUNC(op_4280_0), 0, 17024 }, /* CLR.L Dn */ +{ CPUFUNC(op_4290_0), 0, 17040 }, /* CLR.L (An) */ +{ CPUFUNC(op_4298_0), 0, 17048 }, /* CLR.L (An)+ */ +{ CPUFUNC(op_42a0_0), 0, 17056 }, /* CLR.L -(An) */ +{ CPUFUNC(op_42a8_0), 0, 17064 }, /* CLR.L (d16,An) */ +{ CPUFUNC(op_42b0_3), 0, 17072 }, /* CLR.L (d8,An,Xn) */ +{ CPUFUNC(op_42b8_0), 0, 17080 }, /* CLR.L (xxx).W */ +{ CPUFUNC(op_42b9_0), 0, 17081 }, /* CLR.L (xxx).L */ +{ CPUFUNC(op_4400_0), 0, 17408 }, /* NEG.B Dn */ +{ CPUFUNC(op_4410_0), 0, 17424 }, /* NEG.B (An) */ +{ CPUFUNC(op_4418_0), 0, 17432 }, /* NEG.B (An)+ */ +{ CPUFUNC(op_4420_0), 0, 17440 }, /* NEG.B -(An) */ +{ CPUFUNC(op_4428_0), 0, 17448 }, /* NEG.B (d16,An) */ +{ CPUFUNC(op_4430_3), 0, 17456 }, /* NEG.B (d8,An,Xn) */ +{ CPUFUNC(op_4438_0), 0, 17464 }, /* NEG.B (xxx).W */ +{ CPUFUNC(op_4439_0), 0, 17465 }, /* NEG.B (xxx).L */ +{ CPUFUNC(op_4440_0), 0, 17472 }, /* NEG.W Dn */ +{ CPUFUNC(op_4450_0), 0, 17488 }, /* NEG.W (An) */ +{ CPUFUNC(op_4458_0), 0, 17496 }, /* NEG.W (An)+ */ +{ CPUFUNC(op_4460_0), 0, 17504 }, /* NEG.W -(An) */ +{ CPUFUNC(op_4468_0), 0, 17512 }, /* NEG.W (d16,An) */ +{ CPUFUNC(op_4470_3), 0, 17520 }, /* NEG.W (d8,An,Xn) */ +{ CPUFUNC(op_4478_0), 0, 17528 }, /* NEG.W (xxx).W */ +{ CPUFUNC(op_4479_0), 0, 17529 }, /* NEG.W (xxx).L */ +{ CPUFUNC(op_4480_0), 0, 17536 }, /* NEG.L Dn */ +{ CPUFUNC(op_4490_0), 0, 17552 }, /* NEG.L (An) */ +{ CPUFUNC(op_4498_0), 0, 17560 }, /* NEG.L (An)+ */ +{ CPUFUNC(op_44a0_0), 0, 17568 }, /* NEG.L -(An) */ +{ CPUFUNC(op_44a8_0), 0, 17576 }, /* NEG.L (d16,An) */ +{ CPUFUNC(op_44b0_3), 0, 17584 }, /* NEG.L (d8,An,Xn) */ +{ CPUFUNC(op_44b8_0), 0, 17592 }, /* NEG.L (xxx).W */ +{ CPUFUNC(op_44b9_0), 0, 17593 }, /* NEG.L (xxx).L */ +{ CPUFUNC(op_44c0_0), 0, 17600 }, /* MV2SR.B Dn */ +{ CPUFUNC(op_44d0_0), 0, 17616 }, /* MV2SR.B (An) */ +{ CPUFUNC(op_44d8_0), 0, 17624 }, /* MV2SR.B (An)+ */ +{ CPUFUNC(op_44e0_0), 0, 17632 }, /* MV2SR.B -(An) */ +{ CPUFUNC(op_44e8_0), 0, 17640 }, /* MV2SR.B (d16,An) */ +{ CPUFUNC(op_44f0_3), 0, 17648 }, /* MV2SR.B (d8,An,Xn) */ +{ CPUFUNC(op_44f8_0), 0, 17656 }, /* MV2SR.B (xxx).W */ +{ CPUFUNC(op_44f9_0), 0, 17657 }, /* MV2SR.B (xxx).L */ +{ CPUFUNC(op_44fa_0), 0, 17658 }, /* MV2SR.B (d16,PC) */ +{ CPUFUNC(op_44fb_3), 0, 17659 }, /* MV2SR.B (d8,PC,Xn) */ +{ CPUFUNC(op_44fc_0), 0, 17660 }, /* MV2SR.B #.B */ +{ CPUFUNC(op_4600_0), 0, 17920 }, /* NOT.B Dn */ +{ CPUFUNC(op_4610_0), 0, 17936 }, /* NOT.B (An) */ +{ CPUFUNC(op_4618_0), 0, 17944 }, /* NOT.B (An)+ */ +{ CPUFUNC(op_4620_0), 0, 17952 }, /* NOT.B -(An) */ +{ CPUFUNC(op_4628_0), 0, 17960 }, /* NOT.B (d16,An) */ +{ CPUFUNC(op_4630_3), 0, 17968 }, /* NOT.B (d8,An,Xn) */ +{ CPUFUNC(op_4638_0), 0, 17976 }, /* NOT.B (xxx).W */ +{ CPUFUNC(op_4639_0), 0, 17977 }, /* NOT.B (xxx).L */ +{ CPUFUNC(op_4640_0), 0, 17984 }, /* NOT.W Dn */ +{ CPUFUNC(op_4650_0), 0, 18000 }, /* NOT.W (An) */ +{ CPUFUNC(op_4658_0), 0, 18008 }, /* NOT.W (An)+ */ +{ CPUFUNC(op_4660_0), 0, 18016 }, /* NOT.W -(An) */ +{ CPUFUNC(op_4668_0), 0, 18024 }, /* NOT.W (d16,An) */ +{ CPUFUNC(op_4670_3), 0, 18032 }, /* NOT.W (d8,An,Xn) */ +{ CPUFUNC(op_4678_0), 0, 18040 }, /* NOT.W (xxx).W */ +{ CPUFUNC(op_4679_0), 0, 18041 }, /* NOT.W (xxx).L */ +{ CPUFUNC(op_4680_0), 0, 18048 }, /* NOT.L Dn */ +{ CPUFUNC(op_4690_0), 0, 18064 }, /* NOT.L (An) */ +{ CPUFUNC(op_4698_0), 0, 18072 }, /* NOT.L (An)+ */ +{ CPUFUNC(op_46a0_0), 0, 18080 }, /* NOT.L -(An) */ +{ CPUFUNC(op_46a8_0), 0, 18088 }, /* NOT.L (d16,An) */ +{ CPUFUNC(op_46b0_3), 0, 18096 }, /* NOT.L (d8,An,Xn) */ +{ CPUFUNC(op_46b8_0), 0, 18104 }, /* NOT.L (xxx).W */ +{ CPUFUNC(op_46b9_0), 0, 18105 }, /* NOT.L (xxx).L */ +{ CPUFUNC(op_46c0_0), 0, 18112 }, /* MV2SR.W Dn */ +{ CPUFUNC(op_46d0_0), 0, 18128 }, /* MV2SR.W (An) */ +{ CPUFUNC(op_46d8_0), 0, 18136 }, /* MV2SR.W (An)+ */ +{ CPUFUNC(op_46e0_0), 0, 18144 }, /* MV2SR.W -(An) */ +{ CPUFUNC(op_46e8_0), 0, 18152 }, /* MV2SR.W (d16,An) */ +{ CPUFUNC(op_46f0_3), 0, 18160 }, /* MV2SR.W (d8,An,Xn) */ +{ CPUFUNC(op_46f8_0), 0, 18168 }, /* MV2SR.W (xxx).W */ +{ CPUFUNC(op_46f9_0), 0, 18169 }, /* MV2SR.W (xxx).L */ +{ CPUFUNC(op_46fa_0), 0, 18170 }, /* MV2SR.W (d16,PC) */ +{ CPUFUNC(op_46fb_3), 0, 18171 }, /* MV2SR.W (d8,PC,Xn) */ +{ CPUFUNC(op_46fc_0), 0, 18172 }, /* MV2SR.W #.W */ +{ CPUFUNC(op_4800_1), 0, 18432 }, /* NBCD.B Dn */ +{ CPUFUNC(op_4810_1), 0, 18448 }, /* NBCD.B (An) */ +{ CPUFUNC(op_4818_1), 0, 18456 }, /* NBCD.B (An)+ */ +{ CPUFUNC(op_4820_1), 0, 18464 }, /* NBCD.B -(An) */ +{ CPUFUNC(op_4828_1), 0, 18472 }, /* NBCD.B (d16,An) */ +{ CPUFUNC(op_4830_3), 0, 18480 }, /* NBCD.B (d8,An,Xn) */ +{ CPUFUNC(op_4838_1), 0, 18488 }, /* NBCD.B (xxx).W */ +{ CPUFUNC(op_4839_1), 0, 18489 }, /* NBCD.B (xxx).L */ +{ CPUFUNC(op_4840_0), 0, 18496 }, /* SWAP.W Dn */ +{ CPUFUNC_FF(op_4850_0), 0, 18512 }, /* PEA.L (An) */ +{ CPUFUNC_FF(op_4868_0), 0, 18536 }, /* PEA.L (d16,An) */ +{ CPUFUNC_FF(op_4870_3), 0, 18544 }, /* PEA.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4878_0), 0, 18552 }, /* PEA.L (xxx).W */ +{ CPUFUNC_FF(op_4879_0), 0, 18553 }, /* PEA.L (xxx).L */ +{ CPUFUNC_FF(op_487a_0), 0, 18554 }, /* PEA.L (d16,PC) */ +{ CPUFUNC_FF(op_487b_3), 0, 18555 }, /* PEA.L (d8,PC,Xn) */ +{ CPUFUNC(op_4880_0), 0, 18560 }, /* EXT.W Dn */ +{ CPUFUNC_FF(op_4890_0), 0, 18576 }, /* MVMLE.W #.W,(An) */ +{ CPUFUNC_FF(op_48a0_0), 0, 18592 }, /* MVMLE.W #.W,-(An) */ +{ CPUFUNC_FF(op_48a8_0), 0, 18600 }, /* MVMLE.W #.W,(d16,An) */ +{ CPUFUNC_FF(op_48b0_3), 0, 18608 }, /* MVMLE.W #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_48b8_0), 0, 18616 }, /* MVMLE.W #.W,(xxx).W */ +{ CPUFUNC_FF(op_48b9_0), 0, 18617 }, /* MVMLE.W #.W,(xxx).L */ +{ CPUFUNC(op_48c0_0), 0, 18624 }, /* EXT.L Dn */ +{ CPUFUNC_FF(op_48d0_0), 0, 18640 }, /* MVMLE.L #.W,(An) */ +{ CPUFUNC_FF(op_48e0_0), 0, 18656 }, /* MVMLE.L #.W,-(An) */ +{ CPUFUNC_FF(op_48e8_0), 0, 18664 }, /* MVMLE.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_48f0_3), 0, 18672 }, /* MVMLE.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_48f8_0), 0, 18680 }, /* MVMLE.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_48f9_0), 0, 18681 }, /* MVMLE.L #.W,(xxx).L */ +{ CPUFUNC(op_49c0_0), 0, 18880 }, /* EXT.B Dn */ +{ CPUFUNC(op_4a00_0), 0, 18944 }, /* TST.B Dn */ +{ CPUFUNC(op_4a10_0), 0, 18960 }, /* TST.B (An) */ +{ CPUFUNC(op_4a18_0), 0, 18968 }, /* TST.B (An)+ */ +{ CPUFUNC(op_4a20_0), 0, 18976 }, /* TST.B -(An) */ +{ CPUFUNC(op_4a28_0), 0, 18984 }, /* TST.B (d16,An) */ +{ CPUFUNC(op_4a30_3), 0, 18992 }, /* TST.B (d8,An,Xn) */ +{ CPUFUNC(op_4a38_0), 0, 19000 }, /* TST.B (xxx).W */ +{ CPUFUNC(op_4a39_0), 0, 19001 }, /* TST.B (xxx).L */ +{ CPUFUNC(op_4a3a_0), 0, 19002 }, /* TST.B (d16,PC) */ +{ CPUFUNC(op_4a3b_3), 0, 19003 }, /* TST.B (d8,PC,Xn) */ +{ CPUFUNC(op_4a3c_0), 0, 19004 }, /* TST.B #.B */ +{ CPUFUNC(op_4a40_0), 0, 19008 }, /* TST.W Dn */ +{ CPUFUNC(op_4a48_0), 0, 19016 }, /* TST.W An */ +{ CPUFUNC(op_4a50_0), 0, 19024 }, /* TST.W (An) */ +{ CPUFUNC(op_4a58_0), 0, 19032 }, /* TST.W (An)+ */ +{ CPUFUNC(op_4a60_0), 0, 19040 }, /* TST.W -(An) */ +{ CPUFUNC(op_4a68_0), 0, 19048 }, /* TST.W (d16,An) */ +{ CPUFUNC(op_4a70_3), 0, 19056 }, /* TST.W (d8,An,Xn) */ +{ CPUFUNC(op_4a78_0), 0, 19064 }, /* TST.W (xxx).W */ +{ CPUFUNC(op_4a79_0), 0, 19065 }, /* TST.W (xxx).L */ +{ CPUFUNC(op_4a7a_0), 0, 19066 }, /* TST.W (d16,PC) */ +{ CPUFUNC(op_4a7b_3), 0, 19067 }, /* TST.W (d8,PC,Xn) */ +{ CPUFUNC(op_4a7c_0), 0, 19068 }, /* TST.W #.W */ +{ CPUFUNC(op_4a80_0), 0, 19072 }, /* TST.L Dn */ +{ CPUFUNC(op_4a88_0), 0, 19080 }, /* TST.L An */ +{ CPUFUNC(op_4a90_0), 0, 19088 }, /* TST.L (An) */ +{ CPUFUNC(op_4a98_0), 0, 19096 }, /* TST.L (An)+ */ +{ CPUFUNC(op_4aa0_0), 0, 19104 }, /* TST.L -(An) */ +{ CPUFUNC(op_4aa8_0), 0, 19112 }, /* TST.L (d16,An) */ +{ CPUFUNC(op_4ab0_3), 0, 19120 }, /* TST.L (d8,An,Xn) */ +{ CPUFUNC(op_4ab8_0), 0, 19128 }, /* TST.L (xxx).W */ +{ CPUFUNC(op_4ab9_0), 0, 19129 }, /* TST.L (xxx).L */ +{ CPUFUNC(op_4aba_0), 0, 19130 }, /* TST.L (d16,PC) */ +{ CPUFUNC(op_4abb_3), 0, 19131 }, /* TST.L (d8,PC,Xn) */ +{ CPUFUNC(op_4abc_0), 0, 19132 }, /* TST.L #.L */ +{ CPUFUNC(op_4ac0_0), 0, 19136 }, /* TAS.B Dn */ +{ CPUFUNC(op_4ad0_0), 0, 19152 }, /* TAS.B (An) */ +{ CPUFUNC(op_4ad8_0), 0, 19160 }, /* TAS.B (An)+ */ +{ CPUFUNC(op_4ae0_0), 0, 19168 }, /* TAS.B -(An) */ +{ CPUFUNC(op_4ae8_0), 0, 19176 }, /* TAS.B (d16,An) */ +{ CPUFUNC(op_4af0_3), 0, 19184 }, /* TAS.B (d8,An,Xn) */ +{ CPUFUNC(op_4af8_0), 0, 19192 }, /* TAS.B (xxx).W */ +{ CPUFUNC(op_4af9_0), 0, 19193 }, /* TAS.B (xxx).L */ +{ CPUFUNC_FF(op_4c90_0), 0, 19600 }, /* MVMEL.W #.W,(An) */ +{ CPUFUNC_FF(op_4c98_0), 0, 19608 }, /* MVMEL.W #.W,(An)+ */ +{ CPUFUNC_FF(op_4ca8_0), 0, 19624 }, /* MVMEL.W #.W,(d16,An) */ +{ CPUFUNC_FF(op_4cb0_3), 0, 19632 }, /* MVMEL.W #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_4cb8_0), 0, 19640 }, /* MVMEL.W #.W,(xxx).W */ +{ CPUFUNC_FF(op_4cb9_0), 0, 19641 }, /* MVMEL.W #.W,(xxx).L */ +{ CPUFUNC_FF(op_4cba_0), 0, 19642 }, /* MVMEL.W #.W,(d16,PC) */ +{ CPUFUNC_FF(op_4cbb_3), 0, 19643 }, /* MVMEL.W #.W,(d8,PC,Xn) */ +{ CPUFUNC_FF(op_4cd0_0), 0, 19664 }, /* MVMEL.L #.W,(An) */ +{ CPUFUNC_FF(op_4cd8_0), 0, 19672 }, /* MVMEL.L #.W,(An)+ */ +{ CPUFUNC_FF(op_4ce8_0), 0, 19688 }, /* MVMEL.L #.W,(d16,An) */ +{ CPUFUNC_FF(op_4cf0_3), 0, 19696 }, /* MVMEL.L #.W,(d8,An,Xn) */ +{ CPUFUNC_FF(op_4cf8_0), 0, 19704 }, /* MVMEL.L #.W,(xxx).W */ +{ CPUFUNC_FF(op_4cf9_0), 0, 19705 }, /* MVMEL.L #.W,(xxx).L */ +{ CPUFUNC_FF(op_4cfa_0), 0, 19706 }, /* MVMEL.L #.W,(d16,PC) */ +{ CPUFUNC_FF(op_4cfb_3), 0, 19707 }, /* MVMEL.L #.W,(d8,PC,Xn) */ +{ CPUFUNC_FF(op_4e40_0), 0, 20032 }, /* TRAP.L # */ +{ CPUFUNC_FF(op_4e50_0), 0, 20048 }, /* LINK.W An,#.W */ +{ CPUFUNC_FF(op_4e58_0), 0, 20056 }, /* UNLK.L An */ +{ CPUFUNC_FF(op_4e60_0), 0, 20064 }, /* MVR2USP.L An */ +{ CPUFUNC_FF(op_4e68_0), 0, 20072 }, /* MVUSP2R.L An */ +{ CPUFUNC_FF(op_4e70_0), 0, 20080 }, /* RESET.L */ +{ CPUFUNC_FF(op_4e71_0), 0, 20081 }, /* NOP.L */ +{ CPUFUNC(op_4e72_0), 0, 20082 }, /* STOP.L #.W */ +{ CPUFUNC(op_4e73_4), 0, 20083 }, /* RTE.L */ +{ CPUFUNC_FF(op_4e74_0), 0, 20084 }, /* RTD.L #.W */ +{ CPUFUNC_FF(op_4e75_0), 0, 20085 }, /* RTS.L */ +{ CPUFUNC_FF(op_4e76_0), 0, 20086 }, /* TRAPV.L */ +{ CPUFUNC(op_4e77_0), 0, 20087 }, /* RTR.L */ +{ CPUFUNC_FF(op_4e90_0), 0, 20112 }, /* JSR.L (An) */ +{ CPUFUNC_FF(op_4ea8_0), 0, 20136 }, /* JSR.L (d16,An) */ +{ CPUFUNC_FF(op_4eb0_3), 0, 20144 }, /* JSR.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4eb8_0), 0, 20152 }, /* JSR.L (xxx).W */ +{ CPUFUNC_FF(op_4eb9_0), 0, 20153 }, /* JSR.L (xxx).L */ +{ CPUFUNC_FF(op_4eba_0), 0, 20154 }, /* JSR.L (d16,PC) */ +{ CPUFUNC_FF(op_4ebb_3), 0, 20155 }, /* JSR.L (d8,PC,Xn) */ +{ CPUFUNC_FF(op_4ed0_0), 0, 20176 }, /* JMP.L (An) */ +{ CPUFUNC_FF(op_4ee8_0), 0, 20200 }, /* JMP.L (d16,An) */ +{ CPUFUNC_FF(op_4ef0_3), 0, 20208 }, /* JMP.L (d8,An,Xn) */ +{ CPUFUNC_FF(op_4ef8_0), 0, 20216 }, /* JMP.L (xxx).W */ +{ CPUFUNC_FF(op_4ef9_0), 0, 20217 }, /* JMP.L (xxx).L */ +{ CPUFUNC_FF(op_4efa_0), 0, 20218 }, /* JMP.L (d16,PC) */ +{ CPUFUNC_FF(op_4efb_3), 0, 20219 }, /* JMP.L (d8,PC,Xn) */ +{ CPUFUNC(op_5000_0), 0, 20480 }, /* ADD.B #,Dn */ +{ CPUFUNC(op_5010_0), 0, 20496 }, /* ADD.B #,(An) */ +{ CPUFUNC(op_5018_0), 0, 20504 }, /* ADD.B #,(An)+ */ +{ CPUFUNC(op_5020_0), 0, 20512 }, /* ADD.B #,-(An) */ +{ CPUFUNC(op_5028_0), 0, 20520 }, /* ADD.B #,(d16,An) */ +{ CPUFUNC(op_5030_3), 0, 20528 }, /* ADD.B #,(d8,An,Xn) */ +{ CPUFUNC(op_5038_0), 0, 20536 }, /* ADD.B #,(xxx).W */ +{ CPUFUNC(op_5039_0), 0, 20537 }, /* ADD.B #,(xxx).L */ +{ CPUFUNC(op_5040_0), 0, 20544 }, /* ADD.W #,Dn */ +{ CPUFUNC_FF(op_5048_0), 0, 20552 }, /* ADDA.W #,An */ +{ CPUFUNC(op_5050_0), 0, 20560 }, /* ADD.W #,(An) */ +{ CPUFUNC(op_5058_0), 0, 20568 }, /* ADD.W #,(An)+ */ +{ CPUFUNC(op_5060_0), 0, 20576 }, /* ADD.W #,-(An) */ +{ CPUFUNC(op_5068_0), 0, 20584 }, /* ADD.W #,(d16,An) */ +{ CPUFUNC(op_5070_3), 0, 20592 }, /* ADD.W #,(d8,An,Xn) */ +{ CPUFUNC(op_5078_0), 0, 20600 }, /* ADD.W #,(xxx).W */ +{ CPUFUNC(op_5079_0), 0, 20601 }, /* ADD.W #,(xxx).L */ +{ CPUFUNC(op_5080_0), 0, 20608 }, /* ADD.L #,Dn */ +{ CPUFUNC_FF(op_5088_0), 0, 20616 }, /* ADDA.L #,An */ +{ CPUFUNC(op_5090_0), 0, 20624 }, /* ADD.L #,(An) */ +{ CPUFUNC(op_5098_0), 0, 20632 }, /* ADD.L #,(An)+ */ +{ CPUFUNC(op_50a0_0), 0, 20640 }, /* ADD.L #,-(An) */ +{ CPUFUNC(op_50a8_0), 0, 20648 }, /* ADD.L #,(d16,An) */ +{ CPUFUNC(op_50b0_3), 0, 20656 }, /* ADD.L #,(d8,An,Xn) */ +{ CPUFUNC(op_50b8_0), 0, 20664 }, /* ADD.L #,(xxx).W */ +{ CPUFUNC(op_50b9_0), 0, 20665 }, /* ADD.L #,(xxx).L */ +{ CPUFUNC_FF(op_50c0_0), 0, 20672 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_50c8_0), 0, 20680 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_50d0_0), 0, 20688 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_50d8_0), 0, 20696 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_50e0_0), 0, 20704 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_50e8_0), 0, 20712 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_50f0_3), 0, 20720 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_50f8_0), 0, 20728 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_50f9_0), 0, 20729 }, /* Scc.B (xxx).L */ +{ CPUFUNC(op_5100_0), 0, 20736 }, /* SUB.B #,Dn */ +{ CPUFUNC(op_5110_0), 0, 20752 }, /* SUB.B #,(An) */ +{ CPUFUNC(op_5118_0), 0, 20760 }, /* SUB.B #,(An)+ */ +{ CPUFUNC(op_5120_0), 0, 20768 }, /* SUB.B #,-(An) */ +{ CPUFUNC(op_5128_0), 0, 20776 }, /* SUB.B #,(d16,An) */ +{ CPUFUNC(op_5130_3), 0, 20784 }, /* SUB.B #,(d8,An,Xn) */ +{ CPUFUNC(op_5138_0), 0, 20792 }, /* SUB.B #,(xxx).W */ +{ CPUFUNC(op_5139_0), 0, 20793 }, /* SUB.B #,(xxx).L */ +{ CPUFUNC(op_5140_0), 0, 20800 }, /* SUB.W #,Dn */ +{ CPUFUNC_FF(op_5148_0), 0, 20808 }, /* SUBA.W #,An */ +{ CPUFUNC(op_5150_0), 0, 20816 }, /* SUB.W #,(An) */ +{ CPUFUNC(op_5158_0), 0, 20824 }, /* SUB.W #,(An)+ */ +{ CPUFUNC(op_5160_0), 0, 20832 }, /* SUB.W #,-(An) */ +{ CPUFUNC(op_5168_0), 0, 20840 }, /* SUB.W #,(d16,An) */ +{ CPUFUNC(op_5170_3), 0, 20848 }, /* SUB.W #,(d8,An,Xn) */ +{ CPUFUNC(op_5178_0), 0, 20856 }, /* SUB.W #,(xxx).W */ +{ CPUFUNC(op_5179_0), 0, 20857 }, /* SUB.W #,(xxx).L */ +{ CPUFUNC(op_5180_0), 0, 20864 }, /* SUB.L #,Dn */ +{ CPUFUNC_FF(op_5188_0), 0, 20872 }, /* SUBA.L #,An */ +{ CPUFUNC(op_5190_0), 0, 20880 }, /* SUB.L #,(An) */ +{ CPUFUNC(op_5198_0), 0, 20888 }, /* SUB.L #,(An)+ */ +{ CPUFUNC(op_51a0_0), 0, 20896 }, /* SUB.L #,-(An) */ +{ CPUFUNC(op_51a8_0), 0, 20904 }, /* SUB.L #,(d16,An) */ +{ CPUFUNC(op_51b0_3), 0, 20912 }, /* SUB.L #,(d8,An,Xn) */ +{ CPUFUNC(op_51b8_0), 0, 20920 }, /* SUB.L #,(xxx).W */ +{ CPUFUNC(op_51b9_0), 0, 20921 }, /* SUB.L #,(xxx).L */ +{ CPUFUNC_FF(op_51c0_0), 0, 20928 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_51c8_0), 0, 20936 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_51d0_0), 0, 20944 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_51d8_0), 0, 20952 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_51e0_0), 0, 20960 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_51e8_0), 0, 20968 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_51f0_3), 0, 20976 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_51f8_0), 0, 20984 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_51f9_0), 0, 20985 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_52c0_0), 0, 21184 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_52c8_0), 0, 21192 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_52d0_0), 0, 21200 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_52d8_0), 0, 21208 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_52e0_0), 0, 21216 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_52e8_0), 0, 21224 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_52f0_3), 0, 21232 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_52f8_0), 0, 21240 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_52f9_0), 0, 21241 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_53c0_0), 0, 21440 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_53c8_0), 0, 21448 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_53d0_0), 0, 21456 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_53d8_0), 0, 21464 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_53e0_0), 0, 21472 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_53e8_0), 0, 21480 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_53f0_3), 0, 21488 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_53f8_0), 0, 21496 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_53f9_0), 0, 21497 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_54c0_0), 0, 21696 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_54c8_0), 0, 21704 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_54d0_0), 0, 21712 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_54d8_0), 0, 21720 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_54e0_0), 0, 21728 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_54e8_0), 0, 21736 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_54f0_3), 0, 21744 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_54f8_0), 0, 21752 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_54f9_0), 0, 21753 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_55c0_0), 0, 21952 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_55c8_0), 0, 21960 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_55d0_0), 0, 21968 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_55d8_0), 0, 21976 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_55e0_0), 0, 21984 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_55e8_0), 0, 21992 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_55f0_3), 0, 22000 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_55f8_0), 0, 22008 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_55f9_0), 0, 22009 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_56c0_0), 0, 22208 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_56c8_0), 0, 22216 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_56d0_0), 0, 22224 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_56d8_0), 0, 22232 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_56e0_0), 0, 22240 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_56e8_0), 0, 22248 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_56f0_3), 0, 22256 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_56f8_0), 0, 22264 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_56f9_0), 0, 22265 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_57c0_0), 0, 22464 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_57c8_0), 0, 22472 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_57d0_0), 0, 22480 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_57d8_0), 0, 22488 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_57e0_0), 0, 22496 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_57e8_0), 0, 22504 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_57f0_3), 0, 22512 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_57f8_0), 0, 22520 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_57f9_0), 0, 22521 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_58c0_0), 0, 22720 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_58c8_0), 0, 22728 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_58d0_0), 0, 22736 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_58d8_0), 0, 22744 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_58e0_0), 0, 22752 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_58e8_0), 0, 22760 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_58f0_3), 0, 22768 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_58f8_0), 0, 22776 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_58f9_0), 0, 22777 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_59c0_0), 0, 22976 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_59c8_0), 0, 22984 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_59d0_0), 0, 22992 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_59d8_0), 0, 23000 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_59e0_0), 0, 23008 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_59e8_0), 0, 23016 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_59f0_3), 0, 23024 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_59f8_0), 0, 23032 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_59f9_0), 0, 23033 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5ac0_0), 0, 23232 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5ac8_0), 0, 23240 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5ad0_0), 0, 23248 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5ad8_0), 0, 23256 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ae0_0), 0, 23264 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ae8_0), 0, 23272 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5af0_3), 0, 23280 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5af8_0), 0, 23288 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5af9_0), 0, 23289 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5bc0_0), 0, 23488 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5bc8_0), 0, 23496 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5bd0_0), 0, 23504 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5bd8_0), 0, 23512 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5be0_0), 0, 23520 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5be8_0), 0, 23528 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5bf0_3), 0, 23536 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5bf8_0), 0, 23544 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5bf9_0), 0, 23545 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5cc0_0), 0, 23744 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5cc8_0), 0, 23752 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5cd0_0), 0, 23760 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5cd8_0), 0, 23768 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ce0_0), 0, 23776 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ce8_0), 0, 23784 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5cf0_3), 0, 23792 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5cf8_0), 0, 23800 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5cf9_0), 0, 23801 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5dc0_0), 0, 24000 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5dc8_0), 0, 24008 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5dd0_0), 0, 24016 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5dd8_0), 0, 24024 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5de0_0), 0, 24032 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5de8_0), 0, 24040 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5df0_3), 0, 24048 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5df8_0), 0, 24056 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5df9_0), 0, 24057 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5ec0_0), 0, 24256 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5ec8_0), 0, 24264 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5ed0_0), 0, 24272 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5ed8_0), 0, 24280 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5ee0_0), 0, 24288 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5ee8_0), 0, 24296 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5ef0_3), 0, 24304 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5ef8_0), 0, 24312 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5ef9_0), 0, 24313 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_5fc0_0), 0, 24512 }, /* Scc.B Dn */ +{ CPUFUNC_FF(op_5fc8_0), 0, 24520 }, /* DBcc.W Dn,#.W */ +{ CPUFUNC_FF(op_5fd0_0), 0, 24528 }, /* Scc.B (An) */ +{ CPUFUNC_FF(op_5fd8_0), 0, 24536 }, /* Scc.B (An)+ */ +{ CPUFUNC_FF(op_5fe0_0), 0, 24544 }, /* Scc.B -(An) */ +{ CPUFUNC_FF(op_5fe8_0), 0, 24552 }, /* Scc.B (d16,An) */ +{ CPUFUNC_FF(op_5ff0_3), 0, 24560 }, /* Scc.B (d8,An,Xn) */ +{ CPUFUNC_FF(op_5ff8_0), 0, 24568 }, /* Scc.B (xxx).W */ +{ CPUFUNC_FF(op_5ff9_0), 0, 24569 }, /* Scc.B (xxx).L */ +{ CPUFUNC_FF(op_6000_0), 0, 24576 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6001_0), 0, 24577 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_60ff_3), 0, 24831 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6100_0), 0, 24832 }, /* BSR.W #.W */ +{ CPUFUNC_FF(op_6101_0), 0, 24833 }, /* BSR.B # */ +{ CPUFUNC_FF(op_61ff_0), 0, 25087 }, /* BSR.L #.L */ +{ CPUFUNC_FF(op_6200_0), 0, 25088 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6201_0), 0, 25089 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_62ff_3), 0, 25343 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6300_0), 0, 25344 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6301_0), 0, 25345 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_63ff_3), 0, 25599 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6400_0), 0, 25600 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6401_0), 0, 25601 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_64ff_3), 0, 25855 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6500_0), 0, 25856 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6501_0), 0, 25857 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_65ff_3), 0, 26111 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6600_0), 0, 26112 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6601_0), 0, 26113 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_66ff_3), 0, 26367 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6700_0), 0, 26368 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6701_0), 0, 26369 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_67ff_3), 0, 26623 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6800_0), 0, 26624 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6801_0), 0, 26625 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_68ff_3), 0, 26879 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6900_0), 0, 26880 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6901_0), 0, 26881 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_69ff_3), 0, 27135 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6a00_0), 0, 27136 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6a01_0), 0, 27137 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6aff_3), 0, 27391 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6b00_0), 0, 27392 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6b01_0), 0, 27393 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6bff_3), 0, 27647 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6c00_0), 0, 27648 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6c01_0), 0, 27649 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6cff_3), 0, 27903 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6d00_0), 0, 27904 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6d01_0), 0, 27905 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6dff_3), 0, 28159 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6e00_0), 0, 28160 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6e01_0), 0, 28161 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6eff_3), 0, 28415 }, /* Bcc.L #.L */ +{ CPUFUNC_FF(op_6f00_0), 0, 28416 }, /* Bcc.W #.W */ +{ CPUFUNC_FF(op_6f01_0), 0, 28417 }, /* Bcc.B # */ +{ CPUFUNC_FF(op_6fff_3), 0, 28671 }, /* Bcc.L #.L */ +{ CPUFUNC(op_7000_0), 0, 28672 }, /* MOVE.L #,Dn */ +{ CPUFUNC_FF(op_7100_0), 0, 28928 }, /* EMULOP_RETURN.L */ +{ CPUFUNC_FF(op_7101_0), 0, 28929 }, /* EMULOP.L # */ +{ CPUFUNC(op_8000_0), 0, 32768 }, /* OR.B Dn,Dn */ +{ CPUFUNC(op_8010_0), 0, 32784 }, /* OR.B (An),Dn */ +{ CPUFUNC(op_8018_0), 0, 32792 }, /* OR.B (An)+,Dn */ +{ CPUFUNC(op_8020_0), 0, 32800 }, /* OR.B -(An),Dn */ +{ CPUFUNC(op_8028_0), 0, 32808 }, /* OR.B (d16,An),Dn */ +{ CPUFUNC(op_8030_3), 0, 32816 }, /* OR.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_8038_0), 0, 32824 }, /* OR.B (xxx).W,Dn */ +{ CPUFUNC(op_8039_0), 0, 32825 }, /* OR.B (xxx).L,Dn */ +{ CPUFUNC(op_803a_0), 0, 32826 }, /* OR.B (d16,PC),Dn */ +{ CPUFUNC(op_803b_3), 0, 32827 }, /* OR.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_803c_0), 0, 32828 }, /* OR.B #.B,Dn */ +{ CPUFUNC(op_8040_0), 0, 32832 }, /* OR.W Dn,Dn */ +{ CPUFUNC(op_8050_0), 0, 32848 }, /* OR.W (An),Dn */ +{ CPUFUNC(op_8058_0), 0, 32856 }, /* OR.W (An)+,Dn */ +{ CPUFUNC(op_8060_0), 0, 32864 }, /* OR.W -(An),Dn */ +{ CPUFUNC(op_8068_0), 0, 32872 }, /* OR.W (d16,An),Dn */ +{ CPUFUNC(op_8070_3), 0, 32880 }, /* OR.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_8078_0), 0, 32888 }, /* OR.W (xxx).W,Dn */ +{ CPUFUNC(op_8079_0), 0, 32889 }, /* OR.W (xxx).L,Dn */ +{ CPUFUNC(op_807a_0), 0, 32890 }, /* OR.W (d16,PC),Dn */ +{ CPUFUNC(op_807b_3), 0, 32891 }, /* OR.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_807c_0), 0, 32892 }, /* OR.W #.W,Dn */ +{ CPUFUNC(op_8080_0), 0, 32896 }, /* OR.L Dn,Dn */ +{ CPUFUNC(op_8090_0), 0, 32912 }, /* OR.L (An),Dn */ +{ CPUFUNC(op_8098_0), 0, 32920 }, /* OR.L (An)+,Dn */ +{ CPUFUNC(op_80a0_0), 0, 32928 }, /* OR.L -(An),Dn */ +{ CPUFUNC(op_80a8_0), 0, 32936 }, /* OR.L (d16,An),Dn */ +{ CPUFUNC(op_80b0_3), 0, 32944 }, /* OR.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_80b8_0), 0, 32952 }, /* OR.L (xxx).W,Dn */ +{ CPUFUNC(op_80b9_0), 0, 32953 }, /* OR.L (xxx).L,Dn */ +{ CPUFUNC(op_80ba_0), 0, 32954 }, /* OR.L (d16,PC),Dn */ +{ CPUFUNC(op_80bb_3), 0, 32955 }, /* OR.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_80bc_0), 0, 32956 }, /* OR.L #.L,Dn */ +{ CPUFUNC(op_80c0_0), 0, 32960 }, /* DIVU.W Dn,Dn */ +{ CPUFUNC(op_80d0_0), 0, 32976 }, /* DIVU.W (An),Dn */ +{ CPUFUNC(op_80d8_0), 0, 32984 }, /* DIVU.W (An)+,Dn */ +{ CPUFUNC(op_80e0_0), 0, 32992 }, /* DIVU.W -(An),Dn */ +{ CPUFUNC(op_80e8_0), 0, 33000 }, /* DIVU.W (d16,An),Dn */ +{ CPUFUNC(op_80f0_3), 0, 33008 }, /* DIVU.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_80f8_0), 0, 33016 }, /* DIVU.W (xxx).W,Dn */ +{ CPUFUNC(op_80f9_0), 0, 33017 }, /* DIVU.W (xxx).L,Dn */ +{ CPUFUNC(op_80fa_0), 0, 33018 }, /* DIVU.W (d16,PC),Dn */ +{ CPUFUNC(op_80fb_3), 0, 33019 }, /* DIVU.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_80fc_0), 0, 33020 }, /* DIVU.W #.W,Dn */ +{ CPUFUNC(op_8100_1), 0, 33024 }, /* SBCD.B Dn,Dn */ +{ CPUFUNC(op_8108_1), 0, 33032 }, /* SBCD.B -(An),-(An) */ +{ CPUFUNC(op_8110_0), 0, 33040 }, /* OR.B Dn,(An) */ +{ CPUFUNC(op_8118_0), 0, 33048 }, /* OR.B Dn,(An)+ */ +{ CPUFUNC(op_8120_0), 0, 33056 }, /* OR.B Dn,-(An) */ +{ CPUFUNC(op_8128_0), 0, 33064 }, /* OR.B Dn,(d16,An) */ +{ CPUFUNC(op_8130_3), 0, 33072 }, /* OR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_8138_0), 0, 33080 }, /* OR.B Dn,(xxx).W */ +{ CPUFUNC(op_8139_0), 0, 33081 }, /* OR.B Dn,(xxx).L */ +{ CPUFUNC(op_8150_0), 0, 33104 }, /* OR.W Dn,(An) */ +{ CPUFUNC(op_8158_0), 0, 33112 }, /* OR.W Dn,(An)+ */ +{ CPUFUNC(op_8160_0), 0, 33120 }, /* OR.W Dn,-(An) */ +{ CPUFUNC(op_8168_0), 0, 33128 }, /* OR.W Dn,(d16,An) */ +{ CPUFUNC(op_8170_3), 0, 33136 }, /* OR.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_8178_0), 0, 33144 }, /* OR.W Dn,(xxx).W */ +{ CPUFUNC(op_8179_0), 0, 33145 }, /* OR.W Dn,(xxx).L */ +{ CPUFUNC(op_8190_0), 0, 33168 }, /* OR.L Dn,(An) */ +{ CPUFUNC(op_8198_0), 0, 33176 }, /* OR.L Dn,(An)+ */ +{ CPUFUNC(op_81a0_0), 0, 33184 }, /* OR.L Dn,-(An) */ +{ CPUFUNC(op_81a8_0), 0, 33192 }, /* OR.L Dn,(d16,An) */ +{ CPUFUNC(op_81b0_3), 0, 33200 }, /* OR.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_81b8_0), 0, 33208 }, /* OR.L Dn,(xxx).W */ +{ CPUFUNC(op_81b9_0), 0, 33209 }, /* OR.L Dn,(xxx).L */ +{ CPUFUNC(op_81c0_0), 0, 33216 }, /* DIVS.W Dn,Dn */ +{ CPUFUNC(op_81d0_0), 0, 33232 }, /* DIVS.W (An),Dn */ +{ CPUFUNC(op_81d8_0), 0, 33240 }, /* DIVS.W (An)+,Dn */ +{ CPUFUNC(op_81e0_0), 0, 33248 }, /* DIVS.W -(An),Dn */ +{ CPUFUNC(op_81e8_0), 0, 33256 }, /* DIVS.W (d16,An),Dn */ +{ CPUFUNC(op_81f0_3), 0, 33264 }, /* DIVS.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_81f8_0), 0, 33272 }, /* DIVS.W (xxx).W,Dn */ +{ CPUFUNC(op_81f9_0), 0, 33273 }, /* DIVS.W (xxx).L,Dn */ +{ CPUFUNC(op_81fa_0), 0, 33274 }, /* DIVS.W (d16,PC),Dn */ +{ CPUFUNC(op_81fb_3), 0, 33275 }, /* DIVS.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_81fc_0), 0, 33276 }, /* DIVS.W #.W,Dn */ +{ CPUFUNC(op_9000_0), 0, 36864 }, /* SUB.B Dn,Dn */ +{ CPUFUNC(op_9010_0), 0, 36880 }, /* SUB.B (An),Dn */ +{ CPUFUNC(op_9018_0), 0, 36888 }, /* SUB.B (An)+,Dn */ +{ CPUFUNC(op_9020_0), 0, 36896 }, /* SUB.B -(An),Dn */ +{ CPUFUNC(op_9028_0), 0, 36904 }, /* SUB.B (d16,An),Dn */ +{ CPUFUNC(op_9030_3), 0, 36912 }, /* SUB.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_9038_0), 0, 36920 }, /* SUB.B (xxx).W,Dn */ +{ CPUFUNC(op_9039_0), 0, 36921 }, /* SUB.B (xxx).L,Dn */ +{ CPUFUNC(op_903a_0), 0, 36922 }, /* SUB.B (d16,PC),Dn */ +{ CPUFUNC(op_903b_3), 0, 36923 }, /* SUB.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_903c_0), 0, 36924 }, /* SUB.B #.B,Dn */ +{ CPUFUNC(op_9040_0), 0, 36928 }, /* SUB.W Dn,Dn */ +{ CPUFUNC(op_9048_0), 0, 36936 }, /* SUB.W An,Dn */ +{ CPUFUNC(op_9050_0), 0, 36944 }, /* SUB.W (An),Dn */ +{ CPUFUNC(op_9058_0), 0, 36952 }, /* SUB.W (An)+,Dn */ +{ CPUFUNC(op_9060_0), 0, 36960 }, /* SUB.W -(An),Dn */ +{ CPUFUNC(op_9068_0), 0, 36968 }, /* SUB.W (d16,An),Dn */ +{ CPUFUNC(op_9070_3), 0, 36976 }, /* SUB.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_9078_0), 0, 36984 }, /* SUB.W (xxx).W,Dn */ +{ CPUFUNC(op_9079_0), 0, 36985 }, /* SUB.W (xxx).L,Dn */ +{ CPUFUNC(op_907a_0), 0, 36986 }, /* SUB.W (d16,PC),Dn */ +{ CPUFUNC(op_907b_3), 0, 36987 }, /* SUB.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_907c_0), 0, 36988 }, /* SUB.W #.W,Dn */ +{ CPUFUNC(op_9080_0), 0, 36992 }, /* SUB.L Dn,Dn */ +{ CPUFUNC(op_9088_0), 0, 37000 }, /* SUB.L An,Dn */ +{ CPUFUNC(op_9090_0), 0, 37008 }, /* SUB.L (An),Dn */ +{ CPUFUNC(op_9098_0), 0, 37016 }, /* SUB.L (An)+,Dn */ +{ CPUFUNC(op_90a0_0), 0, 37024 }, /* SUB.L -(An),Dn */ +{ CPUFUNC(op_90a8_0), 0, 37032 }, /* SUB.L (d16,An),Dn */ +{ CPUFUNC(op_90b0_3), 0, 37040 }, /* SUB.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_90b8_0), 0, 37048 }, /* SUB.L (xxx).W,Dn */ +{ CPUFUNC(op_90b9_0), 0, 37049 }, /* SUB.L (xxx).L,Dn */ +{ CPUFUNC(op_90ba_0), 0, 37050 }, /* SUB.L (d16,PC),Dn */ +{ CPUFUNC(op_90bb_3), 0, 37051 }, /* SUB.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_90bc_0), 0, 37052 }, /* SUB.L #.L,Dn */ +{ CPUFUNC_FF(op_90c0_0), 0, 37056 }, /* SUBA.W Dn,An */ +{ CPUFUNC_FF(op_90c8_0), 0, 37064 }, /* SUBA.W An,An */ +{ CPUFUNC_FF(op_90d0_0), 0, 37072 }, /* SUBA.W (An),An */ +{ CPUFUNC_FF(op_90d8_0), 0, 37080 }, /* SUBA.W (An)+,An */ +{ CPUFUNC_FF(op_90e0_0), 0, 37088 }, /* SUBA.W -(An),An */ +{ CPUFUNC_FF(op_90e8_0), 0, 37096 }, /* SUBA.W (d16,An),An */ +{ CPUFUNC_FF(op_90f0_3), 0, 37104 }, /* SUBA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_90f8_0), 0, 37112 }, /* SUBA.W (xxx).W,An */ +{ CPUFUNC_FF(op_90f9_0), 0, 37113 }, /* SUBA.W (xxx).L,An */ +{ CPUFUNC_FF(op_90fa_0), 0, 37114 }, /* SUBA.W (d16,PC),An */ +{ CPUFUNC_FF(op_90fb_3), 0, 37115 }, /* SUBA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_90fc_0), 0, 37116 }, /* SUBA.W #.W,An */ +{ CPUFUNC(op_9100_0), 0, 37120 }, /* SUBX.B Dn,Dn */ +{ CPUFUNC(op_9108_0), 0, 37128 }, /* SUBX.B -(An),-(An) */ +{ CPUFUNC(op_9110_0), 0, 37136 }, /* SUB.B Dn,(An) */ +{ CPUFUNC(op_9118_0), 0, 37144 }, /* SUB.B Dn,(An)+ */ +{ CPUFUNC(op_9120_0), 0, 37152 }, /* SUB.B Dn,-(An) */ +{ CPUFUNC(op_9128_0), 0, 37160 }, /* SUB.B Dn,(d16,An) */ +{ CPUFUNC(op_9130_3), 0, 37168 }, /* SUB.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_9138_0), 0, 37176 }, /* SUB.B Dn,(xxx).W */ +{ CPUFUNC(op_9139_0), 0, 37177 }, /* SUB.B Dn,(xxx).L */ +{ CPUFUNC(op_9140_0), 0, 37184 }, /* SUBX.W Dn,Dn */ +{ CPUFUNC(op_9148_0), 0, 37192 }, /* SUBX.W -(An),-(An) */ +{ CPUFUNC(op_9150_0), 0, 37200 }, /* SUB.W Dn,(An) */ +{ CPUFUNC(op_9158_0), 0, 37208 }, /* SUB.W Dn,(An)+ */ +{ CPUFUNC(op_9160_0), 0, 37216 }, /* SUB.W Dn,-(An) */ +{ CPUFUNC(op_9168_0), 0, 37224 }, /* SUB.W Dn,(d16,An) */ +{ CPUFUNC(op_9170_3), 0, 37232 }, /* SUB.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_9178_0), 0, 37240 }, /* SUB.W Dn,(xxx).W */ +{ CPUFUNC(op_9179_0), 0, 37241 }, /* SUB.W Dn,(xxx).L */ +{ CPUFUNC(op_9180_0), 0, 37248 }, /* SUBX.L Dn,Dn */ +{ CPUFUNC(op_9188_0), 0, 37256 }, /* SUBX.L -(An),-(An) */ +{ CPUFUNC(op_9190_0), 0, 37264 }, /* SUB.L Dn,(An) */ +{ CPUFUNC(op_9198_0), 0, 37272 }, /* SUB.L Dn,(An)+ */ +{ CPUFUNC(op_91a0_0), 0, 37280 }, /* SUB.L Dn,-(An) */ +{ CPUFUNC(op_91a8_0), 0, 37288 }, /* SUB.L Dn,(d16,An) */ +{ CPUFUNC(op_91b0_3), 0, 37296 }, /* SUB.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_91b8_0), 0, 37304 }, /* SUB.L Dn,(xxx).W */ +{ CPUFUNC(op_91b9_0), 0, 37305 }, /* SUB.L Dn,(xxx).L */ +{ CPUFUNC_FF(op_91c0_0), 0, 37312 }, /* SUBA.L Dn,An */ +{ CPUFUNC_FF(op_91c8_0), 0, 37320 }, /* SUBA.L An,An */ +{ CPUFUNC_FF(op_91d0_0), 0, 37328 }, /* SUBA.L (An),An */ +{ CPUFUNC_FF(op_91d8_0), 0, 37336 }, /* SUBA.L (An)+,An */ +{ CPUFUNC_FF(op_91e0_0), 0, 37344 }, /* SUBA.L -(An),An */ +{ CPUFUNC_FF(op_91e8_0), 0, 37352 }, /* SUBA.L (d16,An),An */ +{ CPUFUNC_FF(op_91f0_3), 0, 37360 }, /* SUBA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_91f8_0), 0, 37368 }, /* SUBA.L (xxx).W,An */ +{ CPUFUNC_FF(op_91f9_0), 0, 37369 }, /* SUBA.L (xxx).L,An */ +{ CPUFUNC_FF(op_91fa_0), 0, 37370 }, /* SUBA.L (d16,PC),An */ +{ CPUFUNC_FF(op_91fb_3), 0, 37371 }, /* SUBA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_91fc_0), 0, 37372 }, /* SUBA.L #.L,An */ +{ CPUFUNC(op_b000_0), 0, 45056 }, /* CMP.B Dn,Dn */ +{ CPUFUNC(op_b010_0), 0, 45072 }, /* CMP.B (An),Dn */ +{ CPUFUNC(op_b018_0), 0, 45080 }, /* CMP.B (An)+,Dn */ +{ CPUFUNC(op_b020_0), 0, 45088 }, /* CMP.B -(An),Dn */ +{ CPUFUNC(op_b028_0), 0, 45096 }, /* CMP.B (d16,An),Dn */ +{ CPUFUNC(op_b030_3), 0, 45104 }, /* CMP.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_b038_0), 0, 45112 }, /* CMP.B (xxx).W,Dn */ +{ CPUFUNC(op_b039_0), 0, 45113 }, /* CMP.B (xxx).L,Dn */ +{ CPUFUNC(op_b03a_0), 0, 45114 }, /* CMP.B (d16,PC),Dn */ +{ CPUFUNC(op_b03b_3), 0, 45115 }, /* CMP.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b03c_0), 0, 45116 }, /* CMP.B #.B,Dn */ +{ CPUFUNC(op_b040_0), 0, 45120 }, /* CMP.W Dn,Dn */ +{ CPUFUNC(op_b048_0), 0, 45128 }, /* CMP.W An,Dn */ +{ CPUFUNC(op_b050_0), 0, 45136 }, /* CMP.W (An),Dn */ +{ CPUFUNC(op_b058_0), 0, 45144 }, /* CMP.W (An)+,Dn */ +{ CPUFUNC(op_b060_0), 0, 45152 }, /* CMP.W -(An),Dn */ +{ CPUFUNC(op_b068_0), 0, 45160 }, /* CMP.W (d16,An),Dn */ +{ CPUFUNC(op_b070_3), 0, 45168 }, /* CMP.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_b078_0), 0, 45176 }, /* CMP.W (xxx).W,Dn */ +{ CPUFUNC(op_b079_0), 0, 45177 }, /* CMP.W (xxx).L,Dn */ +{ CPUFUNC(op_b07a_0), 0, 45178 }, /* CMP.W (d16,PC),Dn */ +{ CPUFUNC(op_b07b_3), 0, 45179 }, /* CMP.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b07c_0), 0, 45180 }, /* CMP.W #.W,Dn */ +{ CPUFUNC(op_b080_0), 0, 45184 }, /* CMP.L Dn,Dn */ +{ CPUFUNC(op_b088_0), 0, 45192 }, /* CMP.L An,Dn */ +{ CPUFUNC(op_b090_0), 0, 45200 }, /* CMP.L (An),Dn */ +{ CPUFUNC(op_b098_0), 0, 45208 }, /* CMP.L (An)+,Dn */ +{ CPUFUNC(op_b0a0_0), 0, 45216 }, /* CMP.L -(An),Dn */ +{ CPUFUNC(op_b0a8_0), 0, 45224 }, /* CMP.L (d16,An),Dn */ +{ CPUFUNC(op_b0b0_3), 0, 45232 }, /* CMP.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_b0b8_0), 0, 45240 }, /* CMP.L (xxx).W,Dn */ +{ CPUFUNC(op_b0b9_0), 0, 45241 }, /* CMP.L (xxx).L,Dn */ +{ CPUFUNC(op_b0ba_0), 0, 45242 }, /* CMP.L (d16,PC),Dn */ +{ CPUFUNC(op_b0bb_3), 0, 45243 }, /* CMP.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_b0bc_0), 0, 45244 }, /* CMP.L #.L,Dn */ +{ CPUFUNC(op_b0c0_0), 0, 45248 }, /* CMPA.W Dn,An */ +{ CPUFUNC(op_b0c8_0), 0, 45256 }, /* CMPA.W An,An */ +{ CPUFUNC(op_b0d0_0), 0, 45264 }, /* CMPA.W (An),An */ +{ CPUFUNC(op_b0d8_0), 0, 45272 }, /* CMPA.W (An)+,An */ +{ CPUFUNC(op_b0e0_0), 0, 45280 }, /* CMPA.W -(An),An */ +{ CPUFUNC(op_b0e8_0), 0, 45288 }, /* CMPA.W (d16,An),An */ +{ CPUFUNC(op_b0f0_3), 0, 45296 }, /* CMPA.W (d8,An,Xn),An */ +{ CPUFUNC(op_b0f8_0), 0, 45304 }, /* CMPA.W (xxx).W,An */ +{ CPUFUNC(op_b0f9_0), 0, 45305 }, /* CMPA.W (xxx).L,An */ +{ CPUFUNC(op_b0fa_0), 0, 45306 }, /* CMPA.W (d16,PC),An */ +{ CPUFUNC(op_b0fb_3), 0, 45307 }, /* CMPA.W (d8,PC,Xn),An */ +{ CPUFUNC(op_b0fc_0), 0, 45308 }, /* CMPA.W #.W,An */ +{ CPUFUNC(op_b100_0), 0, 45312 }, /* EOR.B Dn,Dn */ +{ CPUFUNC(op_b108_0), 0, 45320 }, /* CMPM.B (An)+,(An)+ */ +{ CPUFUNC(op_b110_0), 0, 45328 }, /* EOR.B Dn,(An) */ +{ CPUFUNC(op_b118_0), 0, 45336 }, /* EOR.B Dn,(An)+ */ +{ CPUFUNC(op_b120_0), 0, 45344 }, /* EOR.B Dn,-(An) */ +{ CPUFUNC(op_b128_0), 0, 45352 }, /* EOR.B Dn,(d16,An) */ +{ CPUFUNC(op_b130_3), 0, 45360 }, /* EOR.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b138_0), 0, 45368 }, /* EOR.B Dn,(xxx).W */ +{ CPUFUNC(op_b139_0), 0, 45369 }, /* EOR.B Dn,(xxx).L */ +{ CPUFUNC(op_b140_0), 0, 45376 }, /* EOR.W Dn,Dn */ +{ CPUFUNC(op_b148_0), 0, 45384 }, /* CMPM.W (An)+,(An)+ */ +{ CPUFUNC(op_b150_0), 0, 45392 }, /* EOR.W Dn,(An) */ +{ CPUFUNC(op_b158_0), 0, 45400 }, /* EOR.W Dn,(An)+ */ +{ CPUFUNC(op_b160_0), 0, 45408 }, /* EOR.W Dn,-(An) */ +{ CPUFUNC(op_b168_0), 0, 45416 }, /* EOR.W Dn,(d16,An) */ +{ CPUFUNC(op_b170_3), 0, 45424 }, /* EOR.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b178_0), 0, 45432 }, /* EOR.W Dn,(xxx).W */ +{ CPUFUNC(op_b179_0), 0, 45433 }, /* EOR.W Dn,(xxx).L */ +{ CPUFUNC(op_b180_0), 0, 45440 }, /* EOR.L Dn,Dn */ +{ CPUFUNC(op_b188_0), 0, 45448 }, /* CMPM.L (An)+,(An)+ */ +{ CPUFUNC(op_b190_0), 0, 45456 }, /* EOR.L Dn,(An) */ +{ CPUFUNC(op_b198_0), 0, 45464 }, /* EOR.L Dn,(An)+ */ +{ CPUFUNC(op_b1a0_0), 0, 45472 }, /* EOR.L Dn,-(An) */ +{ CPUFUNC(op_b1a8_0), 0, 45480 }, /* EOR.L Dn,(d16,An) */ +{ CPUFUNC(op_b1b0_3), 0, 45488 }, /* EOR.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_b1b8_0), 0, 45496 }, /* EOR.L Dn,(xxx).W */ +{ CPUFUNC(op_b1b9_0), 0, 45497 }, /* EOR.L Dn,(xxx).L */ +{ CPUFUNC(op_b1c0_0), 0, 45504 }, /* CMPA.L Dn,An */ +{ CPUFUNC(op_b1c8_0), 0, 45512 }, /* CMPA.L An,An */ +{ CPUFUNC(op_b1d0_0), 0, 45520 }, /* CMPA.L (An),An */ +{ CPUFUNC(op_b1d8_0), 0, 45528 }, /* CMPA.L (An)+,An */ +{ CPUFUNC(op_b1e0_0), 0, 45536 }, /* CMPA.L -(An),An */ +{ CPUFUNC(op_b1e8_0), 0, 45544 }, /* CMPA.L (d16,An),An */ +{ CPUFUNC(op_b1f0_3), 0, 45552 }, /* CMPA.L (d8,An,Xn),An */ +{ CPUFUNC(op_b1f8_0), 0, 45560 }, /* CMPA.L (xxx).W,An */ +{ CPUFUNC(op_b1f9_0), 0, 45561 }, /* CMPA.L (xxx).L,An */ +{ CPUFUNC(op_b1fa_0), 0, 45562 }, /* CMPA.L (d16,PC),An */ +{ CPUFUNC(op_b1fb_3), 0, 45563 }, /* CMPA.L (d8,PC,Xn),An */ +{ CPUFUNC(op_b1fc_0), 0, 45564 }, /* CMPA.L #.L,An */ +{ CPUFUNC(op_c000_0), 0, 49152 }, /* AND.B Dn,Dn */ +{ CPUFUNC(op_c010_0), 0, 49168 }, /* AND.B (An),Dn */ +{ CPUFUNC(op_c018_0), 0, 49176 }, /* AND.B (An)+,Dn */ +{ CPUFUNC(op_c020_0), 0, 49184 }, /* AND.B -(An),Dn */ +{ CPUFUNC(op_c028_0), 0, 49192 }, /* AND.B (d16,An),Dn */ +{ CPUFUNC(op_c030_3), 0, 49200 }, /* AND.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_c038_0), 0, 49208 }, /* AND.B (xxx).W,Dn */ +{ CPUFUNC(op_c039_0), 0, 49209 }, /* AND.B (xxx).L,Dn */ +{ CPUFUNC(op_c03a_0), 0, 49210 }, /* AND.B (d16,PC),Dn */ +{ CPUFUNC(op_c03b_3), 0, 49211 }, /* AND.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c03c_0), 0, 49212 }, /* AND.B #.B,Dn */ +{ CPUFUNC(op_c040_0), 0, 49216 }, /* AND.W Dn,Dn */ +{ CPUFUNC(op_c050_0), 0, 49232 }, /* AND.W (An),Dn */ +{ CPUFUNC(op_c058_0), 0, 49240 }, /* AND.W (An)+,Dn */ +{ CPUFUNC(op_c060_0), 0, 49248 }, /* AND.W -(An),Dn */ +{ CPUFUNC(op_c068_0), 0, 49256 }, /* AND.W (d16,An),Dn */ +{ CPUFUNC(op_c070_3), 0, 49264 }, /* AND.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c078_0), 0, 49272 }, /* AND.W (xxx).W,Dn */ +{ CPUFUNC(op_c079_0), 0, 49273 }, /* AND.W (xxx).L,Dn */ +{ CPUFUNC(op_c07a_0), 0, 49274 }, /* AND.W (d16,PC),Dn */ +{ CPUFUNC(op_c07b_3), 0, 49275 }, /* AND.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c07c_0), 0, 49276 }, /* AND.W #.W,Dn */ +{ CPUFUNC(op_c080_0), 0, 49280 }, /* AND.L Dn,Dn */ +{ CPUFUNC(op_c090_0), 0, 49296 }, /* AND.L (An),Dn */ +{ CPUFUNC(op_c098_0), 0, 49304 }, /* AND.L (An)+,Dn */ +{ CPUFUNC(op_c0a0_0), 0, 49312 }, /* AND.L -(An),Dn */ +{ CPUFUNC(op_c0a8_0), 0, 49320 }, /* AND.L (d16,An),Dn */ +{ CPUFUNC(op_c0b0_3), 0, 49328 }, /* AND.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_c0b8_0), 0, 49336 }, /* AND.L (xxx).W,Dn */ +{ CPUFUNC(op_c0b9_0), 0, 49337 }, /* AND.L (xxx).L,Dn */ +{ CPUFUNC(op_c0ba_0), 0, 49338 }, /* AND.L (d16,PC),Dn */ +{ CPUFUNC(op_c0bb_3), 0, 49339 }, /* AND.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c0bc_0), 0, 49340 }, /* AND.L #.L,Dn */ +{ CPUFUNC(op_c0c0_0), 0, 49344 }, /* MULU.W Dn,Dn */ +{ CPUFUNC(op_c0d0_0), 0, 49360 }, /* MULU.W (An),Dn */ +{ CPUFUNC(op_c0d8_0), 0, 49368 }, /* MULU.W (An)+,Dn */ +{ CPUFUNC(op_c0e0_0), 0, 49376 }, /* MULU.W -(An),Dn */ +{ CPUFUNC(op_c0e8_0), 0, 49384 }, /* MULU.W (d16,An),Dn */ +{ CPUFUNC(op_c0f0_3), 0, 49392 }, /* MULU.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c0f8_0), 0, 49400 }, /* MULU.W (xxx).W,Dn */ +{ CPUFUNC(op_c0f9_0), 0, 49401 }, /* MULU.W (xxx).L,Dn */ +{ CPUFUNC(op_c0fa_0), 0, 49402 }, /* MULU.W (d16,PC),Dn */ +{ CPUFUNC(op_c0fb_3), 0, 49403 }, /* MULU.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c0fc_0), 0, 49404 }, /* MULU.W #.W,Dn */ +{ CPUFUNC(op_c100_1), 0, 49408 }, /* ABCD.B Dn,Dn */ +{ CPUFUNC(op_c108_1), 0, 49416 }, /* ABCD.B -(An),-(An) */ +{ CPUFUNC(op_c110_0), 0, 49424 }, /* AND.B Dn,(An) */ +{ CPUFUNC(op_c118_0), 0, 49432 }, /* AND.B Dn,(An)+ */ +{ CPUFUNC(op_c120_0), 0, 49440 }, /* AND.B Dn,-(An) */ +{ CPUFUNC(op_c128_0), 0, 49448 }, /* AND.B Dn,(d16,An) */ +{ CPUFUNC(op_c130_3), 0, 49456 }, /* AND.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c138_0), 0, 49464 }, /* AND.B Dn,(xxx).W */ +{ CPUFUNC(op_c139_0), 0, 49465 }, /* AND.B Dn,(xxx).L */ +{ CPUFUNC_FF(op_c140_0), 0, 49472 }, /* EXG.L Dn,Dn */ +{ CPUFUNC_FF(op_c148_0), 0, 49480 }, /* EXG.L An,An */ +{ CPUFUNC(op_c150_0), 0, 49488 }, /* AND.W Dn,(An) */ +{ CPUFUNC(op_c158_0), 0, 49496 }, /* AND.W Dn,(An)+ */ +{ CPUFUNC(op_c160_0), 0, 49504 }, /* AND.W Dn,-(An) */ +{ CPUFUNC(op_c168_0), 0, 49512 }, /* AND.W Dn,(d16,An) */ +{ CPUFUNC(op_c170_3), 0, 49520 }, /* AND.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c178_0), 0, 49528 }, /* AND.W Dn,(xxx).W */ +{ CPUFUNC(op_c179_0), 0, 49529 }, /* AND.W Dn,(xxx).L */ +{ CPUFUNC_FF(op_c188_0), 0, 49544 }, /* EXG.L Dn,An */ +{ CPUFUNC(op_c190_0), 0, 49552 }, /* AND.L Dn,(An) */ +{ CPUFUNC(op_c198_0), 0, 49560 }, /* AND.L Dn,(An)+ */ +{ CPUFUNC(op_c1a0_0), 0, 49568 }, /* AND.L Dn,-(An) */ +{ CPUFUNC(op_c1a8_0), 0, 49576 }, /* AND.L Dn,(d16,An) */ +{ CPUFUNC(op_c1b0_3), 0, 49584 }, /* AND.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_c1b8_0), 0, 49592 }, /* AND.L Dn,(xxx).W */ +{ CPUFUNC(op_c1b9_0), 0, 49593 }, /* AND.L Dn,(xxx).L */ +{ CPUFUNC(op_c1c0_0), 0, 49600 }, /* MULS.W Dn,Dn */ +{ CPUFUNC(op_c1d0_0), 0, 49616 }, /* MULS.W (An),Dn */ +{ CPUFUNC(op_c1d8_0), 0, 49624 }, /* MULS.W (An)+,Dn */ +{ CPUFUNC(op_c1e0_0), 0, 49632 }, /* MULS.W -(An),Dn */ +{ CPUFUNC(op_c1e8_0), 0, 49640 }, /* MULS.W (d16,An),Dn */ +{ CPUFUNC(op_c1f0_3), 0, 49648 }, /* MULS.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_c1f8_0), 0, 49656 }, /* MULS.W (xxx).W,Dn */ +{ CPUFUNC(op_c1f9_0), 0, 49657 }, /* MULS.W (xxx).L,Dn */ +{ CPUFUNC(op_c1fa_0), 0, 49658 }, /* MULS.W (d16,PC),Dn */ +{ CPUFUNC(op_c1fb_3), 0, 49659 }, /* MULS.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_c1fc_0), 0, 49660 }, /* MULS.W #.W,Dn */ +{ CPUFUNC(op_d000_0), 0, 53248 }, /* ADD.B Dn,Dn */ +{ CPUFUNC(op_d010_0), 0, 53264 }, /* ADD.B (An),Dn */ +{ CPUFUNC(op_d018_0), 0, 53272 }, /* ADD.B (An)+,Dn */ +{ CPUFUNC(op_d020_0), 0, 53280 }, /* ADD.B -(An),Dn */ +{ CPUFUNC(op_d028_0), 0, 53288 }, /* ADD.B (d16,An),Dn */ +{ CPUFUNC(op_d030_3), 0, 53296 }, /* ADD.B (d8,An,Xn),Dn */ +{ CPUFUNC(op_d038_0), 0, 53304 }, /* ADD.B (xxx).W,Dn */ +{ CPUFUNC(op_d039_0), 0, 53305 }, /* ADD.B (xxx).L,Dn */ +{ CPUFUNC(op_d03a_0), 0, 53306 }, /* ADD.B (d16,PC),Dn */ +{ CPUFUNC(op_d03b_3), 0, 53307 }, /* ADD.B (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d03c_0), 0, 53308 }, /* ADD.B #.B,Dn */ +{ CPUFUNC(op_d040_0), 0, 53312 }, /* ADD.W Dn,Dn */ +{ CPUFUNC(op_d048_0), 0, 53320 }, /* ADD.W An,Dn */ +{ CPUFUNC(op_d050_0), 0, 53328 }, /* ADD.W (An),Dn */ +{ CPUFUNC(op_d058_0), 0, 53336 }, /* ADD.W (An)+,Dn */ +{ CPUFUNC(op_d060_0), 0, 53344 }, /* ADD.W -(An),Dn */ +{ CPUFUNC(op_d068_0), 0, 53352 }, /* ADD.W (d16,An),Dn */ +{ CPUFUNC(op_d070_3), 0, 53360 }, /* ADD.W (d8,An,Xn),Dn */ +{ CPUFUNC(op_d078_0), 0, 53368 }, /* ADD.W (xxx).W,Dn */ +{ CPUFUNC(op_d079_0), 0, 53369 }, /* ADD.W (xxx).L,Dn */ +{ CPUFUNC(op_d07a_0), 0, 53370 }, /* ADD.W (d16,PC),Dn */ +{ CPUFUNC(op_d07b_3), 0, 53371 }, /* ADD.W (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d07c_0), 0, 53372 }, /* ADD.W #.W,Dn */ +{ CPUFUNC(op_d080_0), 0, 53376 }, /* ADD.L Dn,Dn */ +{ CPUFUNC(op_d088_0), 0, 53384 }, /* ADD.L An,Dn */ +{ CPUFUNC(op_d090_0), 0, 53392 }, /* ADD.L (An),Dn */ +{ CPUFUNC(op_d098_0), 0, 53400 }, /* ADD.L (An)+,Dn */ +{ CPUFUNC(op_d0a0_0), 0, 53408 }, /* ADD.L -(An),Dn */ +{ CPUFUNC(op_d0a8_0), 0, 53416 }, /* ADD.L (d16,An),Dn */ +{ CPUFUNC(op_d0b0_3), 0, 53424 }, /* ADD.L (d8,An,Xn),Dn */ +{ CPUFUNC(op_d0b8_0), 0, 53432 }, /* ADD.L (xxx).W,Dn */ +{ CPUFUNC(op_d0b9_0), 0, 53433 }, /* ADD.L (xxx).L,Dn */ +{ CPUFUNC(op_d0ba_0), 0, 53434 }, /* ADD.L (d16,PC),Dn */ +{ CPUFUNC(op_d0bb_3), 0, 53435 }, /* ADD.L (d8,PC,Xn),Dn */ +{ CPUFUNC(op_d0bc_0), 0, 53436 }, /* ADD.L #.L,Dn */ +{ CPUFUNC_FF(op_d0c0_0), 0, 53440 }, /* ADDA.W Dn,An */ +{ CPUFUNC_FF(op_d0c8_0), 0, 53448 }, /* ADDA.W An,An */ +{ CPUFUNC_FF(op_d0d0_0), 0, 53456 }, /* ADDA.W (An),An */ +{ CPUFUNC_FF(op_d0d8_0), 0, 53464 }, /* ADDA.W (An)+,An */ +{ CPUFUNC_FF(op_d0e0_0), 0, 53472 }, /* ADDA.W -(An),An */ +{ CPUFUNC_FF(op_d0e8_0), 0, 53480 }, /* ADDA.W (d16,An),An */ +{ CPUFUNC_FF(op_d0f0_3), 0, 53488 }, /* ADDA.W (d8,An,Xn),An */ +{ CPUFUNC_FF(op_d0f8_0), 0, 53496 }, /* ADDA.W (xxx).W,An */ +{ CPUFUNC_FF(op_d0f9_0), 0, 53497 }, /* ADDA.W (xxx).L,An */ +{ CPUFUNC_FF(op_d0fa_0), 0, 53498 }, /* ADDA.W (d16,PC),An */ +{ CPUFUNC_FF(op_d0fb_3), 0, 53499 }, /* ADDA.W (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_d0fc_0), 0, 53500 }, /* ADDA.W #.W,An */ +{ CPUFUNC(op_d100_0), 0, 53504 }, /* ADDX.B Dn,Dn */ +{ CPUFUNC(op_d108_0), 0, 53512 }, /* ADDX.B -(An),-(An) */ +{ CPUFUNC(op_d110_0), 0, 53520 }, /* ADD.B Dn,(An) */ +{ CPUFUNC(op_d118_0), 0, 53528 }, /* ADD.B Dn,(An)+ */ +{ CPUFUNC(op_d120_0), 0, 53536 }, /* ADD.B Dn,-(An) */ +{ CPUFUNC(op_d128_0), 0, 53544 }, /* ADD.B Dn,(d16,An) */ +{ CPUFUNC(op_d130_3), 0, 53552 }, /* ADD.B Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d138_0), 0, 53560 }, /* ADD.B Dn,(xxx).W */ +{ CPUFUNC(op_d139_0), 0, 53561 }, /* ADD.B Dn,(xxx).L */ +{ CPUFUNC(op_d140_0), 0, 53568 }, /* ADDX.W Dn,Dn */ +{ CPUFUNC(op_d148_0), 0, 53576 }, /* ADDX.W -(An),-(An) */ +{ CPUFUNC(op_d150_0), 0, 53584 }, /* ADD.W Dn,(An) */ +{ CPUFUNC(op_d158_0), 0, 53592 }, /* ADD.W Dn,(An)+ */ +{ CPUFUNC(op_d160_0), 0, 53600 }, /* ADD.W Dn,-(An) */ +{ CPUFUNC(op_d168_0), 0, 53608 }, /* ADD.W Dn,(d16,An) */ +{ CPUFUNC(op_d170_3), 0, 53616 }, /* ADD.W Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d178_0), 0, 53624 }, /* ADD.W Dn,(xxx).W */ +{ CPUFUNC(op_d179_0), 0, 53625 }, /* ADD.W Dn,(xxx).L */ +{ CPUFUNC(op_d180_0), 0, 53632 }, /* ADDX.L Dn,Dn */ +{ CPUFUNC(op_d188_0), 0, 53640 }, /* ADDX.L -(An),-(An) */ +{ CPUFUNC(op_d190_0), 0, 53648 }, /* ADD.L Dn,(An) */ +{ CPUFUNC(op_d198_0), 0, 53656 }, /* ADD.L Dn,(An)+ */ +{ CPUFUNC(op_d1a0_0), 0, 53664 }, /* ADD.L Dn,-(An) */ +{ CPUFUNC(op_d1a8_0), 0, 53672 }, /* ADD.L Dn,(d16,An) */ +{ CPUFUNC(op_d1b0_3), 0, 53680 }, /* ADD.L Dn,(d8,An,Xn) */ +{ CPUFUNC(op_d1b8_0), 0, 53688 }, /* ADD.L Dn,(xxx).W */ +{ CPUFUNC(op_d1b9_0), 0, 53689 }, /* ADD.L Dn,(xxx).L */ +{ CPUFUNC_FF(op_d1c0_0), 0, 53696 }, /* ADDA.L Dn,An */ +{ CPUFUNC_FF(op_d1c8_0), 0, 53704 }, /* ADDA.L An,An */ +{ CPUFUNC_FF(op_d1d0_0), 0, 53712 }, /* ADDA.L (An),An */ +{ CPUFUNC_FF(op_d1d8_0), 0, 53720 }, /* ADDA.L (An)+,An */ +{ CPUFUNC_FF(op_d1e0_0), 0, 53728 }, /* ADDA.L -(An),An */ +{ CPUFUNC_FF(op_d1e8_0), 0, 53736 }, /* ADDA.L (d16,An),An */ +{ CPUFUNC_FF(op_d1f0_3), 0, 53744 }, /* ADDA.L (d8,An,Xn),An */ +{ CPUFUNC_FF(op_d1f8_0), 0, 53752 }, /* ADDA.L (xxx).W,An */ +{ CPUFUNC_FF(op_d1f9_0), 0, 53753 }, /* ADDA.L (xxx).L,An */ +{ CPUFUNC_FF(op_d1fa_0), 0, 53754 }, /* ADDA.L (d16,PC),An */ +{ CPUFUNC_FF(op_d1fb_3), 0, 53755 }, /* ADDA.L (d8,PC,Xn),An */ +{ CPUFUNC_FF(op_d1fc_0), 0, 53756 }, /* ADDA.L #.L,An */ +{ CPUFUNC(op_e000_0), 0, 57344 }, /* ASR.B #,Dn */ +{ CPUFUNC(op_e008_0), 0, 57352 }, /* LSR.B #,Dn */ +{ CPUFUNC(op_e010_0), 0, 57360 }, /* ROXR.B #,Dn */ +{ CPUFUNC(op_e018_0), 0, 57368 }, /* ROR.B #,Dn */ +{ CPUFUNC(op_e020_0), 0, 57376 }, /* ASR.B Dn,Dn */ +{ CPUFUNC(op_e028_0), 0, 57384 }, /* LSR.B Dn,Dn */ +{ CPUFUNC(op_e030_0), 0, 57392 }, /* ROXR.B Dn,Dn */ +{ CPUFUNC(op_e038_0), 0, 57400 }, /* ROR.B Dn,Dn */ +{ CPUFUNC(op_e040_0), 0, 57408 }, /* ASR.W #,Dn */ +{ CPUFUNC(op_e048_0), 0, 57416 }, /* LSR.W #,Dn */ +{ CPUFUNC(op_e050_0), 0, 57424 }, /* ROXR.W #,Dn */ +{ CPUFUNC(op_e058_0), 0, 57432 }, /* ROR.W #,Dn */ +{ CPUFUNC(op_e060_0), 0, 57440 }, /* ASR.W Dn,Dn */ +{ CPUFUNC(op_e068_0), 0, 57448 }, /* LSR.W Dn,Dn */ +{ CPUFUNC(op_e070_0), 0, 57456 }, /* ROXR.W Dn,Dn */ +{ CPUFUNC(op_e078_0), 0, 57464 }, /* ROR.W Dn,Dn */ +{ CPUFUNC(op_e080_0), 0, 57472 }, /* ASR.L #,Dn */ +{ CPUFUNC(op_e088_0), 0, 57480 }, /* LSR.L #,Dn */ +{ CPUFUNC(op_e090_0), 0, 57488 }, /* ROXR.L #,Dn */ +{ CPUFUNC(op_e098_0), 0, 57496 }, /* ROR.L #,Dn */ +{ CPUFUNC(op_e0a0_0), 0, 57504 }, /* ASR.L Dn,Dn */ +{ CPUFUNC(op_e0a8_0), 0, 57512 }, /* LSR.L Dn,Dn */ +{ CPUFUNC(op_e0b0_0), 0, 57520 }, /* ROXR.L Dn,Dn */ +{ CPUFUNC(op_e0b8_0), 0, 57528 }, /* ROR.L Dn,Dn */ +{ CPUFUNC(op_e0d0_0), 0, 57552 }, /* ASRW.W (An) */ +{ CPUFUNC(op_e0d8_0), 0, 57560 }, /* ASRW.W (An)+ */ +{ CPUFUNC(op_e0e0_0), 0, 57568 }, /* ASRW.W -(An) */ +{ CPUFUNC(op_e0e8_0), 0, 57576 }, /* ASRW.W (d16,An) */ +{ CPUFUNC(op_e0f0_3), 0, 57584 }, /* ASRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e0f8_0), 0, 57592 }, /* ASRW.W (xxx).W */ +{ CPUFUNC(op_e0f9_0), 0, 57593 }, /* ASRW.W (xxx).L */ +{ CPUFUNC(op_e100_0), 0, 57600 }, /* ASL.B #,Dn */ +{ CPUFUNC(op_e108_0), 0, 57608 }, /* LSL.B #,Dn */ +{ CPUFUNC(op_e110_0), 0, 57616 }, /* ROXL.B #,Dn */ +{ CPUFUNC(op_e118_0), 0, 57624 }, /* ROL.B #,Dn */ +{ CPUFUNC(op_e120_0), 0, 57632 }, /* ASL.B Dn,Dn */ +{ CPUFUNC(op_e128_0), 0, 57640 }, /* LSL.B Dn,Dn */ +{ CPUFUNC(op_e130_0), 0, 57648 }, /* ROXL.B Dn,Dn */ +{ CPUFUNC(op_e138_0), 0, 57656 }, /* ROL.B Dn,Dn */ +{ CPUFUNC(op_e140_0), 0, 57664 }, /* ASL.W #,Dn */ +{ CPUFUNC(op_e148_0), 0, 57672 }, /* LSL.W #,Dn */ +{ CPUFUNC(op_e150_0), 0, 57680 }, /* ROXL.W #,Dn */ +{ CPUFUNC(op_e158_0), 0, 57688 }, /* ROL.W #,Dn */ +{ CPUFUNC(op_e160_0), 0, 57696 }, /* ASL.W Dn,Dn */ +{ CPUFUNC(op_e168_0), 0, 57704 }, /* LSL.W Dn,Dn */ +{ CPUFUNC(op_e170_0), 0, 57712 }, /* ROXL.W Dn,Dn */ +{ CPUFUNC(op_e178_0), 0, 57720 }, /* ROL.W Dn,Dn */ +{ CPUFUNC(op_e180_0), 0, 57728 }, /* ASL.L #,Dn */ +{ CPUFUNC(op_e188_0), 0, 57736 }, /* LSL.L #,Dn */ +{ CPUFUNC(op_e190_0), 0, 57744 }, /* ROXL.L #,Dn */ +{ CPUFUNC(op_e198_0), 0, 57752 }, /* ROL.L #,Dn */ +{ CPUFUNC(op_e1a0_0), 0, 57760 }, /* ASL.L Dn,Dn */ +{ CPUFUNC(op_e1a8_0), 0, 57768 }, /* LSL.L Dn,Dn */ +{ CPUFUNC(op_e1b0_0), 0, 57776 }, /* ROXL.L Dn,Dn */ +{ CPUFUNC(op_e1b8_0), 0, 57784 }, /* ROL.L Dn,Dn */ +{ CPUFUNC(op_e1d0_0), 0, 57808 }, /* ASLW.W (An) */ +{ CPUFUNC(op_e1d8_0), 0, 57816 }, /* ASLW.W (An)+ */ +{ CPUFUNC(op_e1e0_0), 0, 57824 }, /* ASLW.W -(An) */ +{ CPUFUNC(op_e1e8_0), 0, 57832 }, /* ASLW.W (d16,An) */ +{ CPUFUNC(op_e1f0_3), 0, 57840 }, /* ASLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e1f8_0), 0, 57848 }, /* ASLW.W (xxx).W */ +{ CPUFUNC(op_e1f9_0), 0, 57849 }, /* ASLW.W (xxx).L */ +{ CPUFUNC(op_e2d0_0), 0, 58064 }, /* LSRW.W (An) */ +{ CPUFUNC(op_e2d8_0), 0, 58072 }, /* LSRW.W (An)+ */ +{ CPUFUNC(op_e2e0_0), 0, 58080 }, /* LSRW.W -(An) */ +{ CPUFUNC(op_e2e8_0), 0, 58088 }, /* LSRW.W (d16,An) */ +{ CPUFUNC(op_e2f0_3), 0, 58096 }, /* LSRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e2f8_0), 0, 58104 }, /* LSRW.W (xxx).W */ +{ CPUFUNC(op_e2f9_0), 0, 58105 }, /* LSRW.W (xxx).L */ +{ CPUFUNC(op_e3d0_0), 0, 58320 }, /* LSLW.W (An) */ +{ CPUFUNC(op_e3d8_0), 0, 58328 }, /* LSLW.W (An)+ */ +{ CPUFUNC(op_e3e0_0), 0, 58336 }, /* LSLW.W -(An) */ +{ CPUFUNC(op_e3e8_0), 0, 58344 }, /* LSLW.W (d16,An) */ +{ CPUFUNC(op_e3f0_3), 0, 58352 }, /* LSLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e3f8_0), 0, 58360 }, /* LSLW.W (xxx).W */ +{ CPUFUNC(op_e3f9_0), 0, 58361 }, /* LSLW.W (xxx).L */ +{ CPUFUNC(op_e4d0_0), 0, 58576 }, /* ROXRW.W (An) */ +{ CPUFUNC(op_e4d8_0), 0, 58584 }, /* ROXRW.W (An)+ */ +{ CPUFUNC(op_e4e0_0), 0, 58592 }, /* ROXRW.W -(An) */ +{ CPUFUNC(op_e4e8_0), 0, 58600 }, /* ROXRW.W (d16,An) */ +{ CPUFUNC(op_e4f0_3), 0, 58608 }, /* ROXRW.W (d8,An,Xn) */ +{ CPUFUNC(op_e4f8_0), 0, 58616 }, /* ROXRW.W (xxx).W */ +{ CPUFUNC(op_e4f9_0), 0, 58617 }, /* ROXRW.W (xxx).L */ +{ CPUFUNC(op_e5d0_0), 0, 58832 }, /* ROXLW.W (An) */ +{ CPUFUNC(op_e5d8_0), 0, 58840 }, /* ROXLW.W (An)+ */ +{ CPUFUNC(op_e5e0_0), 0, 58848 }, /* ROXLW.W -(An) */ +{ CPUFUNC(op_e5e8_0), 0, 58856 }, /* ROXLW.W (d16,An) */ +{ CPUFUNC(op_e5f0_3), 0, 58864 }, /* ROXLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e5f8_0), 0, 58872 }, /* ROXLW.W (xxx).W */ +{ CPUFUNC(op_e5f9_0), 0, 58873 }, /* ROXLW.W (xxx).L */ +{ CPUFUNC(op_e6d0_0), 0, 59088 }, /* RORW.W (An) */ +{ CPUFUNC(op_e6d8_0), 0, 59096 }, /* RORW.W (An)+ */ +{ CPUFUNC(op_e6e0_0), 0, 59104 }, /* RORW.W -(An) */ +{ CPUFUNC(op_e6e8_0), 0, 59112 }, /* RORW.W (d16,An) */ +{ CPUFUNC(op_e6f0_3), 0, 59120 }, /* RORW.W (d8,An,Xn) */ +{ CPUFUNC(op_e6f8_0), 0, 59128 }, /* RORW.W (xxx).W */ +{ CPUFUNC(op_e6f9_0), 0, 59129 }, /* RORW.W (xxx).L */ +{ CPUFUNC(op_e7d0_0), 0, 59344 }, /* ROLW.W (An) */ +{ CPUFUNC(op_e7d8_0), 0, 59352 }, /* ROLW.W (An)+ */ +{ CPUFUNC(op_e7e0_0), 0, 59360 }, /* ROLW.W -(An) */ +{ CPUFUNC(op_e7e8_0), 0, 59368 }, /* ROLW.W (d16,An) */ +{ CPUFUNC(op_e7f0_3), 0, 59376 }, /* ROLW.W (d8,An,Xn) */ +{ CPUFUNC(op_e7f8_0), 0, 59384 }, /* ROLW.W (xxx).W */ +{ CPUFUNC(op_e7f9_0), 0, 59385 }, /* ROLW.W (xxx).L */ +{ 0, 0, 0 }}; diff --git a/BasiliskII/src/uae_cpu/cpustbl_nf.cpp b/BasiliskII/src/uae_cpu/cpustbl_nf.cpp new file mode 100644 index 00000000..e59ae0f0 --- /dev/null +++ b/BasiliskII/src/uae_cpu/cpustbl_nf.cpp @@ -0,0 +1,2 @@ +#define NOFLAGS +#include "cpustbl.cpp" diff --git a/BasiliskII/src/uae_cpu/cputbl.h b/BasiliskII/src/uae_cpu/cputbl.h new file mode 100644 index 00000000..421a51d3 --- /dev/null +++ b/BasiliskII/src/uae_cpu/cputbl.h @@ -0,0 +1,4322 @@ +extern cpuop_func op_0_0_nf; +extern cpuop_func op_0_0_ff; +extern cpuop_func op_10_0_nf; +extern cpuop_func op_10_0_ff; +extern cpuop_func op_18_0_nf; +extern cpuop_func op_18_0_ff; +extern cpuop_func op_20_0_nf; +extern cpuop_func op_20_0_ff; +extern cpuop_func op_28_0_nf; +extern cpuop_func op_28_0_ff; +extern cpuop_func op_30_0_nf; +extern cpuop_func op_30_0_ff; +extern cpuop_func op_38_0_nf; +extern cpuop_func op_38_0_ff; +extern cpuop_func op_39_0_nf; +extern cpuop_func op_39_0_ff; +extern cpuop_func op_3c_0_nf; +extern cpuop_func op_3c_0_ff; +extern cpuop_func op_40_0_nf; +extern cpuop_func op_40_0_ff; +extern cpuop_func op_50_0_nf; +extern cpuop_func op_50_0_ff; +extern cpuop_func op_58_0_nf; +extern cpuop_func op_58_0_ff; +extern cpuop_func op_60_0_nf; +extern cpuop_func op_60_0_ff; +extern cpuop_func op_68_0_nf; +extern cpuop_func op_68_0_ff; +extern cpuop_func op_70_0_nf; +extern cpuop_func op_70_0_ff; +extern cpuop_func op_78_0_nf; +extern cpuop_func op_78_0_ff; +extern cpuop_func op_79_0_nf; +extern cpuop_func op_79_0_ff; +extern cpuop_func op_7c_0_nf; +extern cpuop_func op_7c_0_ff; +extern cpuop_func op_80_0_nf; +extern cpuop_func op_80_0_ff; +extern cpuop_func op_90_0_nf; +extern cpuop_func op_90_0_ff; +extern cpuop_func op_98_0_nf; +extern cpuop_func op_98_0_ff; +extern cpuop_func op_a0_0_nf; +extern cpuop_func op_a0_0_ff; +extern cpuop_func op_a8_0_nf; +extern cpuop_func op_a8_0_ff; +extern cpuop_func op_b0_0_nf; +extern cpuop_func op_b0_0_ff; +extern cpuop_func op_b8_0_nf; +extern cpuop_func op_b8_0_ff; +extern cpuop_func op_b9_0_nf; +extern cpuop_func op_b9_0_ff; +extern cpuop_func op_d0_0_nf; +extern cpuop_func op_d0_0_ff; +extern cpuop_func op_e8_0_nf; +extern cpuop_func op_e8_0_ff; +extern cpuop_func op_f0_0_nf; +extern cpuop_func op_f0_0_ff; +extern cpuop_func op_f8_0_nf; +extern cpuop_func op_f8_0_ff; +extern cpuop_func op_f9_0_nf; +extern cpuop_func op_f9_0_ff; +extern cpuop_func op_fa_0_nf; +extern cpuop_func op_fa_0_ff; +extern cpuop_func op_fb_0_nf; +extern cpuop_func op_fb_0_ff; +extern cpuop_func op_100_0_nf; +extern cpuop_func op_100_0_ff; +extern cpuop_func op_108_0_nf; +extern cpuop_func op_108_0_ff; +extern cpuop_func op_110_0_nf; +extern cpuop_func op_110_0_ff; +extern cpuop_func op_118_0_nf; +extern cpuop_func op_118_0_ff; +extern cpuop_func op_120_0_nf; +extern cpuop_func op_120_0_ff; +extern cpuop_func op_128_0_nf; +extern cpuop_func op_128_0_ff; +extern cpuop_func op_130_0_nf; +extern cpuop_func op_130_0_ff; +extern cpuop_func op_138_0_nf; +extern cpuop_func op_138_0_ff; +extern cpuop_func op_139_0_nf; +extern cpuop_func op_139_0_ff; +extern cpuop_func op_13a_0_nf; +extern cpuop_func op_13a_0_ff; +extern cpuop_func op_13b_0_nf; +extern cpuop_func op_13b_0_ff; +extern cpuop_func op_13c_0_nf; +extern cpuop_func op_13c_0_ff; +extern cpuop_func op_140_0_nf; +extern cpuop_func op_140_0_ff; +extern cpuop_func op_148_0_nf; +extern cpuop_func op_148_0_ff; +extern cpuop_func op_150_0_nf; +extern cpuop_func op_150_0_ff; +extern cpuop_func op_158_0_nf; +extern cpuop_func op_158_0_ff; +extern cpuop_func op_160_0_nf; +extern cpuop_func op_160_0_ff; +extern cpuop_func op_168_0_nf; +extern cpuop_func op_168_0_ff; +extern cpuop_func op_170_0_nf; +extern cpuop_func op_170_0_ff; +extern cpuop_func op_178_0_nf; +extern cpuop_func op_178_0_ff; +extern cpuop_func op_179_0_nf; +extern cpuop_func op_179_0_ff; +extern cpuop_func op_17a_0_nf; +extern cpuop_func op_17a_0_ff; +extern cpuop_func op_17b_0_nf; +extern cpuop_func op_17b_0_ff; +extern cpuop_func op_180_0_nf; +extern cpuop_func op_180_0_ff; +extern cpuop_func op_188_0_nf; +extern cpuop_func op_188_0_ff; +extern cpuop_func op_190_0_nf; +extern cpuop_func op_190_0_ff; +extern cpuop_func op_198_0_nf; +extern cpuop_func op_198_0_ff; +extern cpuop_func op_1a0_0_nf; +extern cpuop_func op_1a0_0_ff; +extern cpuop_func op_1a8_0_nf; +extern cpuop_func op_1a8_0_ff; +extern cpuop_func op_1b0_0_nf; +extern cpuop_func op_1b0_0_ff; +extern cpuop_func op_1b8_0_nf; +extern cpuop_func op_1b8_0_ff; +extern cpuop_func op_1b9_0_nf; +extern cpuop_func op_1b9_0_ff; +extern cpuop_func op_1ba_0_nf; +extern cpuop_func op_1ba_0_ff; +extern cpuop_func op_1bb_0_nf; +extern cpuop_func op_1bb_0_ff; +extern cpuop_func op_1c0_0_nf; +extern cpuop_func op_1c0_0_ff; +extern cpuop_func op_1c8_0_nf; +extern cpuop_func op_1c8_0_ff; +extern cpuop_func op_1d0_0_nf; +extern cpuop_func op_1d0_0_ff; +extern cpuop_func op_1d8_0_nf; +extern cpuop_func op_1d8_0_ff; +extern cpuop_func op_1e0_0_nf; +extern cpuop_func op_1e0_0_ff; +extern cpuop_func op_1e8_0_nf; +extern cpuop_func op_1e8_0_ff; +extern cpuop_func op_1f0_0_nf; +extern cpuop_func op_1f0_0_ff; +extern cpuop_func op_1f8_0_nf; +extern cpuop_func op_1f8_0_ff; +extern cpuop_func op_1f9_0_nf; +extern cpuop_func op_1f9_0_ff; +extern cpuop_func op_1fa_0_nf; +extern cpuop_func op_1fa_0_ff; +extern cpuop_func op_1fb_0_nf; +extern cpuop_func op_1fb_0_ff; +extern cpuop_func op_200_0_nf; +extern cpuop_func op_200_0_ff; +extern cpuop_func op_210_0_nf; +extern cpuop_func op_210_0_ff; +extern cpuop_func op_218_0_nf; +extern cpuop_func op_218_0_ff; +extern cpuop_func op_220_0_nf; +extern cpuop_func op_220_0_ff; +extern cpuop_func op_228_0_nf; +extern cpuop_func op_228_0_ff; +extern cpuop_func op_230_0_nf; +extern cpuop_func op_230_0_ff; +extern cpuop_func op_238_0_nf; +extern cpuop_func op_238_0_ff; +extern cpuop_func op_239_0_nf; +extern cpuop_func op_239_0_ff; +extern cpuop_func op_23c_0_nf; +extern cpuop_func op_23c_0_ff; +extern cpuop_func op_240_0_nf; +extern cpuop_func op_240_0_ff; +extern cpuop_func op_250_0_nf; +extern cpuop_func op_250_0_ff; +extern cpuop_func op_258_0_nf; +extern cpuop_func op_258_0_ff; +extern cpuop_func op_260_0_nf; +extern cpuop_func op_260_0_ff; +extern cpuop_func op_268_0_nf; +extern cpuop_func op_268_0_ff; +extern cpuop_func op_270_0_nf; +extern cpuop_func op_270_0_ff; +extern cpuop_func op_278_0_nf; +extern cpuop_func op_278_0_ff; +extern cpuop_func op_279_0_nf; +extern cpuop_func op_279_0_ff; +extern cpuop_func op_27c_0_nf; +extern cpuop_func op_27c_0_ff; +extern cpuop_func op_280_0_nf; +extern cpuop_func op_280_0_ff; +extern cpuop_func op_290_0_nf; +extern cpuop_func op_290_0_ff; +extern cpuop_func op_298_0_nf; +extern cpuop_func op_298_0_ff; +extern cpuop_func op_2a0_0_nf; +extern cpuop_func op_2a0_0_ff; +extern cpuop_func op_2a8_0_nf; +extern cpuop_func op_2a8_0_ff; +extern cpuop_func op_2b0_0_nf; +extern cpuop_func op_2b0_0_ff; +extern cpuop_func op_2b8_0_nf; +extern cpuop_func op_2b8_0_ff; +extern cpuop_func op_2b9_0_nf; +extern cpuop_func op_2b9_0_ff; +extern cpuop_func op_2d0_0_nf; +extern cpuop_func op_2d0_0_ff; +extern cpuop_func op_2e8_0_nf; +extern cpuop_func op_2e8_0_ff; +extern cpuop_func op_2f0_0_nf; +extern cpuop_func op_2f0_0_ff; +extern cpuop_func op_2f8_0_nf; +extern cpuop_func op_2f8_0_ff; +extern cpuop_func op_2f9_0_nf; +extern cpuop_func op_2f9_0_ff; +extern cpuop_func op_2fa_0_nf; +extern cpuop_func op_2fa_0_ff; +extern cpuop_func op_2fb_0_nf; +extern cpuop_func op_2fb_0_ff; +extern cpuop_func op_400_0_nf; +extern cpuop_func op_400_0_ff; +extern cpuop_func op_410_0_nf; +extern cpuop_func op_410_0_ff; +extern cpuop_func op_418_0_nf; +extern cpuop_func op_418_0_ff; +extern cpuop_func op_420_0_nf; +extern cpuop_func op_420_0_ff; +extern cpuop_func op_428_0_nf; +extern cpuop_func op_428_0_ff; +extern cpuop_func op_430_0_nf; +extern cpuop_func op_430_0_ff; +extern cpuop_func op_438_0_nf; +extern cpuop_func op_438_0_ff; +extern cpuop_func op_439_0_nf; +extern cpuop_func op_439_0_ff; +extern cpuop_func op_440_0_nf; +extern cpuop_func op_440_0_ff; +extern cpuop_func op_450_0_nf; +extern cpuop_func op_450_0_ff; +extern cpuop_func op_458_0_nf; +extern cpuop_func op_458_0_ff; +extern cpuop_func op_460_0_nf; +extern cpuop_func op_460_0_ff; +extern cpuop_func op_468_0_nf; +extern cpuop_func op_468_0_ff; +extern cpuop_func op_470_0_nf; +extern cpuop_func op_470_0_ff; +extern cpuop_func op_478_0_nf; +extern cpuop_func op_478_0_ff; +extern cpuop_func op_479_0_nf; +extern cpuop_func op_479_0_ff; +extern cpuop_func op_480_0_nf; +extern cpuop_func op_480_0_ff; +extern cpuop_func op_490_0_nf; +extern cpuop_func op_490_0_ff; +extern cpuop_func op_498_0_nf; +extern cpuop_func op_498_0_ff; +extern cpuop_func op_4a0_0_nf; +extern cpuop_func op_4a0_0_ff; +extern cpuop_func op_4a8_0_nf; +extern cpuop_func op_4a8_0_ff; +extern cpuop_func op_4b0_0_nf; +extern cpuop_func op_4b0_0_ff; +extern cpuop_func op_4b8_0_nf; +extern cpuop_func op_4b8_0_ff; +extern cpuop_func op_4b9_0_nf; +extern cpuop_func op_4b9_0_ff; +extern cpuop_func op_4d0_0_nf; +extern cpuop_func op_4d0_0_ff; +extern cpuop_func op_4e8_0_nf; +extern cpuop_func op_4e8_0_ff; +extern cpuop_func op_4f0_0_nf; +extern cpuop_func op_4f0_0_ff; +extern cpuop_func op_4f8_0_nf; +extern cpuop_func op_4f8_0_ff; +extern cpuop_func op_4f9_0_nf; +extern cpuop_func op_4f9_0_ff; +extern cpuop_func op_4fa_0_nf; +extern cpuop_func op_4fa_0_ff; +extern cpuop_func op_4fb_0_nf; +extern cpuop_func op_4fb_0_ff; +extern cpuop_func op_600_0_nf; +extern cpuop_func op_600_0_ff; +extern cpuop_func op_610_0_nf; +extern cpuop_func op_610_0_ff; +extern cpuop_func op_618_0_nf; +extern cpuop_func op_618_0_ff; +extern cpuop_func op_620_0_nf; +extern cpuop_func op_620_0_ff; +extern cpuop_func op_628_0_nf; +extern cpuop_func op_628_0_ff; +extern cpuop_func op_630_0_nf; +extern cpuop_func op_630_0_ff; +extern cpuop_func op_638_0_nf; +extern cpuop_func op_638_0_ff; +extern cpuop_func op_639_0_nf; +extern cpuop_func op_639_0_ff; +extern cpuop_func op_640_0_nf; +extern cpuop_func op_640_0_ff; +extern cpuop_func op_650_0_nf; +extern cpuop_func op_650_0_ff; +extern cpuop_func op_658_0_nf; +extern cpuop_func op_658_0_ff; +extern cpuop_func op_660_0_nf; +extern cpuop_func op_660_0_ff; +extern cpuop_func op_668_0_nf; +extern cpuop_func op_668_0_ff; +extern cpuop_func op_670_0_nf; +extern cpuop_func op_670_0_ff; +extern cpuop_func op_678_0_nf; +extern cpuop_func op_678_0_ff; +extern cpuop_func op_679_0_nf; +extern cpuop_func op_679_0_ff; +extern cpuop_func op_680_0_nf; +extern cpuop_func op_680_0_ff; +extern cpuop_func op_690_0_nf; +extern cpuop_func op_690_0_ff; +extern cpuop_func op_698_0_nf; +extern cpuop_func op_698_0_ff; +extern cpuop_func op_6a0_0_nf; +extern cpuop_func op_6a0_0_ff; +extern cpuop_func op_6a8_0_nf; +extern cpuop_func op_6a8_0_ff; +extern cpuop_func op_6b0_0_nf; +extern cpuop_func op_6b0_0_ff; +extern cpuop_func op_6b8_0_nf; +extern cpuop_func op_6b8_0_ff; +extern cpuop_func op_6b9_0_nf; +extern cpuop_func op_6b9_0_ff; +extern cpuop_func op_6c0_0_nf; +extern cpuop_func op_6c0_0_ff; +extern cpuop_func op_6c8_0_nf; +extern cpuop_func op_6c8_0_ff; +extern cpuop_func op_6d0_0_nf; +extern cpuop_func op_6d0_0_ff; +extern cpuop_func op_6e8_0_nf; +extern cpuop_func op_6e8_0_ff; +extern cpuop_func op_6f0_0_nf; +extern cpuop_func op_6f0_0_ff; +extern cpuop_func op_6f8_0_nf; +extern cpuop_func op_6f8_0_ff; +extern cpuop_func op_6f9_0_nf; +extern cpuop_func op_6f9_0_ff; +extern cpuop_func op_6fa_0_nf; +extern cpuop_func op_6fa_0_ff; +extern cpuop_func op_6fb_0_nf; +extern cpuop_func op_6fb_0_ff; +extern cpuop_func op_800_0_nf; +extern cpuop_func op_800_0_ff; +extern cpuop_func op_810_0_nf; +extern cpuop_func op_810_0_ff; +extern cpuop_func op_818_0_nf; +extern cpuop_func op_818_0_ff; +extern cpuop_func op_820_0_nf; +extern cpuop_func op_820_0_ff; +extern cpuop_func op_828_0_nf; +extern cpuop_func op_828_0_ff; +extern cpuop_func op_830_0_nf; +extern cpuop_func op_830_0_ff; +extern cpuop_func op_838_0_nf; +extern cpuop_func op_838_0_ff; +extern cpuop_func op_839_0_nf; +extern cpuop_func op_839_0_ff; +extern cpuop_func op_83a_0_nf; +extern cpuop_func op_83a_0_ff; +extern cpuop_func op_83b_0_nf; +extern cpuop_func op_83b_0_ff; +extern cpuop_func op_83c_0_nf; +extern cpuop_func op_83c_0_ff; +extern cpuop_func op_840_0_nf; +extern cpuop_func op_840_0_ff; +extern cpuop_func op_850_0_nf; +extern cpuop_func op_850_0_ff; +extern cpuop_func op_858_0_nf; +extern cpuop_func op_858_0_ff; +extern cpuop_func op_860_0_nf; +extern cpuop_func op_860_0_ff; +extern cpuop_func op_868_0_nf; +extern cpuop_func op_868_0_ff; +extern cpuop_func op_870_0_nf; +extern cpuop_func op_870_0_ff; +extern cpuop_func op_878_0_nf; +extern cpuop_func op_878_0_ff; +extern cpuop_func op_879_0_nf; +extern cpuop_func op_879_0_ff; +extern cpuop_func op_87a_0_nf; +extern cpuop_func op_87a_0_ff; +extern cpuop_func op_87b_0_nf; +extern cpuop_func op_87b_0_ff; +extern cpuop_func op_880_0_nf; +extern cpuop_func op_880_0_ff; +extern cpuop_func op_890_0_nf; +extern cpuop_func op_890_0_ff; +extern cpuop_func op_898_0_nf; +extern cpuop_func op_898_0_ff; +extern cpuop_func op_8a0_0_nf; +extern cpuop_func op_8a0_0_ff; +extern cpuop_func op_8a8_0_nf; +extern cpuop_func op_8a8_0_ff; +extern cpuop_func op_8b0_0_nf; +extern cpuop_func op_8b0_0_ff; +extern cpuop_func op_8b8_0_nf; +extern cpuop_func op_8b8_0_ff; +extern cpuop_func op_8b9_0_nf; +extern cpuop_func op_8b9_0_ff; +extern cpuop_func op_8ba_0_nf; +extern cpuop_func op_8ba_0_ff; +extern cpuop_func op_8bb_0_nf; +extern cpuop_func op_8bb_0_ff; +extern cpuop_func op_8c0_0_nf; +extern cpuop_func op_8c0_0_ff; +extern cpuop_func op_8d0_0_nf; +extern cpuop_func op_8d0_0_ff; +extern cpuop_func op_8d8_0_nf; +extern cpuop_func op_8d8_0_ff; +extern cpuop_func op_8e0_0_nf; +extern cpuop_func op_8e0_0_ff; +extern cpuop_func op_8e8_0_nf; +extern cpuop_func op_8e8_0_ff; +extern cpuop_func op_8f0_0_nf; +extern cpuop_func op_8f0_0_ff; +extern cpuop_func op_8f8_0_nf; +extern cpuop_func op_8f8_0_ff; +extern cpuop_func op_8f9_0_nf; +extern cpuop_func op_8f9_0_ff; +extern cpuop_func op_8fa_0_nf; +extern cpuop_func op_8fa_0_ff; +extern cpuop_func op_8fb_0_nf; +extern cpuop_func op_8fb_0_ff; +extern cpuop_func op_a00_0_nf; +extern cpuop_func op_a00_0_ff; +extern cpuop_func op_a10_0_nf; +extern cpuop_func op_a10_0_ff; +extern cpuop_func op_a18_0_nf; +extern cpuop_func op_a18_0_ff; +extern cpuop_func op_a20_0_nf; +extern cpuop_func op_a20_0_ff; +extern cpuop_func op_a28_0_nf; +extern cpuop_func op_a28_0_ff; +extern cpuop_func op_a30_0_nf; +extern cpuop_func op_a30_0_ff; +extern cpuop_func op_a38_0_nf; +extern cpuop_func op_a38_0_ff; +extern cpuop_func op_a39_0_nf; +extern cpuop_func op_a39_0_ff; +extern cpuop_func op_a3c_0_nf; +extern cpuop_func op_a3c_0_ff; +extern cpuop_func op_a40_0_nf; +extern cpuop_func op_a40_0_ff; +extern cpuop_func op_a50_0_nf; +extern cpuop_func op_a50_0_ff; +extern cpuop_func op_a58_0_nf; +extern cpuop_func op_a58_0_ff; +extern cpuop_func op_a60_0_nf; +extern cpuop_func op_a60_0_ff; +extern cpuop_func op_a68_0_nf; +extern cpuop_func op_a68_0_ff; +extern cpuop_func op_a70_0_nf; +extern cpuop_func op_a70_0_ff; +extern cpuop_func op_a78_0_nf; +extern cpuop_func op_a78_0_ff; +extern cpuop_func op_a79_0_nf; +extern cpuop_func op_a79_0_ff; +extern cpuop_func op_a7c_0_nf; +extern cpuop_func op_a7c_0_ff; +extern cpuop_func op_a80_0_nf; +extern cpuop_func op_a80_0_ff; +extern cpuop_func op_a90_0_nf; +extern cpuop_func op_a90_0_ff; +extern cpuop_func op_a98_0_nf; +extern cpuop_func op_a98_0_ff; +extern cpuop_func op_aa0_0_nf; +extern cpuop_func op_aa0_0_ff; +extern cpuop_func op_aa8_0_nf; +extern cpuop_func op_aa8_0_ff; +extern cpuop_func op_ab0_0_nf; +extern cpuop_func op_ab0_0_ff; +extern cpuop_func op_ab8_0_nf; +extern cpuop_func op_ab8_0_ff; +extern cpuop_func op_ab9_0_nf; +extern cpuop_func op_ab9_0_ff; +extern cpuop_func op_ad0_0_nf; +extern cpuop_func op_ad0_0_ff; +extern cpuop_func op_ad8_0_nf; +extern cpuop_func op_ad8_0_ff; +extern cpuop_func op_ae0_0_nf; +extern cpuop_func op_ae0_0_ff; +extern cpuop_func op_ae8_0_nf; +extern cpuop_func op_ae8_0_ff; +extern cpuop_func op_af0_0_nf; +extern cpuop_func op_af0_0_ff; +extern cpuop_func op_af8_0_nf; +extern cpuop_func op_af8_0_ff; +extern cpuop_func op_af9_0_nf; +extern cpuop_func op_af9_0_ff; +extern cpuop_func op_c00_0_nf; +extern cpuop_func op_c00_0_ff; +extern cpuop_func op_c10_0_nf; +extern cpuop_func op_c10_0_ff; +extern cpuop_func op_c18_0_nf; +extern cpuop_func op_c18_0_ff; +extern cpuop_func op_c20_0_nf; +extern cpuop_func op_c20_0_ff; +extern cpuop_func op_c28_0_nf; +extern cpuop_func op_c28_0_ff; +extern cpuop_func op_c30_0_nf; +extern cpuop_func op_c30_0_ff; +extern cpuop_func op_c38_0_nf; +extern cpuop_func op_c38_0_ff; +extern cpuop_func op_c39_0_nf; +extern cpuop_func op_c39_0_ff; +extern cpuop_func op_c3a_0_nf; +extern cpuop_func op_c3a_0_ff; +extern cpuop_func op_c3b_0_nf; +extern cpuop_func op_c3b_0_ff; +extern cpuop_func op_c40_0_nf; +extern cpuop_func op_c40_0_ff; +extern cpuop_func op_c50_0_nf; +extern cpuop_func op_c50_0_ff; +extern cpuop_func op_c58_0_nf; +extern cpuop_func op_c58_0_ff; +extern cpuop_func op_c60_0_nf; +extern cpuop_func op_c60_0_ff; +extern cpuop_func op_c68_0_nf; +extern cpuop_func op_c68_0_ff; +extern cpuop_func op_c70_0_nf; +extern cpuop_func op_c70_0_ff; +extern cpuop_func op_c78_0_nf; +extern cpuop_func op_c78_0_ff; +extern cpuop_func op_c79_0_nf; +extern cpuop_func op_c79_0_ff; +extern cpuop_func op_c7a_0_nf; +extern cpuop_func op_c7a_0_ff; +extern cpuop_func op_c7b_0_nf; +extern cpuop_func op_c7b_0_ff; +extern cpuop_func op_c80_0_nf; +extern cpuop_func op_c80_0_ff; +extern cpuop_func op_c90_0_nf; +extern cpuop_func op_c90_0_ff; +extern cpuop_func op_c98_0_nf; +extern cpuop_func op_c98_0_ff; +extern cpuop_func op_ca0_0_nf; +extern cpuop_func op_ca0_0_ff; +extern cpuop_func op_ca8_0_nf; +extern cpuop_func op_ca8_0_ff; +extern cpuop_func op_cb0_0_nf; +extern cpuop_func op_cb0_0_ff; +extern cpuop_func op_cb8_0_nf; +extern cpuop_func op_cb8_0_ff; +extern cpuop_func op_cb9_0_nf; +extern cpuop_func op_cb9_0_ff; +extern cpuop_func op_cba_0_nf; +extern cpuop_func op_cba_0_ff; +extern cpuop_func op_cbb_0_nf; +extern cpuop_func op_cbb_0_ff; +extern cpuop_func op_cd0_0_nf; +extern cpuop_func op_cd0_0_ff; +extern cpuop_func op_cd8_0_nf; +extern cpuop_func op_cd8_0_ff; +extern cpuop_func op_ce0_0_nf; +extern cpuop_func op_ce0_0_ff; +extern cpuop_func op_ce8_0_nf; +extern cpuop_func op_ce8_0_ff; +extern cpuop_func op_cf0_0_nf; +extern cpuop_func op_cf0_0_ff; +extern cpuop_func op_cf8_0_nf; +extern cpuop_func op_cf8_0_ff; +extern cpuop_func op_cf9_0_nf; +extern cpuop_func op_cf9_0_ff; +extern cpuop_func op_cfc_0_nf; +extern cpuop_func op_cfc_0_ff; +extern cpuop_func op_e10_0_nf; +extern cpuop_func op_e10_0_ff; +extern cpuop_func op_e18_0_nf; +extern cpuop_func op_e18_0_ff; +extern cpuop_func op_e20_0_nf; +extern cpuop_func op_e20_0_ff; +extern cpuop_func op_e28_0_nf; +extern cpuop_func op_e28_0_ff; +extern cpuop_func op_e30_0_nf; +extern cpuop_func op_e30_0_ff; +extern cpuop_func op_e38_0_nf; +extern cpuop_func op_e38_0_ff; +extern cpuop_func op_e39_0_nf; +extern cpuop_func op_e39_0_ff; +extern cpuop_func op_e50_0_nf; +extern cpuop_func op_e50_0_ff; +extern cpuop_func op_e58_0_nf; +extern cpuop_func op_e58_0_ff; +extern cpuop_func op_e60_0_nf; +extern cpuop_func op_e60_0_ff; +extern cpuop_func op_e68_0_nf; +extern cpuop_func op_e68_0_ff; +extern cpuop_func op_e70_0_nf; +extern cpuop_func op_e70_0_ff; +extern cpuop_func op_e78_0_nf; +extern cpuop_func op_e78_0_ff; +extern cpuop_func op_e79_0_nf; +extern cpuop_func op_e79_0_ff; +extern cpuop_func op_e90_0_nf; +extern cpuop_func op_e90_0_ff; +extern cpuop_func op_e98_0_nf; +extern cpuop_func op_e98_0_ff; +extern cpuop_func op_ea0_0_nf; +extern cpuop_func op_ea0_0_ff; +extern cpuop_func op_ea8_0_nf; +extern cpuop_func op_ea8_0_ff; +extern cpuop_func op_eb0_0_nf; +extern cpuop_func op_eb0_0_ff; +extern cpuop_func op_eb8_0_nf; +extern cpuop_func op_eb8_0_ff; +extern cpuop_func op_eb9_0_nf; +extern cpuop_func op_eb9_0_ff; +extern cpuop_func op_ed0_0_nf; +extern cpuop_func op_ed0_0_ff; +extern cpuop_func op_ed8_0_nf; +extern cpuop_func op_ed8_0_ff; +extern cpuop_func op_ee0_0_nf; +extern cpuop_func op_ee0_0_ff; +extern cpuop_func op_ee8_0_nf; +extern cpuop_func op_ee8_0_ff; +extern cpuop_func op_ef0_0_nf; +extern cpuop_func op_ef0_0_ff; +extern cpuop_func op_ef8_0_nf; +extern cpuop_func op_ef8_0_ff; +extern cpuop_func op_ef9_0_nf; +extern cpuop_func op_ef9_0_ff; +extern cpuop_func op_efc_0_nf; +extern cpuop_func op_efc_0_ff; +extern cpuop_func op_1000_0_nf; +extern cpuop_func op_1000_0_ff; +extern cpuop_func op_1010_0_nf; +extern cpuop_func op_1010_0_ff; +extern cpuop_func op_1018_0_nf; +extern cpuop_func op_1018_0_ff; +extern cpuop_func op_1020_0_nf; +extern cpuop_func op_1020_0_ff; +extern cpuop_func op_1028_0_nf; +extern cpuop_func op_1028_0_ff; +extern cpuop_func op_1030_0_nf; +extern cpuop_func op_1030_0_ff; +extern cpuop_func op_1038_0_nf; +extern cpuop_func op_1038_0_ff; +extern cpuop_func op_1039_0_nf; +extern cpuop_func op_1039_0_ff; +extern cpuop_func op_103a_0_nf; +extern cpuop_func op_103a_0_ff; +extern cpuop_func op_103b_0_nf; +extern cpuop_func op_103b_0_ff; +extern cpuop_func op_103c_0_nf; +extern cpuop_func op_103c_0_ff; +extern cpuop_func op_1080_0_nf; +extern cpuop_func op_1080_0_ff; +extern cpuop_func op_1090_0_nf; +extern cpuop_func op_1090_0_ff; +extern cpuop_func op_1098_0_nf; +extern cpuop_func op_1098_0_ff; +extern cpuop_func op_10a0_0_nf; +extern cpuop_func op_10a0_0_ff; +extern cpuop_func op_10a8_0_nf; +extern cpuop_func op_10a8_0_ff; +extern cpuop_func op_10b0_0_nf; +extern cpuop_func op_10b0_0_ff; +extern cpuop_func op_10b8_0_nf; +extern cpuop_func op_10b8_0_ff; +extern cpuop_func op_10b9_0_nf; +extern cpuop_func op_10b9_0_ff; +extern cpuop_func op_10ba_0_nf; +extern cpuop_func op_10ba_0_ff; +extern cpuop_func op_10bb_0_nf; +extern cpuop_func op_10bb_0_ff; +extern cpuop_func op_10bc_0_nf; +extern cpuop_func op_10bc_0_ff; +extern cpuop_func op_10c0_0_nf; +extern cpuop_func op_10c0_0_ff; +extern cpuop_func op_10d0_0_nf; +extern cpuop_func op_10d0_0_ff; +extern cpuop_func op_10d8_0_nf; +extern cpuop_func op_10d8_0_ff; +extern cpuop_func op_10e0_0_nf; +extern cpuop_func op_10e0_0_ff; +extern cpuop_func op_10e8_0_nf; +extern cpuop_func op_10e8_0_ff; +extern cpuop_func op_10f0_0_nf; +extern cpuop_func op_10f0_0_ff; +extern cpuop_func op_10f8_0_nf; +extern cpuop_func op_10f8_0_ff; +extern cpuop_func op_10f9_0_nf; +extern cpuop_func op_10f9_0_ff; +extern cpuop_func op_10fa_0_nf; +extern cpuop_func op_10fa_0_ff; +extern cpuop_func op_10fb_0_nf; +extern cpuop_func op_10fb_0_ff; +extern cpuop_func op_10fc_0_nf; +extern cpuop_func op_10fc_0_ff; +extern cpuop_func op_1100_0_nf; +extern cpuop_func op_1100_0_ff; +extern cpuop_func op_1110_0_nf; +extern cpuop_func op_1110_0_ff; +extern cpuop_func op_1118_0_nf; +extern cpuop_func op_1118_0_ff; +extern cpuop_func op_1120_0_nf; +extern cpuop_func op_1120_0_ff; +extern cpuop_func op_1128_0_nf; +extern cpuop_func op_1128_0_ff; +extern cpuop_func op_1130_0_nf; +extern cpuop_func op_1130_0_ff; +extern cpuop_func op_1138_0_nf; +extern cpuop_func op_1138_0_ff; +extern cpuop_func op_1139_0_nf; +extern cpuop_func op_1139_0_ff; +extern cpuop_func op_113a_0_nf; +extern cpuop_func op_113a_0_ff; +extern cpuop_func op_113b_0_nf; +extern cpuop_func op_113b_0_ff; +extern cpuop_func op_113c_0_nf; +extern cpuop_func op_113c_0_ff; +extern cpuop_func op_1140_0_nf; +extern cpuop_func op_1140_0_ff; +extern cpuop_func op_1150_0_nf; +extern cpuop_func op_1150_0_ff; +extern cpuop_func op_1158_0_nf; +extern cpuop_func op_1158_0_ff; +extern cpuop_func op_1160_0_nf; +extern cpuop_func op_1160_0_ff; +extern cpuop_func op_1168_0_nf; +extern cpuop_func op_1168_0_ff; +extern cpuop_func op_1170_0_nf; +extern cpuop_func op_1170_0_ff; +extern cpuop_func op_1178_0_nf; +extern cpuop_func op_1178_0_ff; +extern cpuop_func op_1179_0_nf; +extern cpuop_func op_1179_0_ff; +extern cpuop_func op_117a_0_nf; +extern cpuop_func op_117a_0_ff; +extern cpuop_func op_117b_0_nf; +extern cpuop_func op_117b_0_ff; +extern cpuop_func op_117c_0_nf; +extern cpuop_func op_117c_0_ff; +extern cpuop_func op_1180_0_nf; +extern cpuop_func op_1180_0_ff; +extern cpuop_func op_1190_0_nf; +extern cpuop_func op_1190_0_ff; +extern cpuop_func op_1198_0_nf; +extern cpuop_func op_1198_0_ff; +extern cpuop_func op_11a0_0_nf; +extern cpuop_func op_11a0_0_ff; +extern cpuop_func op_11a8_0_nf; +extern cpuop_func op_11a8_0_ff; +extern cpuop_func op_11b0_0_nf; +extern cpuop_func op_11b0_0_ff; +extern cpuop_func op_11b8_0_nf; +extern cpuop_func op_11b8_0_ff; +extern cpuop_func op_11b9_0_nf; +extern cpuop_func op_11b9_0_ff; +extern cpuop_func op_11ba_0_nf; +extern cpuop_func op_11ba_0_ff; +extern cpuop_func op_11bb_0_nf; +extern cpuop_func op_11bb_0_ff; +extern cpuop_func op_11bc_0_nf; +extern cpuop_func op_11bc_0_ff; +extern cpuop_func op_11c0_0_nf; +extern cpuop_func op_11c0_0_ff; +extern cpuop_func op_11d0_0_nf; +extern cpuop_func op_11d0_0_ff; +extern cpuop_func op_11d8_0_nf; +extern cpuop_func op_11d8_0_ff; +extern cpuop_func op_11e0_0_nf; +extern cpuop_func op_11e0_0_ff; +extern cpuop_func op_11e8_0_nf; +extern cpuop_func op_11e8_0_ff; +extern cpuop_func op_11f0_0_nf; +extern cpuop_func op_11f0_0_ff; +extern cpuop_func op_11f8_0_nf; +extern cpuop_func op_11f8_0_ff; +extern cpuop_func op_11f9_0_nf; +extern cpuop_func op_11f9_0_ff; +extern cpuop_func op_11fa_0_nf; +extern cpuop_func op_11fa_0_ff; +extern cpuop_func op_11fb_0_nf; +extern cpuop_func op_11fb_0_ff; +extern cpuop_func op_11fc_0_nf; +extern cpuop_func op_11fc_0_ff; +extern cpuop_func op_13c0_0_nf; +extern cpuop_func op_13c0_0_ff; +extern cpuop_func op_13d0_0_nf; +extern cpuop_func op_13d0_0_ff; +extern cpuop_func op_13d8_0_nf; +extern cpuop_func op_13d8_0_ff; +extern cpuop_func op_13e0_0_nf; +extern cpuop_func op_13e0_0_ff; +extern cpuop_func op_13e8_0_nf; +extern cpuop_func op_13e8_0_ff; +extern cpuop_func op_13f0_0_nf; +extern cpuop_func op_13f0_0_ff; +extern cpuop_func op_13f8_0_nf; +extern cpuop_func op_13f8_0_ff; +extern cpuop_func op_13f9_0_nf; +extern cpuop_func op_13f9_0_ff; +extern cpuop_func op_13fa_0_nf; +extern cpuop_func op_13fa_0_ff; +extern cpuop_func op_13fb_0_nf; +extern cpuop_func op_13fb_0_ff; +extern cpuop_func op_13fc_0_nf; +extern cpuop_func op_13fc_0_ff; +extern cpuop_func op_2000_0_nf; +extern cpuop_func op_2000_0_ff; +extern cpuop_func op_2008_0_nf; +extern cpuop_func op_2008_0_ff; +extern cpuop_func op_2010_0_nf; +extern cpuop_func op_2010_0_ff; +extern cpuop_func op_2018_0_nf; +extern cpuop_func op_2018_0_ff; +extern cpuop_func op_2020_0_nf; +extern cpuop_func op_2020_0_ff; +extern cpuop_func op_2028_0_nf; +extern cpuop_func op_2028_0_ff; +extern cpuop_func op_2030_0_nf; +extern cpuop_func op_2030_0_ff; +extern cpuop_func op_2038_0_nf; +extern cpuop_func op_2038_0_ff; +extern cpuop_func op_2039_0_nf; +extern cpuop_func op_2039_0_ff; +extern cpuop_func op_203a_0_nf; +extern cpuop_func op_203a_0_ff; +extern cpuop_func op_203b_0_nf; +extern cpuop_func op_203b_0_ff; +extern cpuop_func op_203c_0_nf; +extern cpuop_func op_203c_0_ff; +extern cpuop_func op_2040_0_nf; +extern cpuop_func op_2040_0_ff; +extern cpuop_func op_2048_0_nf; +extern cpuop_func op_2048_0_ff; +extern cpuop_func op_2050_0_nf; +extern cpuop_func op_2050_0_ff; +extern cpuop_func op_2058_0_nf; +extern cpuop_func op_2058_0_ff; +extern cpuop_func op_2060_0_nf; +extern cpuop_func op_2060_0_ff; +extern cpuop_func op_2068_0_nf; +extern cpuop_func op_2068_0_ff; +extern cpuop_func op_2070_0_nf; +extern cpuop_func op_2070_0_ff; +extern cpuop_func op_2078_0_nf; +extern cpuop_func op_2078_0_ff; +extern cpuop_func op_2079_0_nf; +extern cpuop_func op_2079_0_ff; +extern cpuop_func op_207a_0_nf; +extern cpuop_func op_207a_0_ff; +extern cpuop_func op_207b_0_nf; +extern cpuop_func op_207b_0_ff; +extern cpuop_func op_207c_0_nf; +extern cpuop_func op_207c_0_ff; +extern cpuop_func op_2080_0_nf; +extern cpuop_func op_2080_0_ff; +extern cpuop_func op_2088_0_nf; +extern cpuop_func op_2088_0_ff; +extern cpuop_func op_2090_0_nf; +extern cpuop_func op_2090_0_ff; +extern cpuop_func op_2098_0_nf; +extern cpuop_func op_2098_0_ff; +extern cpuop_func op_20a0_0_nf; +extern cpuop_func op_20a0_0_ff; +extern cpuop_func op_20a8_0_nf; +extern cpuop_func op_20a8_0_ff; +extern cpuop_func op_20b0_0_nf; +extern cpuop_func op_20b0_0_ff; +extern cpuop_func op_20b8_0_nf; +extern cpuop_func op_20b8_0_ff; +extern cpuop_func op_20b9_0_nf; +extern cpuop_func op_20b9_0_ff; +extern cpuop_func op_20ba_0_nf; +extern cpuop_func op_20ba_0_ff; +extern cpuop_func op_20bb_0_nf; +extern cpuop_func op_20bb_0_ff; +extern cpuop_func op_20bc_0_nf; +extern cpuop_func op_20bc_0_ff; +extern cpuop_func op_20c0_0_nf; +extern cpuop_func op_20c0_0_ff; +extern cpuop_func op_20c8_0_nf; +extern cpuop_func op_20c8_0_ff; +extern cpuop_func op_20d0_0_nf; +extern cpuop_func op_20d0_0_ff; +extern cpuop_func op_20d8_0_nf; +extern cpuop_func op_20d8_0_ff; +extern cpuop_func op_20e0_0_nf; +extern cpuop_func op_20e0_0_ff; +extern cpuop_func op_20e8_0_nf; +extern cpuop_func op_20e8_0_ff; +extern cpuop_func op_20f0_0_nf; +extern cpuop_func op_20f0_0_ff; +extern cpuop_func op_20f8_0_nf; +extern cpuop_func op_20f8_0_ff; +extern cpuop_func op_20f9_0_nf; +extern cpuop_func op_20f9_0_ff; +extern cpuop_func op_20fa_0_nf; +extern cpuop_func op_20fa_0_ff; +extern cpuop_func op_20fb_0_nf; +extern cpuop_func op_20fb_0_ff; +extern cpuop_func op_20fc_0_nf; +extern cpuop_func op_20fc_0_ff; +extern cpuop_func op_2100_0_nf; +extern cpuop_func op_2100_0_ff; +extern cpuop_func op_2108_0_nf; +extern cpuop_func op_2108_0_ff; +extern cpuop_func op_2110_0_nf; +extern cpuop_func op_2110_0_ff; +extern cpuop_func op_2118_0_nf; +extern cpuop_func op_2118_0_ff; +extern cpuop_func op_2120_0_nf; +extern cpuop_func op_2120_0_ff; +extern cpuop_func op_2128_0_nf; +extern cpuop_func op_2128_0_ff; +extern cpuop_func op_2130_0_nf; +extern cpuop_func op_2130_0_ff; +extern cpuop_func op_2138_0_nf; +extern cpuop_func op_2138_0_ff; +extern cpuop_func op_2139_0_nf; +extern cpuop_func op_2139_0_ff; +extern cpuop_func op_213a_0_nf; +extern cpuop_func op_213a_0_ff; +extern cpuop_func op_213b_0_nf; +extern cpuop_func op_213b_0_ff; +extern cpuop_func op_213c_0_nf; +extern cpuop_func op_213c_0_ff; +extern cpuop_func op_2140_0_nf; +extern cpuop_func op_2140_0_ff; +extern cpuop_func op_2148_0_nf; +extern cpuop_func op_2148_0_ff; +extern cpuop_func op_2150_0_nf; +extern cpuop_func op_2150_0_ff; +extern cpuop_func op_2158_0_nf; +extern cpuop_func op_2158_0_ff; +extern cpuop_func op_2160_0_nf; +extern cpuop_func op_2160_0_ff; +extern cpuop_func op_2168_0_nf; +extern cpuop_func op_2168_0_ff; +extern cpuop_func op_2170_0_nf; +extern cpuop_func op_2170_0_ff; +extern cpuop_func op_2178_0_nf; +extern cpuop_func op_2178_0_ff; +extern cpuop_func op_2179_0_nf; +extern cpuop_func op_2179_0_ff; +extern cpuop_func op_217a_0_nf; +extern cpuop_func op_217a_0_ff; +extern cpuop_func op_217b_0_nf; +extern cpuop_func op_217b_0_ff; +extern cpuop_func op_217c_0_nf; +extern cpuop_func op_217c_0_ff; +extern cpuop_func op_2180_0_nf; +extern cpuop_func op_2180_0_ff; +extern cpuop_func op_2188_0_nf; +extern cpuop_func op_2188_0_ff; +extern cpuop_func op_2190_0_nf; +extern cpuop_func op_2190_0_ff; +extern cpuop_func op_2198_0_nf; +extern cpuop_func op_2198_0_ff; +extern cpuop_func op_21a0_0_nf; +extern cpuop_func op_21a0_0_ff; +extern cpuop_func op_21a8_0_nf; +extern cpuop_func op_21a8_0_ff; +extern cpuop_func op_21b0_0_nf; +extern cpuop_func op_21b0_0_ff; +extern cpuop_func op_21b8_0_nf; +extern cpuop_func op_21b8_0_ff; +extern cpuop_func op_21b9_0_nf; +extern cpuop_func op_21b9_0_ff; +extern cpuop_func op_21ba_0_nf; +extern cpuop_func op_21ba_0_ff; +extern cpuop_func op_21bb_0_nf; +extern cpuop_func op_21bb_0_ff; +extern cpuop_func op_21bc_0_nf; +extern cpuop_func op_21bc_0_ff; +extern cpuop_func op_21c0_0_nf; +extern cpuop_func op_21c0_0_ff; +extern cpuop_func op_21c8_0_nf; +extern cpuop_func op_21c8_0_ff; +extern cpuop_func op_21d0_0_nf; +extern cpuop_func op_21d0_0_ff; +extern cpuop_func op_21d8_0_nf; +extern cpuop_func op_21d8_0_ff; +extern cpuop_func op_21e0_0_nf; +extern cpuop_func op_21e0_0_ff; +extern cpuop_func op_21e8_0_nf; +extern cpuop_func op_21e8_0_ff; +extern cpuop_func op_21f0_0_nf; +extern cpuop_func op_21f0_0_ff; +extern cpuop_func op_21f8_0_nf; +extern cpuop_func op_21f8_0_ff; +extern cpuop_func op_21f9_0_nf; +extern cpuop_func op_21f9_0_ff; +extern cpuop_func op_21fa_0_nf; +extern cpuop_func op_21fa_0_ff; +extern cpuop_func op_21fb_0_nf; +extern cpuop_func op_21fb_0_ff; +extern cpuop_func op_21fc_0_nf; +extern cpuop_func op_21fc_0_ff; +extern cpuop_func op_23c0_0_nf; +extern cpuop_func op_23c0_0_ff; +extern cpuop_func op_23c8_0_nf; +extern cpuop_func op_23c8_0_ff; +extern cpuop_func op_23d0_0_nf; +extern cpuop_func op_23d0_0_ff; +extern cpuop_func op_23d8_0_nf; +extern cpuop_func op_23d8_0_ff; +extern cpuop_func op_23e0_0_nf; +extern cpuop_func op_23e0_0_ff; +extern cpuop_func op_23e8_0_nf; +extern cpuop_func op_23e8_0_ff; +extern cpuop_func op_23f0_0_nf; +extern cpuop_func op_23f0_0_ff; +extern cpuop_func op_23f8_0_nf; +extern cpuop_func op_23f8_0_ff; +extern cpuop_func op_23f9_0_nf; +extern cpuop_func op_23f9_0_ff; +extern cpuop_func op_23fa_0_nf; +extern cpuop_func op_23fa_0_ff; +extern cpuop_func op_23fb_0_nf; +extern cpuop_func op_23fb_0_ff; +extern cpuop_func op_23fc_0_nf; +extern cpuop_func op_23fc_0_ff; +extern cpuop_func op_3000_0_nf; +extern cpuop_func op_3000_0_ff; +extern cpuop_func op_3008_0_nf; +extern cpuop_func op_3008_0_ff; +extern cpuop_func op_3010_0_nf; +extern cpuop_func op_3010_0_ff; +extern cpuop_func op_3018_0_nf; +extern cpuop_func op_3018_0_ff; +extern cpuop_func op_3020_0_nf; +extern cpuop_func op_3020_0_ff; +extern cpuop_func op_3028_0_nf; +extern cpuop_func op_3028_0_ff; +extern cpuop_func op_3030_0_nf; +extern cpuop_func op_3030_0_ff; +extern cpuop_func op_3038_0_nf; +extern cpuop_func op_3038_0_ff; +extern cpuop_func op_3039_0_nf; +extern cpuop_func op_3039_0_ff; +extern cpuop_func op_303a_0_nf; +extern cpuop_func op_303a_0_ff; +extern cpuop_func op_303b_0_nf; +extern cpuop_func op_303b_0_ff; +extern cpuop_func op_303c_0_nf; +extern cpuop_func op_303c_0_ff; +extern cpuop_func op_3040_0_nf; +extern cpuop_func op_3040_0_ff; +extern cpuop_func op_3048_0_nf; +extern cpuop_func op_3048_0_ff; +extern cpuop_func op_3050_0_nf; +extern cpuop_func op_3050_0_ff; +extern cpuop_func op_3058_0_nf; +extern cpuop_func op_3058_0_ff; +extern cpuop_func op_3060_0_nf; +extern cpuop_func op_3060_0_ff; +extern cpuop_func op_3068_0_nf; +extern cpuop_func op_3068_0_ff; +extern cpuop_func op_3070_0_nf; +extern cpuop_func op_3070_0_ff; +extern cpuop_func op_3078_0_nf; +extern cpuop_func op_3078_0_ff; +extern cpuop_func op_3079_0_nf; +extern cpuop_func op_3079_0_ff; +extern cpuop_func op_307a_0_nf; +extern cpuop_func op_307a_0_ff; +extern cpuop_func op_307b_0_nf; +extern cpuop_func op_307b_0_ff; +extern cpuop_func op_307c_0_nf; +extern cpuop_func op_307c_0_ff; +extern cpuop_func op_3080_0_nf; +extern cpuop_func op_3080_0_ff; +extern cpuop_func op_3088_0_nf; +extern cpuop_func op_3088_0_ff; +extern cpuop_func op_3090_0_nf; +extern cpuop_func op_3090_0_ff; +extern cpuop_func op_3098_0_nf; +extern cpuop_func op_3098_0_ff; +extern cpuop_func op_30a0_0_nf; +extern cpuop_func op_30a0_0_ff; +extern cpuop_func op_30a8_0_nf; +extern cpuop_func op_30a8_0_ff; +extern cpuop_func op_30b0_0_nf; +extern cpuop_func op_30b0_0_ff; +extern cpuop_func op_30b8_0_nf; +extern cpuop_func op_30b8_0_ff; +extern cpuop_func op_30b9_0_nf; +extern cpuop_func op_30b9_0_ff; +extern cpuop_func op_30ba_0_nf; +extern cpuop_func op_30ba_0_ff; +extern cpuop_func op_30bb_0_nf; +extern cpuop_func op_30bb_0_ff; +extern cpuop_func op_30bc_0_nf; +extern cpuop_func op_30bc_0_ff; +extern cpuop_func op_30c0_0_nf; +extern cpuop_func op_30c0_0_ff; +extern cpuop_func op_30c8_0_nf; +extern cpuop_func op_30c8_0_ff; +extern cpuop_func op_30d0_0_nf; +extern cpuop_func op_30d0_0_ff; +extern cpuop_func op_30d8_0_nf; +extern cpuop_func op_30d8_0_ff; +extern cpuop_func op_30e0_0_nf; +extern cpuop_func op_30e0_0_ff; +extern cpuop_func op_30e8_0_nf; +extern cpuop_func op_30e8_0_ff; +extern cpuop_func op_30f0_0_nf; +extern cpuop_func op_30f0_0_ff; +extern cpuop_func op_30f8_0_nf; +extern cpuop_func op_30f8_0_ff; +extern cpuop_func op_30f9_0_nf; +extern cpuop_func op_30f9_0_ff; +extern cpuop_func op_30fa_0_nf; +extern cpuop_func op_30fa_0_ff; +extern cpuop_func op_30fb_0_nf; +extern cpuop_func op_30fb_0_ff; +extern cpuop_func op_30fc_0_nf; +extern cpuop_func op_30fc_0_ff; +extern cpuop_func op_3100_0_nf; +extern cpuop_func op_3100_0_ff; +extern cpuop_func op_3108_0_nf; +extern cpuop_func op_3108_0_ff; +extern cpuop_func op_3110_0_nf; +extern cpuop_func op_3110_0_ff; +extern cpuop_func op_3118_0_nf; +extern cpuop_func op_3118_0_ff; +extern cpuop_func op_3120_0_nf; +extern cpuop_func op_3120_0_ff; +extern cpuop_func op_3128_0_nf; +extern cpuop_func op_3128_0_ff; +extern cpuop_func op_3130_0_nf; +extern cpuop_func op_3130_0_ff; +extern cpuop_func op_3138_0_nf; +extern cpuop_func op_3138_0_ff; +extern cpuop_func op_3139_0_nf; +extern cpuop_func op_3139_0_ff; +extern cpuop_func op_313a_0_nf; +extern cpuop_func op_313a_0_ff; +extern cpuop_func op_313b_0_nf; +extern cpuop_func op_313b_0_ff; +extern cpuop_func op_313c_0_nf; +extern cpuop_func op_313c_0_ff; +extern cpuop_func op_3140_0_nf; +extern cpuop_func op_3140_0_ff; +extern cpuop_func op_3148_0_nf; +extern cpuop_func op_3148_0_ff; +extern cpuop_func op_3150_0_nf; +extern cpuop_func op_3150_0_ff; +extern cpuop_func op_3158_0_nf; +extern cpuop_func op_3158_0_ff; +extern cpuop_func op_3160_0_nf; +extern cpuop_func op_3160_0_ff; +extern cpuop_func op_3168_0_nf; +extern cpuop_func op_3168_0_ff; +extern cpuop_func op_3170_0_nf; +extern cpuop_func op_3170_0_ff; +extern cpuop_func op_3178_0_nf; +extern cpuop_func op_3178_0_ff; +extern cpuop_func op_3179_0_nf; +extern cpuop_func op_3179_0_ff; +extern cpuop_func op_317a_0_nf; +extern cpuop_func op_317a_0_ff; +extern cpuop_func op_317b_0_nf; +extern cpuop_func op_317b_0_ff; +extern cpuop_func op_317c_0_nf; +extern cpuop_func op_317c_0_ff; +extern cpuop_func op_3180_0_nf; +extern cpuop_func op_3180_0_ff; +extern cpuop_func op_3188_0_nf; +extern cpuop_func op_3188_0_ff; +extern cpuop_func op_3190_0_nf; +extern cpuop_func op_3190_0_ff; +extern cpuop_func op_3198_0_nf; +extern cpuop_func op_3198_0_ff; +extern cpuop_func op_31a0_0_nf; +extern cpuop_func op_31a0_0_ff; +extern cpuop_func op_31a8_0_nf; +extern cpuop_func op_31a8_0_ff; +extern cpuop_func op_31b0_0_nf; +extern cpuop_func op_31b0_0_ff; +extern cpuop_func op_31b8_0_nf; +extern cpuop_func op_31b8_0_ff; +extern cpuop_func op_31b9_0_nf; +extern cpuop_func op_31b9_0_ff; +extern cpuop_func op_31ba_0_nf; +extern cpuop_func op_31ba_0_ff; +extern cpuop_func op_31bb_0_nf; +extern cpuop_func op_31bb_0_ff; +extern cpuop_func op_31bc_0_nf; +extern cpuop_func op_31bc_0_ff; +extern cpuop_func op_31c0_0_nf; +extern cpuop_func op_31c0_0_ff; +extern cpuop_func op_31c8_0_nf; +extern cpuop_func op_31c8_0_ff; +extern cpuop_func op_31d0_0_nf; +extern cpuop_func op_31d0_0_ff; +extern cpuop_func op_31d8_0_nf; +extern cpuop_func op_31d8_0_ff; +extern cpuop_func op_31e0_0_nf; +extern cpuop_func op_31e0_0_ff; +extern cpuop_func op_31e8_0_nf; +extern cpuop_func op_31e8_0_ff; +extern cpuop_func op_31f0_0_nf; +extern cpuop_func op_31f0_0_ff; +extern cpuop_func op_31f8_0_nf; +extern cpuop_func op_31f8_0_ff; +extern cpuop_func op_31f9_0_nf; +extern cpuop_func op_31f9_0_ff; +extern cpuop_func op_31fa_0_nf; +extern cpuop_func op_31fa_0_ff; +extern cpuop_func op_31fb_0_nf; +extern cpuop_func op_31fb_0_ff; +extern cpuop_func op_31fc_0_nf; +extern cpuop_func op_31fc_0_ff; +extern cpuop_func op_33c0_0_nf; +extern cpuop_func op_33c0_0_ff; +extern cpuop_func op_33c8_0_nf; +extern cpuop_func op_33c8_0_ff; +extern cpuop_func op_33d0_0_nf; +extern cpuop_func op_33d0_0_ff; +extern cpuop_func op_33d8_0_nf; +extern cpuop_func op_33d8_0_ff; +extern cpuop_func op_33e0_0_nf; +extern cpuop_func op_33e0_0_ff; +extern cpuop_func op_33e8_0_nf; +extern cpuop_func op_33e8_0_ff; +extern cpuop_func op_33f0_0_nf; +extern cpuop_func op_33f0_0_ff; +extern cpuop_func op_33f8_0_nf; +extern cpuop_func op_33f8_0_ff; +extern cpuop_func op_33f9_0_nf; +extern cpuop_func op_33f9_0_ff; +extern cpuop_func op_33fa_0_nf; +extern cpuop_func op_33fa_0_ff; +extern cpuop_func op_33fb_0_nf; +extern cpuop_func op_33fb_0_ff; +extern cpuop_func op_33fc_0_nf; +extern cpuop_func op_33fc_0_ff; +extern cpuop_func op_4000_0_nf; +extern cpuop_func op_4000_0_ff; +extern cpuop_func op_4010_0_nf; +extern cpuop_func op_4010_0_ff; +extern cpuop_func op_4018_0_nf; +extern cpuop_func op_4018_0_ff; +extern cpuop_func op_4020_0_nf; +extern cpuop_func op_4020_0_ff; +extern cpuop_func op_4028_0_nf; +extern cpuop_func op_4028_0_ff; +extern cpuop_func op_4030_0_nf; +extern cpuop_func op_4030_0_ff; +extern cpuop_func op_4038_0_nf; +extern cpuop_func op_4038_0_ff; +extern cpuop_func op_4039_0_nf; +extern cpuop_func op_4039_0_ff; +extern cpuop_func op_4040_0_nf; +extern cpuop_func op_4040_0_ff; +extern cpuop_func op_4050_0_nf; +extern cpuop_func op_4050_0_ff; +extern cpuop_func op_4058_0_nf; +extern cpuop_func op_4058_0_ff; +extern cpuop_func op_4060_0_nf; +extern cpuop_func op_4060_0_ff; +extern cpuop_func op_4068_0_nf; +extern cpuop_func op_4068_0_ff; +extern cpuop_func op_4070_0_nf; +extern cpuop_func op_4070_0_ff; +extern cpuop_func op_4078_0_nf; +extern cpuop_func op_4078_0_ff; +extern cpuop_func op_4079_0_nf; +extern cpuop_func op_4079_0_ff; +extern cpuop_func op_4080_0_nf; +extern cpuop_func op_4080_0_ff; +extern cpuop_func op_4090_0_nf; +extern cpuop_func op_4090_0_ff; +extern cpuop_func op_4098_0_nf; +extern cpuop_func op_4098_0_ff; +extern cpuop_func op_40a0_0_nf; +extern cpuop_func op_40a0_0_ff; +extern cpuop_func op_40a8_0_nf; +extern cpuop_func op_40a8_0_ff; +extern cpuop_func op_40b0_0_nf; +extern cpuop_func op_40b0_0_ff; +extern cpuop_func op_40b8_0_nf; +extern cpuop_func op_40b8_0_ff; +extern cpuop_func op_40b9_0_nf; +extern cpuop_func op_40b9_0_ff; +extern cpuop_func op_40c0_0_nf; +extern cpuop_func op_40c0_0_ff; +extern cpuop_func op_40d0_0_nf; +extern cpuop_func op_40d0_0_ff; +extern cpuop_func op_40d8_0_nf; +extern cpuop_func op_40d8_0_ff; +extern cpuop_func op_40e0_0_nf; +extern cpuop_func op_40e0_0_ff; +extern cpuop_func op_40e8_0_nf; +extern cpuop_func op_40e8_0_ff; +extern cpuop_func op_40f0_0_nf; +extern cpuop_func op_40f0_0_ff; +extern cpuop_func op_40f8_0_nf; +extern cpuop_func op_40f8_0_ff; +extern cpuop_func op_40f9_0_nf; +extern cpuop_func op_40f9_0_ff; +extern cpuop_func op_4100_0_nf; +extern cpuop_func op_4100_0_ff; +extern cpuop_func op_4110_0_nf; +extern cpuop_func op_4110_0_ff; +extern cpuop_func op_4118_0_nf; +extern cpuop_func op_4118_0_ff; +extern cpuop_func op_4120_0_nf; +extern cpuop_func op_4120_0_ff; +extern cpuop_func op_4128_0_nf; +extern cpuop_func op_4128_0_ff; +extern cpuop_func op_4130_0_nf; +extern cpuop_func op_4130_0_ff; +extern cpuop_func op_4138_0_nf; +extern cpuop_func op_4138_0_ff; +extern cpuop_func op_4139_0_nf; +extern cpuop_func op_4139_0_ff; +extern cpuop_func op_413a_0_nf; +extern cpuop_func op_413a_0_ff; +extern cpuop_func op_413b_0_nf; +extern cpuop_func op_413b_0_ff; +extern cpuop_func op_413c_0_nf; +extern cpuop_func op_413c_0_ff; +extern cpuop_func op_4180_0_nf; +extern cpuop_func op_4180_0_ff; +extern cpuop_func op_4190_0_nf; +extern cpuop_func op_4190_0_ff; +extern cpuop_func op_4198_0_nf; +extern cpuop_func op_4198_0_ff; +extern cpuop_func op_41a0_0_nf; +extern cpuop_func op_41a0_0_ff; +extern cpuop_func op_41a8_0_nf; +extern cpuop_func op_41a8_0_ff; +extern cpuop_func op_41b0_0_nf; +extern cpuop_func op_41b0_0_ff; +extern cpuop_func op_41b8_0_nf; +extern cpuop_func op_41b8_0_ff; +extern cpuop_func op_41b9_0_nf; +extern cpuop_func op_41b9_0_ff; +extern cpuop_func op_41ba_0_nf; +extern cpuop_func op_41ba_0_ff; +extern cpuop_func op_41bb_0_nf; +extern cpuop_func op_41bb_0_ff; +extern cpuop_func op_41bc_0_nf; +extern cpuop_func op_41bc_0_ff; +extern cpuop_func op_41d0_0_nf; +extern cpuop_func op_41d0_0_ff; +extern cpuop_func op_41e8_0_nf; +extern cpuop_func op_41e8_0_ff; +extern cpuop_func op_41f0_0_nf; +extern cpuop_func op_41f0_0_ff; +extern cpuop_func op_41f8_0_nf; +extern cpuop_func op_41f8_0_ff; +extern cpuop_func op_41f9_0_nf; +extern cpuop_func op_41f9_0_ff; +extern cpuop_func op_41fa_0_nf; +extern cpuop_func op_41fa_0_ff; +extern cpuop_func op_41fb_0_nf; +extern cpuop_func op_41fb_0_ff; +extern cpuop_func op_4200_0_nf; +extern cpuop_func op_4200_0_ff; +extern cpuop_func op_4210_0_nf; +extern cpuop_func op_4210_0_ff; +extern cpuop_func op_4218_0_nf; +extern cpuop_func op_4218_0_ff; +extern cpuop_func op_4220_0_nf; +extern cpuop_func op_4220_0_ff; +extern cpuop_func op_4228_0_nf; +extern cpuop_func op_4228_0_ff; +extern cpuop_func op_4230_0_nf; +extern cpuop_func op_4230_0_ff; +extern cpuop_func op_4238_0_nf; +extern cpuop_func op_4238_0_ff; +extern cpuop_func op_4239_0_nf; +extern cpuop_func op_4239_0_ff; +extern cpuop_func op_4240_0_nf; +extern cpuop_func op_4240_0_ff; +extern cpuop_func op_4250_0_nf; +extern cpuop_func op_4250_0_ff; +extern cpuop_func op_4258_0_nf; +extern cpuop_func op_4258_0_ff; +extern cpuop_func op_4260_0_nf; +extern cpuop_func op_4260_0_ff; +extern cpuop_func op_4268_0_nf; +extern cpuop_func op_4268_0_ff; +extern cpuop_func op_4270_0_nf; +extern cpuop_func op_4270_0_ff; +extern cpuop_func op_4278_0_nf; +extern cpuop_func op_4278_0_ff; +extern cpuop_func op_4279_0_nf; +extern cpuop_func op_4279_0_ff; +extern cpuop_func op_4280_0_nf; +extern cpuop_func op_4280_0_ff; +extern cpuop_func op_4290_0_nf; +extern cpuop_func op_4290_0_ff; +extern cpuop_func op_4298_0_nf; +extern cpuop_func op_4298_0_ff; +extern cpuop_func op_42a0_0_nf; +extern cpuop_func op_42a0_0_ff; +extern cpuop_func op_42a8_0_nf; +extern cpuop_func op_42a8_0_ff; +extern cpuop_func op_42b0_0_nf; +extern cpuop_func op_42b0_0_ff; +extern cpuop_func op_42b8_0_nf; +extern cpuop_func op_42b8_0_ff; +extern cpuop_func op_42b9_0_nf; +extern cpuop_func op_42b9_0_ff; +extern cpuop_func op_42c0_0_nf; +extern cpuop_func op_42c0_0_ff; +extern cpuop_func op_42d0_0_nf; +extern cpuop_func op_42d0_0_ff; +extern cpuop_func op_42d8_0_nf; +extern cpuop_func op_42d8_0_ff; +extern cpuop_func op_42e0_0_nf; +extern cpuop_func op_42e0_0_ff; +extern cpuop_func op_42e8_0_nf; +extern cpuop_func op_42e8_0_ff; +extern cpuop_func op_42f0_0_nf; +extern cpuop_func op_42f0_0_ff; +extern cpuop_func op_42f8_0_nf; +extern cpuop_func op_42f8_0_ff; +extern cpuop_func op_42f9_0_nf; +extern cpuop_func op_42f9_0_ff; +extern cpuop_func op_4400_0_nf; +extern cpuop_func op_4400_0_ff; +extern cpuop_func op_4410_0_nf; +extern cpuop_func op_4410_0_ff; +extern cpuop_func op_4418_0_nf; +extern cpuop_func op_4418_0_ff; +extern cpuop_func op_4420_0_nf; +extern cpuop_func op_4420_0_ff; +extern cpuop_func op_4428_0_nf; +extern cpuop_func op_4428_0_ff; +extern cpuop_func op_4430_0_nf; +extern cpuop_func op_4430_0_ff; +extern cpuop_func op_4438_0_nf; +extern cpuop_func op_4438_0_ff; +extern cpuop_func op_4439_0_nf; +extern cpuop_func op_4439_0_ff; +extern cpuop_func op_4440_0_nf; +extern cpuop_func op_4440_0_ff; +extern cpuop_func op_4450_0_nf; +extern cpuop_func op_4450_0_ff; +extern cpuop_func op_4458_0_nf; +extern cpuop_func op_4458_0_ff; +extern cpuop_func op_4460_0_nf; +extern cpuop_func op_4460_0_ff; +extern cpuop_func op_4468_0_nf; +extern cpuop_func op_4468_0_ff; +extern cpuop_func op_4470_0_nf; +extern cpuop_func op_4470_0_ff; +extern cpuop_func op_4478_0_nf; +extern cpuop_func op_4478_0_ff; +extern cpuop_func op_4479_0_nf; +extern cpuop_func op_4479_0_ff; +extern cpuop_func op_4480_0_nf; +extern cpuop_func op_4480_0_ff; +extern cpuop_func op_4490_0_nf; +extern cpuop_func op_4490_0_ff; +extern cpuop_func op_4498_0_nf; +extern cpuop_func op_4498_0_ff; +extern cpuop_func op_44a0_0_nf; +extern cpuop_func op_44a0_0_ff; +extern cpuop_func op_44a8_0_nf; +extern cpuop_func op_44a8_0_ff; +extern cpuop_func op_44b0_0_nf; +extern cpuop_func op_44b0_0_ff; +extern cpuop_func op_44b8_0_nf; +extern cpuop_func op_44b8_0_ff; +extern cpuop_func op_44b9_0_nf; +extern cpuop_func op_44b9_0_ff; +extern cpuop_func op_44c0_0_nf; +extern cpuop_func op_44c0_0_ff; +extern cpuop_func op_44d0_0_nf; +extern cpuop_func op_44d0_0_ff; +extern cpuop_func op_44d8_0_nf; +extern cpuop_func op_44d8_0_ff; +extern cpuop_func op_44e0_0_nf; +extern cpuop_func op_44e0_0_ff; +extern cpuop_func op_44e8_0_nf; +extern cpuop_func op_44e8_0_ff; +extern cpuop_func op_44f0_0_nf; +extern cpuop_func op_44f0_0_ff; +extern cpuop_func op_44f8_0_nf; +extern cpuop_func op_44f8_0_ff; +extern cpuop_func op_44f9_0_nf; +extern cpuop_func op_44f9_0_ff; +extern cpuop_func op_44fa_0_nf; +extern cpuop_func op_44fa_0_ff; +extern cpuop_func op_44fb_0_nf; +extern cpuop_func op_44fb_0_ff; +extern cpuop_func op_44fc_0_nf; +extern cpuop_func op_44fc_0_ff; +extern cpuop_func op_4600_0_nf; +extern cpuop_func op_4600_0_ff; +extern cpuop_func op_4610_0_nf; +extern cpuop_func op_4610_0_ff; +extern cpuop_func op_4618_0_nf; +extern cpuop_func op_4618_0_ff; +extern cpuop_func op_4620_0_nf; +extern cpuop_func op_4620_0_ff; +extern cpuop_func op_4628_0_nf; +extern cpuop_func op_4628_0_ff; +extern cpuop_func op_4630_0_nf; +extern cpuop_func op_4630_0_ff; +extern cpuop_func op_4638_0_nf; +extern cpuop_func op_4638_0_ff; +extern cpuop_func op_4639_0_nf; +extern cpuop_func op_4639_0_ff; +extern cpuop_func op_4640_0_nf; +extern cpuop_func op_4640_0_ff; +extern cpuop_func op_4650_0_nf; +extern cpuop_func op_4650_0_ff; +extern cpuop_func op_4658_0_nf; +extern cpuop_func op_4658_0_ff; +extern cpuop_func op_4660_0_nf; +extern cpuop_func op_4660_0_ff; +extern cpuop_func op_4668_0_nf; +extern cpuop_func op_4668_0_ff; +extern cpuop_func op_4670_0_nf; +extern cpuop_func op_4670_0_ff; +extern cpuop_func op_4678_0_nf; +extern cpuop_func op_4678_0_ff; +extern cpuop_func op_4679_0_nf; +extern cpuop_func op_4679_0_ff; +extern cpuop_func op_4680_0_nf; +extern cpuop_func op_4680_0_ff; +extern cpuop_func op_4690_0_nf; +extern cpuop_func op_4690_0_ff; +extern cpuop_func op_4698_0_nf; +extern cpuop_func op_4698_0_ff; +extern cpuop_func op_46a0_0_nf; +extern cpuop_func op_46a0_0_ff; +extern cpuop_func op_46a8_0_nf; +extern cpuop_func op_46a8_0_ff; +extern cpuop_func op_46b0_0_nf; +extern cpuop_func op_46b0_0_ff; +extern cpuop_func op_46b8_0_nf; +extern cpuop_func op_46b8_0_ff; +extern cpuop_func op_46b9_0_nf; +extern cpuop_func op_46b9_0_ff; +extern cpuop_func op_46c0_0_nf; +extern cpuop_func op_46c0_0_ff; +extern cpuop_func op_46d0_0_nf; +extern cpuop_func op_46d0_0_ff; +extern cpuop_func op_46d8_0_nf; +extern cpuop_func op_46d8_0_ff; +extern cpuop_func op_46e0_0_nf; +extern cpuop_func op_46e0_0_ff; +extern cpuop_func op_46e8_0_nf; +extern cpuop_func op_46e8_0_ff; +extern cpuop_func op_46f0_0_nf; +extern cpuop_func op_46f0_0_ff; +extern cpuop_func op_46f8_0_nf; +extern cpuop_func op_46f8_0_ff; +extern cpuop_func op_46f9_0_nf; +extern cpuop_func op_46f9_0_ff; +extern cpuop_func op_46fa_0_nf; +extern cpuop_func op_46fa_0_ff; +extern cpuop_func op_46fb_0_nf; +extern cpuop_func op_46fb_0_ff; +extern cpuop_func op_46fc_0_nf; +extern cpuop_func op_46fc_0_ff; +extern cpuop_func op_4800_0_nf; +extern cpuop_func op_4800_0_ff; +extern cpuop_func op_4808_0_nf; +extern cpuop_func op_4808_0_ff; +extern cpuop_func op_4810_0_nf; +extern cpuop_func op_4810_0_ff; +extern cpuop_func op_4818_0_nf; +extern cpuop_func op_4818_0_ff; +extern cpuop_func op_4820_0_nf; +extern cpuop_func op_4820_0_ff; +extern cpuop_func op_4828_0_nf; +extern cpuop_func op_4828_0_ff; +extern cpuop_func op_4830_0_nf; +extern cpuop_func op_4830_0_ff; +extern cpuop_func op_4838_0_nf; +extern cpuop_func op_4838_0_ff; +extern cpuop_func op_4839_0_nf; +extern cpuop_func op_4839_0_ff; +extern cpuop_func op_4840_0_nf; +extern cpuop_func op_4840_0_ff; +extern cpuop_func op_4848_0_nf; +extern cpuop_func op_4848_0_ff; +extern cpuop_func op_4850_0_nf; +extern cpuop_func op_4850_0_ff; +extern cpuop_func op_4868_0_nf; +extern cpuop_func op_4868_0_ff; +extern cpuop_func op_4870_0_nf; +extern cpuop_func op_4870_0_ff; +extern cpuop_func op_4878_0_nf; +extern cpuop_func op_4878_0_ff; +extern cpuop_func op_4879_0_nf; +extern cpuop_func op_4879_0_ff; +extern cpuop_func op_487a_0_nf; +extern cpuop_func op_487a_0_ff; +extern cpuop_func op_487b_0_nf; +extern cpuop_func op_487b_0_ff; +extern cpuop_func op_4880_0_nf; +extern cpuop_func op_4880_0_ff; +extern cpuop_func op_4890_0_nf; +extern cpuop_func op_4890_0_ff; +extern cpuop_func op_48a0_0_nf; +extern cpuop_func op_48a0_0_ff; +extern cpuop_func op_48a8_0_nf; +extern cpuop_func op_48a8_0_ff; +extern cpuop_func op_48b0_0_nf; +extern cpuop_func op_48b0_0_ff; +extern cpuop_func op_48b8_0_nf; +extern cpuop_func op_48b8_0_ff; +extern cpuop_func op_48b9_0_nf; +extern cpuop_func op_48b9_0_ff; +extern cpuop_func op_48c0_0_nf; +extern cpuop_func op_48c0_0_ff; +extern cpuop_func op_48d0_0_nf; +extern cpuop_func op_48d0_0_ff; +extern cpuop_func op_48e0_0_nf; +extern cpuop_func op_48e0_0_ff; +extern cpuop_func op_48e8_0_nf; +extern cpuop_func op_48e8_0_ff; +extern cpuop_func op_48f0_0_nf; +extern cpuop_func op_48f0_0_ff; +extern cpuop_func op_48f8_0_nf; +extern cpuop_func op_48f8_0_ff; +extern cpuop_func op_48f9_0_nf; +extern cpuop_func op_48f9_0_ff; +extern cpuop_func op_49c0_0_nf; +extern cpuop_func op_49c0_0_ff; +extern cpuop_func op_4a00_0_nf; +extern cpuop_func op_4a00_0_ff; +extern cpuop_func op_4a10_0_nf; +extern cpuop_func op_4a10_0_ff; +extern cpuop_func op_4a18_0_nf; +extern cpuop_func op_4a18_0_ff; +extern cpuop_func op_4a20_0_nf; +extern cpuop_func op_4a20_0_ff; +extern cpuop_func op_4a28_0_nf; +extern cpuop_func op_4a28_0_ff; +extern cpuop_func op_4a30_0_nf; +extern cpuop_func op_4a30_0_ff; +extern cpuop_func op_4a38_0_nf; +extern cpuop_func op_4a38_0_ff; +extern cpuop_func op_4a39_0_nf; +extern cpuop_func op_4a39_0_ff; +extern cpuop_func op_4a3a_0_nf; +extern cpuop_func op_4a3a_0_ff; +extern cpuop_func op_4a3b_0_nf; +extern cpuop_func op_4a3b_0_ff; +extern cpuop_func op_4a3c_0_nf; +extern cpuop_func op_4a3c_0_ff; +extern cpuop_func op_4a40_0_nf; +extern cpuop_func op_4a40_0_ff; +extern cpuop_func op_4a48_0_nf; +extern cpuop_func op_4a48_0_ff; +extern cpuop_func op_4a50_0_nf; +extern cpuop_func op_4a50_0_ff; +extern cpuop_func op_4a58_0_nf; +extern cpuop_func op_4a58_0_ff; +extern cpuop_func op_4a60_0_nf; +extern cpuop_func op_4a60_0_ff; +extern cpuop_func op_4a68_0_nf; +extern cpuop_func op_4a68_0_ff; +extern cpuop_func op_4a70_0_nf; +extern cpuop_func op_4a70_0_ff; +extern cpuop_func op_4a78_0_nf; +extern cpuop_func op_4a78_0_ff; +extern cpuop_func op_4a79_0_nf; +extern cpuop_func op_4a79_0_ff; +extern cpuop_func op_4a7a_0_nf; +extern cpuop_func op_4a7a_0_ff; +extern cpuop_func op_4a7b_0_nf; +extern cpuop_func op_4a7b_0_ff; +extern cpuop_func op_4a7c_0_nf; +extern cpuop_func op_4a7c_0_ff; +extern cpuop_func op_4a80_0_nf; +extern cpuop_func op_4a80_0_ff; +extern cpuop_func op_4a88_0_nf; +extern cpuop_func op_4a88_0_ff; +extern cpuop_func op_4a90_0_nf; +extern cpuop_func op_4a90_0_ff; +extern cpuop_func op_4a98_0_nf; +extern cpuop_func op_4a98_0_ff; +extern cpuop_func op_4aa0_0_nf; +extern cpuop_func op_4aa0_0_ff; +extern cpuop_func op_4aa8_0_nf; +extern cpuop_func op_4aa8_0_ff; +extern cpuop_func op_4ab0_0_nf; +extern cpuop_func op_4ab0_0_ff; +extern cpuop_func op_4ab8_0_nf; +extern cpuop_func op_4ab8_0_ff; +extern cpuop_func op_4ab9_0_nf; +extern cpuop_func op_4ab9_0_ff; +extern cpuop_func op_4aba_0_nf; +extern cpuop_func op_4aba_0_ff; +extern cpuop_func op_4abb_0_nf; +extern cpuop_func op_4abb_0_ff; +extern cpuop_func op_4abc_0_nf; +extern cpuop_func op_4abc_0_ff; +extern cpuop_func op_4ac0_0_nf; +extern cpuop_func op_4ac0_0_ff; +extern cpuop_func op_4ad0_0_nf; +extern cpuop_func op_4ad0_0_ff; +extern cpuop_func op_4ad8_0_nf; +extern cpuop_func op_4ad8_0_ff; +extern cpuop_func op_4ae0_0_nf; +extern cpuop_func op_4ae0_0_ff; +extern cpuop_func op_4ae8_0_nf; +extern cpuop_func op_4ae8_0_ff; +extern cpuop_func op_4af0_0_nf; +extern cpuop_func op_4af0_0_ff; +extern cpuop_func op_4af8_0_nf; +extern cpuop_func op_4af8_0_ff; +extern cpuop_func op_4af9_0_nf; +extern cpuop_func op_4af9_0_ff; +extern cpuop_func op_4c00_0_nf; +extern cpuop_func op_4c00_0_ff; +extern cpuop_func op_4c10_0_nf; +extern cpuop_func op_4c10_0_ff; +extern cpuop_func op_4c18_0_nf; +extern cpuop_func op_4c18_0_ff; +extern cpuop_func op_4c20_0_nf; +extern cpuop_func op_4c20_0_ff; +extern cpuop_func op_4c28_0_nf; +extern cpuop_func op_4c28_0_ff; +extern cpuop_func op_4c30_0_nf; +extern cpuop_func op_4c30_0_ff; +extern cpuop_func op_4c38_0_nf; +extern cpuop_func op_4c38_0_ff; +extern cpuop_func op_4c39_0_nf; +extern cpuop_func op_4c39_0_ff; +extern cpuop_func op_4c3a_0_nf; +extern cpuop_func op_4c3a_0_ff; +extern cpuop_func op_4c3b_0_nf; +extern cpuop_func op_4c3b_0_ff; +extern cpuop_func op_4c3c_0_nf; +extern cpuop_func op_4c3c_0_ff; +extern cpuop_func op_4c40_0_nf; +extern cpuop_func op_4c40_0_ff; +extern cpuop_func op_4c50_0_nf; +extern cpuop_func op_4c50_0_ff; +extern cpuop_func op_4c58_0_nf; +extern cpuop_func op_4c58_0_ff; +extern cpuop_func op_4c60_0_nf; +extern cpuop_func op_4c60_0_ff; +extern cpuop_func op_4c68_0_nf; +extern cpuop_func op_4c68_0_ff; +extern cpuop_func op_4c70_0_nf; +extern cpuop_func op_4c70_0_ff; +extern cpuop_func op_4c78_0_nf; +extern cpuop_func op_4c78_0_ff; +extern cpuop_func op_4c79_0_nf; +extern cpuop_func op_4c79_0_ff; +extern cpuop_func op_4c7a_0_nf; +extern cpuop_func op_4c7a_0_ff; +extern cpuop_func op_4c7b_0_nf; +extern cpuop_func op_4c7b_0_ff; +extern cpuop_func op_4c7c_0_nf; +extern cpuop_func op_4c7c_0_ff; +extern cpuop_func op_4c90_0_nf; +extern cpuop_func op_4c90_0_ff; +extern cpuop_func op_4c98_0_nf; +extern cpuop_func op_4c98_0_ff; +extern cpuop_func op_4ca8_0_nf; +extern cpuop_func op_4ca8_0_ff; +extern cpuop_func op_4cb0_0_nf; +extern cpuop_func op_4cb0_0_ff; +extern cpuop_func op_4cb8_0_nf; +extern cpuop_func op_4cb8_0_ff; +extern cpuop_func op_4cb9_0_nf; +extern cpuop_func op_4cb9_0_ff; +extern cpuop_func op_4cba_0_nf; +extern cpuop_func op_4cba_0_ff; +extern cpuop_func op_4cbb_0_nf; +extern cpuop_func op_4cbb_0_ff; +extern cpuop_func op_4cd0_0_nf; +extern cpuop_func op_4cd0_0_ff; +extern cpuop_func op_4cd8_0_nf; +extern cpuop_func op_4cd8_0_ff; +extern cpuop_func op_4ce8_0_nf; +extern cpuop_func op_4ce8_0_ff; +extern cpuop_func op_4cf0_0_nf; +extern cpuop_func op_4cf0_0_ff; +extern cpuop_func op_4cf8_0_nf; +extern cpuop_func op_4cf8_0_ff; +extern cpuop_func op_4cf9_0_nf; +extern cpuop_func op_4cf9_0_ff; +extern cpuop_func op_4cfa_0_nf; +extern cpuop_func op_4cfa_0_ff; +extern cpuop_func op_4cfb_0_nf; +extern cpuop_func op_4cfb_0_ff; +extern cpuop_func op_4e40_0_nf; +extern cpuop_func op_4e40_0_ff; +extern cpuop_func op_4e50_0_nf; +extern cpuop_func op_4e50_0_ff; +extern cpuop_func op_4e58_0_nf; +extern cpuop_func op_4e58_0_ff; +extern cpuop_func op_4e60_0_nf; +extern cpuop_func op_4e60_0_ff; +extern cpuop_func op_4e68_0_nf; +extern cpuop_func op_4e68_0_ff; +extern cpuop_func op_4e70_0_nf; +extern cpuop_func op_4e70_0_ff; +extern cpuop_func op_4e71_0_nf; +extern cpuop_func op_4e71_0_ff; +extern cpuop_func op_4e72_0_nf; +extern cpuop_func op_4e72_0_ff; +extern cpuop_func op_4e73_0_nf; +extern cpuop_func op_4e73_0_ff; +extern cpuop_func op_4e74_0_nf; +extern cpuop_func op_4e74_0_ff; +extern cpuop_func op_4e75_0_nf; +extern cpuop_func op_4e75_0_ff; +extern cpuop_func op_4e76_0_nf; +extern cpuop_func op_4e76_0_ff; +extern cpuop_func op_4e77_0_nf; +extern cpuop_func op_4e77_0_ff; +extern cpuop_func op_4e7a_0_nf; +extern cpuop_func op_4e7a_0_ff; +extern cpuop_func op_4e7b_0_nf; +extern cpuop_func op_4e7b_0_ff; +extern cpuop_func op_4e90_0_nf; +extern cpuop_func op_4e90_0_ff; +extern cpuop_func op_4ea8_0_nf; +extern cpuop_func op_4ea8_0_ff; +extern cpuop_func op_4eb0_0_nf; +extern cpuop_func op_4eb0_0_ff; +extern cpuop_func op_4eb8_0_nf; +extern cpuop_func op_4eb8_0_ff; +extern cpuop_func op_4eb9_0_nf; +extern cpuop_func op_4eb9_0_ff; +extern cpuop_func op_4eba_0_nf; +extern cpuop_func op_4eba_0_ff; +extern cpuop_func op_4ebb_0_nf; +extern cpuop_func op_4ebb_0_ff; +extern cpuop_func op_4ed0_0_nf; +extern cpuop_func op_4ed0_0_ff; +extern cpuop_func op_4ee8_0_nf; +extern cpuop_func op_4ee8_0_ff; +extern cpuop_func op_4ef0_0_nf; +extern cpuop_func op_4ef0_0_ff; +extern cpuop_func op_4ef8_0_nf; +extern cpuop_func op_4ef8_0_ff; +extern cpuop_func op_4ef9_0_nf; +extern cpuop_func op_4ef9_0_ff; +extern cpuop_func op_4efa_0_nf; +extern cpuop_func op_4efa_0_ff; +extern cpuop_func op_4efb_0_nf; +extern cpuop_func op_4efb_0_ff; +extern cpuop_func op_5000_0_nf; +extern cpuop_func op_5000_0_ff; +extern cpuop_func op_5010_0_nf; +extern cpuop_func op_5010_0_ff; +extern cpuop_func op_5018_0_nf; +extern cpuop_func op_5018_0_ff; +extern cpuop_func op_5020_0_nf; +extern cpuop_func op_5020_0_ff; +extern cpuop_func op_5028_0_nf; +extern cpuop_func op_5028_0_ff; +extern cpuop_func op_5030_0_nf; +extern cpuop_func op_5030_0_ff; +extern cpuop_func op_5038_0_nf; +extern cpuop_func op_5038_0_ff; +extern cpuop_func op_5039_0_nf; +extern cpuop_func op_5039_0_ff; +extern cpuop_func op_5040_0_nf; +extern cpuop_func op_5040_0_ff; +extern cpuop_func op_5048_0_nf; +extern cpuop_func op_5048_0_ff; +extern cpuop_func op_5050_0_nf; +extern cpuop_func op_5050_0_ff; +extern cpuop_func op_5058_0_nf; +extern cpuop_func op_5058_0_ff; +extern cpuop_func op_5060_0_nf; +extern cpuop_func op_5060_0_ff; +extern cpuop_func op_5068_0_nf; +extern cpuop_func op_5068_0_ff; +extern cpuop_func op_5070_0_nf; +extern cpuop_func op_5070_0_ff; +extern cpuop_func op_5078_0_nf; +extern cpuop_func op_5078_0_ff; +extern cpuop_func op_5079_0_nf; +extern cpuop_func op_5079_0_ff; +extern cpuop_func op_5080_0_nf; +extern cpuop_func op_5080_0_ff; +extern cpuop_func op_5088_0_nf; +extern cpuop_func op_5088_0_ff; +extern cpuop_func op_5090_0_nf; +extern cpuop_func op_5090_0_ff; +extern cpuop_func op_5098_0_nf; +extern cpuop_func op_5098_0_ff; +extern cpuop_func op_50a0_0_nf; +extern cpuop_func op_50a0_0_ff; +extern cpuop_func op_50a8_0_nf; +extern cpuop_func op_50a8_0_ff; +extern cpuop_func op_50b0_0_nf; +extern cpuop_func op_50b0_0_ff; +extern cpuop_func op_50b8_0_nf; +extern cpuop_func op_50b8_0_ff; +extern cpuop_func op_50b9_0_nf; +extern cpuop_func op_50b9_0_ff; +extern cpuop_func op_50c0_0_nf; +extern cpuop_func op_50c0_0_ff; +extern cpuop_func op_50c8_0_nf; +extern cpuop_func op_50c8_0_ff; +extern cpuop_func op_50d0_0_nf; +extern cpuop_func op_50d0_0_ff; +extern cpuop_func op_50d8_0_nf; +extern cpuop_func op_50d8_0_ff; +extern cpuop_func op_50e0_0_nf; +extern cpuop_func op_50e0_0_ff; +extern cpuop_func op_50e8_0_nf; +extern cpuop_func op_50e8_0_ff; +extern cpuop_func op_50f0_0_nf; +extern cpuop_func op_50f0_0_ff; +extern cpuop_func op_50f8_0_nf; +extern cpuop_func op_50f8_0_ff; +extern cpuop_func op_50f9_0_nf; +extern cpuop_func op_50f9_0_ff; +extern cpuop_func op_50fa_0_nf; +extern cpuop_func op_50fa_0_ff; +extern cpuop_func op_50fb_0_nf; +extern cpuop_func op_50fb_0_ff; +extern cpuop_func op_50fc_0_nf; +extern cpuop_func op_50fc_0_ff; +extern cpuop_func op_5100_0_nf; +extern cpuop_func op_5100_0_ff; +extern cpuop_func op_5110_0_nf; +extern cpuop_func op_5110_0_ff; +extern cpuop_func op_5118_0_nf; +extern cpuop_func op_5118_0_ff; +extern cpuop_func op_5120_0_nf; +extern cpuop_func op_5120_0_ff; +extern cpuop_func op_5128_0_nf; +extern cpuop_func op_5128_0_ff; +extern cpuop_func op_5130_0_nf; +extern cpuop_func op_5130_0_ff; +extern cpuop_func op_5138_0_nf; +extern cpuop_func op_5138_0_ff; +extern cpuop_func op_5139_0_nf; +extern cpuop_func op_5139_0_ff; +extern cpuop_func op_5140_0_nf; +extern cpuop_func op_5140_0_ff; +extern cpuop_func op_5148_0_nf; +extern cpuop_func op_5148_0_ff; +extern cpuop_func op_5150_0_nf; +extern cpuop_func op_5150_0_ff; +extern cpuop_func op_5158_0_nf; +extern cpuop_func op_5158_0_ff; +extern cpuop_func op_5160_0_nf; +extern cpuop_func op_5160_0_ff; +extern cpuop_func op_5168_0_nf; +extern cpuop_func op_5168_0_ff; +extern cpuop_func op_5170_0_nf; +extern cpuop_func op_5170_0_ff; +extern cpuop_func op_5178_0_nf; +extern cpuop_func op_5178_0_ff; +extern cpuop_func op_5179_0_nf; +extern cpuop_func op_5179_0_ff; +extern cpuop_func op_5180_0_nf; +extern cpuop_func op_5180_0_ff; +extern cpuop_func op_5188_0_nf; +extern cpuop_func op_5188_0_ff; +extern cpuop_func op_5190_0_nf; +extern cpuop_func op_5190_0_ff; +extern cpuop_func op_5198_0_nf; +extern cpuop_func op_5198_0_ff; +extern cpuop_func op_51a0_0_nf; +extern cpuop_func op_51a0_0_ff; +extern cpuop_func op_51a8_0_nf; +extern cpuop_func op_51a8_0_ff; +extern cpuop_func op_51b0_0_nf; +extern cpuop_func op_51b0_0_ff; +extern cpuop_func op_51b8_0_nf; +extern cpuop_func op_51b8_0_ff; +extern cpuop_func op_51b9_0_nf; +extern cpuop_func op_51b9_0_ff; +extern cpuop_func op_51c0_0_nf; +extern cpuop_func op_51c0_0_ff; +extern cpuop_func op_51c8_0_nf; +extern cpuop_func op_51c8_0_ff; +extern cpuop_func op_51d0_0_nf; +extern cpuop_func op_51d0_0_ff; +extern cpuop_func op_51d8_0_nf; +extern cpuop_func op_51d8_0_ff; +extern cpuop_func op_51e0_0_nf; +extern cpuop_func op_51e0_0_ff; +extern cpuop_func op_51e8_0_nf; +extern cpuop_func op_51e8_0_ff; +extern cpuop_func op_51f0_0_nf; +extern cpuop_func op_51f0_0_ff; +extern cpuop_func op_51f8_0_nf; +extern cpuop_func op_51f8_0_ff; +extern cpuop_func op_51f9_0_nf; +extern cpuop_func op_51f9_0_ff; +extern cpuop_func op_51fa_0_nf; +extern cpuop_func op_51fa_0_ff; +extern cpuop_func op_51fb_0_nf; +extern cpuop_func op_51fb_0_ff; +extern cpuop_func op_51fc_0_nf; +extern cpuop_func op_51fc_0_ff; +extern cpuop_func op_52c0_0_nf; +extern cpuop_func op_52c0_0_ff; +extern cpuop_func op_52c8_0_nf; +extern cpuop_func op_52c8_0_ff; +extern cpuop_func op_52d0_0_nf; +extern cpuop_func op_52d0_0_ff; +extern cpuop_func op_52d8_0_nf; +extern cpuop_func op_52d8_0_ff; +extern cpuop_func op_52e0_0_nf; +extern cpuop_func op_52e0_0_ff; +extern cpuop_func op_52e8_0_nf; +extern cpuop_func op_52e8_0_ff; +extern cpuop_func op_52f0_0_nf; +extern cpuop_func op_52f0_0_ff; +extern cpuop_func op_52f8_0_nf; +extern cpuop_func op_52f8_0_ff; +extern cpuop_func op_52f9_0_nf; +extern cpuop_func op_52f9_0_ff; +extern cpuop_func op_52fa_0_nf; +extern cpuop_func op_52fa_0_ff; +extern cpuop_func op_52fb_0_nf; +extern cpuop_func op_52fb_0_ff; +extern cpuop_func op_52fc_0_nf; +extern cpuop_func op_52fc_0_ff; +extern cpuop_func op_53c0_0_nf; +extern cpuop_func op_53c0_0_ff; +extern cpuop_func op_53c8_0_nf; +extern cpuop_func op_53c8_0_ff; +extern cpuop_func op_53d0_0_nf; +extern cpuop_func op_53d0_0_ff; +extern cpuop_func op_53d8_0_nf; +extern cpuop_func op_53d8_0_ff; +extern cpuop_func op_53e0_0_nf; +extern cpuop_func op_53e0_0_ff; +extern cpuop_func op_53e8_0_nf; +extern cpuop_func op_53e8_0_ff; +extern cpuop_func op_53f0_0_nf; +extern cpuop_func op_53f0_0_ff; +extern cpuop_func op_53f8_0_nf; +extern cpuop_func op_53f8_0_ff; +extern cpuop_func op_53f9_0_nf; +extern cpuop_func op_53f9_0_ff; +extern cpuop_func op_53fa_0_nf; +extern cpuop_func op_53fa_0_ff; +extern cpuop_func op_53fb_0_nf; +extern cpuop_func op_53fb_0_ff; +extern cpuop_func op_53fc_0_nf; +extern cpuop_func op_53fc_0_ff; +extern cpuop_func op_54c0_0_nf; +extern cpuop_func op_54c0_0_ff; +extern cpuop_func op_54c8_0_nf; +extern cpuop_func op_54c8_0_ff; +extern cpuop_func op_54d0_0_nf; +extern cpuop_func op_54d0_0_ff; +extern cpuop_func op_54d8_0_nf; +extern cpuop_func op_54d8_0_ff; +extern cpuop_func op_54e0_0_nf; +extern cpuop_func op_54e0_0_ff; +extern cpuop_func op_54e8_0_nf; +extern cpuop_func op_54e8_0_ff; +extern cpuop_func op_54f0_0_nf; +extern cpuop_func op_54f0_0_ff; +extern cpuop_func op_54f8_0_nf; +extern cpuop_func op_54f8_0_ff; +extern cpuop_func op_54f9_0_nf; +extern cpuop_func op_54f9_0_ff; +extern cpuop_func op_54fa_0_nf; +extern cpuop_func op_54fa_0_ff; +extern cpuop_func op_54fb_0_nf; +extern cpuop_func op_54fb_0_ff; +extern cpuop_func op_54fc_0_nf; +extern cpuop_func op_54fc_0_ff; +extern cpuop_func op_55c0_0_nf; +extern cpuop_func op_55c0_0_ff; +extern cpuop_func op_55c8_0_nf; +extern cpuop_func op_55c8_0_ff; +extern cpuop_func op_55d0_0_nf; +extern cpuop_func op_55d0_0_ff; +extern cpuop_func op_55d8_0_nf; +extern cpuop_func op_55d8_0_ff; +extern cpuop_func op_55e0_0_nf; +extern cpuop_func op_55e0_0_ff; +extern cpuop_func op_55e8_0_nf; +extern cpuop_func op_55e8_0_ff; +extern cpuop_func op_55f0_0_nf; +extern cpuop_func op_55f0_0_ff; +extern cpuop_func op_55f8_0_nf; +extern cpuop_func op_55f8_0_ff; +extern cpuop_func op_55f9_0_nf; +extern cpuop_func op_55f9_0_ff; +extern cpuop_func op_55fa_0_nf; +extern cpuop_func op_55fa_0_ff; +extern cpuop_func op_55fb_0_nf; +extern cpuop_func op_55fb_0_ff; +extern cpuop_func op_55fc_0_nf; +extern cpuop_func op_55fc_0_ff; +extern cpuop_func op_56c0_0_nf; +extern cpuop_func op_56c0_0_ff; +extern cpuop_func op_56c8_0_nf; +extern cpuop_func op_56c8_0_ff; +extern cpuop_func op_56d0_0_nf; +extern cpuop_func op_56d0_0_ff; +extern cpuop_func op_56d8_0_nf; +extern cpuop_func op_56d8_0_ff; +extern cpuop_func op_56e0_0_nf; +extern cpuop_func op_56e0_0_ff; +extern cpuop_func op_56e8_0_nf; +extern cpuop_func op_56e8_0_ff; +extern cpuop_func op_56f0_0_nf; +extern cpuop_func op_56f0_0_ff; +extern cpuop_func op_56f8_0_nf; +extern cpuop_func op_56f8_0_ff; +extern cpuop_func op_56f9_0_nf; +extern cpuop_func op_56f9_0_ff; +extern cpuop_func op_56fa_0_nf; +extern cpuop_func op_56fa_0_ff; +extern cpuop_func op_56fb_0_nf; +extern cpuop_func op_56fb_0_ff; +extern cpuop_func op_56fc_0_nf; +extern cpuop_func op_56fc_0_ff; +extern cpuop_func op_57c0_0_nf; +extern cpuop_func op_57c0_0_ff; +extern cpuop_func op_57c8_0_nf; +extern cpuop_func op_57c8_0_ff; +extern cpuop_func op_57d0_0_nf; +extern cpuop_func op_57d0_0_ff; +extern cpuop_func op_57d8_0_nf; +extern cpuop_func op_57d8_0_ff; +extern cpuop_func op_57e0_0_nf; +extern cpuop_func op_57e0_0_ff; +extern cpuop_func op_57e8_0_nf; +extern cpuop_func op_57e8_0_ff; +extern cpuop_func op_57f0_0_nf; +extern cpuop_func op_57f0_0_ff; +extern cpuop_func op_57f8_0_nf; +extern cpuop_func op_57f8_0_ff; +extern cpuop_func op_57f9_0_nf; +extern cpuop_func op_57f9_0_ff; +extern cpuop_func op_57fa_0_nf; +extern cpuop_func op_57fa_0_ff; +extern cpuop_func op_57fb_0_nf; +extern cpuop_func op_57fb_0_ff; +extern cpuop_func op_57fc_0_nf; +extern cpuop_func op_57fc_0_ff; +extern cpuop_func op_58c0_0_nf; +extern cpuop_func op_58c0_0_ff; +extern cpuop_func op_58c8_0_nf; +extern cpuop_func op_58c8_0_ff; +extern cpuop_func op_58d0_0_nf; +extern cpuop_func op_58d0_0_ff; +extern cpuop_func op_58d8_0_nf; +extern cpuop_func op_58d8_0_ff; +extern cpuop_func op_58e0_0_nf; +extern cpuop_func op_58e0_0_ff; +extern cpuop_func op_58e8_0_nf; +extern cpuop_func op_58e8_0_ff; +extern cpuop_func op_58f0_0_nf; +extern cpuop_func op_58f0_0_ff; +extern cpuop_func op_58f8_0_nf; +extern cpuop_func op_58f8_0_ff; +extern cpuop_func op_58f9_0_nf; +extern cpuop_func op_58f9_0_ff; +extern cpuop_func op_58fa_0_nf; +extern cpuop_func op_58fa_0_ff; +extern cpuop_func op_58fb_0_nf; +extern cpuop_func op_58fb_0_ff; +extern cpuop_func op_58fc_0_nf; +extern cpuop_func op_58fc_0_ff; +extern cpuop_func op_59c0_0_nf; +extern cpuop_func op_59c0_0_ff; +extern cpuop_func op_59c8_0_nf; +extern cpuop_func op_59c8_0_ff; +extern cpuop_func op_59d0_0_nf; +extern cpuop_func op_59d0_0_ff; +extern cpuop_func op_59d8_0_nf; +extern cpuop_func op_59d8_0_ff; +extern cpuop_func op_59e0_0_nf; +extern cpuop_func op_59e0_0_ff; +extern cpuop_func op_59e8_0_nf; +extern cpuop_func op_59e8_0_ff; +extern cpuop_func op_59f0_0_nf; +extern cpuop_func op_59f0_0_ff; +extern cpuop_func op_59f8_0_nf; +extern cpuop_func op_59f8_0_ff; +extern cpuop_func op_59f9_0_nf; +extern cpuop_func op_59f9_0_ff; +extern cpuop_func op_59fa_0_nf; +extern cpuop_func op_59fa_0_ff; +extern cpuop_func op_59fb_0_nf; +extern cpuop_func op_59fb_0_ff; +extern cpuop_func op_59fc_0_nf; +extern cpuop_func op_59fc_0_ff; +extern cpuop_func op_5ac0_0_nf; +extern cpuop_func op_5ac0_0_ff; +extern cpuop_func op_5ac8_0_nf; +extern cpuop_func op_5ac8_0_ff; +extern cpuop_func op_5ad0_0_nf; +extern cpuop_func op_5ad0_0_ff; +extern cpuop_func op_5ad8_0_nf; +extern cpuop_func op_5ad8_0_ff; +extern cpuop_func op_5ae0_0_nf; +extern cpuop_func op_5ae0_0_ff; +extern cpuop_func op_5ae8_0_nf; +extern cpuop_func op_5ae8_0_ff; +extern cpuop_func op_5af0_0_nf; +extern cpuop_func op_5af0_0_ff; +extern cpuop_func op_5af8_0_nf; +extern cpuop_func op_5af8_0_ff; +extern cpuop_func op_5af9_0_nf; +extern cpuop_func op_5af9_0_ff; +extern cpuop_func op_5afa_0_nf; +extern cpuop_func op_5afa_0_ff; +extern cpuop_func op_5afb_0_nf; +extern cpuop_func op_5afb_0_ff; +extern cpuop_func op_5afc_0_nf; +extern cpuop_func op_5afc_0_ff; +extern cpuop_func op_5bc0_0_nf; +extern cpuop_func op_5bc0_0_ff; +extern cpuop_func op_5bc8_0_nf; +extern cpuop_func op_5bc8_0_ff; +extern cpuop_func op_5bd0_0_nf; +extern cpuop_func op_5bd0_0_ff; +extern cpuop_func op_5bd8_0_nf; +extern cpuop_func op_5bd8_0_ff; +extern cpuop_func op_5be0_0_nf; +extern cpuop_func op_5be0_0_ff; +extern cpuop_func op_5be8_0_nf; +extern cpuop_func op_5be8_0_ff; +extern cpuop_func op_5bf0_0_nf; +extern cpuop_func op_5bf0_0_ff; +extern cpuop_func op_5bf8_0_nf; +extern cpuop_func op_5bf8_0_ff; +extern cpuop_func op_5bf9_0_nf; +extern cpuop_func op_5bf9_0_ff; +extern cpuop_func op_5bfa_0_nf; +extern cpuop_func op_5bfa_0_ff; +extern cpuop_func op_5bfb_0_nf; +extern cpuop_func op_5bfb_0_ff; +extern cpuop_func op_5bfc_0_nf; +extern cpuop_func op_5bfc_0_ff; +extern cpuop_func op_5cc0_0_nf; +extern cpuop_func op_5cc0_0_ff; +extern cpuop_func op_5cc8_0_nf; +extern cpuop_func op_5cc8_0_ff; +extern cpuop_func op_5cd0_0_nf; +extern cpuop_func op_5cd0_0_ff; +extern cpuop_func op_5cd8_0_nf; +extern cpuop_func op_5cd8_0_ff; +extern cpuop_func op_5ce0_0_nf; +extern cpuop_func op_5ce0_0_ff; +extern cpuop_func op_5ce8_0_nf; +extern cpuop_func op_5ce8_0_ff; +extern cpuop_func op_5cf0_0_nf; +extern cpuop_func op_5cf0_0_ff; +extern cpuop_func op_5cf8_0_nf; +extern cpuop_func op_5cf8_0_ff; +extern cpuop_func op_5cf9_0_nf; +extern cpuop_func op_5cf9_0_ff; +extern cpuop_func op_5cfa_0_nf; +extern cpuop_func op_5cfa_0_ff; +extern cpuop_func op_5cfb_0_nf; +extern cpuop_func op_5cfb_0_ff; +extern cpuop_func op_5cfc_0_nf; +extern cpuop_func op_5cfc_0_ff; +extern cpuop_func op_5dc0_0_nf; +extern cpuop_func op_5dc0_0_ff; +extern cpuop_func op_5dc8_0_nf; +extern cpuop_func op_5dc8_0_ff; +extern cpuop_func op_5dd0_0_nf; +extern cpuop_func op_5dd0_0_ff; +extern cpuop_func op_5dd8_0_nf; +extern cpuop_func op_5dd8_0_ff; +extern cpuop_func op_5de0_0_nf; +extern cpuop_func op_5de0_0_ff; +extern cpuop_func op_5de8_0_nf; +extern cpuop_func op_5de8_0_ff; +extern cpuop_func op_5df0_0_nf; +extern cpuop_func op_5df0_0_ff; +extern cpuop_func op_5df8_0_nf; +extern cpuop_func op_5df8_0_ff; +extern cpuop_func op_5df9_0_nf; +extern cpuop_func op_5df9_0_ff; +extern cpuop_func op_5dfa_0_nf; +extern cpuop_func op_5dfa_0_ff; +extern cpuop_func op_5dfb_0_nf; +extern cpuop_func op_5dfb_0_ff; +extern cpuop_func op_5dfc_0_nf; +extern cpuop_func op_5dfc_0_ff; +extern cpuop_func op_5ec0_0_nf; +extern cpuop_func op_5ec0_0_ff; +extern cpuop_func op_5ec8_0_nf; +extern cpuop_func op_5ec8_0_ff; +extern cpuop_func op_5ed0_0_nf; +extern cpuop_func op_5ed0_0_ff; +extern cpuop_func op_5ed8_0_nf; +extern cpuop_func op_5ed8_0_ff; +extern cpuop_func op_5ee0_0_nf; +extern cpuop_func op_5ee0_0_ff; +extern cpuop_func op_5ee8_0_nf; +extern cpuop_func op_5ee8_0_ff; +extern cpuop_func op_5ef0_0_nf; +extern cpuop_func op_5ef0_0_ff; +extern cpuop_func op_5ef8_0_nf; +extern cpuop_func op_5ef8_0_ff; +extern cpuop_func op_5ef9_0_nf; +extern cpuop_func op_5ef9_0_ff; +extern cpuop_func op_5efa_0_nf; +extern cpuop_func op_5efa_0_ff; +extern cpuop_func op_5efb_0_nf; +extern cpuop_func op_5efb_0_ff; +extern cpuop_func op_5efc_0_nf; +extern cpuop_func op_5efc_0_ff; +extern cpuop_func op_5fc0_0_nf; +extern cpuop_func op_5fc0_0_ff; +extern cpuop_func op_5fc8_0_nf; +extern cpuop_func op_5fc8_0_ff; +extern cpuop_func op_5fd0_0_nf; +extern cpuop_func op_5fd0_0_ff; +extern cpuop_func op_5fd8_0_nf; +extern cpuop_func op_5fd8_0_ff; +extern cpuop_func op_5fe0_0_nf; +extern cpuop_func op_5fe0_0_ff; +extern cpuop_func op_5fe8_0_nf; +extern cpuop_func op_5fe8_0_ff; +extern cpuop_func op_5ff0_0_nf; +extern cpuop_func op_5ff0_0_ff; +extern cpuop_func op_5ff8_0_nf; +extern cpuop_func op_5ff8_0_ff; +extern cpuop_func op_5ff9_0_nf; +extern cpuop_func op_5ff9_0_ff; +extern cpuop_func op_5ffa_0_nf; +extern cpuop_func op_5ffa_0_ff; +extern cpuop_func op_5ffb_0_nf; +extern cpuop_func op_5ffb_0_ff; +extern cpuop_func op_5ffc_0_nf; +extern cpuop_func op_5ffc_0_ff; +extern cpuop_func op_6000_0_nf; +extern cpuop_func op_6000_0_ff; +extern cpuop_func op_6001_0_nf; +extern cpuop_func op_6001_0_ff; +extern cpuop_func op_60ff_0_nf; +extern cpuop_func op_60ff_0_ff; +extern cpuop_func op_6100_0_nf; +extern cpuop_func op_6100_0_ff; +extern cpuop_func op_6101_0_nf; +extern cpuop_func op_6101_0_ff; +extern cpuop_func op_61ff_0_nf; +extern cpuop_func op_61ff_0_ff; +extern cpuop_func op_6200_0_nf; +extern cpuop_func op_6200_0_ff; +extern cpuop_func op_6201_0_nf; +extern cpuop_func op_6201_0_ff; +extern cpuop_func op_62ff_0_nf; +extern cpuop_func op_62ff_0_ff; +extern cpuop_func op_6300_0_nf; +extern cpuop_func op_6300_0_ff; +extern cpuop_func op_6301_0_nf; +extern cpuop_func op_6301_0_ff; +extern cpuop_func op_63ff_0_nf; +extern cpuop_func op_63ff_0_ff; +extern cpuop_func op_6400_0_nf; +extern cpuop_func op_6400_0_ff; +extern cpuop_func op_6401_0_nf; +extern cpuop_func op_6401_0_ff; +extern cpuop_func op_64ff_0_nf; +extern cpuop_func op_64ff_0_ff; +extern cpuop_func op_6500_0_nf; +extern cpuop_func op_6500_0_ff; +extern cpuop_func op_6501_0_nf; +extern cpuop_func op_6501_0_ff; +extern cpuop_func op_65ff_0_nf; +extern cpuop_func op_65ff_0_ff; +extern cpuop_func op_6600_0_nf; +extern cpuop_func op_6600_0_ff; +extern cpuop_func op_6601_0_nf; +extern cpuop_func op_6601_0_ff; +extern cpuop_func op_66ff_0_nf; +extern cpuop_func op_66ff_0_ff; +extern cpuop_func op_6700_0_nf; +extern cpuop_func op_6700_0_ff; +extern cpuop_func op_6701_0_nf; +extern cpuop_func op_6701_0_ff; +extern cpuop_func op_67ff_0_nf; +extern cpuop_func op_67ff_0_ff; +extern cpuop_func op_6800_0_nf; +extern cpuop_func op_6800_0_ff; +extern cpuop_func op_6801_0_nf; +extern cpuop_func op_6801_0_ff; +extern cpuop_func op_68ff_0_nf; +extern cpuop_func op_68ff_0_ff; +extern cpuop_func op_6900_0_nf; +extern cpuop_func op_6900_0_ff; +extern cpuop_func op_6901_0_nf; +extern cpuop_func op_6901_0_ff; +extern cpuop_func op_69ff_0_nf; +extern cpuop_func op_69ff_0_ff; +extern cpuop_func op_6a00_0_nf; +extern cpuop_func op_6a00_0_ff; +extern cpuop_func op_6a01_0_nf; +extern cpuop_func op_6a01_0_ff; +extern cpuop_func op_6aff_0_nf; +extern cpuop_func op_6aff_0_ff; +extern cpuop_func op_6b00_0_nf; +extern cpuop_func op_6b00_0_ff; +extern cpuop_func op_6b01_0_nf; +extern cpuop_func op_6b01_0_ff; +extern cpuop_func op_6bff_0_nf; +extern cpuop_func op_6bff_0_ff; +extern cpuop_func op_6c00_0_nf; +extern cpuop_func op_6c00_0_ff; +extern cpuop_func op_6c01_0_nf; +extern cpuop_func op_6c01_0_ff; +extern cpuop_func op_6cff_0_nf; +extern cpuop_func op_6cff_0_ff; +extern cpuop_func op_6d00_0_nf; +extern cpuop_func op_6d00_0_ff; +extern cpuop_func op_6d01_0_nf; +extern cpuop_func op_6d01_0_ff; +extern cpuop_func op_6dff_0_nf; +extern cpuop_func op_6dff_0_ff; +extern cpuop_func op_6e00_0_nf; +extern cpuop_func op_6e00_0_ff; +extern cpuop_func op_6e01_0_nf; +extern cpuop_func op_6e01_0_ff; +extern cpuop_func op_6eff_0_nf; +extern cpuop_func op_6eff_0_ff; +extern cpuop_func op_6f00_0_nf; +extern cpuop_func op_6f00_0_ff; +extern cpuop_func op_6f01_0_nf; +extern cpuop_func op_6f01_0_ff; +extern cpuop_func op_6fff_0_nf; +extern cpuop_func op_6fff_0_ff; +extern cpuop_func op_7000_0_nf; +extern cpuop_func op_7000_0_ff; +extern cpuop_func op_7100_0_nf; +extern cpuop_func op_7100_0_ff; +extern cpuop_func op_7101_0_nf; +extern cpuop_func op_7101_0_ff; +extern cpuop_func op_8000_0_nf; +extern cpuop_func op_8000_0_ff; +extern cpuop_func op_8010_0_nf; +extern cpuop_func op_8010_0_ff; +extern cpuop_func op_8018_0_nf; +extern cpuop_func op_8018_0_ff; +extern cpuop_func op_8020_0_nf; +extern cpuop_func op_8020_0_ff; +extern cpuop_func op_8028_0_nf; +extern cpuop_func op_8028_0_ff; +extern cpuop_func op_8030_0_nf; +extern cpuop_func op_8030_0_ff; +extern cpuop_func op_8038_0_nf; +extern cpuop_func op_8038_0_ff; +extern cpuop_func op_8039_0_nf; +extern cpuop_func op_8039_0_ff; +extern cpuop_func op_803a_0_nf; +extern cpuop_func op_803a_0_ff; +extern cpuop_func op_803b_0_nf; +extern cpuop_func op_803b_0_ff; +extern cpuop_func op_803c_0_nf; +extern cpuop_func op_803c_0_ff; +extern cpuop_func op_8040_0_nf; +extern cpuop_func op_8040_0_ff; +extern cpuop_func op_8050_0_nf; +extern cpuop_func op_8050_0_ff; +extern cpuop_func op_8058_0_nf; +extern cpuop_func op_8058_0_ff; +extern cpuop_func op_8060_0_nf; +extern cpuop_func op_8060_0_ff; +extern cpuop_func op_8068_0_nf; +extern cpuop_func op_8068_0_ff; +extern cpuop_func op_8070_0_nf; +extern cpuop_func op_8070_0_ff; +extern cpuop_func op_8078_0_nf; +extern cpuop_func op_8078_0_ff; +extern cpuop_func op_8079_0_nf; +extern cpuop_func op_8079_0_ff; +extern cpuop_func op_807a_0_nf; +extern cpuop_func op_807a_0_ff; +extern cpuop_func op_807b_0_nf; +extern cpuop_func op_807b_0_ff; +extern cpuop_func op_807c_0_nf; +extern cpuop_func op_807c_0_ff; +extern cpuop_func op_8080_0_nf; +extern cpuop_func op_8080_0_ff; +extern cpuop_func op_8090_0_nf; +extern cpuop_func op_8090_0_ff; +extern cpuop_func op_8098_0_nf; +extern cpuop_func op_8098_0_ff; +extern cpuop_func op_80a0_0_nf; +extern cpuop_func op_80a0_0_ff; +extern cpuop_func op_80a8_0_nf; +extern cpuop_func op_80a8_0_ff; +extern cpuop_func op_80b0_0_nf; +extern cpuop_func op_80b0_0_ff; +extern cpuop_func op_80b8_0_nf; +extern cpuop_func op_80b8_0_ff; +extern cpuop_func op_80b9_0_nf; +extern cpuop_func op_80b9_0_ff; +extern cpuop_func op_80ba_0_nf; +extern cpuop_func op_80ba_0_ff; +extern cpuop_func op_80bb_0_nf; +extern cpuop_func op_80bb_0_ff; +extern cpuop_func op_80bc_0_nf; +extern cpuop_func op_80bc_0_ff; +extern cpuop_func op_80c0_0_nf; +extern cpuop_func op_80c0_0_ff; +extern cpuop_func op_80d0_0_nf; +extern cpuop_func op_80d0_0_ff; +extern cpuop_func op_80d8_0_nf; +extern cpuop_func op_80d8_0_ff; +extern cpuop_func op_80e0_0_nf; +extern cpuop_func op_80e0_0_ff; +extern cpuop_func op_80e8_0_nf; +extern cpuop_func op_80e8_0_ff; +extern cpuop_func op_80f0_0_nf; +extern cpuop_func op_80f0_0_ff; +extern cpuop_func op_80f8_0_nf; +extern cpuop_func op_80f8_0_ff; +extern cpuop_func op_80f9_0_nf; +extern cpuop_func op_80f9_0_ff; +extern cpuop_func op_80fa_0_nf; +extern cpuop_func op_80fa_0_ff; +extern cpuop_func op_80fb_0_nf; +extern cpuop_func op_80fb_0_ff; +extern cpuop_func op_80fc_0_nf; +extern cpuop_func op_80fc_0_ff; +extern cpuop_func op_8100_0_nf; +extern cpuop_func op_8100_0_ff; +extern cpuop_func op_8108_0_nf; +extern cpuop_func op_8108_0_ff; +extern cpuop_func op_8110_0_nf; +extern cpuop_func op_8110_0_ff; +extern cpuop_func op_8118_0_nf; +extern cpuop_func op_8118_0_ff; +extern cpuop_func op_8120_0_nf; +extern cpuop_func op_8120_0_ff; +extern cpuop_func op_8128_0_nf; +extern cpuop_func op_8128_0_ff; +extern cpuop_func op_8130_0_nf; +extern cpuop_func op_8130_0_ff; +extern cpuop_func op_8138_0_nf; +extern cpuop_func op_8138_0_ff; +extern cpuop_func op_8139_0_nf; +extern cpuop_func op_8139_0_ff; +extern cpuop_func op_8140_0_nf; +extern cpuop_func op_8140_0_ff; +extern cpuop_func op_8148_0_nf; +extern cpuop_func op_8148_0_ff; +extern cpuop_func op_8150_0_nf; +extern cpuop_func op_8150_0_ff; +extern cpuop_func op_8158_0_nf; +extern cpuop_func op_8158_0_ff; +extern cpuop_func op_8160_0_nf; +extern cpuop_func op_8160_0_ff; +extern cpuop_func op_8168_0_nf; +extern cpuop_func op_8168_0_ff; +extern cpuop_func op_8170_0_nf; +extern cpuop_func op_8170_0_ff; +extern cpuop_func op_8178_0_nf; +extern cpuop_func op_8178_0_ff; +extern cpuop_func op_8179_0_nf; +extern cpuop_func op_8179_0_ff; +extern cpuop_func op_8180_0_nf; +extern cpuop_func op_8180_0_ff; +extern cpuop_func op_8188_0_nf; +extern cpuop_func op_8188_0_ff; +extern cpuop_func op_8190_0_nf; +extern cpuop_func op_8190_0_ff; +extern cpuop_func op_8198_0_nf; +extern cpuop_func op_8198_0_ff; +extern cpuop_func op_81a0_0_nf; +extern cpuop_func op_81a0_0_ff; +extern cpuop_func op_81a8_0_nf; +extern cpuop_func op_81a8_0_ff; +extern cpuop_func op_81b0_0_nf; +extern cpuop_func op_81b0_0_ff; +extern cpuop_func op_81b8_0_nf; +extern cpuop_func op_81b8_0_ff; +extern cpuop_func op_81b9_0_nf; +extern cpuop_func op_81b9_0_ff; +extern cpuop_func op_81c0_0_nf; +extern cpuop_func op_81c0_0_ff; +extern cpuop_func op_81d0_0_nf; +extern cpuop_func op_81d0_0_ff; +extern cpuop_func op_81d8_0_nf; +extern cpuop_func op_81d8_0_ff; +extern cpuop_func op_81e0_0_nf; +extern cpuop_func op_81e0_0_ff; +extern cpuop_func op_81e8_0_nf; +extern cpuop_func op_81e8_0_ff; +extern cpuop_func op_81f0_0_nf; +extern cpuop_func op_81f0_0_ff; +extern cpuop_func op_81f8_0_nf; +extern cpuop_func op_81f8_0_ff; +extern cpuop_func op_81f9_0_nf; +extern cpuop_func op_81f9_0_ff; +extern cpuop_func op_81fa_0_nf; +extern cpuop_func op_81fa_0_ff; +extern cpuop_func op_81fb_0_nf; +extern cpuop_func op_81fb_0_ff; +extern cpuop_func op_81fc_0_nf; +extern cpuop_func op_81fc_0_ff; +extern cpuop_func op_9000_0_nf; +extern cpuop_func op_9000_0_ff; +extern cpuop_func op_9010_0_nf; +extern cpuop_func op_9010_0_ff; +extern cpuop_func op_9018_0_nf; +extern cpuop_func op_9018_0_ff; +extern cpuop_func op_9020_0_nf; +extern cpuop_func op_9020_0_ff; +extern cpuop_func op_9028_0_nf; +extern cpuop_func op_9028_0_ff; +extern cpuop_func op_9030_0_nf; +extern cpuop_func op_9030_0_ff; +extern cpuop_func op_9038_0_nf; +extern cpuop_func op_9038_0_ff; +extern cpuop_func op_9039_0_nf; +extern cpuop_func op_9039_0_ff; +extern cpuop_func op_903a_0_nf; +extern cpuop_func op_903a_0_ff; +extern cpuop_func op_903b_0_nf; +extern cpuop_func op_903b_0_ff; +extern cpuop_func op_903c_0_nf; +extern cpuop_func op_903c_0_ff; +extern cpuop_func op_9040_0_nf; +extern cpuop_func op_9040_0_ff; +extern cpuop_func op_9048_0_nf; +extern cpuop_func op_9048_0_ff; +extern cpuop_func op_9050_0_nf; +extern cpuop_func op_9050_0_ff; +extern cpuop_func op_9058_0_nf; +extern cpuop_func op_9058_0_ff; +extern cpuop_func op_9060_0_nf; +extern cpuop_func op_9060_0_ff; +extern cpuop_func op_9068_0_nf; +extern cpuop_func op_9068_0_ff; +extern cpuop_func op_9070_0_nf; +extern cpuop_func op_9070_0_ff; +extern cpuop_func op_9078_0_nf; +extern cpuop_func op_9078_0_ff; +extern cpuop_func op_9079_0_nf; +extern cpuop_func op_9079_0_ff; +extern cpuop_func op_907a_0_nf; +extern cpuop_func op_907a_0_ff; +extern cpuop_func op_907b_0_nf; +extern cpuop_func op_907b_0_ff; +extern cpuop_func op_907c_0_nf; +extern cpuop_func op_907c_0_ff; +extern cpuop_func op_9080_0_nf; +extern cpuop_func op_9080_0_ff; +extern cpuop_func op_9088_0_nf; +extern cpuop_func op_9088_0_ff; +extern cpuop_func op_9090_0_nf; +extern cpuop_func op_9090_0_ff; +extern cpuop_func op_9098_0_nf; +extern cpuop_func op_9098_0_ff; +extern cpuop_func op_90a0_0_nf; +extern cpuop_func op_90a0_0_ff; +extern cpuop_func op_90a8_0_nf; +extern cpuop_func op_90a8_0_ff; +extern cpuop_func op_90b0_0_nf; +extern cpuop_func op_90b0_0_ff; +extern cpuop_func op_90b8_0_nf; +extern cpuop_func op_90b8_0_ff; +extern cpuop_func op_90b9_0_nf; +extern cpuop_func op_90b9_0_ff; +extern cpuop_func op_90ba_0_nf; +extern cpuop_func op_90ba_0_ff; +extern cpuop_func op_90bb_0_nf; +extern cpuop_func op_90bb_0_ff; +extern cpuop_func op_90bc_0_nf; +extern cpuop_func op_90bc_0_ff; +extern cpuop_func op_90c0_0_nf; +extern cpuop_func op_90c0_0_ff; +extern cpuop_func op_90c8_0_nf; +extern cpuop_func op_90c8_0_ff; +extern cpuop_func op_90d0_0_nf; +extern cpuop_func op_90d0_0_ff; +extern cpuop_func op_90d8_0_nf; +extern cpuop_func op_90d8_0_ff; +extern cpuop_func op_90e0_0_nf; +extern cpuop_func op_90e0_0_ff; +extern cpuop_func op_90e8_0_nf; +extern cpuop_func op_90e8_0_ff; +extern cpuop_func op_90f0_0_nf; +extern cpuop_func op_90f0_0_ff; +extern cpuop_func op_90f8_0_nf; +extern cpuop_func op_90f8_0_ff; +extern cpuop_func op_90f9_0_nf; +extern cpuop_func op_90f9_0_ff; +extern cpuop_func op_90fa_0_nf; +extern cpuop_func op_90fa_0_ff; +extern cpuop_func op_90fb_0_nf; +extern cpuop_func op_90fb_0_ff; +extern cpuop_func op_90fc_0_nf; +extern cpuop_func op_90fc_0_ff; +extern cpuop_func op_9100_0_nf; +extern cpuop_func op_9100_0_ff; +extern cpuop_func op_9108_0_nf; +extern cpuop_func op_9108_0_ff; +extern cpuop_func op_9110_0_nf; +extern cpuop_func op_9110_0_ff; +extern cpuop_func op_9118_0_nf; +extern cpuop_func op_9118_0_ff; +extern cpuop_func op_9120_0_nf; +extern cpuop_func op_9120_0_ff; +extern cpuop_func op_9128_0_nf; +extern cpuop_func op_9128_0_ff; +extern cpuop_func op_9130_0_nf; +extern cpuop_func op_9130_0_ff; +extern cpuop_func op_9138_0_nf; +extern cpuop_func op_9138_0_ff; +extern cpuop_func op_9139_0_nf; +extern cpuop_func op_9139_0_ff; +extern cpuop_func op_9140_0_nf; +extern cpuop_func op_9140_0_ff; +extern cpuop_func op_9148_0_nf; +extern cpuop_func op_9148_0_ff; +extern cpuop_func op_9150_0_nf; +extern cpuop_func op_9150_0_ff; +extern cpuop_func op_9158_0_nf; +extern cpuop_func op_9158_0_ff; +extern cpuop_func op_9160_0_nf; +extern cpuop_func op_9160_0_ff; +extern cpuop_func op_9168_0_nf; +extern cpuop_func op_9168_0_ff; +extern cpuop_func op_9170_0_nf; +extern cpuop_func op_9170_0_ff; +extern cpuop_func op_9178_0_nf; +extern cpuop_func op_9178_0_ff; +extern cpuop_func op_9179_0_nf; +extern cpuop_func op_9179_0_ff; +extern cpuop_func op_9180_0_nf; +extern cpuop_func op_9180_0_ff; +extern cpuop_func op_9188_0_nf; +extern cpuop_func op_9188_0_ff; +extern cpuop_func op_9190_0_nf; +extern cpuop_func op_9190_0_ff; +extern cpuop_func op_9198_0_nf; +extern cpuop_func op_9198_0_ff; +extern cpuop_func op_91a0_0_nf; +extern cpuop_func op_91a0_0_ff; +extern cpuop_func op_91a8_0_nf; +extern cpuop_func op_91a8_0_ff; +extern cpuop_func op_91b0_0_nf; +extern cpuop_func op_91b0_0_ff; +extern cpuop_func op_91b8_0_nf; +extern cpuop_func op_91b8_0_ff; +extern cpuop_func op_91b9_0_nf; +extern cpuop_func op_91b9_0_ff; +extern cpuop_func op_91c0_0_nf; +extern cpuop_func op_91c0_0_ff; +extern cpuop_func op_91c8_0_nf; +extern cpuop_func op_91c8_0_ff; +extern cpuop_func op_91d0_0_nf; +extern cpuop_func op_91d0_0_ff; +extern cpuop_func op_91d8_0_nf; +extern cpuop_func op_91d8_0_ff; +extern cpuop_func op_91e0_0_nf; +extern cpuop_func op_91e0_0_ff; +extern cpuop_func op_91e8_0_nf; +extern cpuop_func op_91e8_0_ff; +extern cpuop_func op_91f0_0_nf; +extern cpuop_func op_91f0_0_ff; +extern cpuop_func op_91f8_0_nf; +extern cpuop_func op_91f8_0_ff; +extern cpuop_func op_91f9_0_nf; +extern cpuop_func op_91f9_0_ff; +extern cpuop_func op_91fa_0_nf; +extern cpuop_func op_91fa_0_ff; +extern cpuop_func op_91fb_0_nf; +extern cpuop_func op_91fb_0_ff; +extern cpuop_func op_91fc_0_nf; +extern cpuop_func op_91fc_0_ff; +extern cpuop_func op_b000_0_nf; +extern cpuop_func op_b000_0_ff; +extern cpuop_func op_b010_0_nf; +extern cpuop_func op_b010_0_ff; +extern cpuop_func op_b018_0_nf; +extern cpuop_func op_b018_0_ff; +extern cpuop_func op_b020_0_nf; +extern cpuop_func op_b020_0_ff; +extern cpuop_func op_b028_0_nf; +extern cpuop_func op_b028_0_ff; +extern cpuop_func op_b030_0_nf; +extern cpuop_func op_b030_0_ff; +extern cpuop_func op_b038_0_nf; +extern cpuop_func op_b038_0_ff; +extern cpuop_func op_b039_0_nf; +extern cpuop_func op_b039_0_ff; +extern cpuop_func op_b03a_0_nf; +extern cpuop_func op_b03a_0_ff; +extern cpuop_func op_b03b_0_nf; +extern cpuop_func op_b03b_0_ff; +extern cpuop_func op_b03c_0_nf; +extern cpuop_func op_b03c_0_ff; +extern cpuop_func op_b040_0_nf; +extern cpuop_func op_b040_0_ff; +extern cpuop_func op_b048_0_nf; +extern cpuop_func op_b048_0_ff; +extern cpuop_func op_b050_0_nf; +extern cpuop_func op_b050_0_ff; +extern cpuop_func op_b058_0_nf; +extern cpuop_func op_b058_0_ff; +extern cpuop_func op_b060_0_nf; +extern cpuop_func op_b060_0_ff; +extern cpuop_func op_b068_0_nf; +extern cpuop_func op_b068_0_ff; +extern cpuop_func op_b070_0_nf; +extern cpuop_func op_b070_0_ff; +extern cpuop_func op_b078_0_nf; +extern cpuop_func op_b078_0_ff; +extern cpuop_func op_b079_0_nf; +extern cpuop_func op_b079_0_ff; +extern cpuop_func op_b07a_0_nf; +extern cpuop_func op_b07a_0_ff; +extern cpuop_func op_b07b_0_nf; +extern cpuop_func op_b07b_0_ff; +extern cpuop_func op_b07c_0_nf; +extern cpuop_func op_b07c_0_ff; +extern cpuop_func op_b080_0_nf; +extern cpuop_func op_b080_0_ff; +extern cpuop_func op_b088_0_nf; +extern cpuop_func op_b088_0_ff; +extern cpuop_func op_b090_0_nf; +extern cpuop_func op_b090_0_ff; +extern cpuop_func op_b098_0_nf; +extern cpuop_func op_b098_0_ff; +extern cpuop_func op_b0a0_0_nf; +extern cpuop_func op_b0a0_0_ff; +extern cpuop_func op_b0a8_0_nf; +extern cpuop_func op_b0a8_0_ff; +extern cpuop_func op_b0b0_0_nf; +extern cpuop_func op_b0b0_0_ff; +extern cpuop_func op_b0b8_0_nf; +extern cpuop_func op_b0b8_0_ff; +extern cpuop_func op_b0b9_0_nf; +extern cpuop_func op_b0b9_0_ff; +extern cpuop_func op_b0ba_0_nf; +extern cpuop_func op_b0ba_0_ff; +extern cpuop_func op_b0bb_0_nf; +extern cpuop_func op_b0bb_0_ff; +extern cpuop_func op_b0bc_0_nf; +extern cpuop_func op_b0bc_0_ff; +extern cpuop_func op_b0c0_0_nf; +extern cpuop_func op_b0c0_0_ff; +extern cpuop_func op_b0c8_0_nf; +extern cpuop_func op_b0c8_0_ff; +extern cpuop_func op_b0d0_0_nf; +extern cpuop_func op_b0d0_0_ff; +extern cpuop_func op_b0d8_0_nf; +extern cpuop_func op_b0d8_0_ff; +extern cpuop_func op_b0e0_0_nf; +extern cpuop_func op_b0e0_0_ff; +extern cpuop_func op_b0e8_0_nf; +extern cpuop_func op_b0e8_0_ff; +extern cpuop_func op_b0f0_0_nf; +extern cpuop_func op_b0f0_0_ff; +extern cpuop_func op_b0f8_0_nf; +extern cpuop_func op_b0f8_0_ff; +extern cpuop_func op_b0f9_0_nf; +extern cpuop_func op_b0f9_0_ff; +extern cpuop_func op_b0fa_0_nf; +extern cpuop_func op_b0fa_0_ff; +extern cpuop_func op_b0fb_0_nf; +extern cpuop_func op_b0fb_0_ff; +extern cpuop_func op_b0fc_0_nf; +extern cpuop_func op_b0fc_0_ff; +extern cpuop_func op_b100_0_nf; +extern cpuop_func op_b100_0_ff; +extern cpuop_func op_b108_0_nf; +extern cpuop_func op_b108_0_ff; +extern cpuop_func op_b110_0_nf; +extern cpuop_func op_b110_0_ff; +extern cpuop_func op_b118_0_nf; +extern cpuop_func op_b118_0_ff; +extern cpuop_func op_b120_0_nf; +extern cpuop_func op_b120_0_ff; +extern cpuop_func op_b128_0_nf; +extern cpuop_func op_b128_0_ff; +extern cpuop_func op_b130_0_nf; +extern cpuop_func op_b130_0_ff; +extern cpuop_func op_b138_0_nf; +extern cpuop_func op_b138_0_ff; +extern cpuop_func op_b139_0_nf; +extern cpuop_func op_b139_0_ff; +extern cpuop_func op_b140_0_nf; +extern cpuop_func op_b140_0_ff; +extern cpuop_func op_b148_0_nf; +extern cpuop_func op_b148_0_ff; +extern cpuop_func op_b150_0_nf; +extern cpuop_func op_b150_0_ff; +extern cpuop_func op_b158_0_nf; +extern cpuop_func op_b158_0_ff; +extern cpuop_func op_b160_0_nf; +extern cpuop_func op_b160_0_ff; +extern cpuop_func op_b168_0_nf; +extern cpuop_func op_b168_0_ff; +extern cpuop_func op_b170_0_nf; +extern cpuop_func op_b170_0_ff; +extern cpuop_func op_b178_0_nf; +extern cpuop_func op_b178_0_ff; +extern cpuop_func op_b179_0_nf; +extern cpuop_func op_b179_0_ff; +extern cpuop_func op_b180_0_nf; +extern cpuop_func op_b180_0_ff; +extern cpuop_func op_b188_0_nf; +extern cpuop_func op_b188_0_ff; +extern cpuop_func op_b190_0_nf; +extern cpuop_func op_b190_0_ff; +extern cpuop_func op_b198_0_nf; +extern cpuop_func op_b198_0_ff; +extern cpuop_func op_b1a0_0_nf; +extern cpuop_func op_b1a0_0_ff; +extern cpuop_func op_b1a8_0_nf; +extern cpuop_func op_b1a8_0_ff; +extern cpuop_func op_b1b0_0_nf; +extern cpuop_func op_b1b0_0_ff; +extern cpuop_func op_b1b8_0_nf; +extern cpuop_func op_b1b8_0_ff; +extern cpuop_func op_b1b9_0_nf; +extern cpuop_func op_b1b9_0_ff; +extern cpuop_func op_b1c0_0_nf; +extern cpuop_func op_b1c0_0_ff; +extern cpuop_func op_b1c8_0_nf; +extern cpuop_func op_b1c8_0_ff; +extern cpuop_func op_b1d0_0_nf; +extern cpuop_func op_b1d0_0_ff; +extern cpuop_func op_b1d8_0_nf; +extern cpuop_func op_b1d8_0_ff; +extern cpuop_func op_b1e0_0_nf; +extern cpuop_func op_b1e0_0_ff; +extern cpuop_func op_b1e8_0_nf; +extern cpuop_func op_b1e8_0_ff; +extern cpuop_func op_b1f0_0_nf; +extern cpuop_func op_b1f0_0_ff; +extern cpuop_func op_b1f8_0_nf; +extern cpuop_func op_b1f8_0_ff; +extern cpuop_func op_b1f9_0_nf; +extern cpuop_func op_b1f9_0_ff; +extern cpuop_func op_b1fa_0_nf; +extern cpuop_func op_b1fa_0_ff; +extern cpuop_func op_b1fb_0_nf; +extern cpuop_func op_b1fb_0_ff; +extern cpuop_func op_b1fc_0_nf; +extern cpuop_func op_b1fc_0_ff; +extern cpuop_func op_c000_0_nf; +extern cpuop_func op_c000_0_ff; +extern cpuop_func op_c010_0_nf; +extern cpuop_func op_c010_0_ff; +extern cpuop_func op_c018_0_nf; +extern cpuop_func op_c018_0_ff; +extern cpuop_func op_c020_0_nf; +extern cpuop_func op_c020_0_ff; +extern cpuop_func op_c028_0_nf; +extern cpuop_func op_c028_0_ff; +extern cpuop_func op_c030_0_nf; +extern cpuop_func op_c030_0_ff; +extern cpuop_func op_c038_0_nf; +extern cpuop_func op_c038_0_ff; +extern cpuop_func op_c039_0_nf; +extern cpuop_func op_c039_0_ff; +extern cpuop_func op_c03a_0_nf; +extern cpuop_func op_c03a_0_ff; +extern cpuop_func op_c03b_0_nf; +extern cpuop_func op_c03b_0_ff; +extern cpuop_func op_c03c_0_nf; +extern cpuop_func op_c03c_0_ff; +extern cpuop_func op_c040_0_nf; +extern cpuop_func op_c040_0_ff; +extern cpuop_func op_c050_0_nf; +extern cpuop_func op_c050_0_ff; +extern cpuop_func op_c058_0_nf; +extern cpuop_func op_c058_0_ff; +extern cpuop_func op_c060_0_nf; +extern cpuop_func op_c060_0_ff; +extern cpuop_func op_c068_0_nf; +extern cpuop_func op_c068_0_ff; +extern cpuop_func op_c070_0_nf; +extern cpuop_func op_c070_0_ff; +extern cpuop_func op_c078_0_nf; +extern cpuop_func op_c078_0_ff; +extern cpuop_func op_c079_0_nf; +extern cpuop_func op_c079_0_ff; +extern cpuop_func op_c07a_0_nf; +extern cpuop_func op_c07a_0_ff; +extern cpuop_func op_c07b_0_nf; +extern cpuop_func op_c07b_0_ff; +extern cpuop_func op_c07c_0_nf; +extern cpuop_func op_c07c_0_ff; +extern cpuop_func op_c080_0_nf; +extern cpuop_func op_c080_0_ff; +extern cpuop_func op_c090_0_nf; +extern cpuop_func op_c090_0_ff; +extern cpuop_func op_c098_0_nf; +extern cpuop_func op_c098_0_ff; +extern cpuop_func op_c0a0_0_nf; +extern cpuop_func op_c0a0_0_ff; +extern cpuop_func op_c0a8_0_nf; +extern cpuop_func op_c0a8_0_ff; +extern cpuop_func op_c0b0_0_nf; +extern cpuop_func op_c0b0_0_ff; +extern cpuop_func op_c0b8_0_nf; +extern cpuop_func op_c0b8_0_ff; +extern cpuop_func op_c0b9_0_nf; +extern cpuop_func op_c0b9_0_ff; +extern cpuop_func op_c0ba_0_nf; +extern cpuop_func op_c0ba_0_ff; +extern cpuop_func op_c0bb_0_nf; +extern cpuop_func op_c0bb_0_ff; +extern cpuop_func op_c0bc_0_nf; +extern cpuop_func op_c0bc_0_ff; +extern cpuop_func op_c0c0_0_nf; +extern cpuop_func op_c0c0_0_ff; +extern cpuop_func op_c0d0_0_nf; +extern cpuop_func op_c0d0_0_ff; +extern cpuop_func op_c0d8_0_nf; +extern cpuop_func op_c0d8_0_ff; +extern cpuop_func op_c0e0_0_nf; +extern cpuop_func op_c0e0_0_ff; +extern cpuop_func op_c0e8_0_nf; +extern cpuop_func op_c0e8_0_ff; +extern cpuop_func op_c0f0_0_nf; +extern cpuop_func op_c0f0_0_ff; +extern cpuop_func op_c0f8_0_nf; +extern cpuop_func op_c0f8_0_ff; +extern cpuop_func op_c0f9_0_nf; +extern cpuop_func op_c0f9_0_ff; +extern cpuop_func op_c0fa_0_nf; +extern cpuop_func op_c0fa_0_ff; +extern cpuop_func op_c0fb_0_nf; +extern cpuop_func op_c0fb_0_ff; +extern cpuop_func op_c0fc_0_nf; +extern cpuop_func op_c0fc_0_ff; +extern cpuop_func op_c100_0_nf; +extern cpuop_func op_c100_0_ff; +extern cpuop_func op_c108_0_nf; +extern cpuop_func op_c108_0_ff; +extern cpuop_func op_c110_0_nf; +extern cpuop_func op_c110_0_ff; +extern cpuop_func op_c118_0_nf; +extern cpuop_func op_c118_0_ff; +extern cpuop_func op_c120_0_nf; +extern cpuop_func op_c120_0_ff; +extern cpuop_func op_c128_0_nf; +extern cpuop_func op_c128_0_ff; +extern cpuop_func op_c130_0_nf; +extern cpuop_func op_c130_0_ff; +extern cpuop_func op_c138_0_nf; +extern cpuop_func op_c138_0_ff; +extern cpuop_func op_c139_0_nf; +extern cpuop_func op_c139_0_ff; +extern cpuop_func op_c140_0_nf; +extern cpuop_func op_c140_0_ff; +extern cpuop_func op_c148_0_nf; +extern cpuop_func op_c148_0_ff; +extern cpuop_func op_c150_0_nf; +extern cpuop_func op_c150_0_ff; +extern cpuop_func op_c158_0_nf; +extern cpuop_func op_c158_0_ff; +extern cpuop_func op_c160_0_nf; +extern cpuop_func op_c160_0_ff; +extern cpuop_func op_c168_0_nf; +extern cpuop_func op_c168_0_ff; +extern cpuop_func op_c170_0_nf; +extern cpuop_func op_c170_0_ff; +extern cpuop_func op_c178_0_nf; +extern cpuop_func op_c178_0_ff; +extern cpuop_func op_c179_0_nf; +extern cpuop_func op_c179_0_ff; +extern cpuop_func op_c188_0_nf; +extern cpuop_func op_c188_0_ff; +extern cpuop_func op_c190_0_nf; +extern cpuop_func op_c190_0_ff; +extern cpuop_func op_c198_0_nf; +extern cpuop_func op_c198_0_ff; +extern cpuop_func op_c1a0_0_nf; +extern cpuop_func op_c1a0_0_ff; +extern cpuop_func op_c1a8_0_nf; +extern cpuop_func op_c1a8_0_ff; +extern cpuop_func op_c1b0_0_nf; +extern cpuop_func op_c1b0_0_ff; +extern cpuop_func op_c1b8_0_nf; +extern cpuop_func op_c1b8_0_ff; +extern cpuop_func op_c1b9_0_nf; +extern cpuop_func op_c1b9_0_ff; +extern cpuop_func op_c1c0_0_nf; +extern cpuop_func op_c1c0_0_ff; +extern cpuop_func op_c1d0_0_nf; +extern cpuop_func op_c1d0_0_ff; +extern cpuop_func op_c1d8_0_nf; +extern cpuop_func op_c1d8_0_ff; +extern cpuop_func op_c1e0_0_nf; +extern cpuop_func op_c1e0_0_ff; +extern cpuop_func op_c1e8_0_nf; +extern cpuop_func op_c1e8_0_ff; +extern cpuop_func op_c1f0_0_nf; +extern cpuop_func op_c1f0_0_ff; +extern cpuop_func op_c1f8_0_nf; +extern cpuop_func op_c1f8_0_ff; +extern cpuop_func op_c1f9_0_nf; +extern cpuop_func op_c1f9_0_ff; +extern cpuop_func op_c1fa_0_nf; +extern cpuop_func op_c1fa_0_ff; +extern cpuop_func op_c1fb_0_nf; +extern cpuop_func op_c1fb_0_ff; +extern cpuop_func op_c1fc_0_nf; +extern cpuop_func op_c1fc_0_ff; +extern cpuop_func op_d000_0_nf; +extern cpuop_func op_d000_0_ff; +extern cpuop_func op_d010_0_nf; +extern cpuop_func op_d010_0_ff; +extern cpuop_func op_d018_0_nf; +extern cpuop_func op_d018_0_ff; +extern cpuop_func op_d020_0_nf; +extern cpuop_func op_d020_0_ff; +extern cpuop_func op_d028_0_nf; +extern cpuop_func op_d028_0_ff; +extern cpuop_func op_d030_0_nf; +extern cpuop_func op_d030_0_ff; +extern cpuop_func op_d038_0_nf; +extern cpuop_func op_d038_0_ff; +extern cpuop_func op_d039_0_nf; +extern cpuop_func op_d039_0_ff; +extern cpuop_func op_d03a_0_nf; +extern cpuop_func op_d03a_0_ff; +extern cpuop_func op_d03b_0_nf; +extern cpuop_func op_d03b_0_ff; +extern cpuop_func op_d03c_0_nf; +extern cpuop_func op_d03c_0_ff; +extern cpuop_func op_d040_0_nf; +extern cpuop_func op_d040_0_ff; +extern cpuop_func op_d048_0_nf; +extern cpuop_func op_d048_0_ff; +extern cpuop_func op_d050_0_nf; +extern cpuop_func op_d050_0_ff; +extern cpuop_func op_d058_0_nf; +extern cpuop_func op_d058_0_ff; +extern cpuop_func op_d060_0_nf; +extern cpuop_func op_d060_0_ff; +extern cpuop_func op_d068_0_nf; +extern cpuop_func op_d068_0_ff; +extern cpuop_func op_d070_0_nf; +extern cpuop_func op_d070_0_ff; +extern cpuop_func op_d078_0_nf; +extern cpuop_func op_d078_0_ff; +extern cpuop_func op_d079_0_nf; +extern cpuop_func op_d079_0_ff; +extern cpuop_func op_d07a_0_nf; +extern cpuop_func op_d07a_0_ff; +extern cpuop_func op_d07b_0_nf; +extern cpuop_func op_d07b_0_ff; +extern cpuop_func op_d07c_0_nf; +extern cpuop_func op_d07c_0_ff; +extern cpuop_func op_d080_0_nf; +extern cpuop_func op_d080_0_ff; +extern cpuop_func op_d088_0_nf; +extern cpuop_func op_d088_0_ff; +extern cpuop_func op_d090_0_nf; +extern cpuop_func op_d090_0_ff; +extern cpuop_func op_d098_0_nf; +extern cpuop_func op_d098_0_ff; +extern cpuop_func op_d0a0_0_nf; +extern cpuop_func op_d0a0_0_ff; +extern cpuop_func op_d0a8_0_nf; +extern cpuop_func op_d0a8_0_ff; +extern cpuop_func op_d0b0_0_nf; +extern cpuop_func op_d0b0_0_ff; +extern cpuop_func op_d0b8_0_nf; +extern cpuop_func op_d0b8_0_ff; +extern cpuop_func op_d0b9_0_nf; +extern cpuop_func op_d0b9_0_ff; +extern cpuop_func op_d0ba_0_nf; +extern cpuop_func op_d0ba_0_ff; +extern cpuop_func op_d0bb_0_nf; +extern cpuop_func op_d0bb_0_ff; +extern cpuop_func op_d0bc_0_nf; +extern cpuop_func op_d0bc_0_ff; +extern cpuop_func op_d0c0_0_nf; +extern cpuop_func op_d0c0_0_ff; +extern cpuop_func op_d0c8_0_nf; +extern cpuop_func op_d0c8_0_ff; +extern cpuop_func op_d0d0_0_nf; +extern cpuop_func op_d0d0_0_ff; +extern cpuop_func op_d0d8_0_nf; +extern cpuop_func op_d0d8_0_ff; +extern cpuop_func op_d0e0_0_nf; +extern cpuop_func op_d0e0_0_ff; +extern cpuop_func op_d0e8_0_nf; +extern cpuop_func op_d0e8_0_ff; +extern cpuop_func op_d0f0_0_nf; +extern cpuop_func op_d0f0_0_ff; +extern cpuop_func op_d0f8_0_nf; +extern cpuop_func op_d0f8_0_ff; +extern cpuop_func op_d0f9_0_nf; +extern cpuop_func op_d0f9_0_ff; +extern cpuop_func op_d0fa_0_nf; +extern cpuop_func op_d0fa_0_ff; +extern cpuop_func op_d0fb_0_nf; +extern cpuop_func op_d0fb_0_ff; +extern cpuop_func op_d0fc_0_nf; +extern cpuop_func op_d0fc_0_ff; +extern cpuop_func op_d100_0_nf; +extern cpuop_func op_d100_0_ff; +extern cpuop_func op_d108_0_nf; +extern cpuop_func op_d108_0_ff; +extern cpuop_func op_d110_0_nf; +extern cpuop_func op_d110_0_ff; +extern cpuop_func op_d118_0_nf; +extern cpuop_func op_d118_0_ff; +extern cpuop_func op_d120_0_nf; +extern cpuop_func op_d120_0_ff; +extern cpuop_func op_d128_0_nf; +extern cpuop_func op_d128_0_ff; +extern cpuop_func op_d130_0_nf; +extern cpuop_func op_d130_0_ff; +extern cpuop_func op_d138_0_nf; +extern cpuop_func op_d138_0_ff; +extern cpuop_func op_d139_0_nf; +extern cpuop_func op_d139_0_ff; +extern cpuop_func op_d140_0_nf; +extern cpuop_func op_d140_0_ff; +extern cpuop_func op_d148_0_nf; +extern cpuop_func op_d148_0_ff; +extern cpuop_func op_d150_0_nf; +extern cpuop_func op_d150_0_ff; +extern cpuop_func op_d158_0_nf; +extern cpuop_func op_d158_0_ff; +extern cpuop_func op_d160_0_nf; +extern cpuop_func op_d160_0_ff; +extern cpuop_func op_d168_0_nf; +extern cpuop_func op_d168_0_ff; +extern cpuop_func op_d170_0_nf; +extern cpuop_func op_d170_0_ff; +extern cpuop_func op_d178_0_nf; +extern cpuop_func op_d178_0_ff; +extern cpuop_func op_d179_0_nf; +extern cpuop_func op_d179_0_ff; +extern cpuop_func op_d180_0_nf; +extern cpuop_func op_d180_0_ff; +extern cpuop_func op_d188_0_nf; +extern cpuop_func op_d188_0_ff; +extern cpuop_func op_d190_0_nf; +extern cpuop_func op_d190_0_ff; +extern cpuop_func op_d198_0_nf; +extern cpuop_func op_d198_0_ff; +extern cpuop_func op_d1a0_0_nf; +extern cpuop_func op_d1a0_0_ff; +extern cpuop_func op_d1a8_0_nf; +extern cpuop_func op_d1a8_0_ff; +extern cpuop_func op_d1b0_0_nf; +extern cpuop_func op_d1b0_0_ff; +extern cpuop_func op_d1b8_0_nf; +extern cpuop_func op_d1b8_0_ff; +extern cpuop_func op_d1b9_0_nf; +extern cpuop_func op_d1b9_0_ff; +extern cpuop_func op_d1c0_0_nf; +extern cpuop_func op_d1c0_0_ff; +extern cpuop_func op_d1c8_0_nf; +extern cpuop_func op_d1c8_0_ff; +extern cpuop_func op_d1d0_0_nf; +extern cpuop_func op_d1d0_0_ff; +extern cpuop_func op_d1d8_0_nf; +extern cpuop_func op_d1d8_0_ff; +extern cpuop_func op_d1e0_0_nf; +extern cpuop_func op_d1e0_0_ff; +extern cpuop_func op_d1e8_0_nf; +extern cpuop_func op_d1e8_0_ff; +extern cpuop_func op_d1f0_0_nf; +extern cpuop_func op_d1f0_0_ff; +extern cpuop_func op_d1f8_0_nf; +extern cpuop_func op_d1f8_0_ff; +extern cpuop_func op_d1f9_0_nf; +extern cpuop_func op_d1f9_0_ff; +extern cpuop_func op_d1fa_0_nf; +extern cpuop_func op_d1fa_0_ff; +extern cpuop_func op_d1fb_0_nf; +extern cpuop_func op_d1fb_0_ff; +extern cpuop_func op_d1fc_0_nf; +extern cpuop_func op_d1fc_0_ff; +extern cpuop_func op_e000_0_nf; +extern cpuop_func op_e000_0_ff; +extern cpuop_func op_e008_0_nf; +extern cpuop_func op_e008_0_ff; +extern cpuop_func op_e010_0_nf; +extern cpuop_func op_e010_0_ff; +extern cpuop_func op_e018_0_nf; +extern cpuop_func op_e018_0_ff; +extern cpuop_func op_e020_0_nf; +extern cpuop_func op_e020_0_ff; +extern cpuop_func op_e028_0_nf; +extern cpuop_func op_e028_0_ff; +extern cpuop_func op_e030_0_nf; +extern cpuop_func op_e030_0_ff; +extern cpuop_func op_e038_0_nf; +extern cpuop_func op_e038_0_ff; +extern cpuop_func op_e040_0_nf; +extern cpuop_func op_e040_0_ff; +extern cpuop_func op_e048_0_nf; +extern cpuop_func op_e048_0_ff; +extern cpuop_func op_e050_0_nf; +extern cpuop_func op_e050_0_ff; +extern cpuop_func op_e058_0_nf; +extern cpuop_func op_e058_0_ff; +extern cpuop_func op_e060_0_nf; +extern cpuop_func op_e060_0_ff; +extern cpuop_func op_e068_0_nf; +extern cpuop_func op_e068_0_ff; +extern cpuop_func op_e070_0_nf; +extern cpuop_func op_e070_0_ff; +extern cpuop_func op_e078_0_nf; +extern cpuop_func op_e078_0_ff; +extern cpuop_func op_e080_0_nf; +extern cpuop_func op_e080_0_ff; +extern cpuop_func op_e088_0_nf; +extern cpuop_func op_e088_0_ff; +extern cpuop_func op_e090_0_nf; +extern cpuop_func op_e090_0_ff; +extern cpuop_func op_e098_0_nf; +extern cpuop_func op_e098_0_ff; +extern cpuop_func op_e0a0_0_nf; +extern cpuop_func op_e0a0_0_ff; +extern cpuop_func op_e0a8_0_nf; +extern cpuop_func op_e0a8_0_ff; +extern cpuop_func op_e0b0_0_nf; +extern cpuop_func op_e0b0_0_ff; +extern cpuop_func op_e0b8_0_nf; +extern cpuop_func op_e0b8_0_ff; +extern cpuop_func op_e0d0_0_nf; +extern cpuop_func op_e0d0_0_ff; +extern cpuop_func op_e0d8_0_nf; +extern cpuop_func op_e0d8_0_ff; +extern cpuop_func op_e0e0_0_nf; +extern cpuop_func op_e0e0_0_ff; +extern cpuop_func op_e0e8_0_nf; +extern cpuop_func op_e0e8_0_ff; +extern cpuop_func op_e0f0_0_nf; +extern cpuop_func op_e0f0_0_ff; +extern cpuop_func op_e0f8_0_nf; +extern cpuop_func op_e0f8_0_ff; +extern cpuop_func op_e0f9_0_nf; +extern cpuop_func op_e0f9_0_ff; +extern cpuop_func op_e100_0_nf; +extern cpuop_func op_e100_0_ff; +extern cpuop_func op_e108_0_nf; +extern cpuop_func op_e108_0_ff; +extern cpuop_func op_e110_0_nf; +extern cpuop_func op_e110_0_ff; +extern cpuop_func op_e118_0_nf; +extern cpuop_func op_e118_0_ff; +extern cpuop_func op_e120_0_nf; +extern cpuop_func op_e120_0_ff; +extern cpuop_func op_e128_0_nf; +extern cpuop_func op_e128_0_ff; +extern cpuop_func op_e130_0_nf; +extern cpuop_func op_e130_0_ff; +extern cpuop_func op_e138_0_nf; +extern cpuop_func op_e138_0_ff; +extern cpuop_func op_e140_0_nf; +extern cpuop_func op_e140_0_ff; +extern cpuop_func op_e148_0_nf; +extern cpuop_func op_e148_0_ff; +extern cpuop_func op_e150_0_nf; +extern cpuop_func op_e150_0_ff; +extern cpuop_func op_e158_0_nf; +extern cpuop_func op_e158_0_ff; +extern cpuop_func op_e160_0_nf; +extern cpuop_func op_e160_0_ff; +extern cpuop_func op_e168_0_nf; +extern cpuop_func op_e168_0_ff; +extern cpuop_func op_e170_0_nf; +extern cpuop_func op_e170_0_ff; +extern cpuop_func op_e178_0_nf; +extern cpuop_func op_e178_0_ff; +extern cpuop_func op_e180_0_nf; +extern cpuop_func op_e180_0_ff; +extern cpuop_func op_e188_0_nf; +extern cpuop_func op_e188_0_ff; +extern cpuop_func op_e190_0_nf; +extern cpuop_func op_e190_0_ff; +extern cpuop_func op_e198_0_nf; +extern cpuop_func op_e198_0_ff; +extern cpuop_func op_e1a0_0_nf; +extern cpuop_func op_e1a0_0_ff; +extern cpuop_func op_e1a8_0_nf; +extern cpuop_func op_e1a8_0_ff; +extern cpuop_func op_e1b0_0_nf; +extern cpuop_func op_e1b0_0_ff; +extern cpuop_func op_e1b8_0_nf; +extern cpuop_func op_e1b8_0_ff; +extern cpuop_func op_e1d0_0_nf; +extern cpuop_func op_e1d0_0_ff; +extern cpuop_func op_e1d8_0_nf; +extern cpuop_func op_e1d8_0_ff; +extern cpuop_func op_e1e0_0_nf; +extern cpuop_func op_e1e0_0_ff; +extern cpuop_func op_e1e8_0_nf; +extern cpuop_func op_e1e8_0_ff; +extern cpuop_func op_e1f0_0_nf; +extern cpuop_func op_e1f0_0_ff; +extern cpuop_func op_e1f8_0_nf; +extern cpuop_func op_e1f8_0_ff; +extern cpuop_func op_e1f9_0_nf; +extern cpuop_func op_e1f9_0_ff; +extern cpuop_func op_e2d0_0_nf; +extern cpuop_func op_e2d0_0_ff; +extern cpuop_func op_e2d8_0_nf; +extern cpuop_func op_e2d8_0_ff; +extern cpuop_func op_e2e0_0_nf; +extern cpuop_func op_e2e0_0_ff; +extern cpuop_func op_e2e8_0_nf; +extern cpuop_func op_e2e8_0_ff; +extern cpuop_func op_e2f0_0_nf; +extern cpuop_func op_e2f0_0_ff; +extern cpuop_func op_e2f8_0_nf; +extern cpuop_func op_e2f8_0_ff; +extern cpuop_func op_e2f9_0_nf; +extern cpuop_func op_e2f9_0_ff; +extern cpuop_func op_e3d0_0_nf; +extern cpuop_func op_e3d0_0_ff; +extern cpuop_func op_e3d8_0_nf; +extern cpuop_func op_e3d8_0_ff; +extern cpuop_func op_e3e0_0_nf; +extern cpuop_func op_e3e0_0_ff; +extern cpuop_func op_e3e8_0_nf; +extern cpuop_func op_e3e8_0_ff; +extern cpuop_func op_e3f0_0_nf; +extern cpuop_func op_e3f0_0_ff; +extern cpuop_func op_e3f8_0_nf; +extern cpuop_func op_e3f8_0_ff; +extern cpuop_func op_e3f9_0_nf; +extern cpuop_func op_e3f9_0_ff; +extern cpuop_func op_e4d0_0_nf; +extern cpuop_func op_e4d0_0_ff; +extern cpuop_func op_e4d8_0_nf; +extern cpuop_func op_e4d8_0_ff; +extern cpuop_func op_e4e0_0_nf; +extern cpuop_func op_e4e0_0_ff; +extern cpuop_func op_e4e8_0_nf; +extern cpuop_func op_e4e8_0_ff; +extern cpuop_func op_e4f0_0_nf; +extern cpuop_func op_e4f0_0_ff; +extern cpuop_func op_e4f8_0_nf; +extern cpuop_func op_e4f8_0_ff; +extern cpuop_func op_e4f9_0_nf; +extern cpuop_func op_e4f9_0_ff; +extern cpuop_func op_e5d0_0_nf; +extern cpuop_func op_e5d0_0_ff; +extern cpuop_func op_e5d8_0_nf; +extern cpuop_func op_e5d8_0_ff; +extern cpuop_func op_e5e0_0_nf; +extern cpuop_func op_e5e0_0_ff; +extern cpuop_func op_e5e8_0_nf; +extern cpuop_func op_e5e8_0_ff; +extern cpuop_func op_e5f0_0_nf; +extern cpuop_func op_e5f0_0_ff; +extern cpuop_func op_e5f8_0_nf; +extern cpuop_func op_e5f8_0_ff; +extern cpuop_func op_e5f9_0_nf; +extern cpuop_func op_e5f9_0_ff; +extern cpuop_func op_e6d0_0_nf; +extern cpuop_func op_e6d0_0_ff; +extern cpuop_func op_e6d8_0_nf; +extern cpuop_func op_e6d8_0_ff; +extern cpuop_func op_e6e0_0_nf; +extern cpuop_func op_e6e0_0_ff; +extern cpuop_func op_e6e8_0_nf; +extern cpuop_func op_e6e8_0_ff; +extern cpuop_func op_e6f0_0_nf; +extern cpuop_func op_e6f0_0_ff; +extern cpuop_func op_e6f8_0_nf; +extern cpuop_func op_e6f8_0_ff; +extern cpuop_func op_e6f9_0_nf; +extern cpuop_func op_e6f9_0_ff; +extern cpuop_func op_e7d0_0_nf; +extern cpuop_func op_e7d0_0_ff; +extern cpuop_func op_e7d8_0_nf; +extern cpuop_func op_e7d8_0_ff; +extern cpuop_func op_e7e0_0_nf; +extern cpuop_func op_e7e0_0_ff; +extern cpuop_func op_e7e8_0_nf; +extern cpuop_func op_e7e8_0_ff; +extern cpuop_func op_e7f0_0_nf; +extern cpuop_func op_e7f0_0_ff; +extern cpuop_func op_e7f8_0_nf; +extern cpuop_func op_e7f8_0_ff; +extern cpuop_func op_e7f9_0_nf; +extern cpuop_func op_e7f9_0_ff; +extern cpuop_func op_e8c0_0_nf; +extern cpuop_func op_e8c0_0_ff; +extern cpuop_func op_e8d0_0_nf; +extern cpuop_func op_e8d0_0_ff; +extern cpuop_func op_e8e8_0_nf; +extern cpuop_func op_e8e8_0_ff; +extern cpuop_func op_e8f0_0_nf; +extern cpuop_func op_e8f0_0_ff; +extern cpuop_func op_e8f8_0_nf; +extern cpuop_func op_e8f8_0_ff; +extern cpuop_func op_e8f9_0_nf; +extern cpuop_func op_e8f9_0_ff; +extern cpuop_func op_e8fa_0_nf; +extern cpuop_func op_e8fa_0_ff; +extern cpuop_func op_e8fb_0_nf; +extern cpuop_func op_e8fb_0_ff; +extern cpuop_func op_e9c0_0_nf; +extern cpuop_func op_e9c0_0_ff; +extern cpuop_func op_e9d0_0_nf; +extern cpuop_func op_e9d0_0_ff; +extern cpuop_func op_e9e8_0_nf; +extern cpuop_func op_e9e8_0_ff; +extern cpuop_func op_e9f0_0_nf; +extern cpuop_func op_e9f0_0_ff; +extern cpuop_func op_e9f8_0_nf; +extern cpuop_func op_e9f8_0_ff; +extern cpuop_func op_e9f9_0_nf; +extern cpuop_func op_e9f9_0_ff; +extern cpuop_func op_e9fa_0_nf; +extern cpuop_func op_e9fa_0_ff; +extern cpuop_func op_e9fb_0_nf; +extern cpuop_func op_e9fb_0_ff; +extern cpuop_func op_eac0_0_nf; +extern cpuop_func op_eac0_0_ff; +extern cpuop_func op_ead0_0_nf; +extern cpuop_func op_ead0_0_ff; +extern cpuop_func op_eae8_0_nf; +extern cpuop_func op_eae8_0_ff; +extern cpuop_func op_eaf0_0_nf; +extern cpuop_func op_eaf0_0_ff; +extern cpuop_func op_eaf8_0_nf; +extern cpuop_func op_eaf8_0_ff; +extern cpuop_func op_eaf9_0_nf; +extern cpuop_func op_eaf9_0_ff; +extern cpuop_func op_ebc0_0_nf; +extern cpuop_func op_ebc0_0_ff; +extern cpuop_func op_ebd0_0_nf; +extern cpuop_func op_ebd0_0_ff; +extern cpuop_func op_ebe8_0_nf; +extern cpuop_func op_ebe8_0_ff; +extern cpuop_func op_ebf0_0_nf; +extern cpuop_func op_ebf0_0_ff; +extern cpuop_func op_ebf8_0_nf; +extern cpuop_func op_ebf8_0_ff; +extern cpuop_func op_ebf9_0_nf; +extern cpuop_func op_ebf9_0_ff; +extern cpuop_func op_ebfa_0_nf; +extern cpuop_func op_ebfa_0_ff; +extern cpuop_func op_ebfb_0_nf; +extern cpuop_func op_ebfb_0_ff; +extern cpuop_func op_ecc0_0_nf; +extern cpuop_func op_ecc0_0_ff; +extern cpuop_func op_ecd0_0_nf; +extern cpuop_func op_ecd0_0_ff; +extern cpuop_func op_ece8_0_nf; +extern cpuop_func op_ece8_0_ff; +extern cpuop_func op_ecf0_0_nf; +extern cpuop_func op_ecf0_0_ff; +extern cpuop_func op_ecf8_0_nf; +extern cpuop_func op_ecf8_0_ff; +extern cpuop_func op_ecf9_0_nf; +extern cpuop_func op_ecf9_0_ff; +extern cpuop_func op_edc0_0_nf; +extern cpuop_func op_edc0_0_ff; +extern cpuop_func op_edd0_0_nf; +extern cpuop_func op_edd0_0_ff; +extern cpuop_func op_ede8_0_nf; +extern cpuop_func op_ede8_0_ff; +extern cpuop_func op_edf0_0_nf; +extern cpuop_func op_edf0_0_ff; +extern cpuop_func op_edf8_0_nf; +extern cpuop_func op_edf8_0_ff; +extern cpuop_func op_edf9_0_nf; +extern cpuop_func op_edf9_0_ff; +extern cpuop_func op_edfa_0_nf; +extern cpuop_func op_edfa_0_ff; +extern cpuop_func op_edfb_0_nf; +extern cpuop_func op_edfb_0_ff; +extern cpuop_func op_eec0_0_nf; +extern cpuop_func op_eec0_0_ff; +extern cpuop_func op_eed0_0_nf; +extern cpuop_func op_eed0_0_ff; +extern cpuop_func op_eee8_0_nf; +extern cpuop_func op_eee8_0_ff; +extern cpuop_func op_eef0_0_nf; +extern cpuop_func op_eef0_0_ff; +extern cpuop_func op_eef8_0_nf; +extern cpuop_func op_eef8_0_ff; +extern cpuop_func op_eef9_0_nf; +extern cpuop_func op_eef9_0_ff; +extern cpuop_func op_efc0_0_nf; +extern cpuop_func op_efc0_0_ff; +extern cpuop_func op_efd0_0_nf; +extern cpuop_func op_efd0_0_ff; +extern cpuop_func op_efe8_0_nf; +extern cpuop_func op_efe8_0_ff; +extern cpuop_func op_eff0_0_nf; +extern cpuop_func op_eff0_0_ff; +extern cpuop_func op_eff8_0_nf; +extern cpuop_func op_eff8_0_ff; +extern cpuop_func op_eff9_0_nf; +extern cpuop_func op_eff9_0_ff; +extern cpuop_func op_f200_0_nf; +extern cpuop_func op_f200_0_ff; +extern cpuop_func op_f208_0_nf; +extern cpuop_func op_f208_0_ff; +extern cpuop_func op_f210_0_nf; +extern cpuop_func op_f210_0_ff; +extern cpuop_func op_f218_0_nf; +extern cpuop_func op_f218_0_ff; +extern cpuop_func op_f220_0_nf; +extern cpuop_func op_f220_0_ff; +extern cpuop_func op_f228_0_nf; +extern cpuop_func op_f228_0_ff; +extern cpuop_func op_f230_0_nf; +extern cpuop_func op_f230_0_ff; +extern cpuop_func op_f238_0_nf; +extern cpuop_func op_f238_0_ff; +extern cpuop_func op_f239_0_nf; +extern cpuop_func op_f239_0_ff; +extern cpuop_func op_f23a_0_nf; +extern cpuop_func op_f23a_0_ff; +extern cpuop_func op_f23b_0_nf; +extern cpuop_func op_f23b_0_ff; +extern cpuop_func op_f23c_0_nf; +extern cpuop_func op_f23c_0_ff; +extern cpuop_func op_f240_0_nf; +extern cpuop_func op_f240_0_ff; +extern cpuop_func op_f248_0_nf; +extern cpuop_func op_f248_0_ff; +extern cpuop_func op_f250_0_nf; +extern cpuop_func op_f250_0_ff; +extern cpuop_func op_f258_0_nf; +extern cpuop_func op_f258_0_ff; +extern cpuop_func op_f260_0_nf; +extern cpuop_func op_f260_0_ff; +extern cpuop_func op_f268_0_nf; +extern cpuop_func op_f268_0_ff; +extern cpuop_func op_f270_0_nf; +extern cpuop_func op_f270_0_ff; +extern cpuop_func op_f278_0_nf; +extern cpuop_func op_f278_0_ff; +extern cpuop_func op_f279_0_nf; +extern cpuop_func op_f279_0_ff; +extern cpuop_func op_f27a_0_nf; +extern cpuop_func op_f27a_0_ff; +extern cpuop_func op_f27b_0_nf; +extern cpuop_func op_f27b_0_ff; +extern cpuop_func op_f27c_0_nf; +extern cpuop_func op_f27c_0_ff; +extern cpuop_func op_f280_0_nf; +extern cpuop_func op_f280_0_ff; +extern cpuop_func op_f2c0_0_nf; +extern cpuop_func op_f2c0_0_ff; +extern cpuop_func op_f310_0_nf; +extern cpuop_func op_f310_0_ff; +extern cpuop_func op_f320_0_nf; +extern cpuop_func op_f320_0_ff; +extern cpuop_func op_f328_0_nf; +extern cpuop_func op_f328_0_ff; +extern cpuop_func op_f330_0_nf; +extern cpuop_func op_f330_0_ff; +extern cpuop_func op_f338_0_nf; +extern cpuop_func op_f338_0_ff; +extern cpuop_func op_f339_0_nf; +extern cpuop_func op_f339_0_ff; +extern cpuop_func op_f350_0_nf; +extern cpuop_func op_f350_0_ff; +extern cpuop_func op_f358_0_nf; +extern cpuop_func op_f358_0_ff; +extern cpuop_func op_f368_0_nf; +extern cpuop_func op_f368_0_ff; +extern cpuop_func op_f370_0_nf; +extern cpuop_func op_f370_0_ff; +extern cpuop_func op_f378_0_nf; +extern cpuop_func op_f378_0_ff; +extern cpuop_func op_f379_0_nf; +extern cpuop_func op_f379_0_ff; +extern cpuop_func op_f37a_0_nf; +extern cpuop_func op_f37a_0_ff; +extern cpuop_func op_f37b_0_nf; +extern cpuop_func op_f37b_0_ff; +extern cpuop_func op_f408_0_nf; +extern cpuop_func op_f408_0_ff; +extern cpuop_func op_f410_0_nf; +extern cpuop_func op_f410_0_ff; +extern cpuop_func op_f418_0_nf; +extern cpuop_func op_f418_0_ff; +extern cpuop_func op_f419_0_nf; +extern cpuop_func op_f419_0_ff; +extern cpuop_func op_f41a_0_nf; +extern cpuop_func op_f41a_0_ff; +extern cpuop_func op_f41b_0_nf; +extern cpuop_func op_f41b_0_ff; +extern cpuop_func op_f41c_0_nf; +extern cpuop_func op_f41c_0_ff; +extern cpuop_func op_f41d_0_nf; +extern cpuop_func op_f41d_0_ff; +extern cpuop_func op_f41e_0_nf; +extern cpuop_func op_f41e_0_ff; +extern cpuop_func op_f41f_0_nf; +extern cpuop_func op_f41f_0_ff; +extern cpuop_func op_f428_0_nf; +extern cpuop_func op_f428_0_ff; +extern cpuop_func op_f430_0_nf; +extern cpuop_func op_f430_0_ff; +extern cpuop_func op_f438_0_nf; +extern cpuop_func op_f438_0_ff; +extern cpuop_func op_f439_0_nf; +extern cpuop_func op_f439_0_ff; +extern cpuop_func op_f43a_0_nf; +extern cpuop_func op_f43a_0_ff; +extern cpuop_func op_f43b_0_nf; +extern cpuop_func op_f43b_0_ff; +extern cpuop_func op_f43c_0_nf; +extern cpuop_func op_f43c_0_ff; +extern cpuop_func op_f43d_0_nf; +extern cpuop_func op_f43d_0_ff; +extern cpuop_func op_f43e_0_nf; +extern cpuop_func op_f43e_0_ff; +extern cpuop_func op_f43f_0_nf; +extern cpuop_func op_f43f_0_ff; +extern cpuop_func op_f500_0_nf; +extern cpuop_func op_f500_0_ff; +extern cpuop_func op_f600_0_nf; +extern cpuop_func op_f600_0_ff; +extern cpuop_func op_f608_0_nf; +extern cpuop_func op_f608_0_ff; +extern cpuop_func op_f610_0_nf; +extern cpuop_func op_f610_0_ff; +extern cpuop_func op_f618_0_nf; +extern cpuop_func op_f618_0_ff; +extern cpuop_func op_f620_0_nf; +extern cpuop_func op_f620_0_ff; +extern cpuop_func op_4800_1_nf; +extern cpuop_func op_4800_1_ff; +extern cpuop_func op_4810_1_nf; +extern cpuop_func op_4810_1_ff; +extern cpuop_func op_4818_1_nf; +extern cpuop_func op_4818_1_ff; +extern cpuop_func op_4820_1_nf; +extern cpuop_func op_4820_1_ff; +extern cpuop_func op_4828_1_nf; +extern cpuop_func op_4828_1_ff; +extern cpuop_func op_4830_1_nf; +extern cpuop_func op_4830_1_ff; +extern cpuop_func op_4838_1_nf; +extern cpuop_func op_4838_1_ff; +extern cpuop_func op_4839_1_nf; +extern cpuop_func op_4839_1_ff; +extern cpuop_func op_8100_1_nf; +extern cpuop_func op_8100_1_ff; +extern cpuop_func op_8108_1_nf; +extern cpuop_func op_8108_1_ff; +extern cpuop_func op_c100_1_nf; +extern cpuop_func op_c100_1_ff; +extern cpuop_func op_c108_1_nf; +extern cpuop_func op_c108_1_ff; +extern cpuop_func op_30_3_nf; +extern cpuop_func op_30_3_ff; +extern cpuop_func op_70_3_nf; +extern cpuop_func op_70_3_ff; +extern cpuop_func op_b0_3_nf; +extern cpuop_func op_b0_3_ff; +extern cpuop_func op_130_3_nf; +extern cpuop_func op_130_3_ff; +extern cpuop_func op_13b_3_nf; +extern cpuop_func op_13b_3_ff; +extern cpuop_func op_170_3_nf; +extern cpuop_func op_170_3_ff; +extern cpuop_func op_17b_3_nf; +extern cpuop_func op_17b_3_ff; +extern cpuop_func op_1b0_3_nf; +extern cpuop_func op_1b0_3_ff; +extern cpuop_func op_1bb_3_nf; +extern cpuop_func op_1bb_3_ff; +extern cpuop_func op_1f0_3_nf; +extern cpuop_func op_1f0_3_ff; +extern cpuop_func op_1fb_3_nf; +extern cpuop_func op_1fb_3_ff; +extern cpuop_func op_230_3_nf; +extern cpuop_func op_230_3_ff; +extern cpuop_func op_270_3_nf; +extern cpuop_func op_270_3_ff; +extern cpuop_func op_2b0_3_nf; +extern cpuop_func op_2b0_3_ff; +extern cpuop_func op_430_3_nf; +extern cpuop_func op_430_3_ff; +extern cpuop_func op_470_3_nf; +extern cpuop_func op_470_3_ff; +extern cpuop_func op_4b0_3_nf; +extern cpuop_func op_4b0_3_ff; +extern cpuop_func op_630_3_nf; +extern cpuop_func op_630_3_ff; +extern cpuop_func op_670_3_nf; +extern cpuop_func op_670_3_ff; +extern cpuop_func op_6b0_3_nf; +extern cpuop_func op_6b0_3_ff; +extern cpuop_func op_830_3_nf; +extern cpuop_func op_830_3_ff; +extern cpuop_func op_83b_3_nf; +extern cpuop_func op_83b_3_ff; +extern cpuop_func op_870_3_nf; +extern cpuop_func op_870_3_ff; +extern cpuop_func op_87b_3_nf; +extern cpuop_func op_87b_3_ff; +extern cpuop_func op_8b0_3_nf; +extern cpuop_func op_8b0_3_ff; +extern cpuop_func op_8bb_3_nf; +extern cpuop_func op_8bb_3_ff; +extern cpuop_func op_8f0_3_nf; +extern cpuop_func op_8f0_3_ff; +extern cpuop_func op_8fb_3_nf; +extern cpuop_func op_8fb_3_ff; +extern cpuop_func op_a30_3_nf; +extern cpuop_func op_a30_3_ff; +extern cpuop_func op_a70_3_nf; +extern cpuop_func op_a70_3_ff; +extern cpuop_func op_ab0_3_nf; +extern cpuop_func op_ab0_3_ff; +extern cpuop_func op_c30_3_nf; +extern cpuop_func op_c30_3_ff; +extern cpuop_func op_c3b_3_nf; +extern cpuop_func op_c3b_3_ff; +extern cpuop_func op_c70_3_nf; +extern cpuop_func op_c70_3_ff; +extern cpuop_func op_c7b_3_nf; +extern cpuop_func op_c7b_3_ff; +extern cpuop_func op_cb0_3_nf; +extern cpuop_func op_cb0_3_ff; +extern cpuop_func op_cbb_3_nf; +extern cpuop_func op_cbb_3_ff; +extern cpuop_func op_1030_3_nf; +extern cpuop_func op_1030_3_ff; +extern cpuop_func op_103b_3_nf; +extern cpuop_func op_103b_3_ff; +extern cpuop_func op_10b0_3_nf; +extern cpuop_func op_10b0_3_ff; +extern cpuop_func op_10bb_3_nf; +extern cpuop_func op_10bb_3_ff; +extern cpuop_func op_10f0_3_nf; +extern cpuop_func op_10f0_3_ff; +extern cpuop_func op_10fb_3_nf; +extern cpuop_func op_10fb_3_ff; +extern cpuop_func op_1130_3_nf; +extern cpuop_func op_1130_3_ff; +extern cpuop_func op_113b_3_nf; +extern cpuop_func op_113b_3_ff; +extern cpuop_func op_1170_3_nf; +extern cpuop_func op_1170_3_ff; +extern cpuop_func op_117b_3_nf; +extern cpuop_func op_117b_3_ff; +extern cpuop_func op_1180_3_nf; +extern cpuop_func op_1180_3_ff; +extern cpuop_func op_1190_3_nf; +extern cpuop_func op_1190_3_ff; +extern cpuop_func op_1198_3_nf; +extern cpuop_func op_1198_3_ff; +extern cpuop_func op_11a0_3_nf; +extern cpuop_func op_11a0_3_ff; +extern cpuop_func op_11a8_3_nf; +extern cpuop_func op_11a8_3_ff; +extern cpuop_func op_11b0_3_nf; +extern cpuop_func op_11b0_3_ff; +extern cpuop_func op_11b8_3_nf; +extern cpuop_func op_11b8_3_ff; +extern cpuop_func op_11b9_3_nf; +extern cpuop_func op_11b9_3_ff; +extern cpuop_func op_11ba_3_nf; +extern cpuop_func op_11ba_3_ff; +extern cpuop_func op_11bb_3_nf; +extern cpuop_func op_11bb_3_ff; +extern cpuop_func op_11bc_3_nf; +extern cpuop_func op_11bc_3_ff; +extern cpuop_func op_11f0_3_nf; +extern cpuop_func op_11f0_3_ff; +extern cpuop_func op_11fb_3_nf; +extern cpuop_func op_11fb_3_ff; +extern cpuop_func op_13f0_3_nf; +extern cpuop_func op_13f0_3_ff; +extern cpuop_func op_13fb_3_nf; +extern cpuop_func op_13fb_3_ff; +extern cpuop_func op_2030_3_nf; +extern cpuop_func op_2030_3_ff; +extern cpuop_func op_203b_3_nf; +extern cpuop_func op_203b_3_ff; +extern cpuop_func op_2070_3_nf; +extern cpuop_func op_2070_3_ff; +extern cpuop_func op_207b_3_nf; +extern cpuop_func op_207b_3_ff; +extern cpuop_func op_20b0_3_nf; +extern cpuop_func op_20b0_3_ff; +extern cpuop_func op_20bb_3_nf; +extern cpuop_func op_20bb_3_ff; +extern cpuop_func op_20f0_3_nf; +extern cpuop_func op_20f0_3_ff; +extern cpuop_func op_20fb_3_nf; +extern cpuop_func op_20fb_3_ff; +extern cpuop_func op_2130_3_nf; +extern cpuop_func op_2130_3_ff; +extern cpuop_func op_213b_3_nf; +extern cpuop_func op_213b_3_ff; +extern cpuop_func op_2170_3_nf; +extern cpuop_func op_2170_3_ff; +extern cpuop_func op_217b_3_nf; +extern cpuop_func op_217b_3_ff; +extern cpuop_func op_2180_3_nf; +extern cpuop_func op_2180_3_ff; +extern cpuop_func op_2188_3_nf; +extern cpuop_func op_2188_3_ff; +extern cpuop_func op_2190_3_nf; +extern cpuop_func op_2190_3_ff; +extern cpuop_func op_2198_3_nf; +extern cpuop_func op_2198_3_ff; +extern cpuop_func op_21a0_3_nf; +extern cpuop_func op_21a0_3_ff; +extern cpuop_func op_21a8_3_nf; +extern cpuop_func op_21a8_3_ff; +extern cpuop_func op_21b0_3_nf; +extern cpuop_func op_21b0_3_ff; +extern cpuop_func op_21b8_3_nf; +extern cpuop_func op_21b8_3_ff; +extern cpuop_func op_21b9_3_nf; +extern cpuop_func op_21b9_3_ff; +extern cpuop_func op_21ba_3_nf; +extern cpuop_func op_21ba_3_ff; +extern cpuop_func op_21bb_3_nf; +extern cpuop_func op_21bb_3_ff; +extern cpuop_func op_21bc_3_nf; +extern cpuop_func op_21bc_3_ff; +extern cpuop_func op_21f0_3_nf; +extern cpuop_func op_21f0_3_ff; +extern cpuop_func op_21fb_3_nf; +extern cpuop_func op_21fb_3_ff; +extern cpuop_func op_23f0_3_nf; +extern cpuop_func op_23f0_3_ff; +extern cpuop_func op_23fb_3_nf; +extern cpuop_func op_23fb_3_ff; +extern cpuop_func op_3030_3_nf; +extern cpuop_func op_3030_3_ff; +extern cpuop_func op_303b_3_nf; +extern cpuop_func op_303b_3_ff; +extern cpuop_func op_3070_3_nf; +extern cpuop_func op_3070_3_ff; +extern cpuop_func op_307b_3_nf; +extern cpuop_func op_307b_3_ff; +extern cpuop_func op_30b0_3_nf; +extern cpuop_func op_30b0_3_ff; +extern cpuop_func op_30bb_3_nf; +extern cpuop_func op_30bb_3_ff; +extern cpuop_func op_30f0_3_nf; +extern cpuop_func op_30f0_3_ff; +extern cpuop_func op_30fb_3_nf; +extern cpuop_func op_30fb_3_ff; +extern cpuop_func op_3130_3_nf; +extern cpuop_func op_3130_3_ff; +extern cpuop_func op_313b_3_nf; +extern cpuop_func op_313b_3_ff; +extern cpuop_func op_3170_3_nf; +extern cpuop_func op_3170_3_ff; +extern cpuop_func op_317b_3_nf; +extern cpuop_func op_317b_3_ff; +extern cpuop_func op_3180_3_nf; +extern cpuop_func op_3180_3_ff; +extern cpuop_func op_3188_3_nf; +extern cpuop_func op_3188_3_ff; +extern cpuop_func op_3190_3_nf; +extern cpuop_func op_3190_3_ff; +extern cpuop_func op_3198_3_nf; +extern cpuop_func op_3198_3_ff; +extern cpuop_func op_31a0_3_nf; +extern cpuop_func op_31a0_3_ff; +extern cpuop_func op_31a8_3_nf; +extern cpuop_func op_31a8_3_ff; +extern cpuop_func op_31b0_3_nf; +extern cpuop_func op_31b0_3_ff; +extern cpuop_func op_31b8_3_nf; +extern cpuop_func op_31b8_3_ff; +extern cpuop_func op_31b9_3_nf; +extern cpuop_func op_31b9_3_ff; +extern cpuop_func op_31ba_3_nf; +extern cpuop_func op_31ba_3_ff; +extern cpuop_func op_31bb_3_nf; +extern cpuop_func op_31bb_3_ff; +extern cpuop_func op_31bc_3_nf; +extern cpuop_func op_31bc_3_ff; +extern cpuop_func op_31f0_3_nf; +extern cpuop_func op_31f0_3_ff; +extern cpuop_func op_31fb_3_nf; +extern cpuop_func op_31fb_3_ff; +extern cpuop_func op_33f0_3_nf; +extern cpuop_func op_33f0_3_ff; +extern cpuop_func op_33fb_3_nf; +extern cpuop_func op_33fb_3_ff; +extern cpuop_func op_4030_3_nf; +extern cpuop_func op_4030_3_ff; +extern cpuop_func op_4070_3_nf; +extern cpuop_func op_4070_3_ff; +extern cpuop_func op_40b0_3_nf; +extern cpuop_func op_40b0_3_ff; +extern cpuop_func op_40f0_3_nf; +extern cpuop_func op_40f0_3_ff; +extern cpuop_func op_4130_3_nf; +extern cpuop_func op_4130_3_ff; +extern cpuop_func op_413b_3_nf; +extern cpuop_func op_413b_3_ff; +extern cpuop_func op_41b0_3_nf; +extern cpuop_func op_41b0_3_ff; +extern cpuop_func op_41bb_3_nf; +extern cpuop_func op_41bb_3_ff; +extern cpuop_func op_41f0_3_nf; +extern cpuop_func op_41f0_3_ff; +extern cpuop_func op_41fb_3_nf; +extern cpuop_func op_41fb_3_ff; +extern cpuop_func op_4230_3_nf; +extern cpuop_func op_4230_3_ff; +extern cpuop_func op_4270_3_nf; +extern cpuop_func op_4270_3_ff; +extern cpuop_func op_42b0_3_nf; +extern cpuop_func op_42b0_3_ff; +extern cpuop_func op_42f0_3_nf; +extern cpuop_func op_42f0_3_ff; +extern cpuop_func op_4430_3_nf; +extern cpuop_func op_4430_3_ff; +extern cpuop_func op_4470_3_nf; +extern cpuop_func op_4470_3_ff; +extern cpuop_func op_44b0_3_nf; +extern cpuop_func op_44b0_3_ff; +extern cpuop_func op_44f0_3_nf; +extern cpuop_func op_44f0_3_ff; +extern cpuop_func op_44fb_3_nf; +extern cpuop_func op_44fb_3_ff; +extern cpuop_func op_4630_3_nf; +extern cpuop_func op_4630_3_ff; +extern cpuop_func op_4670_3_nf; +extern cpuop_func op_4670_3_ff; +extern cpuop_func op_46b0_3_nf; +extern cpuop_func op_46b0_3_ff; +extern cpuop_func op_46f0_3_nf; +extern cpuop_func op_46f0_3_ff; +extern cpuop_func op_46fb_3_nf; +extern cpuop_func op_46fb_3_ff; +extern cpuop_func op_4830_3_nf; +extern cpuop_func op_4830_3_ff; +extern cpuop_func op_4870_3_nf; +extern cpuop_func op_4870_3_ff; +extern cpuop_func op_487b_3_nf; +extern cpuop_func op_487b_3_ff; +extern cpuop_func op_48b0_3_nf; +extern cpuop_func op_48b0_3_ff; +extern cpuop_func op_48f0_3_nf; +extern cpuop_func op_48f0_3_ff; +extern cpuop_func op_4a30_3_nf; +extern cpuop_func op_4a30_3_ff; +extern cpuop_func op_4a3b_3_nf; +extern cpuop_func op_4a3b_3_ff; +extern cpuop_func op_4a70_3_nf; +extern cpuop_func op_4a70_3_ff; +extern cpuop_func op_4a7b_3_nf; +extern cpuop_func op_4a7b_3_ff; +extern cpuop_func op_4ab0_3_nf; +extern cpuop_func op_4ab0_3_ff; +extern cpuop_func op_4abb_3_nf; +extern cpuop_func op_4abb_3_ff; +extern cpuop_func op_4af0_3_nf; +extern cpuop_func op_4af0_3_ff; +extern cpuop_func op_4cb0_3_nf; +extern cpuop_func op_4cb0_3_ff; +extern cpuop_func op_4cbb_3_nf; +extern cpuop_func op_4cbb_3_ff; +extern cpuop_func op_4cf0_3_nf; +extern cpuop_func op_4cf0_3_ff; +extern cpuop_func op_4cfb_3_nf; +extern cpuop_func op_4cfb_3_ff; +extern cpuop_func op_4eb0_3_nf; +extern cpuop_func op_4eb0_3_ff; +extern cpuop_func op_4ebb_3_nf; +extern cpuop_func op_4ebb_3_ff; +extern cpuop_func op_4ef0_3_nf; +extern cpuop_func op_4ef0_3_ff; +extern cpuop_func op_4efb_3_nf; +extern cpuop_func op_4efb_3_ff; +extern cpuop_func op_5030_3_nf; +extern cpuop_func op_5030_3_ff; +extern cpuop_func op_5070_3_nf; +extern cpuop_func op_5070_3_ff; +extern cpuop_func op_50b0_3_nf; +extern cpuop_func op_50b0_3_ff; +extern cpuop_func op_50f0_3_nf; +extern cpuop_func op_50f0_3_ff; +extern cpuop_func op_5130_3_nf; +extern cpuop_func op_5130_3_ff; +extern cpuop_func op_5170_3_nf; +extern cpuop_func op_5170_3_ff; +extern cpuop_func op_51b0_3_nf; +extern cpuop_func op_51b0_3_ff; +extern cpuop_func op_51f0_3_nf; +extern cpuop_func op_51f0_3_ff; +extern cpuop_func op_52f0_3_nf; +extern cpuop_func op_52f0_3_ff; +extern cpuop_func op_53f0_3_nf; +extern cpuop_func op_53f0_3_ff; +extern cpuop_func op_54f0_3_nf; +extern cpuop_func op_54f0_3_ff; +extern cpuop_func op_55f0_3_nf; +extern cpuop_func op_55f0_3_ff; +extern cpuop_func op_56f0_3_nf; +extern cpuop_func op_56f0_3_ff; +extern cpuop_func op_57f0_3_nf; +extern cpuop_func op_57f0_3_ff; +extern cpuop_func op_58f0_3_nf; +extern cpuop_func op_58f0_3_ff; +extern cpuop_func op_59f0_3_nf; +extern cpuop_func op_59f0_3_ff; +extern cpuop_func op_5af0_3_nf; +extern cpuop_func op_5af0_3_ff; +extern cpuop_func op_5bf0_3_nf; +extern cpuop_func op_5bf0_3_ff; +extern cpuop_func op_5cf0_3_nf; +extern cpuop_func op_5cf0_3_ff; +extern cpuop_func op_5df0_3_nf; +extern cpuop_func op_5df0_3_ff; +extern cpuop_func op_5ef0_3_nf; +extern cpuop_func op_5ef0_3_ff; +extern cpuop_func op_5ff0_3_nf; +extern cpuop_func op_5ff0_3_ff; +extern cpuop_func op_60ff_3_nf; +extern cpuop_func op_60ff_3_ff; +extern cpuop_func op_62ff_3_nf; +extern cpuop_func op_62ff_3_ff; +extern cpuop_func op_63ff_3_nf; +extern cpuop_func op_63ff_3_ff; +extern cpuop_func op_64ff_3_nf; +extern cpuop_func op_64ff_3_ff; +extern cpuop_func op_65ff_3_nf; +extern cpuop_func op_65ff_3_ff; +extern cpuop_func op_66ff_3_nf; +extern cpuop_func op_66ff_3_ff; +extern cpuop_func op_67ff_3_nf; +extern cpuop_func op_67ff_3_ff; +extern cpuop_func op_68ff_3_nf; +extern cpuop_func op_68ff_3_ff; +extern cpuop_func op_69ff_3_nf; +extern cpuop_func op_69ff_3_ff; +extern cpuop_func op_6aff_3_nf; +extern cpuop_func op_6aff_3_ff; +extern cpuop_func op_6bff_3_nf; +extern cpuop_func op_6bff_3_ff; +extern cpuop_func op_6cff_3_nf; +extern cpuop_func op_6cff_3_ff; +extern cpuop_func op_6dff_3_nf; +extern cpuop_func op_6dff_3_ff; +extern cpuop_func op_6eff_3_nf; +extern cpuop_func op_6eff_3_ff; +extern cpuop_func op_6fff_3_nf; +extern cpuop_func op_6fff_3_ff; +extern cpuop_func op_8030_3_nf; +extern cpuop_func op_8030_3_ff; +extern cpuop_func op_803b_3_nf; +extern cpuop_func op_803b_3_ff; +extern cpuop_func op_8070_3_nf; +extern cpuop_func op_8070_3_ff; +extern cpuop_func op_807b_3_nf; +extern cpuop_func op_807b_3_ff; +extern cpuop_func op_80b0_3_nf; +extern cpuop_func op_80b0_3_ff; +extern cpuop_func op_80bb_3_nf; +extern cpuop_func op_80bb_3_ff; +extern cpuop_func op_80f0_3_nf; +extern cpuop_func op_80f0_3_ff; +extern cpuop_func op_80fb_3_nf; +extern cpuop_func op_80fb_3_ff; +extern cpuop_func op_8130_3_nf; +extern cpuop_func op_8130_3_ff; +extern cpuop_func op_8170_3_nf; +extern cpuop_func op_8170_3_ff; +extern cpuop_func op_81b0_3_nf; +extern cpuop_func op_81b0_3_ff; +extern cpuop_func op_81f0_3_nf; +extern cpuop_func op_81f0_3_ff; +extern cpuop_func op_81fb_3_nf; +extern cpuop_func op_81fb_3_ff; +extern cpuop_func op_9030_3_nf; +extern cpuop_func op_9030_3_ff; +extern cpuop_func op_903b_3_nf; +extern cpuop_func op_903b_3_ff; +extern cpuop_func op_9070_3_nf; +extern cpuop_func op_9070_3_ff; +extern cpuop_func op_907b_3_nf; +extern cpuop_func op_907b_3_ff; +extern cpuop_func op_90b0_3_nf; +extern cpuop_func op_90b0_3_ff; +extern cpuop_func op_90bb_3_nf; +extern cpuop_func op_90bb_3_ff; +extern cpuop_func op_90f0_3_nf; +extern cpuop_func op_90f0_3_ff; +extern cpuop_func op_90fb_3_nf; +extern cpuop_func op_90fb_3_ff; +extern cpuop_func op_9130_3_nf; +extern cpuop_func op_9130_3_ff; +extern cpuop_func op_9170_3_nf; +extern cpuop_func op_9170_3_ff; +extern cpuop_func op_91b0_3_nf; +extern cpuop_func op_91b0_3_ff; +extern cpuop_func op_91f0_3_nf; +extern cpuop_func op_91f0_3_ff; +extern cpuop_func op_91fb_3_nf; +extern cpuop_func op_91fb_3_ff; +extern cpuop_func op_b030_3_nf; +extern cpuop_func op_b030_3_ff; +extern cpuop_func op_b03b_3_nf; +extern cpuop_func op_b03b_3_ff; +extern cpuop_func op_b070_3_nf; +extern cpuop_func op_b070_3_ff; +extern cpuop_func op_b07b_3_nf; +extern cpuop_func op_b07b_3_ff; +extern cpuop_func op_b0b0_3_nf; +extern cpuop_func op_b0b0_3_ff; +extern cpuop_func op_b0bb_3_nf; +extern cpuop_func op_b0bb_3_ff; +extern cpuop_func op_b0f0_3_nf; +extern cpuop_func op_b0f0_3_ff; +extern cpuop_func op_b0fb_3_nf; +extern cpuop_func op_b0fb_3_ff; +extern cpuop_func op_b130_3_nf; +extern cpuop_func op_b130_3_ff; +extern cpuop_func op_b170_3_nf; +extern cpuop_func op_b170_3_ff; +extern cpuop_func op_b1b0_3_nf; +extern cpuop_func op_b1b0_3_ff; +extern cpuop_func op_b1f0_3_nf; +extern cpuop_func op_b1f0_3_ff; +extern cpuop_func op_b1fb_3_nf; +extern cpuop_func op_b1fb_3_ff; +extern cpuop_func op_c030_3_nf; +extern cpuop_func op_c030_3_ff; +extern cpuop_func op_c03b_3_nf; +extern cpuop_func op_c03b_3_ff; +extern cpuop_func op_c070_3_nf; +extern cpuop_func op_c070_3_ff; +extern cpuop_func op_c07b_3_nf; +extern cpuop_func op_c07b_3_ff; +extern cpuop_func op_c0b0_3_nf; +extern cpuop_func op_c0b0_3_ff; +extern cpuop_func op_c0bb_3_nf; +extern cpuop_func op_c0bb_3_ff; +extern cpuop_func op_c0f0_3_nf; +extern cpuop_func op_c0f0_3_ff; +extern cpuop_func op_c0fb_3_nf; +extern cpuop_func op_c0fb_3_ff; +extern cpuop_func op_c130_3_nf; +extern cpuop_func op_c130_3_ff; +extern cpuop_func op_c170_3_nf; +extern cpuop_func op_c170_3_ff; +extern cpuop_func op_c1b0_3_nf; +extern cpuop_func op_c1b0_3_ff; +extern cpuop_func op_c1f0_3_nf; +extern cpuop_func op_c1f0_3_ff; +extern cpuop_func op_c1fb_3_nf; +extern cpuop_func op_c1fb_3_ff; +extern cpuop_func op_d030_3_nf; +extern cpuop_func op_d030_3_ff; +extern cpuop_func op_d03b_3_nf; +extern cpuop_func op_d03b_3_ff; +extern cpuop_func op_d070_3_nf; +extern cpuop_func op_d070_3_ff; +extern cpuop_func op_d07b_3_nf; +extern cpuop_func op_d07b_3_ff; +extern cpuop_func op_d0b0_3_nf; +extern cpuop_func op_d0b0_3_ff; +extern cpuop_func op_d0bb_3_nf; +extern cpuop_func op_d0bb_3_ff; +extern cpuop_func op_d0f0_3_nf; +extern cpuop_func op_d0f0_3_ff; +extern cpuop_func op_d0fb_3_nf; +extern cpuop_func op_d0fb_3_ff; +extern cpuop_func op_d130_3_nf; +extern cpuop_func op_d130_3_ff; +extern cpuop_func op_d170_3_nf; +extern cpuop_func op_d170_3_ff; +extern cpuop_func op_d1b0_3_nf; +extern cpuop_func op_d1b0_3_ff; +extern cpuop_func op_d1f0_3_nf; +extern cpuop_func op_d1f0_3_ff; +extern cpuop_func op_d1fb_3_nf; +extern cpuop_func op_d1fb_3_ff; +extern cpuop_func op_e0f0_3_nf; +extern cpuop_func op_e0f0_3_ff; +extern cpuop_func op_e1f0_3_nf; +extern cpuop_func op_e1f0_3_ff; +extern cpuop_func op_e2f0_3_nf; +extern cpuop_func op_e2f0_3_ff; +extern cpuop_func op_e3f0_3_nf; +extern cpuop_func op_e3f0_3_ff; +extern cpuop_func op_e4f0_3_nf; +extern cpuop_func op_e4f0_3_ff; +extern cpuop_func op_e5f0_3_nf; +extern cpuop_func op_e5f0_3_ff; +extern cpuop_func op_e6f0_3_nf; +extern cpuop_func op_e6f0_3_ff; +extern cpuop_func op_e7f0_3_nf; +extern cpuop_func op_e7f0_3_ff; +extern cpuop_func op_40c0_4_nf; +extern cpuop_func op_40c0_4_ff; +extern cpuop_func op_40d0_4_nf; +extern cpuop_func op_40d0_4_ff; +extern cpuop_func op_40d8_4_nf; +extern cpuop_func op_40d8_4_ff; +extern cpuop_func op_40e0_4_nf; +extern cpuop_func op_40e0_4_ff; +extern cpuop_func op_40e8_4_nf; +extern cpuop_func op_40e8_4_ff; +extern cpuop_func op_40f0_4_nf; +extern cpuop_func op_40f0_4_ff; +extern cpuop_func op_40f8_4_nf; +extern cpuop_func op_40f8_4_ff; +extern cpuop_func op_40f9_4_nf; +extern cpuop_func op_40f9_4_ff; +extern cpuop_func op_4e73_4_nf; +extern cpuop_func op_4e73_4_ff; diff --git a/BasiliskII/src/uae_cpu/defs68k.c b/BasiliskII/src/uae_cpu/defs68k.c new file mode 100644 index 00000000..e3cfa982 --- /dev/null +++ b/BasiliskII/src/uae_cpu/defs68k.c @@ -0,0 +1,185 @@ +#include "sysdeps.h" +#include "readcpu.h" +struct instr_def defs68k[] = { +{ 60, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, 0, 16, "ORSR.B #1"}, +{ 124, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 2, { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, 4, 16, "ORSR.W #1"}, +{ 192, 8, {17,17,11,11,11,12,12,12,0,0,0,0,0,0,0,0}, 63936, 2, 0, { { 1, 1 }, { 1, 5 }, { 1, 0 }, { 1, 5 }, { 1, 0 } }, 4, 17, "CHK2.z #1,s[!Dreg,Areg,Aipi,Apdi,Immd]"}, +{ 0, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "OR.z #z,d[!Areg]"}, +{ 572, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, 0, 16, "ANDSR.B #1"}, +{ 636, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 2, { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, 4, 16, "ANDSR.W #1"}, +{ 512, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "AND.z #z,d[!Areg]"}, +{ 1024, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "SUB.z #z,d[!Areg]"}, +{ 1536, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ADD.z #z,d[!Areg]"}, +{ 1728, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 } }, 0, 16, "CALLM s[!Dreg,Areg,Aipi,Apdi,Immd]"}, +{ 1728, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 3, 16, "RTM s[Dreg,Areg]"}, +{ 2048, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 17, "BTST #1,s[!Areg]"}, +{ 2112, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 19, "BCHG #1,s[!Areg,Immd]"}, +{ 2176, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 19, "BCLR #1,s[!Areg,Immd]"}, +{ 2240, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 19, "BSET #1,s[!Areg,Immd]"}, +{ 2620, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, 0, 16, "EORSR.B #1"}, +{ 2684, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 2, { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, 4, 16, "EORSR.W #1"}, +{ 2560, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "EOR.z #z,d[!Areg]"}, +{ 3072, 8, {17,17,11,11,11,12,12,12,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 17, "CMP.z #z,s[!Areg,Immd]"}, +{ 2752, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "CAS.B #1,s[!Dreg,Areg,Immd,PC8r,PC16]"}, +{ 3264, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "CAS.W #1,s[!Dreg,Areg,Immd,PC8r,PC16]"}, +{ 3324, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 16, "CAS2.W #2"}, +{ 3584, 8, {17,17,11,11,11,12,12,12,0,0,0,0,0,0,0,0}, 65280, 2, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 19, "MOVES.z #1,s[!Dreg,Areg,Immd,PC8r,PC16]"}, +{ 3776, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "CAS.L #1,s[!Dreg,Areg,Immd,PC8r,PC16]"}, +{ 3836, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 16, "CAS2.L #2"}, +{ 256, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MVPMR.W d[Areg-Ad16],Dr"}, +{ 320, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MVPMR.L d[Areg-Ad16],Dr"}, +{ 384, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MVPRM.W Dr,d[Areg-Ad16]"}, +{ 448, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MVPRM.L Dr,d[Areg-Ad16]"}, +{ 256, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 17, "BTST Dr,s[!Areg]"}, +{ 320, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 19, "BCHG Dr,s[!Areg,Immd]"}, +{ 384, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 19, "BCLR Dr,s[!Areg,Immd]"}, +{ 448, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 19, "BSET Dr,s[!Areg,Immd]"}, +{ 4096, 12, {14,14,14,13,13,13,11,11,11,12,12,12,0,0,0,0}, 61440, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 18, "MOVE.B s,d[!Areg]"}, +{ 8192, 12, {14,14,14,13,13,13,11,11,11,12,12,12,0,0,0,0}, 61440, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MOVEA.L s,d[Areg]"}, +{ 8192, 12, {14,14,14,13,13,13,11,11,11,12,12,12,0,0,0,0}, 61440, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 18, "MOVE.L s,d[!Areg]"}, +{ 12288, 12, {14,14,14,13,13,13,11,11,11,12,12,12,0,0,0,0}, 61440, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MOVEA.W s,d[Areg]"}, +{ 12288, 12, {14,14,14,13,13,13,11,11,11,12,12,12,0,0,0,0}, 61440, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 18, "MOVE.W s,d[!Areg]"}, +{ 16384, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 0, 0 }, { 1, 4 }, { 0, 0 }, { 1, 4 }, { 1, 0 } }, 0, 48, "NEGX.z d[!Areg]"}, +{ 16576, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 1, { { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 } }, 4, 16, "MVSR2.W d[!Areg]"}, +{ 16896, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 2 }, { 1, 3 }, { 1, 2 }, { 1, 2 } }, 0, 32, "CLR.z d[!Areg]"}, +{ 17088, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 1, 0, { { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 } }, 0, 16, "MVSR2.B d[!Areg]"}, +{ 17408, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 48, "NEG.z d[!Areg]"}, +{ 17600, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 16, "MV2SR.B s[!Areg]"}, +{ 17920, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 48, "NOT.z d[!Areg]"}, +{ 18112, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 2, { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, 4, 16, "MV2SR.W s[!Areg]"}, +{ 18440, 3, {15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65528, 2, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 49, "LINK.L Ar,#2"}, +{ 18432, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 0, 0 }, { 1, 5 }, { 0, 0 }, { 1, 5 }, { 1, 0 } }, 0, 48, "NBCD.B d[!Areg]"}, +{ 18504, 3, {9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65528, 2, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 16, "BKPT #k"}, +{ 18496, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 48, "SWAP.W s[Dreg]"}, +{ 18496, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 0, "PEA.L s[!Dreg,Areg,Aipi,Apdi,Immd]"}, +{ 18560, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 48, "EXT.W d[Dreg]"}, +{ 18560, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 2, "MVMLE.W #1,d[!Dreg,Areg,Aipi]"}, +{ 18624, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 48, "EXT.L d[Dreg]"}, +{ 18624, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 2, "MVMLE.L #1,d[!Dreg,Areg,Aipi]"}, +{ 18880, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 48, "EXT.B d[Dreg]"}, +{ 18944, 8, {17,17,11,11,11,12,12,12,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 16, "TST.z s"}, +{ 19136, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 48, "TAS.B d[!Areg]"}, +{ 19196, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 0, "ILLEGAL"}, +{ 19456, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "MULL.L #1,s[!Areg]"}, +{ 19520, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 } }, 4, 19, "DIVL.L #1,s[!Areg]"}, +{ 19584, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 1, "MVMEL.W #1,s[!Dreg,Areg,Apdi,Immd]"}, +{ 19648, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 1, "MVMEL.L #1,s[!Dreg,Areg,Apdi,Immd]"}, +{ 20032, 4, {8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0}, 65520, 0, 0, { { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 } }, 0, 16, "TRAP #J"}, +{ 20048, 3, {15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65528, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 49, "LINK.W Ar,#1"}, +{ 20056, 3, {15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65528, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 48, "UNLK.L Ar"}, +{ 20064, 3, {15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65528, 0, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 16, "MVR2USP.L Ar"}, +{ 20072, 3, {15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65528, 0, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 32, "MVUSP2R.L Ar"}, +{ 20080, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 0, "RESET"}, +{ 20081, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 0, "NOP"}, +{ 20082, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 2, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 4, 16, "STOP #1"}, +{ 20083, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 2, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 7, 0, "RTE"}, +{ 20084, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 3, 16, "RTD #1"}, +{ 20085, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 3, 0, "RTS"}, +{ 20086, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 } }, 4, 0, "TRAPV"}, +{ 20087, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 3, 0, "RTR"}, +{ 20090, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 1, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 16, "MOVEC2 #1"}, +{ 20091, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 1, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 16, "MOVE2C #1"}, +{ 20096, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 2, 128, "JSR.L s[!Dreg,Areg,Aipi,Apdi,Immd]"}, +{ 16640, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 5 }, { 1, 5 }, { 1, 5 } }, 4, 17, "CHK.L s[!Areg],Dr"}, +{ 16768, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 5 }, { 1, 5 }, { 1, 5 } }, 4, 17, "CHK.W s[!Areg],Dr"}, +{ 20160, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 2, 128, "JMP.L s[!Dreg,Areg,Aipi,Apdi,Immd]"}, +{ 16832, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 2, "LEA.L s[!Dreg,Areg,Aipi,Apdi,Immd],Ar"}, +{ 20544, 9, {7,7,7,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "ADDA.W #j,d[Areg]"}, +{ 20608, 9, {7,7,7,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "ADDA.L #j,d[Areg]"}, +{ 20480, 11, {7,7,7,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ADD.z #j,d[!Areg]"}, +{ 20800, 9, {7,7,7,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "SUBA.W #j,d[Areg]"}, +{ 20864, 9, {7,7,7,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "SUBA.L #j,d[Areg]"}, +{ 20736, 11, {7,7,7,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "SUB.z #j,d[!Areg]"}, +{ 20680, 7, {2,2,2,2,15,15,15,0,0,0,0,0,0,0,0,0}, 61688, 0, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 1, 49, "DBcc.W Dr,#1"}, +{ 20672, 10, {2,2,2,2,13,13,13,14,14,14,0,0,0,0,0,0}, 61632, 0, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 0, 32, "Scc.B d[!Areg]"}, +{ 20730, 4, {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0}, 61695, 2, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 4, 16, "TRAPcc #1"}, +{ 20731, 4, {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0}, 61695, 2, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 4, 16, "TRAPcc #2"}, +{ 20732, 4, {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0}, 61695, 2, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 4, 0, "TRAPcc"}, +{ 24832, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 1, 64, "BSR.W #1"}, +{ 24832, 8, {6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 1, 64, "BSR.B #i"}, +{ 25087, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 1, 64, "BSR.L #2"}, +{ 24576, 4, {3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0}, 61695, 0, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 1, 64, "Bcc.W #1"}, +{ 24576, 12, {3,3,3,3,6,6,6,6,6,6,6,6,0,0,0,0}, 61440, 0, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 1, 64, "Bcc.B #i"}, +{ 24831, 4, {3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0}, 61695, 0, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 1, 64, "Bcc.L #2"}, +{ 28672, 11, {15,15,15,5,5,5,5,5,5,5,5,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 18, "MOVE.L #i,Dr"}, +{ 32768, 11, {15,15,15,17,17,11,11,11,12,12,12,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "OR.z s[!Areg],Dr"}, +{ 32960, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 } }, 4, 19, "DIVU.W s[!Areg],Dr"}, +{ 33024, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 0, 0 }, { 1, 4 }, { 0, 0 }, { 1, 4 }, { 1, 0 } }, 0, 19, "SBCD.B d[Dreg],Dr"}, +{ 33024, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 0, 0 }, { 1, 4 }, { 0, 0 }, { 1, 4 }, { 1, 0 } }, 0, 19, "SBCD.B d[Areg-Apdi],Arp"}, +{ 33024, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "OR.z Dr,d[!Areg,Dreg]"}, +{ 33088, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 2, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "PACK d[Dreg],Dr"}, +{ 33088, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 2, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "PACK d[Areg-Apdi],Arp"}, +{ 33152, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 2, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "UNPK d[Dreg],Dr"}, +{ 33152, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 2, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "UNPK d[Areg-Apdi],Arp"}, +{ 33216, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 } }, 4, 19, "DIVS.W s[!Areg],Dr"}, +{ 36864, 11, {15,15,15,17,17,11,11,11,12,12,12,0,0,0,0,0}, 61696, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "SUB.z s,Dr"}, +{ 37056, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "SUBA.W s,Ar"}, +{ 37120, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 0, 0 }, { 1, 0 }, { 0, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "SUBX.z d[Dreg],Dr"}, +{ 37120, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 0, 0 }, { 1, 0 }, { 0, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "SUBX.z d[Areg-Apdi],Arp"}, +{ 37120, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "SUB.z Dr,d[!Areg,Dreg]"}, +{ 37312, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "SUBA.L s,Ar"}, +{ 45056, 11, {15,15,15,17,17,11,11,11,12,12,12,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 17, "CMP.z s,Dr"}, +{ 45248, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 17, "CMPA.W s,Ar"}, +{ 45504, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 17, "CMPA.L s,Ar"}, +{ 45312, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 17, "CMPM.z d[Areg-Aipi],ArP"}, +{ 45312, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "EOR.z Dr,d[!Areg]"}, +{ 49152, 11, {15,15,15,17,17,11,11,11,12,12,12,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "AND.z s[!Areg],Dr"}, +{ 49344, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "MULU.W s[!Areg],Dr"}, +{ 49408, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 0, 0 }, { 1, 4 }, { 0, 0 }, { 1, 4 }, { 1, 0 } }, 0, 19, "ABCD.B d[Dreg],Dr"}, +{ 49408, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 0, 0 }, { 1, 4 }, { 0, 0 }, { 1, 4 }, { 1, 0 } }, 0, 19, "ABCD.B d[Areg-Apdi],Arp"}, +{ 49408, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "AND.z Dr,d[!Areg,Dreg]"}, +{ 49472, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 51, "EXG.L Dr,d[Dreg]"}, +{ 49472, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 51, "EXG.L Ar,d[Areg]"}, +{ 49536, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 51, "EXG.L Dr,d[Areg]"}, +{ 49600, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "MULS.W s[!Areg],Dr"}, +{ 53248, 11, {15,15,15,17,17,11,11,11,12,12,12,0,0,0,0,0}, 61696, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ADD.z s,Dr"}, +{ 53440, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "ADDA.W s,Ar"}, +{ 53504, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 0, 0 }, { 1, 0 }, { 0, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ADDX.z d[Dreg],Dr"}, +{ 53504, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 0, 0 }, { 1, 0 }, { 0, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ADDX.z d[Areg-Apdi],Arp"}, +{ 53504, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ADD.z Dr,d[!Areg,Dreg]"}, +{ 53696, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "ADDA.L s,Ar"}, +{ 57344, 9, {7,7,7,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ASf.z #j,DR"}, +{ 57352, 9, {7,7,7,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "LSf.z #j,DR"}, +{ 57360, 9, {7,7,7,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 0, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "ROXf.z #j,DR"}, +{ 57368, 9, {7,7,7,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "ROf.z #j,DR"}, +{ 57376, 9, {15,15,15,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ASf.z Dr,DR"}, +{ 57384, 9, {15,15,15,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "LSf.z Dr,DR"}, +{ 57392, 9, {15,15,15,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 0, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "ROXf.z Dr,DR"}, +{ 57400, 9, {15,15,15,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "ROf.z Dr,DR"}, +{ 57536, 7, {4,13,13,13,14,14,14,0,0,0,0,0,0,0,0,0}, 65216, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ASfW.W d[!Dreg,Areg]"}, +{ 58048, 7, {4,13,13,13,14,14,14,0,0,0,0,0,0,0,0,0}, 65216, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "LSfW.W d[!Dreg,Areg]"}, +{ 58560, 7, {4,13,13,13,14,14,14,0,0,0,0,0,0,0,0,0}, 65216, 0, 0, { { 0, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "ROXfW.W d[!Dreg,Areg]"}, +{ 59072, 7, {4,13,13,13,14,14,14,0,0,0,0,0,0,0,0,0}, 65216, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "ROfW.W d[!Dreg,Areg]"}, +{ 59584, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 17, "BFTST #1,s[!Areg,Apdi,Aipi,Immd]"}, +{ 59840, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 17, "BFEXTU #1,s[!Areg,Apdi,Aipi,Immd]"}, +{ 60096, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "BFCHG #1,s[!Areg,Apdi,Aipi,Immd,PC8r,PC16]"}, +{ 60352, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 17, "BFEXTS #1,s[!Areg,Apdi,Aipi,Immd]"}, +{ 60608, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "BFCLR #1,s[!Areg,Apdi,Aipi,Immd,PC8r,PC16]"}, +{ 60864, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 17, "BFFFO #1,s[!Areg,Apdi,Aipi,Immd]"}, +{ 61120, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "BFSET #1,s[!Areg,Apdi,Aipi,Immd,PC8r,PC16]"}, +{ 61376, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "BFINS #1,s[!Areg,Apdi,Aipi,Immd,PC8r,PC16]"}, +{ 61952, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 17, "FPP #1,s"}, +{ 62016, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 1, 17, "FDBcc #1,s[Areg-Dreg]"}, +{ 62016, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 17, "FScc #1,s[!Areg,Immd,PC8r,PC16]"}, +{ 62074, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 16, "FTRAPcc #1"}, +{ 62075, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 16, "FTRAPcc #2"}, +{ 62076, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 0, "FTRAPcc"}, +{ 62080, 6, {10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0}, 65472, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 1, 17, "FBcc #K,#1"}, +{ 62144, 6, {10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0}, 65472, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 1, 17, "FBcc #K,#2"}, +{ 62208, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 3, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 32, "FSAVE s[!Dreg,Areg,Aipi,Immd,PC8r,PC16]"}, +{ 62272, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 3, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 16, "FRESTORE s[!Dreg,Areg,Apdi,Immd]"}, +{ 62720, 8, {5,5,5,5,5,12,12,12,0,0,0,0,0,0,0,0}, 65280, 4, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 17, "MMUOP #i,s"}, +{ 62472, 5, {19,19,15,15,15,0,0,0,0,0,0,0,0,0,0,0}, 65336, 4, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 2, "CINVL #p,Ar"}, +{ 62480, 5, {19,19,15,15,15,0,0,0,0,0,0,0,0,0,0,0}, 65336, 4, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 2, "CINVP #p,Ar"}, +{ 62488, 5, {19,19,15,15,15,0,0,0,0,0,0,0,0,0,0,0}, 65336, 4, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 0, "CINVA #p"}, +{ 62504, 5, {19,19,15,15,15,0,0,0,0,0,0,0,0,0,0,0}, 65336, 4, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 2, "CPUSHL #p,Ar"}, +{ 62512, 5, {19,19,15,15,15,0,0,0,0,0,0,0,0,0,0,0}, 65336, 4, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 2, "CPUSHP #p,Ar"}, +{ 62520, 5, {19,19,15,15,15,0,0,0,0,0,0,0,0,0,0,0}, 65336, 4, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 0, "CPUSHA #p"}, +{ 63008, 3, {15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65528, 4, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MOVE16 ArP,AxP"}, +{ 62976, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 4, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MOVE16 s[Dreg-Aipi],L"}, +{ 62976, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 4, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MOVE16 L,d[Areg-Aipi]"}, +{ 62976, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 4, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MOVE16 s[Aind],L"}, +{ 62976, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 4, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MOVE16 L,d[Aipi-Aind]"}, +{ 28928, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 3, 0, "EMULOP_RETURN"}, +{ 28928, 8, {18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 2, 16, "EMULOP #E"}}; +int n_defs68k = 181; diff --git a/BasiliskII/src/uae_cpu/gencpu.c b/BasiliskII/src/uae_cpu/gencpu.c index 1653adab..5045dffd 100644 --- a/BasiliskII/src/uae_cpu/gencpu.c +++ b/BasiliskII/src/uae_cpu/gencpu.c @@ -2189,14 +2189,14 @@ static void gen_opcode (unsigned long int opcode) case i_CINVA: /* gb-- srcreg now contains the cache field */ printf ("\tif (srcreg&0x2)\n"); - printf ("\t\tflush_icache(%d);\n", 30 + ((opcode >> 3) & 3)); + printf ("\t\tflush_icache(%d);\n", (int)(30 + ((opcode >> 3) & 3))); break; case i_CPUSHL: case i_CPUSHP: case i_CPUSHA: /* gb-- srcreg now contains the cache field */ printf ("\tif (srcreg&0x2)\n"); - printf ("\t\tflush_icache(%d);\n", 40 + ((opcode >> 3) & 3)); + printf ("\t\tflush_icache(%d);\n", (int)(40 + ((opcode >> 3) & 3))); break; case i_MOVE16: if ((opcode & 0xfff8) == 0xf620) { diff --git a/BasiliskII/src/uae_cpu/osx_generate_files.sh b/BasiliskII/src/uae_cpu/osx_generate_files.sh new file mode 100755 index 00000000..3f6da3ce --- /dev/null +++ b/BasiliskII/src/uae_cpu/osx_generate_files.sh @@ -0,0 +1,22 @@ +#!/bin/bash -e + +# +# osx_generate_files.sh +# +# Generates files for 68k emulation, via UAE's virtual cpu, for use on Mac OS X hosts +# + +SCRIPT_DIRNAME="$(cd $(dirname $0) && pwd)" +cd "$SCRIPT_DIRNAME" + +echo "build68k: compiling" +clang build68k.c -o build68k -I ../MacOSX/ -I ../Unix/ + +echo "build68k: running" +cat table68k | ./build68k > ./defs68k.c + +echo "gencpu: compiling" +clang gencpu.c ./defs68k.c readcpu.cpp -o gencpu -I . -I ../MacOSX/ -I ../Unix/ + +echo "gencpu: running" +./gencpu diff --git a/BasiliskII/src/video.cpp b/BasiliskII/src/video.cpp index 8f84f48d..3b46864e 100644 --- a/BasiliskII/src/video.cpp +++ b/BasiliskII/src/video.cpp @@ -48,6 +48,23 @@ uint8 monitor_desc::next_slot_id = 0x80; vector VideoMonitors; +/* + * Converts a video_depth to a C-String name ("VDEPTH_1BIT", "VDEPTH_2BIT", etc.) + */ +const char * NameOfDepth(video_depth depth) +{ + switch (depth) { + case VDEPTH_1BIT: return "VDEPTH_1BIT"; + case VDEPTH_2BIT: return "VDEPTH_2BIT"; + case VDEPTH_4BIT: return "VDEPTH_4BIT"; + case VDEPTH_8BIT: return "VDEPTH_8BIT"; + case VDEPTH_16BIT: return "VDEPTH_16BIT"; + case VDEPTH_32BIT: return "VDEPTH_32BIT"; + } + return ""; +} + + /* * Find palette size for given color depth */ From cb982ee2edacbb1714a218515558f7b3e43e946d Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 22 Jul 2017 20:29:30 -0400 Subject: [PATCH 02/85] use SDL 2.0.5+, rather than SDL 1.x This change may end up being a bit slower on some systems, as the SDL backend will now render its content to two, new, SDL_Surfaces: one of which is in the guest OS' resolution, the other of which is application defined. SDL2's SDL_Render API is used, which exposes some rudimentary elements of GPU + texture-based programming. Basilisk II now maintains a single 'SDL_Texture' object, which is an SDL representation of a GPU texture. The 'outer' surface will be used to update this texture, as requests to redraw are made. TODO: look into removing the 'outer' SDL surface, and see if we can just copy the 'inner' surface to the SDL_Texture. TODO: the entire SDL_Texture is updated, any time a request is made to draw. Look into minimizing this a bit. --- .../BasiliskII.xcodeproj/project.pbxproj | 40 +- BasiliskII/src/SDL/SDLMain.h | 16 - BasiliskII/src/SDL/SDLMain.m | 381 ----------------- BasiliskII/src/SDL/audio_sdl.cpp | 4 +- BasiliskII/src/SDL/video_sdl.cpp | 382 +++++++++++++----- BasiliskII/src/Unix/main_unix.cpp | 1 + 6 files changed, 305 insertions(+), 519 deletions(-) delete mode 100644 BasiliskII/src/SDL/SDLMain.h delete mode 100644 BasiliskII/src/SDL/SDLMain.m diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index 02e9485d..3069555a 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -7,6 +7,10 @@ objects = { /* Begin PBXBuildFile section */ + 752F26F11F240140001032B4 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7539E1E51F23B288006B2DF2 /* SDL2.framework */; }; + 752F26F21F240140001032B4 /* SDL2.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7539E1E51F23B288006B2DF2 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 752F26F91F240E51001032B4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F26F81F240E51001032B4 /* Foundation.framework */; }; + 752F26FB1F240E69001032B4 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F26FA1F240E69001032B4 /* IOKit.framework */; }; 7539DFBF1F23B17E006B2DF2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7539DFBE1F23B17E006B2DF2 /* Assets.xcassets */; }; 7539E1251F23B25A006B2DF2 /* adb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFC91F23B25A006B2DF2 /* adb.cpp */; }; 7539E1261F23B25A006B2DF2 /* audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFCA1F23B25A006B2DF2 /* audio.cpp */; }; @@ -35,7 +39,6 @@ 7539E1731F23B25A006B2DF2 /* scsi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0701F23B25A006B2DF2 /* scsi.cpp */; }; 7539E1741F23B25A006B2DF2 /* audio_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0721F23B25A006B2DF2 /* audio_sdl.cpp */; }; 7539E1751F23B25A006B2DF2 /* keycodes in Resources */ = {isa = PBXBuildFile; fileRef = 7539E0731F23B25A006B2DF2 /* keycodes */; }; - 7539E1761F23B25A006B2DF2 /* SDLMain.m in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0751F23B25A006B2DF2 /* SDLMain.m */; }; 7539E1771F23B25A006B2DF2 /* video_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0761F23B25A006B2DF2 /* video_sdl.cpp */; }; 7539E1781F23B25A006B2DF2 /* serial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0771F23B25A006B2DF2 /* serial.cpp */; }; 7539E18D1F23B25A006B2DF2 /* slot_rom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0A21F23B25A006B2DF2 /* slot_rom.cpp */; }; @@ -79,8 +82,6 @@ 7539E26F1F23B32A006B2DF2 /* timer_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2301F23B32A006B2DF2 /* timer_unix.cpp */; }; 7539E2701F23B32A006B2DF2 /* tinyxml2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2311F23B32A006B2DF2 /* tinyxml2.cpp */; }; 7539E2711F23B32A006B2DF2 /* tunconfig in Resources */ = {isa = PBXBuildFile; fileRef = 7539E2331F23B32A006B2DF2 /* tunconfig */; }; - 7539E27B1F23B488006B2DF2 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7539E2771F23B469006B2DF2 /* SDL.framework */; }; - 7539E27C1F23B488006B2DF2 /* SDL.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7539E2771F23B469006B2DF2 /* SDL.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 7539E2801F23C4CA006B2DF2 /* main_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E27F1F23C4CA006B2DF2 /* main_unix.cpp */; }; 7539E28E1F23C56F006B2DF2 /* clip_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2851F23C56F006B2DF2 /* clip_dummy.cpp */; }; 7539E28F1F23C56F006B2DF2 /* ether_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2861F23C56F006B2DF2 /* ether_dummy.cpp */; }; @@ -102,13 +103,13 @@ /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ - 7539E27D1F23B489006B2DF2 /* Embed Frameworks */ = { + 752F26F31F240140001032B4 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( - 7539E27C1F23B488006B2DF2 /* SDL.framework in Embed Frameworks */, + 752F26F21F240140001032B4 /* SDL2.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -116,6 +117,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 752F26F81F240E51001032B4 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 752F26FA1F240E69001032B4 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 7539DFB21F23B17E006B2DF2 /* BasiliskII.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BasiliskII.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7539DFBE1F23B17E006B2DF2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 7539DFC91F23B25A006B2DF2 /* adb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = adb.cpp; path = ../adb.cpp; sourceTree = ""; }; @@ -182,8 +185,6 @@ 7539E0701F23B25A006B2DF2 /* scsi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = scsi.cpp; path = ../scsi.cpp; sourceTree = ""; }; 7539E0721F23B25A006B2DF2 /* audio_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audio_sdl.cpp; sourceTree = ""; }; 7539E0731F23B25A006B2DF2 /* keycodes */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = keycodes; sourceTree = ""; }; - 7539E0741F23B25A006B2DF2 /* SDLMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLMain.h; sourceTree = ""; }; - 7539E0751F23B25A006B2DF2 /* SDLMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLMain.m; sourceTree = ""; }; 7539E0761F23B25A006B2DF2 /* video_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = video_sdl.cpp; sourceTree = ""; }; 7539E0771F23B25A006B2DF2 /* serial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = serial.cpp; path = ../serial.cpp; sourceTree = ""; }; 7539E0A21F23B25A006B2DF2 /* slot_rom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = slot_rom.cpp; path = ../slot_rom.cpp; sourceTree = ""; }; @@ -258,7 +259,6 @@ 7539E2321F23B32A006B2DF2 /* tinyxml2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tinyxml2.h; sourceTree = ""; }; 7539E2331F23B32A006B2DF2 /* tunconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = tunconfig; sourceTree = ""; }; 7539E2351F23B32A006B2DF2 /* user_strings_unix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = user_strings_unix.h; sourceTree = ""; }; - 7539E2771F23B469006B2DF2 /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = /Library/Frameworks/SDL.framework; sourceTree = ""; }; 7539E27E1F23BEB4006B2DF2 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; }; 7539E27F1F23C4CA006B2DF2 /* main_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main_unix.cpp; sourceTree = ""; }; 7539E2851F23C56F006B2DF2 /* clip_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = clip_dummy.cpp; sourceTree = ""; }; @@ -285,21 +285,32 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7539E27B1F23B488006B2DF2 /* SDL.framework in Frameworks */, + 752F26FB1F240E69001032B4 /* IOKit.framework in Frameworks */, + 752F26F91F240E51001032B4 /* Foundation.framework in Frameworks */, + 752F26F11F240140001032B4 /* SDL2.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 752F26F71F240E51001032B4 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 752F26FA1F240E69001032B4 /* IOKit.framework */, + 752F26F81F240E51001032B4 /* Foundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 7539DFA91F23B17E006B2DF2 = { isa = PBXGroup; children = ( 7539E1E41F23B25E006B2DF2 /* src */, 7539DFB41F23B17E006B2DF2 /* Assets */, 7539DFB31F23B17E006B2DF2 /* Products */, - 7539E2771F23B469006B2DF2 /* SDL.framework */, 7539E1E51F23B288006B2DF2 /* SDL2.framework */, + 752F26F71F240E51001032B4 /* Frameworks */, ); sourceTree = ""; }; @@ -403,8 +414,6 @@ children = ( 7539E0721F23B25A006B2DF2 /* audio_sdl.cpp */, 7539E0731F23B25A006B2DF2 /* keycodes */, - 7539E0741F23B25A006B2DF2 /* SDLMain.h */, - 7539E0751F23B25A006B2DF2 /* SDLMain.m */, 7539E0761F23B25A006B2DF2 /* video_sdl.cpp */, ); name = SDL; @@ -602,7 +611,7 @@ 7539DFAE1F23B17E006B2DF2 /* Sources */, 7539DFAF1F23B17E006B2DF2 /* Frameworks */, 7539DFB01F23B17E006B2DF2 /* Resources */, - 7539E27D1F23B489006B2DF2 /* Embed Frameworks */, + 752F26F31F240140001032B4 /* Embed Frameworks */, ); buildRules = ( ); @@ -710,7 +719,6 @@ 7539E2A71F23CB9B006B2DF2 /* cpustbl_nf.cpp in Sources */, 7539E1711F23B25A006B2DF2 /* rom_patches.cpp in Sources */, 7539E1281F23B25A006B2DF2 /* sigsegv.cpp in Sources */, - 7539E1761F23B25A006B2DF2 /* SDLMain.m in Sources */, 7539E1A21F23B25A006B2DF2 /* readcpu.cpp in Sources */, 7539E2701F23B32A006B2DF2 /* tinyxml2.cpp in Sources */, 7539E28F1F23C56F006B2DF2 /* ether_dummy.cpp in Sources */, @@ -816,7 +824,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL.framework/Headers, + /Library/Frameworks/SDL2.framework/Headers, ../UNIX, ../include, ., @@ -865,7 +873,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL.framework/Headers, + /Library/Frameworks/SDL2.framework/Headers, ../UNIX, ../include, ., diff --git a/BasiliskII/src/SDL/SDLMain.h b/BasiliskII/src/SDL/SDLMain.h deleted file mode 100644 index c56d90cb..00000000 --- a/BasiliskII/src/SDL/SDLMain.h +++ /dev/null @@ -1,16 +0,0 @@ -/* SDLMain.m - main entry point for our Cocoa-ized SDL app - Initial Version: Darrell Walisser - Non-NIB-Code & other changes: Max Horn - - Feel free to customize this file to suit your needs -*/ - -#ifndef _SDLMain_h_ -#define _SDLMain_h_ - -#import - -@interface SDLMain : NSObject -@end - -#endif /* _SDLMain_h_ */ diff --git a/BasiliskII/src/SDL/SDLMain.m b/BasiliskII/src/SDL/SDLMain.m deleted file mode 100644 index 0f23664d..00000000 --- a/BasiliskII/src/SDL/SDLMain.m +++ /dev/null @@ -1,381 +0,0 @@ -/* SDLMain.m - main entry point for our Cocoa-ized SDL app - Initial Version: Darrell Walisser - Non-NIB-Code & other changes: Max Horn - - Feel free to customize this file to suit your needs -*/ - -#include "SDL.h" -#include "SDLMain.h" -#include /* for MAXPATHLEN */ -#include - -/* For some reaon, Apple removed setAppleMenu from the headers in 10.4, - but the method still is there and works. To avoid warnings, we declare - it ourselves here. */ -@interface NSApplication(SDL_Missing_Methods) -- (void)setAppleMenu:(NSMenu *)menu; -@end - -/* Use this flag to determine whether we use SDLMain.nib or not */ -#define SDL_USE_NIB_FILE 0 - -/* Use this flag to determine whether we use CPS (docking) or not */ -#define SDL_USE_CPS 1 -#ifdef SDL_USE_CPS -/* Portions of CPS.h */ -typedef struct CPSProcessSerNum -{ - UInt32 lo; - UInt32 hi; -} CPSProcessSerNum; - -extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn); -extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5); -extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn); - -#endif /* SDL_USE_CPS */ - -static int gArgc; -static char **gArgv; -static BOOL gFinderLaunch; -static BOOL gCalledAppMainline = FALSE; - -static NSString *getApplicationName(void) -{ - const NSDictionary *dict; - NSString *appName = 0; - - /* Determine the application name */ - dict = (const NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle()); - if (dict) - appName = [dict objectForKey: @"CFBundleName"]; - - if (![appName length]) - appName = [[NSProcessInfo processInfo] processName]; - - return appName; -} - -#if SDL_USE_NIB_FILE -/* A helper category for NSString */ -@interface NSString (ReplaceSubString) -- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString; -@end -#endif - -@interface NSApplication (SDLApplication) -@end - -@implementation NSApplication (SDLApplication) -/* Invoked from the Quit menu item */ -- (void)terminate:(id)sender -{ - /* Post a SDL_QUIT event */ - SDL_Event event; - event.type = SDL_QUIT; - SDL_PushEvent(&event); -} -@end - -/* The main class of the application, the application's delegate */ -@implementation SDLMain - -/* Set the working directory to the .app's parent directory */ -- (void) setupWorkingDirectory:(BOOL)shouldChdir -{ - if (shouldChdir) - { - char parentdir[MAXPATHLEN]; - CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); - CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url); - if (CFURLGetFileSystemRepresentation(url2, 1, (UInt8 *)parentdir, MAXPATHLEN)) { - chdir(parentdir); /* chdir to the binary app's parent */ - } - CFRelease(url); - CFRelease(url2); - } -} - -#if SDL_USE_NIB_FILE - -/* Fix menu to contain the real app name instead of "SDL App" */ -- (void)fixMenu:(NSMenu *)aMenu withAppName:(NSString *)appName -{ - NSRange aRange; - NSEnumerator *enumerator; - NSMenuItem *menuItem; - - aRange = [[aMenu title] rangeOfString:@"SDL App"]; - if (aRange.length != 0) - [aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]]; - - enumerator = [[aMenu itemArray] objectEnumerator]; - while ((menuItem = [enumerator nextObject])) - { - aRange = [[menuItem title] rangeOfString:@"SDL App"]; - if (aRange.length != 0) - [menuItem setTitle: [[menuItem title] stringByReplacingRange:aRange with:appName]]; - if ([menuItem hasSubmenu]) - [self fixMenu:[menuItem submenu] withAppName:appName]; - } -} - -#else - -static void setApplicationMenu(void) -{ - /* warning: this code is very odd */ - NSMenu *appleMenu; - NSMenuItem *menuItem; - NSString *title; - NSString *appName; - - appName = getApplicationName(); - appleMenu = [[NSMenu alloc] initWithTitle:@""]; - - /* Add menu items */ - title = [@"About " stringByAppendingString:appName]; - [appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""]; - - [appleMenu addItem:[NSMenuItem separatorItem]]; - - title = [@"Hide " stringByAppendingString:appName]; - [appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"]; - - menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"]; - [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)]; - - [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""]; - - [appleMenu addItem:[NSMenuItem separatorItem]]; - - title = [@"Quit " stringByAppendingString:appName]; - [appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"]; - - - /* Put menu into the menubar */ - menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]; - [menuItem setSubmenu:appleMenu]; - [[NSApp mainMenu] addItem:menuItem]; - - /* Tell the application object that this is now the application menu */ - [NSApp setAppleMenu:appleMenu]; - - /* Finally give up our references to the objects */ - [appleMenu release]; - [menuItem release]; -} - -/* Create a window menu */ -static void setupWindowMenu(void) -{ - NSMenu *windowMenu; - NSMenuItem *windowMenuItem; - NSMenuItem *menuItem; - - windowMenu = [[NSMenu alloc] initWithTitle:@"Window"]; - - /* "Minimize" item */ - menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"]; - [windowMenu addItem:menuItem]; - [menuItem release]; - - /* Put menu into the menubar */ - windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""]; - [windowMenuItem setSubmenu:windowMenu]; - [[NSApp mainMenu] addItem:windowMenuItem]; - - /* Tell the application object that this is now the window menu */ - [NSApp setWindowsMenu:windowMenu]; - - /* Finally give up our references to the objects */ - [windowMenu release]; - [windowMenuItem release]; -} - -/* Replacement for NSApplicationMain */ -static void CustomApplicationMain (int argc, char **argv) -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - SDLMain *sdlMain; - - /* Ensure the application object is initialised */ - [NSApplication sharedApplication]; - -#ifdef SDL_USE_CPS - { - CPSProcessSerNum PSN; - /* Tell the dock about us */ - if (!CPSGetCurrentProcess(&PSN)) - if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103)) - if (!CPSSetFrontProcess(&PSN)) - [NSApplication sharedApplication]; - } -#endif /* SDL_USE_CPS */ - - /* Set up the menubar */ - [NSApp setMainMenu:[[[NSMenu alloc] init] autorelease]]; - setApplicationMenu(); - setupWindowMenu(); - - /* Create SDLMain and make it the app delegate */ - sdlMain = [[SDLMain alloc] init]; - [NSApp setDelegate:sdlMain]; - - /* Start the main event loop */ - [NSApp run]; - - [sdlMain release]; - [pool release]; -} - -#endif - - -/* - * Catch document open requests...this lets us notice files when the app - * was launched by double-clicking a document, or when a document was - * dragged/dropped on the app's icon. You need to have a - * CFBundleDocumentsType section in your Info.plist to get this message, - * apparently. - * - * Files are added to gArgv, so to the app, they'll look like command line - * arguments. Previously, apps launched from the finder had nothing but - * an argv[0]. - * - * This message may be received multiple times to open several docs on launch. - * - * This message is ignored once the app's mainline has been called. - */ -- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename -{ - const char *temparg; - size_t arglen; - char *arg; - char **newargv; - - if (!gFinderLaunch) /* MacOS is passing command line args. */ - return FALSE; - - if (gCalledAppMainline) /* app has started, ignore this document. */ - return FALSE; - - temparg = [filename UTF8String]; - arglen = SDL_strlen(temparg) + 1; - arg = (char *) SDL_malloc(arglen); - if (arg == NULL) - return FALSE; - - newargv = (char **) realloc(gArgv, sizeof (char *) * (gArgc + 2)); - if (newargv == NULL) - { - SDL_free(arg); - return FALSE; - } - gArgv = newargv; - - SDL_strlcpy(arg, temparg, arglen); - gArgv[gArgc++] = arg; - gArgv[gArgc] = NULL; - return TRUE; -} - - -/* Called when the internal event loop has just started running */ -- (void) applicationDidFinishLaunching: (NSNotification *) note -{ - int status; - - /* Set the working directory to the .app's parent directory */ - [self setupWorkingDirectory:gFinderLaunch]; - -#if SDL_USE_NIB_FILE - /* Set the main menu to contain the real app name instead of "SDL App" */ - [self fixMenu:[NSApp mainMenu] withAppName:getApplicationName()]; -#endif - - /* Hand off to main application code */ - gCalledAppMainline = TRUE; - status = SDL_main (gArgc, gArgv); - - /* We're done, thank you for playing */ - exit(status); -} -@end - - -@implementation NSString (ReplaceSubString) - -- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString -{ - unsigned int bufferSize; - unsigned int selfLen = [self length]; - unsigned int aStringLen = [aString length]; - unichar *buffer; - NSRange localRange; - NSString *result; - - bufferSize = selfLen + aStringLen - aRange.length; - buffer = (unichar *)NSAllocateMemoryPages(bufferSize*sizeof(unichar)); - - /* Get first part into buffer */ - localRange.location = 0; - localRange.length = aRange.location; - [self getCharacters:buffer range:localRange]; - - /* Get middle part into buffer */ - localRange.location = 0; - localRange.length = aStringLen; - [aString getCharacters:(buffer+aRange.location) range:localRange]; - - /* Get last part into buffer */ - localRange.location = aRange.location + aRange.length; - localRange.length = selfLen - localRange.location; - [self getCharacters:(buffer+aRange.location+aStringLen) range:localRange]; - - /* Build output string */ - result = [NSString stringWithCharacters:buffer length:bufferSize]; - - NSDeallocateMemoryPages(buffer, bufferSize); - - return result; -} - -@end - - - -#ifdef main -# undef main -#endif - - -/* Main entry point to executable - should *not* be SDL_main! */ -int main (int argc, char **argv) -{ - /* Copy the arguments into a global variable */ - /* This is passed if we are launched by double-clicking */ - if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) { - gArgv = (char **) SDL_malloc(sizeof (char *) * 2); - gArgv[0] = argv[0]; - gArgv[1] = NULL; - gArgc = 1; - gFinderLaunch = YES; - } else { - int i; - gArgc = argc; - gArgv = (char **) SDL_malloc(sizeof (char *) * (argc+1)); - for (i = 0; i <= argc; i++) - gArgv[i] = argv[i]; - gFinderLaunch = NO; - } - -#if SDL_USE_NIB_FILE - NSApplicationMain (argc, argv); -#else - CustomApplicationMain (argc, argv); -#endif - return 0; -} - diff --git a/BasiliskII/src/SDL/audio_sdl.cpp b/BasiliskII/src/SDL/audio_sdl.cpp index 921beb4c..bca3ff09 100644 --- a/BasiliskII/src/SDL/audio_sdl.cpp +++ b/BasiliskII/src/SDL/audio_sdl.cpp @@ -105,8 +105,8 @@ static bool open_sdl_audio(void) audio_spec.silence); #endif - char driver_name[32]; - printf("Using SDL/%s audio output\n", SDL_AudioDriverName(driver_name, sizeof(driver_name) - 1)); + const char * driver_name = SDL_GetCurrentAudioDriver(); + printf("Using SDL/%s audio output\n", driver_name ? driver_name : ""); silence_byte = audio_spec.silence; SDL_PauseAudio(0); diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 99f3bfa6..b43ad49d 100644 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -129,12 +129,16 @@ static bool use_keycodes = false; // Flag: Use keycodes rather than keysyms static int keycode_table[256]; // X keycode -> Mac keycode translation table // SDL variables +static SDL_Window * sdl_window = NULL; // Wraps an OS-native window +static SDL_Surface * inner_sdl_surface = NULL; // Surface in guest-OS display format +static SDL_Surface * outer_sdl_surface = NULL; // Surface in host-OS display format +static SDL_Renderer * sdl_renderer = NULL; // Handle to SDL2 renderer +static SDL_Texture * sdl_texture = NULL; // Handle to a GPU texture, with which to draw outer_sdl_surface to static int screen_depth; // Depth of current screen -static SDL_Cursor *sdl_cursor; // Copy of Mac cursor -static SDL_Color sdl_palette[256]; // Color palette to be used as CLUT and gamma table +//static SDL_Cursor *sdl_cursor; // Copy of Mac cursor +static SDL_Palette *sdl_palette = NULL; // Color palette to be used as CLUT and gamma table static bool sdl_palette_changed = false; // Flag: Palette changed, redraw thread must set new colors static bool toggle_fullscreen = false; -static const int sdl_eventmask = SDL_MOUSEEVENTMASK | SDL_KEYEVENTMASK | SDL_VIDEOEXPOSEMASK | SDL_QUITMASK | SDL_ACTIVEEVENTMASK; static bool mouse_grabbed = false; @@ -171,7 +175,7 @@ extern void SysMountFirstFloppy(void); #ifdef ENABLE_VOSF #define SDL_VIDEO_LOCK_VOSF_SURFACE(SURFACE) do { \ - if ((SURFACE)->flags & (SDL_HWSURFACE | SDL_FULLSCREEN)) \ + if ((SURFACE)->flags & (SDL_FULLSCREEN)) \ the_host_buffer = (uint8 *)(SURFACE)->pixels; \ } while (0) #else @@ -428,25 +432,15 @@ static int sdl_depth_of_video_depth(int video_depth) // Get screen dimensions static void sdl_display_dimensions(int &width, int &height) { - static int max_width, max_height; - if (max_width == 0 && max_height == 0) { - max_width = 640 ; max_height = 480; - SDL_Rect **modes = SDL_ListModes(NULL, SDL_FULLSCREEN | SDL_HWSURFACE); - if (modes && modes != (SDL_Rect **)-1) { - // It turns out that on some implementations, and contrary to the documentation, - // the returned list is not sorted from largest to smallest (e.g. Windows) - for (int i = 0; modes[i] != NULL; i++) { - const int w = modes[i]->w; - const int h = modes[i]->h; - if (w > max_width && h > max_height) { - max_width = w; - max_height = h; - } - } - } + SDL_DisplayMode desktop_mode; + const int display_index = 0; // TODO: try supporting multiple displays + if (SDL_GetDesktopDisplayMode(display_index, &desktop_mode) != 0) { + // TODO: report a warning, here? + width = height = 0; + return; } - width = max_width; - height = max_height; + width = desktop_mode.w; + height = desktop_mode.h; } static inline int sdl_display_width(void) @@ -476,10 +470,8 @@ static bool has_mode(int type, int width, int height, int depth) if (width > sdl_display_width() || height > sdl_display_height()) return false; - // Rely on SDL capabilities - return SDL_VideoModeOK(width, height, - sdl_depth_of_video_depth(depth), - SDL_HWSURFACE | (type == DISPLAY_SCREEN ? SDL_FULLSCREEN : 0)) != 0; + // Whatever size it is, beyond what we've checked, we'll scale to/from as appropriate. + return true; } // Add mode to list of supported modes @@ -532,18 +524,20 @@ static void set_mac_frame_buffer(SDL_monitor_desc &monitor, int depth, bool nati // Set window name and class static void set_window_name(int name) { - const SDL_VideoInfo *vi = SDL_GetVideoInfo(); - if (vi && vi->wm_available) { - const char *str = GetString(name); - SDL_WM_SetCaption(str, str); + if (!sdl_window) { + return; } + const char *str = GetString(name); + SDL_SetWindowTitle(sdl_window, str); } // Set mouse grab mode -static SDL_GrabMode set_grab_mode(SDL_GrabMode mode) +static void set_grab_mode(bool grab) { - const SDL_VideoInfo *vi = SDL_GetVideoInfo(); - return (vi && vi->wm_available ? SDL_WM_GrabInput(mode) : SDL_GRAB_OFF); + if (!sdl_window) { + return; + } + SDL_SetWindowGrab(sdl_window, grab ? SDL_TRUE : SDL_FALSE); } // Migrate preferences items (XXX to be handled in MigratePrefs()) @@ -647,11 +641,149 @@ driver_base::driver_base(SDL_monitor_desc &m) the_buffer_copy = NULL; } +static void shutdown_sdl_video() +{ + if (sdl_texture) { + SDL_DestroyTexture(sdl_texture); + sdl_texture = NULL; + } + + if (sdl_renderer) { + SDL_DestroyRenderer(sdl_renderer); + sdl_renderer = NULL; + } + + if (inner_sdl_surface) { + if (inner_sdl_surface == outer_sdl_surface) { + outer_sdl_surface = NULL; + } + + SDL_FreeSurface(inner_sdl_surface); + inner_sdl_surface = NULL; + } + + if (outer_sdl_surface) { + SDL_FreeSurface(outer_sdl_surface); + outer_sdl_surface = NULL; + } + + if (sdl_window) { + SDL_DestroyWindow(sdl_window); + sdl_window = NULL; + } +} + +static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags) +{ + if (outer_sdl_surface) { + shutdown_sdl_video(); + } + + int window_width = width; + int window_height = height; + Uint32 window_flags = 0; + + if (flags & SDL_WINDOW_FULLSCREEN) { + SDL_DisplayMode desktop_mode; + if (SDL_GetDesktopDisplayMode(0, &desktop_mode) != 0) { + shutdown_sdl_video(); + return NULL; + } + window_flags |= SDL_WINDOW_FULLSCREEN; + window_width = desktop_mode.w; + window_height = desktop_mode.h; + } + + sdl_window = SDL_CreateWindow( + "Basilisk II", + SDL_WINDOWPOS_UNDEFINED, + SDL_WINDOWPOS_UNDEFINED, + window_width, + window_height, + window_flags); + if (!sdl_window) { + shutdown_sdl_video(); + return NULL; + } + + sdl_renderer = SDL_CreateRenderer(sdl_window, -1, SDL_RENDERER_ACCELERATED); + if (!sdl_renderer) { + shutdown_sdl_video(); + return NULL; + } + + sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_STREAMING, width, height); + if (!sdl_texture) { + shutdown_sdl_video(); + return NULL; + } + + switch (bpp) { + case 8: + outer_sdl_surface = SDL_CreateRGBSurface(0, width, height, 8, 0, 0, 0, 0); + break; + case 16: + outer_sdl_surface = SDL_CreateRGBSurfaceWithFormat(0, width, height, 16, SDL_PIXELFORMAT_RGB565); + break; + case 32: + outer_sdl_surface = SDL_CreateRGBSurface(0, width, height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); + inner_sdl_surface = outer_sdl_surface; + break; + default: + printf("WARNING: An unsupported bpp of %d was used\n", bpp); + break; + } + if (!outer_sdl_surface) { + shutdown_sdl_video(); + return NULL; + } + + if (!inner_sdl_surface) { + inner_sdl_surface = SDL_CreateRGBSurface(0, width, height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); + if (!inner_sdl_surface) { + shutdown_sdl_video(); + return NULL; + } + } + + return outer_sdl_surface; +} + +static int update_sdl_video() +{ + if (!sdl_renderer || !sdl_texture || !outer_sdl_surface) { + printf("WARNING: A video mode does not appear to have been set.\n"); + return -1; + } + + if (inner_sdl_surface != outer_sdl_surface && + inner_sdl_surface != NULL && + outer_sdl_surface != NULL) + { + SDL_Rect destRect = {0, 0, inner_sdl_surface->w, inner_sdl_surface->h}; + if (SDL_BlitSurface(outer_sdl_surface, NULL, inner_sdl_surface, &destRect) != 0) { + return -1; + } + } + + if (SDL_UpdateTexture(sdl_texture, NULL, inner_sdl_surface->pixels, inner_sdl_surface->pitch) != 0) { + return -1; + } + + SDL_Rect src_rect = {0, 0, inner_sdl_surface->w, inner_sdl_surface->h}; + if (SDL_RenderCopy(sdl_renderer, sdl_texture, &src_rect, NULL) != 0) { + return -1; + } + + SDL_RenderPresent(sdl_renderer); + + return 0; +} + void driver_base::set_video_mode(int flags) { int depth = sdl_depth_of_video_depth(VIDEO_MODE_DEPTH); - if ((s = SDL_SetVideoMode(VIDEO_MODE_X, VIDEO_MODE_Y, depth, - SDL_HWSURFACE | flags)) == NULL) + if ((s = init_sdl_video(VIDEO_MODE_X, VIDEO_MODE_Y, depth, flags)) == NULL) return; #ifdef ENABLE_VOSF the_host_buffer = (uint8 *)s->pixels; @@ -660,7 +792,7 @@ void driver_base::set_video_mode(int flags) void driver_base::init() { - set_video_mode(display_type == DISPLAY_SCREEN ? SDL_FULLSCREEN : 0); + set_video_mode(display_type == DISPLAY_SCREEN ? SDL_WINDOW_FULLSCREEN : 0); int aligned_height = (VIDEO_MODE_Y + 15) & ~15; #ifdef ENABLE_VOSF @@ -785,8 +917,9 @@ void driver_base::update_palette(void) { const VIDEO_MODE &mode = monitor.get_current_mode(); - if ((int)VIDEO_MODE_DEPTH <= VIDEO_DEPTH_8BIT) - SDL_SetPalette(s, SDL_PHYSPAL, sdl_palette, 0, 256); + if ((int)VIDEO_MODE_DEPTH <= VIDEO_DEPTH_8BIT) { + SDL_SetSurfacePalette(s, sdl_palette); + } } // Disable mouse acceleration @@ -812,12 +945,10 @@ void driver_base::toggle_mouse_grab(void) void driver_base::grab_mouse(void) { if (!mouse_grabbed) { - SDL_GrabMode new_mode = set_grab_mode(SDL_GRAB_ON); - if (new_mode == SDL_GRAB_ON) { - set_window_name(STR_WINDOW_TITLE_GRABBED); - disable_mouse_accel(); - ADBSetRelMouseMode(mouse_grabbed = true); - } + set_grab_mode(true); + set_window_name(STR_WINDOW_TITLE_GRABBED); + disable_mouse_accel(); + ADBSetRelMouseMode(mouse_grabbed = true); } } @@ -825,12 +956,10 @@ void driver_base::grab_mouse(void) void driver_base::ungrab_mouse(void) { if (mouse_grabbed) { - SDL_GrabMode new_mode = set_grab_mode(SDL_GRAB_OFF); - if (new_mode == SDL_GRAB_OFF) { - set_window_name(STR_WINDOW_TITLE); - restore_mouse_accel(); - ADBSetRelMouseMode(mouse_grabbed = false); - } + set_grab_mode(false); + set_window_name(STR_WINDOW_TITLE); + restore_mouse_accel(); + ADBSetRelMouseMode(mouse_grabbed = false); } } @@ -861,8 +990,7 @@ static void keycode_init(void) keycode_table[i] = -1; // Search for server vendor string, then read keycodes - char video_driver[256]; - SDL_VideoDriverName(video_driver, sizeof(video_driver)); + const char * video_driver = SDL_GetCurrentVideoDriver(); bool video_driver_found = false; char line[256]; int n_keys = 0; @@ -895,7 +1023,7 @@ static void keycode_init(void) static const char sdl_str[] = "sdl"; if (strncmp(line, sdl_str, sizeof(sdl_str) - 1) == 0) { char *p = line + sizeof(sdl_str); - if (strstr(video_driver, p) == video_driver) + if (video_driver && strstr(video_driver, p) == video_driver) video_driver_found = true; } } @@ -908,12 +1036,12 @@ static void keycode_init(void) // Vendor not found? Then display warning if (!video_driver_found) { char str[256]; - snprintf(str, sizeof(str), GetString(STR_KEYCODE_VENDOR_WARN), video_driver, kc_path ? kc_path : KEYCODE_FILE_NAME); + snprintf(str, sizeof(str), GetString(STR_KEYCODE_VENDOR_WARN), video_driver ? video_driver : "", kc_path ? kc_path : KEYCODE_FILE_NAME); WarningAlert(str); return; } - D(bug("Using SDL/%s keycodes table, %d key mappings\n", video_driver, n_keys)); + D(bug("Using SDL/%s keycodes table, %d key mappings\n", video_driver ? video_driver : "", n_keys)); } } @@ -954,7 +1082,7 @@ bool SDL_monitor_desc::video_open(void) // Start redraw/input thread #ifndef USE_CPU_EMUL_SERVICES redraw_thread_cancel = false; - redraw_thread_active = ((redraw_thread = SDL_CreateThread(redraw_func, NULL)) != NULL); + redraw_thread_active = ((redraw_thread = SDL_CreateThread(redraw_func, "Redraw Thread", NULL)) != NULL); if (!redraw_thread_active) { printf("FATAL: cannot create redraw thread\n"); return false; @@ -1032,7 +1160,11 @@ bool VideoInit(bool classic) default_height = sdl_display_height(); // Mac screen depth follows X depth - screen_depth = SDL_GetVideoInfo()->vfmt->BitsPerPixel; + screen_depth = 32; + SDL_DisplayMode desktop_mode; + if (SDL_GetDesktopDisplayMode(0, &desktop_mode) == 0) { + screen_depth = SDL_BITSPERPIXEL(desktop_mode.format); + } int default_depth; switch (screen_depth) { case 8: @@ -1241,7 +1373,7 @@ static void do_toggle_fullscreen(void) // switch modes display_type = (display_type == DISPLAY_SCREEN) ? DISPLAY_WINDOW : DISPLAY_SCREEN; - drv->set_video_mode(display_type == DISPLAY_SCREEN ? SDL_FULLSCREEN : 0); + drv->set_video_mode(display_type == DISPLAY_SCREEN ? SDL_WINDOW_FULLSCREEN : 0); drv->adapt_to_video_mode(); // reset the palette @@ -1253,7 +1385,7 @@ static void do_toggle_fullscreen(void) // restore the screen contents SDL_BlitSurface(tmp_surface, NULL, drv->s, NULL); SDL_FreeSurface(tmp_surface); - SDL_UpdateRect(drv->s, 0, 0, 0, 0); + update_sdl_video(); // reset the video refresh handler VideoRefreshInit(); @@ -1262,7 +1394,7 @@ static void do_toggle_fullscreen(void) ADBKeyUp(0x36); // restore the mouse position - SDL_WarpMouse(x, y); + SDL_WarpMouseGlobal(x, y); // resume redraw thread toggle_fullscreen = false; @@ -1351,7 +1483,12 @@ void SDL_monitor_desc::set_palette(uint8 *pal, int num_in) // Convert colors to XColor array int num_out = 256; bool stretch = false; - SDL_Color *p = sdl_palette; + + if (!sdl_palette) { + sdl_palette = SDL_AllocPalette(num_out); + } + + SDL_Color *p = sdl_palette->colors; for (int i=0; ir = pal[c*3 + 0] * 0x0101; @@ -1523,27 +1660,25 @@ void video_set_cursor(void) static bool is_modifier_key(SDL_KeyboardEvent const & e) { switch (e.keysym.sym) { - case SDLK_NUMLOCK: + case SDLK_NUMLOCKCLEAR: case SDLK_CAPSLOCK: - case SDLK_SCROLLOCK: + case SDLK_SCROLLLOCK: case SDLK_RSHIFT: case SDLK_LSHIFT: case SDLK_RCTRL: case SDLK_LCTRL: case SDLK_RALT: case SDLK_LALT: - case SDLK_RMETA: - case SDLK_LMETA: - case SDLK_LSUPER: - case SDLK_RSUPER: + case SDLK_RGUI: + case SDLK_LGUI: case SDLK_MODE: - case SDLK_COMPOSE: + case SDLK_APPLICATION: return true; } return false; } -static bool is_ctrl_down(SDL_keysym const & ks) +static bool is_ctrl_down(SDL_Keysym const & ks) { return ctrl_down || (ks.mod & KMOD_CTRL); } @@ -1554,7 +1689,7 @@ static bool is_ctrl_down(SDL_keysym const & ks) * and -2 if the key was recognized as a hotkey */ -static int kc_decode(SDL_keysym const & ks, bool key_down) +static int kc_decode(SDL_Keysym const & ks, bool key_down) { switch (ks.sym) { case SDLK_a: return 0x00; @@ -1626,19 +1761,17 @@ static int kc_decode(SDL_keysym const & ks, bool key_down) #if (defined(__APPLE__) && defined(__MACH__)) case SDLK_LALT: return 0x3a; case SDLK_RALT: return 0x3a; - case SDLK_LMETA: return 0x37; - case SDLK_RMETA: return 0x37; + case SDLK_LGUI: return 0x37; + case SDLK_RGUI: return 0x37; #else case SDLK_LALT: return 0x37; case SDLK_RALT: return 0x37; - case SDLK_LMETA: return 0x3a; - case SDLK_RMETA: return 0x3a; + case SDLK_LGUI: return 0x3a; + case SDLK_RGUI: return 0x3a; #endif - case SDLK_LSUPER: return 0x3a; // "Windows" key - case SDLK_RSUPER: return 0x3a; case SDLK_MENU: return 0x32; case SDLK_CAPSLOCK: return 0x39; - case SDLK_NUMLOCK: return 0x47; + case SDLK_NUMLOCKCLEAR: return 0x47; case SDLK_UP: return 0x3e; case SDLK_DOWN: return 0x3d; @@ -1660,20 +1793,20 @@ static int kc_decode(SDL_keysym const & ks, bool key_down) case SDLK_F11: return 0x67; case SDLK_F12: return 0x6f; - case SDLK_PRINT: return 0x69; - case SDLK_SCROLLOCK: return 0x6b; + case SDLK_PRINTSCREEN: return 0x69; + case SDLK_SCROLLLOCK: return 0x6b; case SDLK_PAUSE: return 0x71; - case SDLK_KP0: return 0x52; - case SDLK_KP1: return 0x53; - case SDLK_KP2: return 0x54; - case SDLK_KP3: return 0x55; - case SDLK_KP4: return 0x56; - case SDLK_KP5: return 0x57; - case SDLK_KP6: return 0x58; - case SDLK_KP7: return 0x59; - case SDLK_KP8: return 0x5b; - case SDLK_KP9: return 0x5c; + case SDLK_KP_0: return 0x52; + case SDLK_KP_1: return 0x53; + case SDLK_KP_2: return 0x54; + case SDLK_KP_3: return 0x55; + case SDLK_KP_4: return 0x56; + case SDLK_KP_5: return 0x57; + case SDLK_KP_6: return 0x58; + case SDLK_KP_7: return 0x59; + case SDLK_KP_8: return 0x5b; + case SDLK_KP_9: return 0x5c; case SDLK_KP_PERIOD: return 0x41; case SDLK_KP_PLUS: return 0x45; case SDLK_KP_MINUS: return 0x4e; @@ -1713,15 +1846,52 @@ static void force_complete_window_refresh() * SDL event handling */ +static void scale_mouse_event_coordinates(void *userdata, SDL_Event * event) +{ + if (!inner_sdl_surface || !sdl_window) { + return; + } + + int window_width = 0; + int window_height = 0; + SDL_GetWindowSize(sdl_window, &window_width, &window_height); + if (window_width == 0 || window_height == 0) { + return; + } + + float scale_x = (float)inner_sdl_surface->w / (float)window_width; + float scale_y = (float)inner_sdl_surface->h / (float)window_height; + + switch (event->type) { + case SDL_MOUSEBUTTONDOWN: + case SDL_MOUSEBUTTONUP: + event->button.x = (int)(event->button.x * scale_x); + event->button.y = (int)(event->button.y * scale_y); + break; + + case SDL_MOUSEMOTION: + event->motion.x = (int)(event->motion.x * scale_x); + event->motion.y = (int)(event->motion.y * scale_y); + event->motion.xrel = (int)(event->motion.xrel * scale_x); + event->motion.yrel = (int)(event->motion.yrel * scale_y); + break; + } +} + static void handle_events(void) { SDL_Event events[10]; const int n_max_events = sizeof(events) / sizeof(events[0]); int n_events; - while ((n_events = SDL_PeepEvents(events, n_max_events, SDL_GETEVENT, sdl_eventmask)) > 0) { + while ((n_events = SDL_PeepEvents(events, n_max_events, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT)) > 0) { for (int i = 0; i < n_events; i++) { - SDL_Event const & event = events[i]; + SDL_Event & event = events[i]; + + // Make sure events with mouse coordinates get scaled, in case the Mac's + // display size is different than the host OS' window. + scale_mouse_event_coordinates(NULL, &events[i]); + switch (event.type) { // Mouse button @@ -1820,24 +1990,28 @@ static void handle_events(void) } break; } - - // Hidden parts exposed, force complete refresh of window - case SDL_VIDEOEXPOSE: - force_complete_window_refresh(); + + case SDL_WINDOWEVENT: { + switch (event.window.event) { + // Hidden parts exposed, force complete refresh of window + case SDL_WINDOWEVENT_EXPOSED: + force_complete_window_refresh(); + break; + + // Force a complete window refresh when activating, to avoid redraw artifacts otherwise. + case SDL_WINDOWEVENT_RESTORED: + force_complete_window_refresh(); + break; + + } break; + } // Window "close" widget clicked case SDL_QUIT: ADBKeyDown(0x7f); // Power key ADBKeyUp(0x7f); break; - - // Application activate/deactivate - case SDL_ACTIVEEVENT: - // Force a complete window refresh when activating, to avoid redraw artifacts otherwise. - if (event.active.gain && (event.active.state & SDL_APPACTIVE)) - force_complete_window_refresh(); - break; } } } @@ -1885,7 +2059,7 @@ static void update_display_static(driver_base *drv) SDL_UnlockSurface(drv->s); // Refresh display - SDL_UpdateRect(drv->s, 0, 0, 0, 0); + update_sdl_video(); /* // Incremental update code @@ -2091,7 +2265,7 @@ static void update_display_static_bbox(driver_base *drv) // Refresh display if (nr_boxes) - SDL_UpdateRects(drv->s, nr_boxes, boxes); + update_sdl_video(); } diff --git a/BasiliskII/src/Unix/main_unix.cpp b/BasiliskII/src/Unix/main_unix.cpp index 1f03b9a0..d996c6a5 100644 --- a/BasiliskII/src/Unix/main_unix.cpp +++ b/BasiliskII/src/Unix/main_unix.cpp @@ -27,6 +27,7 @@ #ifdef USE_SDL # include +# include #endif #ifndef USE_SDL_VIDEO From 1d5b8e95af7f3fda71b4c5ffdcf56ac4a1847732 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 22 Jul 2017 20:40:31 -0400 Subject: [PATCH 03/85] use the host-OS' desktop resolution, when entering full-screen. This enables use of Mac OS X's "Spaces" feature, when going to fullscreen. --- BasiliskII/src/SDL/video_sdl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index b43ad49d..e9454b0a 100644 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -689,7 +689,7 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags shutdown_sdl_video(); return NULL; } - window_flags |= SDL_WINDOW_FULLSCREEN; + window_flags |= SDL_WINDOW_FULLSCREEN_DESKTOP; window_width = desktop_mode.w; window_height = desktop_mode.h; } From b62b8fe5ad957bdf86f4a6bc25b2a6a0be104ac9 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 22 Jul 2017 21:09:53 -0400 Subject: [PATCH 04/85] read/write preferences from HOME/.basilisk_ii_prefs --- .../BasiliskII.xcodeproj/project.pbxproj | 8 +- BasiliskII/src/SDL/prefs_sdl.cpp | 104 ++++++++++++++++++ 2 files changed, 108 insertions(+), 4 deletions(-) create mode 100644 BasiliskII/src/SDL/prefs_sdl.cpp diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index 3069555a..149dd2f4 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -11,6 +11,7 @@ 752F26F21F240140001032B4 /* SDL2.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7539E1E51F23B288006B2DF2 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 752F26F91F240E51001032B4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F26F81F240E51001032B4 /* Foundation.framework */; }; 752F26FB1F240E69001032B4 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F26FA1F240E69001032B4 /* IOKit.framework */; }; + 752F27011F242BAF001032B4 /* prefs_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 752F27001F242BAF001032B4 /* prefs_sdl.cpp */; }; 7539DFBF1F23B17E006B2DF2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7539DFBE1F23B17E006B2DF2 /* Assets.xcassets */; }; 7539E1251F23B25A006B2DF2 /* adb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFC91F23B25A006B2DF2 /* adb.cpp */; }; 7539E1261F23B25A006B2DF2 /* audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFCA1F23B25A006B2DF2 /* audio.cpp */; }; @@ -85,7 +86,6 @@ 7539E2801F23C4CA006B2DF2 /* main_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E27F1F23C4CA006B2DF2 /* main_unix.cpp */; }; 7539E28E1F23C56F006B2DF2 /* clip_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2851F23C56F006B2DF2 /* clip_dummy.cpp */; }; 7539E28F1F23C56F006B2DF2 /* ether_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2861F23C56F006B2DF2 /* ether_dummy.cpp */; }; - 7539E2901F23C56F006B2DF2 /* prefs_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2871F23C56F006B2DF2 /* prefs_dummy.cpp */; }; 7539E2911F23C56F006B2DF2 /* prefs_editor_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2881F23C56F006B2DF2 /* prefs_editor_dummy.cpp */; }; 7539E2921F23C56F006B2DF2 /* scsi_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2891F23C56F006B2DF2 /* scsi_dummy.cpp */; }; 7539E2931F23C56F006B2DF2 /* serial_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E28A1F23C56F006B2DF2 /* serial_dummy.cpp */; }; @@ -119,6 +119,7 @@ /* Begin PBXFileReference section */ 752F26F81F240E51001032B4 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 752F26FA1F240E69001032B4 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; + 752F27001F242BAF001032B4 /* prefs_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = prefs_sdl.cpp; sourceTree = ""; }; 7539DFB21F23B17E006B2DF2 /* BasiliskII.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BasiliskII.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7539DFBE1F23B17E006B2DF2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 7539DFC91F23B25A006B2DF2 /* adb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = adb.cpp; path = ../adb.cpp; sourceTree = ""; }; @@ -263,7 +264,6 @@ 7539E27F1F23C4CA006B2DF2 /* main_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main_unix.cpp; sourceTree = ""; }; 7539E2851F23C56F006B2DF2 /* clip_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = clip_dummy.cpp; sourceTree = ""; }; 7539E2861F23C56F006B2DF2 /* ether_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ether_dummy.cpp; sourceTree = ""; }; - 7539E2871F23C56F006B2DF2 /* prefs_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = prefs_dummy.cpp; sourceTree = ""; }; 7539E2881F23C56F006B2DF2 /* prefs_editor_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = prefs_editor_dummy.cpp; sourceTree = ""; }; 7539E2891F23C56F006B2DF2 /* scsi_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = scsi_dummy.cpp; sourceTree = ""; }; 7539E28A1F23C56F006B2DF2 /* serial_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = serial_dummy.cpp; sourceTree = ""; }; @@ -412,6 +412,7 @@ 7539E0711F23B25A006B2DF2 /* SDL */ = { isa = PBXGroup; children = ( + 752F27001F242BAF001032B4 /* prefs_sdl.cpp */, 7539E0721F23B25A006B2DF2 /* audio_sdl.cpp */, 7539E0731F23B25A006B2DF2 /* keycodes */, 7539E0761F23B25A006B2DF2 /* video_sdl.cpp */, @@ -590,7 +591,6 @@ children = ( 7539E2851F23C56F006B2DF2 /* clip_dummy.cpp */, 7539E2861F23C56F006B2DF2 /* ether_dummy.cpp */, - 7539E2871F23C56F006B2DF2 /* prefs_dummy.cpp */, 7539E2881F23C56F006B2DF2 /* prefs_editor_dummy.cpp */, 7539E2891F23C56F006B2DF2 /* scsi_dummy.cpp */, 7539E28A1F23C56F006B2DF2 /* serial_dummy.cpp */, @@ -729,11 +729,11 @@ 7539E2801F23C4CA006B2DF2 /* main_unix.cpp in Sources */, 7539E2A61F23CB9B006B2DF2 /* cpuemu.cpp in Sources */, 7539E1E11F23B25A006B2DF2 /* user_strings.cpp in Sources */, + 752F27011F242BAF001032B4 /* prefs_sdl.cpp in Sources */, 7539E2A51F23CB9B006B2DF2 /* cpuemu_nf.cpp in Sources */, 7539E2971F23C5FD006B2DF2 /* newcpu.cpp in Sources */, 7539E12A1F23B25A006B2DF2 /* vm_alloc.cpp in Sources */, 7539E16C1F23B25A006B2DF2 /* main.cpp in Sources */, - 7539E2901F23C56F006B2DF2 /* prefs_dummy.cpp in Sources */, 7539E26D1F23B32A006B2DF2 /* strlcpy.c in Sources */, 7539E26E1F23B32A006B2DF2 /* sys_unix.cpp in Sources */, 7539E1271F23B25A006B2DF2 /* cdrom.cpp in Sources */, diff --git a/BasiliskII/src/SDL/prefs_sdl.cpp b/BasiliskII/src/SDL/prefs_sdl.cpp new file mode 100644 index 00000000..577d1084 --- /dev/null +++ b/BasiliskII/src/SDL/prefs_sdl.cpp @@ -0,0 +1,104 @@ +/* + * prefs_sdl.cpp - Preferences handling, SDL2 implementation + * + * Basilisk II (C) 1997-2008 Christian Bauer + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "sysdeps.h" + +#include +#include +#include +#include + +#include "prefs.h" + + +// Platform-specific preferences items +prefs_desc platform_prefs_items[] = { + {NULL, TYPE_END, false} // End of list +}; + + +// Prefs file name and path +const char PREFS_FILE_NAME[] = ".basilisk_ii_prefs"; + +std::string UserPrefsPath; + + +/* + * Load preferences from settings file + */ + +void LoadPrefs(const char * vmdir) // TODO: load prefs from 'vmdir' +{ + // Build a full-path to the settings file + char prefs_path[4096]; + if (!vmdir) { + vmdir = SDL_getenv("HOME"); + } + if (!vmdir) { + vmdir = "./"; + } + SDL_snprintf(prefs_path, sizeof(prefs_path), "%s/%s", vmdir, PREFS_FILE_NAME); + + // Read preferences from settings file + FILE *f = fopen(prefs_path, "r"); + if (f != NULL) { + + // Prefs file found, load settings + LoadPrefsFromStream(f); + fclose(f); + + } else { + + // No prefs file, save defaults + SavePrefs(); + } +} + + +/* + * Save preferences to settings file + */ + +void SavePrefs(void) +{ + // Build a full-path to the settings file + char prefs_path[4096]; + const char * dir = SDL_getenv("HOME"); + if (!dir) { + dir = "./"; + } + SDL_snprintf(prefs_path, sizeof(prefs_path), "%s/%s", dir, PREFS_FILE_NAME); + + FILE *f; + if ((f = fopen(prefs_path, "w")) != NULL) { + SavePrefsToStream(f); + fclose(f); + } +} + + +/* + * Add defaults of platform-specific prefs items + * You may also override the defaults set in PrefsInit() + */ + +void AddPlatformPrefsDefaults(void) +{ +} From ad747d2049240974d9984f757c856a43b4e786ee Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 22 Jul 2017 21:16:32 -0400 Subject: [PATCH 05/85] use HOME/.basilisk_ii_xpram for saving + restoring XPRAM --- .../BasiliskII.xcodeproj/project.pbxproj | 8 +- BasiliskII/src/SDL/xpram_sdl.cpp | 98 +++++++++++++++++++ 2 files changed, 102 insertions(+), 4 deletions(-) create mode 100644 BasiliskII/src/SDL/xpram_sdl.cpp diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index 149dd2f4..8633e240 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -12,6 +12,7 @@ 752F26F91F240E51001032B4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F26F81F240E51001032B4 /* Foundation.framework */; }; 752F26FB1F240E69001032B4 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F26FA1F240E69001032B4 /* IOKit.framework */; }; 752F27011F242BAF001032B4 /* prefs_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 752F27001F242BAF001032B4 /* prefs_sdl.cpp */; }; + 752F27031F242F51001032B4 /* xpram_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 752F27021F242F51001032B4 /* xpram_sdl.cpp */; }; 7539DFBF1F23B17E006B2DF2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7539DFBE1F23B17E006B2DF2 /* Assets.xcassets */; }; 7539E1251F23B25A006B2DF2 /* adb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFC91F23B25A006B2DF2 /* adb.cpp */; }; 7539E1261F23B25A006B2DF2 /* audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFCA1F23B25A006B2DF2 /* audio.cpp */; }; @@ -90,7 +91,6 @@ 7539E2921F23C56F006B2DF2 /* scsi_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2891F23C56F006B2DF2 /* scsi_dummy.cpp */; }; 7539E2931F23C56F006B2DF2 /* serial_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E28A1F23C56F006B2DF2 /* serial_dummy.cpp */; }; 7539E2941F23C56F006B2DF2 /* user_strings_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E28B1F23C56F006B2DF2 /* user_strings_dummy.cpp */; }; - 7539E2951F23C56F006B2DF2 /* xpram_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E28C1F23C56F006B2DF2 /* xpram_dummy.cpp */; }; 7539E2971F23C5FD006B2DF2 /* newcpu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2961F23C5FD006B2DF2 /* newcpu.cpp */; }; 7539E29D1F23C83F006B2DF2 /* sys_darwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E29C1F23C83F006B2DF2 /* sys_darwin.cpp */; }; 7539E29F1F23C939006B2DF2 /* fpu_uae.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E29E1F23C939006B2DF2 /* fpu_uae.cpp */; }; @@ -120,6 +120,7 @@ 752F26F81F240E51001032B4 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 752F26FA1F240E69001032B4 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 752F27001F242BAF001032B4 /* prefs_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = prefs_sdl.cpp; sourceTree = ""; }; + 752F27021F242F51001032B4 /* xpram_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xpram_sdl.cpp; sourceTree = ""; }; 7539DFB21F23B17E006B2DF2 /* BasiliskII.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BasiliskII.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7539DFBE1F23B17E006B2DF2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 7539DFC91F23B25A006B2DF2 /* adb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = adb.cpp; path = ../adb.cpp; sourceTree = ""; }; @@ -268,7 +269,6 @@ 7539E2891F23C56F006B2DF2 /* scsi_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = scsi_dummy.cpp; sourceTree = ""; }; 7539E28A1F23C56F006B2DF2 /* serial_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = serial_dummy.cpp; sourceTree = ""; }; 7539E28B1F23C56F006B2DF2 /* user_strings_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = user_strings_dummy.cpp; sourceTree = ""; }; - 7539E28C1F23C56F006B2DF2 /* xpram_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xpram_dummy.cpp; sourceTree = ""; }; 7539E2961F23C5FD006B2DF2 /* newcpu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = newcpu.cpp; sourceTree = ""; }; 7539E29C1F23C83F006B2DF2 /* sys_darwin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sys_darwin.cpp; sourceTree = ""; }; 7539E29E1F23C939006B2DF2 /* fpu_uae.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fpu_uae.cpp; sourceTree = ""; }; @@ -412,6 +412,7 @@ 7539E0711F23B25A006B2DF2 /* SDL */ = { isa = PBXGroup; children = ( + 752F27021F242F51001032B4 /* xpram_sdl.cpp */, 752F27001F242BAF001032B4 /* prefs_sdl.cpp */, 7539E0721F23B25A006B2DF2 /* audio_sdl.cpp */, 7539E0731F23B25A006B2DF2 /* keycodes */, @@ -595,7 +596,6 @@ 7539E2891F23C56F006B2DF2 /* scsi_dummy.cpp */, 7539E28A1F23C56F006B2DF2 /* serial_dummy.cpp */, 7539E28B1F23C56F006B2DF2 /* user_strings_dummy.cpp */, - 7539E28C1F23C56F006B2DF2 /* xpram_dummy.cpp */, ); name = dummy; path = ../dummy; @@ -746,7 +746,6 @@ 7539E2921F23C56F006B2DF2 /* scsi_dummy.cpp in Sources */, 7539E16F1F23B25A006B2DF2 /* prefs_items.cpp in Sources */, 7539E18E1F23B25A006B2DF2 /* sony.cpp in Sources */, - 7539E2951F23C56F006B2DF2 /* xpram_dummy.cpp in Sources */, 7539E2941F23C56F006B2DF2 /* user_strings_dummy.cpp in Sources */, 7539E26F1F23B32A006B2DF2 /* timer_unix.cpp in Sources */, 7539E2A91F23CB9B006B2DF2 /* defs68k.c in Sources */, @@ -754,6 +753,7 @@ 7539E23F1F23B32A006B2DF2 /* bincue_unix.cpp in Sources */, 7539E12C1F23B25A006B2DF2 /* emul_op.cpp in Sources */, 7539E19D1F23B25A006B2DF2 /* mathlib.cpp in Sources */, + 752F27031F242F51001032B4 /* xpram_sdl.cpp in Sources */, 7539E16D1F23B25A006B2DF2 /* pict.c in Sources */, 7539E1251F23B25A006B2DF2 /* adb.cpp in Sources */, 7539E12F1F23B25A006B2DF2 /* macos_util.cpp in Sources */, diff --git a/BasiliskII/src/SDL/xpram_sdl.cpp b/BasiliskII/src/SDL/xpram_sdl.cpp new file mode 100644 index 00000000..4526bae6 --- /dev/null +++ b/BasiliskII/src/SDL/xpram_sdl.cpp @@ -0,0 +1,98 @@ +/* + * xpram_sdl.cpp - XPRAM handling, SDL implementation + * + * Basilisk II (C) 1997-2008 Christian Bauer + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "sysdeps.h" + +#include +#include +#include + +#include "xpram.h" + + +// XPRAM file name and path +const char XPRAM_FILE_NAME[] = ".basilisk_ii_xpram"; + + +/* + * Load XPRAM from settings file + */ + +void LoadXPRAM(const char *dir) +{ + // Build a full-path to the file + char full_path[4096]; + if (!dir) { + dir = SDL_getenv("HOME"); + } + if (!dir) { + dir = "./"; + } + SDL_snprintf(full_path, sizeof(full_path), "%s/%s", dir, XPRAM_FILE_NAME); + + // Open the XPRAM file + FILE *f = fopen(full_path, "rb"); + if (f != NULL) { + fread(XPRAM, 256, 1, f); + fclose(f); + } +} + + +/* + * Save XPRAM to settings file + */ + +void SaveXPRAM(void) +{ + // Build a full-path to the file + char full_path[4096]; + const char *dir = SDL_getenv("HOME"); + if (!dir) { + dir = "./"; + } + SDL_snprintf(full_path, sizeof(full_path), "%s/%s", dir, XPRAM_FILE_NAME); + + // Save the XPRAM file + FILE *f = fopen(XPRAM_FILE_NAME, "wb"); + if (f != NULL) { + fwrite(XPRAM, 256, 1, f); + fclose(f); + } +} + + +/* + * Delete PRAM file + */ + +void ZapPRAM(void) +{ + // Build a full-path to the file + char full_path[4096]; + const char *dir = SDL_getenv("HOME"); + if (!dir) { + dir = "./"; + } + SDL_snprintf(full_path, sizeof(full_path), "%s/%s", dir, XPRAM_FILE_NAME); + + // Delete the XPRAM file + remove(full_path); +} From e3a687ff1e6465ded66ff99bc15a5146aa772835 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 22 Jul 2017 21:20:46 -0400 Subject: [PATCH 06/85] updated copyright to 2017 (from 2006); added SDL2 port credit --- BasiliskII/src/MacOSX/Credits.html | 6 ++++++ BasiliskII/src/MacOSX/English.lproj/InfoPlist.strings | 2 +- BasiliskII/src/MacOSX/Info.plist | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/BasiliskII/src/MacOSX/Credits.html b/BasiliskII/src/MacOSX/Credits.html index 29ee57a9..aa43da65 100644 --- a/BasiliskII/src/MacOSX/Credits.html +++ b/BasiliskII/src/MacOSX/Credits.html @@ -4,8 +4,14 @@ It enables you to run 68k MacOS software on your computer, even if you are using
The Official Basilisk II Home Page
+
MacOS X (native windowing) port
by Nigel Pearson <nigel@ind.tansu.com.au> +
+
+SDL2 port +
+by David Ludwig <dludwig@pobox.com>
diff --git a/BasiliskII/src/MacOSX/English.lproj/InfoPlist.strings b/BasiliskII/src/MacOSX/English.lproj/InfoPlist.strings index fbcc2d40..5b8ae8d0 100755 --- a/BasiliskII/src/MacOSX/English.lproj/InfoPlist.strings +++ b/BasiliskII/src/MacOSX/English.lproj/InfoPlist.strings @@ -1,3 +1,3 @@ /* Localized versions of Info.plist keys */ -NSHumanReadableCopyright = "Copyright © 1997-2006 Christian Bauer et al. Freely distributable under the terms of the GNU GPL."; +NSHumanReadableCopyright = "Copyright © 1997-2017 Christian Bauer et al. Freely distributable under the terms of the GNU GPL."; diff --git a/BasiliskII/src/MacOSX/Info.plist b/BasiliskII/src/MacOSX/Info.plist index 31a02329..391fb133 100644 --- a/BasiliskII/src/MacOSX/Info.plist +++ b/BasiliskII/src/MacOSX/Info.plist @@ -1,5 +1,5 @@ - + CFBundleDevelopmentRegion @@ -7,7 +7,7 @@ CFBundleExecutable BasiliskII CFBundleGetInfoString - Basilisk II version 1.0, Copyright © 1997-2006 Christian Bauer et al. Mac OS X port 19 + Basilisk II version 1.0, Copyright © 1997-2017 Christian Bauer et al. SDL2 port CFBundleIconFile BasiliskII.icns CFBundleIdentifier @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - Basilisk II 1.0, Mac OS X port 19 + Basilisk II 1.0, SDL2 port CFBundleSignature ???? NSHelpFile From a1a85a9315985d150c4af258906652e152d2dc05 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 22 Jul 2017 21:31:06 -0400 Subject: [PATCH 07/85] bug-fix: don't double-free the inner SDL_Surface, when the guest OS switches video modes --- BasiliskII/src/SDL/video_sdl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index e9454b0a..c788548b 100644 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -879,8 +879,7 @@ driver_base::~driver_base() ungrab_mouse(); restore_mouse_accel(); - if (s) - SDL_FreeSurface(s); + shutdown_sdl_video(); // the_buffer shall always be mapped through vm_acquire_framebuffer() if (the_buffer != VM_MAP_FAILED) { From 3d0ea018ed007a1c8921845a2bdb694334899210 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 22 Jul 2017 21:49:54 -0400 Subject: [PATCH 08/85] bug-fix: OS X app would not launch, when run from the Finder --- BasiliskII/src/Unix/main_unix.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/BasiliskII/src/Unix/main_unix.cpp b/BasiliskII/src/Unix/main_unix.cpp index d996c6a5..f8dc7431 100644 --- a/BasiliskII/src/Unix/main_unix.cpp +++ b/BasiliskII/src/Unix/main_unix.cpp @@ -427,11 +427,18 @@ int main(int argc, char **argv) } else if (strcmp(argv[i], "--rominfo") == 0) { argv[i] = NULL; PrintROMInfo = true; - } else if (strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0) { - // HACK: prevent Basilisk from exiting, when run via Xcode 8, which - // passes in a '-NSDocumentRevisionsDebugMode' option. + } + +#if defined(__APPLE__) && defined(__MACH__) + // Mac OS X likes to pass in various options of its own, when launching an app. + // Attempt to ignore these. + const char * mac_psn_prefix = "-psn_"; + if (strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0) { + argv[i] = NULL; + } else if (strncmp(mac_psn_prefix, argv[i], strlen(mac_psn_prefix)) == 0) { argv[i] = NULL; } +#endif } // Remove processed arguments From a3f3d4f5d236698fd1df0a3ad8899f7d414f5d4d Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 22 Jul 2017 22:01:13 -0400 Subject: [PATCH 09/85] dropped Mac OS X deployment target down to 10.7 (from 10.12) --- BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index 8633e240..8e2b1d79 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -830,7 +830,7 @@ ., ../uae_cpu, ); - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.7; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -879,7 +879,7 @@ ., ../uae_cpu, ); - MACOSX_DEPLOYMENT_TARGET = 10.12; + MACOSX_DEPLOYMENT_TARGET = 10.7; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; }; From 6e36c8dd30ac178eb517f1569881a6427d93dcb3 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 23 Jul 2017 14:09:19 -0400 Subject: [PATCH 10/85] include SDL2 as a git submodule, currently using v2.0.5; make Mac builds (of Basilisk II) build SDL This should help with debugging windowing system issues, which may reside in SDL, which SDL may not provide adequate diagnostic info, or which Basilisk may not report --- .gitmodules | 4 + .../BasiliskII.xcodeproj/project.pbxproj | 135 ++++++++++++++++-- external/SDL | 1 + 3 files changed, 132 insertions(+), 8 deletions(-) create mode 100644 .gitmodules create mode 160000 external/SDL diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..1873d9c7 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "external/SDL"] + path = external/SDL + url = https://github.com/spurious/SDL-mirror + branch = release-2.0.5 diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index 8e2b1d79..f51fe002 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -7,12 +7,12 @@ objects = { /* Begin PBXBuildFile section */ - 752F26F11F240140001032B4 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7539E1E51F23B288006B2DF2 /* SDL2.framework */; }; - 752F26F21F240140001032B4 /* SDL2.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7539E1E51F23B288006B2DF2 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 752F26F91F240E51001032B4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F26F81F240E51001032B4 /* Foundation.framework */; }; 752F26FB1F240E69001032B4 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F26FA1F240E69001032B4 /* IOKit.framework */; }; 752F27011F242BAF001032B4 /* prefs_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 752F27001F242BAF001032B4 /* prefs_sdl.cpp */; }; 752F27031F242F51001032B4 /* xpram_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 752F27021F242F51001032B4 /* xpram_sdl.cpp */; }; + 752F27141F251B5C001032B4 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F270D1F251B4A001032B4 /* SDL2.framework */; }; + 752F27151F251B5C001032B4 /* SDL2.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 752F270D1F251B4A001032B4 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 7539DFBF1F23B17E006B2DF2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7539DFBE1F23B17E006B2DF2 /* Assets.xcassets */; }; 7539E1251F23B25A006B2DF2 /* adb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFC91F23B25A006B2DF2 /* adb.cpp */; }; 7539E1261F23B25A006B2DF2 /* audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFCA1F23B25A006B2DF2 /* audio.cpp */; }; @@ -102,6 +102,44 @@ 7539E2AB1F23CDB7006B2DF2 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 7539E2AA1F23CDB7006B2DF2 /* Info.plist */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 752F270C1F251B4A001032B4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 752F27051F251B4A001032B4 /* SDL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = BECDF66C0761BA81005FE872; + remoteInfo = Framework; + }; + 752F270E1F251B4A001032B4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 752F27051F251B4A001032B4 /* SDL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = BECDF6B30761BA81005FE872; + remoteInfo = "Static Library"; + }; + 752F27101F251B4A001032B4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 752F27051F251B4A001032B4 /* SDL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = DB31407717554B71006C0E22; + remoteInfo = "Shared Library"; + }; + 752F27121F251B4A001032B4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 752F27051F251B4A001032B4 /* SDL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = BECDF6BE0761BA81005FE872; + remoteInfo = "Standard DMG"; + }; + 752F27161F251B5C001032B4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 752F27051F251B4A001032B4 /* SDL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = BECDF5FE0761BA81005FE872; + remoteInfo = Framework; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ 752F26F31F240140001032B4 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; @@ -109,7 +147,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 752F26F21F240140001032B4 /* SDL2.framework in Embed Frameworks */, + 752F27151F251B5C001032B4 /* SDL2.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -121,6 +159,7 @@ 752F26FA1F240E69001032B4 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 752F27001F242BAF001032B4 /* prefs_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = prefs_sdl.cpp; sourceTree = ""; }; 752F27021F242F51001032B4 /* xpram_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xpram_sdl.cpp; sourceTree = ""; }; + 752F27051F251B4A001032B4 /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../../../external/SDL/Xcode/SDL/SDL.xcodeproj; sourceTree = ""; }; 7539DFB21F23B17E006B2DF2 /* BasiliskII.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BasiliskII.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7539DFBE1F23B17E006B2DF2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 7539DFC91F23B25A006B2DF2 /* adb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = adb.cpp; path = ../adb.cpp; sourceTree = ""; }; @@ -224,7 +263,6 @@ 7539E1221F23B25A006B2DF2 /* user_strings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = user_strings.cpp; path = ../user_strings.cpp; sourceTree = ""; }; 7539E1231F23B25A006B2DF2 /* video.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = video.cpp; path = ../video.cpp; sourceTree = ""; }; 7539E1241F23B25A006B2DF2 /* xpram.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = xpram.cpp; path = ../xpram.cpp; sourceTree = ""; }; - 7539E1E51F23B288006B2DF2 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = /Library/Frameworks/SDL2.framework; sourceTree = ""; }; 7539E1F01F23B329006B2DF2 /* bincue_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bincue_unix.cpp; sourceTree = ""; }; 7539E1F11F23B329006B2DF2 /* bincue_unix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bincue_unix.h; sourceTree = ""; }; 7539E1F81F23B329006B2DF2 /* gtk-osx.patch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "gtk-osx.patch"; sourceTree = ""; }; @@ -285,9 +323,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 752F27141F251B5C001032B4 /* SDL2.framework in Frameworks */, 752F26FB1F240E69001032B4 /* IOKit.framework in Frameworks */, 752F26F91F240E51001032B4 /* Foundation.framework in Frameworks */, - 752F26F11F240140001032B4 /* SDL2.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -303,13 +341,32 @@ name = Frameworks; sourceTree = ""; }; + 752F27041F251B27001032B4 /* external */ = { + isa = PBXGroup; + children = ( + 752F27051F251B4A001032B4 /* SDL.xcodeproj */, + ); + name = external; + sourceTree = ""; + }; + 752F27061F251B4A001032B4 /* Products */ = { + isa = PBXGroup; + children = ( + 752F270D1F251B4A001032B4 /* SDL2.framework */, + 752F270F1F251B4A001032B4 /* libSDL2.a */, + 752F27111F251B4A001032B4 /* libSDL2.dylib */, + 752F27131F251B4A001032B4 /* Standard DMG */, + ); + name = Products; + sourceTree = ""; + }; 7539DFA91F23B17E006B2DF2 = { isa = PBXGroup; children = ( 7539E1E41F23B25E006B2DF2 /* src */, + 752F27041F251B27001032B4 /* external */, 7539DFB41F23B17E006B2DF2 /* Assets */, 7539DFB31F23B17E006B2DF2 /* Products */, - 7539E1E51F23B288006B2DF2 /* SDL2.framework */, 752F26F71F240E51001032B4 /* Frameworks */, ); sourceTree = ""; @@ -608,6 +665,7 @@ isa = PBXNativeTarget; buildConfigurationList = 7539DFC61F23B17E006B2DF2 /* Build configuration list for PBXNativeTarget "BasiliskII" */; buildPhases = ( + 752F27181F251CB1001032B4 /* Run Script */, 7539DFAE1F23B17E006B2DF2 /* Sources */, 7539DFAF1F23B17E006B2DF2 /* Frameworks */, 7539DFB01F23B17E006B2DF2 /* Resources */, @@ -616,6 +674,7 @@ buildRules = ( ); dependencies = ( + 752F27171F251B5C001032B4 /* PBXTargetDependency */, ); name = BasiliskII; productName = BasiliskII; @@ -653,6 +712,10 @@ ProductGroup = 7539E0041F23B25A006B2DF2 /* Products */; ProjectRef = 7539E0031F23B25A006B2DF2 /* BasiliskII.xcodeproj */; }, + { + ProductGroup = 752F27061F251B4A001032B4 /* Products */; + ProjectRef = 752F27051F251B4A001032B4 /* SDL.xcodeproj */; + }, ); projectRoot = ""; targets = ( @@ -661,6 +724,37 @@ }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + 752F270D1F251B4A001032B4 /* SDL2.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = SDL2.framework; + remoteRef = 752F270C1F251B4A001032B4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 752F270F1F251B4A001032B4 /* libSDL2.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libSDL2.a; + remoteRef = 752F270E1F251B4A001032B4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 752F27111F251B4A001032B4 /* libSDL2.dylib */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.dylib"; + path = libSDL2.dylib; + remoteRef = 752F27101F251B4A001032B4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 752F27131F251B4A001032B4 /* Standard DMG */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = "Standard DMG"; + remoteRef = 752F27121F251B4A001032B4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ 7539DFB01F23B17E006B2DF2 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -700,6 +794,23 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 752F27181F251CB1001032B4 /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo Hello World"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 7539DFAE1F23B17E006B2DF2 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -770,6 +881,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 752F27171F251B5C001032B4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Framework; + targetProxy = 752F27161F251B5C001032B4 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ 7539E00F1F23B25A006B2DF2 /* InfoPlist.strings */ = { isa = PBXVariantGroup; @@ -824,7 +943,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL2.framework/Headers, + "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", ../UNIX, ../include, ., @@ -873,7 +992,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL2.framework/Headers, + "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", ../UNIX, ../include, ., diff --git a/external/SDL b/external/SDL new file mode 160000 index 00000000..5d7cfcca --- /dev/null +++ b/external/SDL @@ -0,0 +1 @@ +Subproject commit 5d7cfcca344034aff9327f77fc181ae3754e7a90 From 84282f45256c3e1577fb4b89f74f3a670adf8be5 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 23 Jul 2017 15:13:50 -0400 Subject: [PATCH 11/85] bug-fix: buffer-overflow in SDL2 audio code --- BasiliskII/src/SDL/audio_sdl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BasiliskII/src/SDL/audio_sdl.cpp b/BasiliskII/src/SDL/audio_sdl.cpp index bca3ff09..bc5f30a9 100644 --- a/BasiliskII/src/SDL/audio_sdl.cpp +++ b/BasiliskII/src/SDL/audio_sdl.cpp @@ -87,6 +87,7 @@ static bool open_sdl_audio(void) } SDL_AudioSpec audio_spec; + SDL_zero(audio_spec); audio_spec.freq = audio_sample_rates[audio_sample_rate_index] >> 16; audio_spec.format = (audio_sample_sizes[audio_sample_size_index] == 8) ? AUDIO_U8 : AUDIO_S16MSB; audio_spec.channels = audio_channel_counts[audio_channel_count_index]; @@ -99,6 +100,12 @@ static bool open_sdl_audio(void) fprintf(stderr, "WARNING: Cannot open audio: %s\n", SDL_GetError()); return false; } + + // HACK: workaround a possible bug in SDL 2.0.5 (reported via https://bugzilla.libsdl.org/show_bug.cgi?id=3710 ) + // whereby SDL does not update audio_spec.size + if (audio_spec.size == 0) { + audio_spec.size = (SDL_AUDIO_BITSIZE(audio_spec.format) / 8) * audio_spec.channels * audio_spec.samples; + } #if defined(BINCUE) OpenAudio_bincue(audio_spec.freq, audio_spec.format, audio_spec.channels, From 1190a2b127cd1755113c1dfd6a17e19a0f22f1fc Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 23 Jul 2017 15:22:00 -0400 Subject: [PATCH 12/85] bug-fix, Issue #4: prevent guest OS from causing desktop/Spaces switches on OS X host --- BasiliskII/src/SDL/video_sdl.cpp | 84 +++++++++++++++++++++++--------- 1 file changed, 60 insertions(+), 24 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index c788548b..dfcf9ece 100644 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -641,18 +641,13 @@ driver_base::driver_base(SDL_monitor_desc &m) the_buffer_copy = NULL; } -static void shutdown_sdl_video() +static void delete_sdl_video_surfaces() { if (sdl_texture) { SDL_DestroyTexture(sdl_texture); sdl_texture = NULL; } - if (sdl_renderer) { - SDL_DestroyRenderer(sdl_renderer); - sdl_renderer = NULL; - } - if (inner_sdl_surface) { if (inner_sdl_surface == outer_sdl_surface) { outer_sdl_surface = NULL; @@ -666,6 +661,14 @@ static void shutdown_sdl_video() SDL_FreeSurface(outer_sdl_surface); outer_sdl_surface = NULL; } +} + +static void delete_sdl_video_window() +{ + if (sdl_renderer) { + SDL_DestroyRenderer(sdl_renderer); + sdl_renderer = NULL; + } if (sdl_window) { SDL_DestroyWindow(sdl_window); @@ -673,15 +676,22 @@ static void shutdown_sdl_video() } } +static void shutdown_sdl_video() +{ + delete_sdl_video_surfaces(); + delete_sdl_video_window(); +} + static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags) { if (outer_sdl_surface) { - shutdown_sdl_video(); + delete_sdl_video_surfaces(); } int window_width = width; int window_height = height; Uint32 window_flags = 0; + const int window_flags_to_monitor = SDL_WINDOW_FULLSCREEN; if (flags & SDL_WINDOW_FULLSCREEN) { SDL_DisplayMode desktop_mode; @@ -693,31 +703,50 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags window_width = desktop_mode.w; window_height = desktop_mode.h; } + + if (sdl_window) { + int old_window_width, old_window_height, old_window_flags; + SDL_GetWindowSize(sdl_window, &old_window_width, &old_window_height); + old_window_flags = SDL_GetWindowFlags(sdl_window); + if (old_window_width != window_width || + old_window_height != window_height || + (old_window_flags & window_flags_to_monitor) != (window_flags & window_flags_to_monitor)) + { + delete_sdl_video_window(); + } + } - sdl_window = SDL_CreateWindow( - "Basilisk II", - SDL_WINDOWPOS_UNDEFINED, - SDL_WINDOWPOS_UNDEFINED, - window_width, - window_height, - window_flags); - if (!sdl_window) { - shutdown_sdl_video(); - return NULL; - } + if (!sdl_window) { + sdl_window = SDL_CreateWindow( + "Basilisk II", + SDL_WINDOWPOS_UNDEFINED, + SDL_WINDOWPOS_UNDEFINED, + window_width, + window_height, + window_flags); + if (!sdl_window) { + shutdown_sdl_video(); + return NULL; + } + } - sdl_renderer = SDL_CreateRenderer(sdl_window, -1, SDL_RENDERER_ACCELERATED); - if (!sdl_renderer) { - shutdown_sdl_video(); - return NULL; - } + if (!sdl_renderer) { + sdl_renderer = SDL_CreateRenderer(sdl_window, -1, SDL_RENDERER_ACCELERATED); + if (!sdl_renderer) { + shutdown_sdl_video(); + return NULL; + } + } + SDL_assert(sdl_texture == NULL); sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_STREAMING, width, height); if (!sdl_texture) { shutdown_sdl_video(); return NULL; } + SDL_assert(outer_sdl_surface == NULL); + SDL_assert(inner_sdl_surface == NULL); switch (bpp) { case 8: outer_sdl_surface = SDL_CreateRGBSurface(0, width, height, 8, 0, 0, 0, 0); @@ -879,7 +908,14 @@ driver_base::~driver_base() ungrab_mouse(); restore_mouse_accel(); - shutdown_sdl_video(); + // HACK: Just delete instances of SDL_Surface and SDL_Texture, rather + // than also the SDL_Window and SDL_Renderer. This fixes a bug whereby + // OSX hosts, when in fullscreen, will, on a guest OS resolution change, + // do a series of switches (using OSX's "Spaces" feature) to and from + // the Basilisk II desktop, + delete_sdl_video_surfaces(); // This deletes instances of SDL_Surface and SDL_Texture + //shutdown_sdl_video(); // This deletes SDL_Window, SDL_Renderer, in addition to + // instances of SDL_Surface and SDL_Texture. // the_buffer shall always be mapped through vm_acquire_framebuffer() if (the_buffer != VM_MAP_FAILED) { From 54e03d96478e1476c509164876c32aba39371180 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 23 Jul 2017 16:23:51 -0400 Subject: [PATCH 13/85] bug-fix, Issue #2: prevent SDL2 from installing keyboard shortcuts (Command+Q, etc.) on OSX hosts, as they interfere with guest OS use --- .../src/MacOSX/BasiliskII.xcodeproj/project.pbxproj | 10 ++++++++++ BasiliskII/src/MacOSX/utils_macosx.mm | 12 ++++++++++++ BasiliskII/src/Unix/main_unix.cpp | 12 ++++++++++++ 3 files changed, 34 insertions(+) diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index f51fe002..52bebbe5 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -100,6 +100,8 @@ 7539E2A81F23CB9B006B2DF2 /* cpustbl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2A31F23CB9B006B2DF2 /* cpustbl.cpp */; }; 7539E2A91F23CB9B006B2DF2 /* defs68k.c in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2A41F23CB9B006B2DF2 /* defs68k.c */; }; 7539E2AB1F23CDB7006B2DF2 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 7539E2AA1F23CDB7006B2DF2 /* Info.plist */; }; + 756C1B341F252FC100620917 /* utils_macosx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 756C1B331F252FC100620917 /* utils_macosx.mm */; }; + 756C1B391F25306A00620917 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 756C1B381F25306A00620917 /* AppKit.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -316,6 +318,9 @@ 7539E2A31F23CB9B006B2DF2 /* cpustbl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cpustbl.cpp; sourceTree = ""; }; 7539E2A41F23CB9B006B2DF2 /* defs68k.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = defs68k.c; sourceTree = ""; }; 7539E2AA1F23CDB7006B2DF2 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 756C1B321F252FC100620917 /* utils_macosx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils_macosx.h; sourceTree = ""; }; + 756C1B331F252FC100620917 /* utils_macosx.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = utils_macosx.mm; sourceTree = ""; }; + 756C1B381F25306A00620917 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -323,6 +328,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 756C1B391F25306A00620917 /* AppKit.framework in Frameworks */, 752F27141F251B5C001032B4 /* SDL2.framework in Frameworks */, 752F26FB1F240E69001032B4 /* IOKit.framework in Frameworks */, 752F26F91F240E51001032B4 /* Foundation.framework in Frameworks */, @@ -335,6 +341,7 @@ 752F26F71F240E51001032B4 /* Frameworks */ = { isa = PBXGroup; children = ( + 756C1B381F25306A00620917 /* AppKit.framework */, 752F26FA1F240E69001032B4 /* IOKit.framework */, 752F26F81F240E51001032B4 /* Foundation.framework */, ); @@ -456,6 +463,8 @@ 7539E0141F23B25A006B2DF2 /* HowTo.html */, 7539E29C1F23C83F006B2DF2 /* sys_darwin.cpp */, 7539E02B1F23B25A006B2DF2 /* ToDo.html */, + 756C1B321F252FC100620917 /* utils_macosx.h */, + 756C1B331F252FC100620917 /* utils_macosx.mm */, 7539E02E1F23B25A006B2DF2 /* Versions.html */, ); name = MacOSX; @@ -831,6 +840,7 @@ 7539E1711F23B25A006B2DF2 /* rom_patches.cpp in Sources */, 7539E1281F23B25A006B2DF2 /* sigsegv.cpp in Sources */, 7539E1A21F23B25A006B2DF2 /* readcpu.cpp in Sources */, + 756C1B341F252FC100620917 /* utils_macosx.mm in Sources */, 7539E2701F23B32A006B2DF2 /* tinyxml2.cpp in Sources */, 7539E28F1F23C56F006B2DF2 /* ether_dummy.cpp in Sources */, 7539E1721F23B25A006B2DF2 /* rsrc_patches.cpp in Sources */, diff --git a/BasiliskII/src/MacOSX/utils_macosx.mm b/BasiliskII/src/MacOSX/utils_macosx.mm index b653638d..4dd359b2 100644 --- a/BasiliskII/src/MacOSX/utils_macosx.mm +++ b/BasiliskII/src/MacOSX/utils_macosx.mm @@ -28,3 +28,15 @@ void NSAutoReleasePool_wrap(void (*fn)(void)) fn(); [pool release]; } + +void disable_SDL2_macosx_menu_bar_keyboard_shortcuts() { + for (NSMenuItem * menu_item in [NSApp mainMenu].itemArray) { + if (menu_item.hasSubmenu) { + for (NSMenuItem * sub_item in menu_item.submenu.itemArray) { + sub_item.keyEquivalent = @""; + sub_item.keyEquivalentModifierMask = 0; + } + } + } +} + diff --git a/BasiliskII/src/Unix/main_unix.cpp b/BasiliskII/src/Unix/main_unix.cpp index f8dc7431..c80f95f4 100644 --- a/BasiliskII/src/Unix/main_unix.cpp +++ b/BasiliskII/src/Unix/main_unix.cpp @@ -522,6 +522,18 @@ int main(int argc, char **argv) QuitEmulator(); } atexit(SDL_Quit); + +#if __MACOSX__ + // On Mac OS X hosts, SDL2 will create its own menu bar. This is mostly OK, + // except that it will also install keyboard shortcuts, such as Command + Q, + // which can interfere with keyboard shortcuts in the guest OS. + // + // HACK: disable these shortcuts, while leaving all other pieces of SDL2's + // menu bar in-place. + extern void disable_SDL2_macosx_menu_bar_keyboard_shortcuts(); + disable_SDL2_macosx_menu_bar_keyboard_shortcuts(); +#endif + #endif // Init system routines From 87052762063f10c63d3b1c62c6e92b29762e9bcd Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 23 Jul 2017 20:49:29 -0400 Subject: [PATCH 14/85] updated Windows + MSVC support with SDL2 support --- BasiliskII/src/CrossPlatform/video_vosf.h | 9 +- BasiliskII/src/SDL/video_sdl.cpp | 5 +- BasiliskII/src/Windows/BasiliskII.sln | 280 ++-- BasiliskII/src/Windows/BasiliskII.vcxproj | 1332 ++++++++++--------- BasiliskII/src/Windows/b2ether/packet32.cpp | 1 - BasiliskII/src/Windows/main_windows.cpp | 20 +- 6 files changed, 834 insertions(+), 813 deletions(-) diff --git a/BasiliskII/src/CrossPlatform/video_vosf.h b/BasiliskII/src/CrossPlatform/video_vosf.h index 4a5677e1..fc89e125 100644 --- a/BasiliskII/src/CrossPlatform/video_vosf.h +++ b/BasiliskII/src/CrossPlatform/video_vosf.h @@ -514,7 +514,8 @@ static void update_display_window_vosf(VIDEO_DRV_WIN_INIT) VIDEO_DRV_UNLOCK_PIXELS; #ifdef USE_SDL_VIDEO - SDL_UpdateRect(drv->s, 0, y1, VIDEO_MODE_X, height); + //SDL_UpdateRect(drv->s, 0, y1, VIDEO_MODE_X, height); + update_sdl_video(); #else if (VIDEO_DRV_HAVE_SHM) XShmPutImage(x_display, VIDEO_DRV_WINDOW, VIDEO_DRV_GC, VIDEO_DRV_IMAGE, 0, y1, 0, y1, VIDEO_MODE_X, height, 0); @@ -558,7 +559,8 @@ static void update_display_dga_vosf(VIDEO_DRV_DGA_INIT) i2 += scr_bytes_per_row; } #ifdef USE_SDL_VIDEO - SDL_UpdateRect(drv->s, 0, 0, VIDEO_MODE_X, VIDEO_MODE_Y); + //SDL_UpdateRect(drv->s, 0, 0, VIDEO_MODE_X, VIDEO_MODE_Y); + update_sdl_video(); #endif VIDEO_DRV_UNLOCK_PIXELS; return; @@ -664,7 +666,8 @@ static void update_display_dga_vosf(VIDEO_DRV_DGA_INIT) #endif } #ifdef USE_SDL_VIDEO - SDL_UpdateRects(drv->s, bbi, bb); + //SDL_UpdateRects(drv->s, bbi, bb); + update_sdl_video(); #endif VIDEO_DRV_UNLOCK_PIXELS; } diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index dfcf9ece..23f6efc8 100644 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -129,7 +129,7 @@ static bool use_keycodes = false; // Flag: Use keycodes rather than keysyms static int keycode_table[256]; // X keycode -> Mac keycode translation table // SDL variables -static SDL_Window * sdl_window = NULL; // Wraps an OS-native window +SDL_Window * sdl_window = NULL; // Wraps an OS-native window static SDL_Surface * inner_sdl_surface = NULL; // Surface in guest-OS display format static SDL_Surface * outer_sdl_surface = NULL; // Surface in host-OS display format static SDL_Renderer * sdl_renderer = NULL; // Handle to SDL2 renderer @@ -164,6 +164,7 @@ static void (*video_refresh)(void); // Prototypes static int redraw_func(void *arg); +static int update_sdl_video(); // From sys_unix.cpp extern void SysMountFirstFloppy(void); @@ -175,7 +176,7 @@ extern void SysMountFirstFloppy(void); #ifdef ENABLE_VOSF #define SDL_VIDEO_LOCK_VOSF_SURFACE(SURFACE) do { \ - if ((SURFACE)->flags & (SDL_FULLSCREEN)) \ + if (sdl_window && SDL_GetWindowFlags(sdl_window) & (SDL_WINDOW_FULLSCREEN)) \ the_host_buffer = (uint8 *)(SURFACE)->pixels; \ } while (0) #else diff --git a/BasiliskII/src/Windows/BasiliskII.sln b/BasiliskII/src/Windows/BasiliskII.sln index 1c4b7a1f..65b6b30f 100644 --- a/BasiliskII/src/Windows/BasiliskII.sln +++ b/BasiliskII/src/Windows/BasiliskII.sln @@ -1,140 +1,140 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BasiliskII", "BasiliskII.vcxproj", "{1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}" - ProjectSection(ProjectDependencies) = postProject - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48} = {1A9EA738-8DA7-422F-9E0D-BE92893C0E48} - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04} = {95933FE9-C27C-41F0-B4AF-EAAADE94FD04} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "build68k", "build68k.vcxproj", "{7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gencpu", "gencpu.vcxproj", "{1A9EA738-8DA7-422F-9E0D-BE92893C0E48}" - ProjectSection(ProjectDependencies) = postProject - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0} = {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gencomp", "gencomp.vcxproj", "{95933FE9-C27C-41F0-B4AF-EAAADE94FD04}" - ProjectSection(ProjectDependencies) = postProject - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0} = {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLmain", "..\..\..\..\SDL-1.2.15\VisualC\SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL", "..\..\..\..\SDL-1.2.15\VisualC\SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug JIT|x64 = Debug JIT|x64 - Debug JIT|x86 = Debug JIT|x86 - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release JIT|x64 = Release JIT|x64 - Release JIT|x86 = Release JIT|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug JIT|x64.ActiveCfg = Debug JIT|x64 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug JIT|x64.Build.0 = Debug JIT|x64 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug JIT|x86.ActiveCfg = Debug JIT|Win32 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug JIT|x86.Build.0 = Debug JIT|Win32 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug|x64.ActiveCfg = Debug|x64 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug|x64.Build.0 = Debug|x64 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug|x86.ActiveCfg = Debug|Win32 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug|x86.Build.0 = Debug|Win32 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release JIT|x64.ActiveCfg = Release JIT|x64 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release JIT|x64.Build.0 = Release JIT|x64 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release JIT|x86.ActiveCfg = Release JIT|Win32 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release JIT|x86.Build.0 = Release JIT|Win32 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release|x64.ActiveCfg = Release|x64 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release|x64.Build.0 = Release|x64 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release|x86.ActiveCfg = Release|Win32 - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release|x86.Build.0 = Release|Win32 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug JIT|x64.ActiveCfg = Debug|x64 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug JIT|x64.Build.0 = Debug|x64 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug JIT|x86.ActiveCfg = Debug|Win32 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug JIT|x86.Build.0 = Debug|Win32 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug|x64.ActiveCfg = Debug|x64 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug|x64.Build.0 = Debug|x64 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug|x86.ActiveCfg = Debug|Win32 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug|x86.Build.0 = Debug|Win32 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release JIT|x64.ActiveCfg = Release|x64 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release JIT|x64.Build.0 = Release|x64 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release JIT|x86.ActiveCfg = Release|Win32 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release JIT|x86.Build.0 = Release|Win32 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release|x64.ActiveCfg = Release|x64 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release|x64.Build.0 = Release|x64 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release|x86.ActiveCfg = Release|Win32 - {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release|x86.Build.0 = Release|Win32 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug JIT|x64.ActiveCfg = Debug|x64 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug JIT|x64.Build.0 = Debug|x64 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug JIT|x86.ActiveCfg = Debug|Win32 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug JIT|x86.Build.0 = Debug|Win32 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug|x64.ActiveCfg = Debug|x64 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug|x64.Build.0 = Debug|x64 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug|x86.ActiveCfg = Debug|Win32 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug|x86.Build.0 = Debug|Win32 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release JIT|x64.ActiveCfg = Release|x64 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release JIT|x64.Build.0 = Release|x64 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release JIT|x86.ActiveCfg = Release|Win32 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release JIT|x86.Build.0 = Release|Win32 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release|x64.ActiveCfg = Release|x64 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release|x64.Build.0 = Release|x64 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release|x86.ActiveCfg = Release|Win32 - {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release|x86.Build.0 = Release|Win32 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug JIT|x64.ActiveCfg = Debug|x64 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug JIT|x64.Build.0 = Debug|x64 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug JIT|x86.ActiveCfg = Debug|Win32 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug JIT|x86.Build.0 = Debug|Win32 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug|x64.ActiveCfg = Debug|x64 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug|x64.Build.0 = Debug|x64 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug|x86.ActiveCfg = Debug|Win32 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug|x86.Build.0 = Debug|Win32 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release JIT|x64.ActiveCfg = Release|x64 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release JIT|x64.Build.0 = Release|x64 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release JIT|x86.ActiveCfg = Release|Win32 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release JIT|x86.Build.0 = Release|Win32 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release|x64.ActiveCfg = Release|x64 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release|x64.Build.0 = Release|x64 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release|x86.ActiveCfg = Release|Win32 - {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release|x86.Build.0 = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug JIT|x64.ActiveCfg = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug JIT|x64.Build.0 = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug JIT|x86.ActiveCfg = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug JIT|x86.Build.0 = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x86.ActiveCfg = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x86.Build.0 = Debug|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release JIT|x64.ActiveCfg = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release JIT|x64.Build.0 = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release JIT|x86.ActiveCfg = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release JIT|x86.Build.0 = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x86.ActiveCfg = Release|Win32 - {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x86.Build.0 = Release|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug JIT|x64.ActiveCfg = Debug|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug JIT|x64.Build.0 = Debug|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug JIT|x86.ActiveCfg = Debug|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug JIT|x86.Build.0 = Debug|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x86.ActiveCfg = Debug|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x86.Build.0 = Debug|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release JIT|x64.ActiveCfg = Release|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release JIT|x64.Build.0 = Release|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release JIT|x86.ActiveCfg = Release|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release JIT|x86.Build.0 = Release|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x86.ActiveCfg = Release|Win32 - {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26430.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BasiliskII", "BasiliskII.vcxproj", "{1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}" + ProjectSection(ProjectDependencies) = postProject + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48} = {1A9EA738-8DA7-422F-9E0D-BE92893C0E48} + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04} = {95933FE9-C27C-41F0-B4AF-EAAADE94FD04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "build68k", "build68k.vcxproj", "{7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gencpu", "gencpu.vcxproj", "{1A9EA738-8DA7-422F-9E0D-BE92893C0E48}" + ProjectSection(ProjectDependencies) = postProject + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0} = {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gencomp", "gencomp.vcxproj", "{95933FE9-C27C-41F0-B4AF-EAAADE94FD04}" + ProjectSection(ProjectDependencies) = postProject + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0} = {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2", "..\..\..\external\SDL\VisualC\SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL2main", "..\..\..\external\SDL\VisualC\SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug JIT|x64 = Debug JIT|x64 + Debug JIT|x86 = Debug JIT|x86 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release JIT|x64 = Release JIT|x64 + Release JIT|x86 = Release JIT|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug JIT|x64.ActiveCfg = Debug JIT|x64 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug JIT|x64.Build.0 = Debug JIT|x64 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug JIT|x86.ActiveCfg = Debug JIT|Win32 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug JIT|x86.Build.0 = Debug JIT|Win32 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug|x64.ActiveCfg = Debug|x64 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug|x64.Build.0 = Debug|x64 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug|x86.ActiveCfg = Debug|Win32 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Debug|x86.Build.0 = Debug|Win32 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release JIT|x64.ActiveCfg = Release JIT|x64 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release JIT|x64.Build.0 = Release JIT|x64 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release JIT|x86.ActiveCfg = Release JIT|Win32 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release JIT|x86.Build.0 = Release JIT|Win32 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release|x64.ActiveCfg = Release|x64 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release|x64.Build.0 = Release|x64 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release|x86.ActiveCfg = Release|Win32 + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0}.Release|x86.Build.0 = Release|Win32 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug JIT|x64.ActiveCfg = Debug|x64 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug JIT|x64.Build.0 = Debug|x64 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug JIT|x86.ActiveCfg = Debug|Win32 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug JIT|x86.Build.0 = Debug|Win32 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug|x64.ActiveCfg = Debug|x64 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug|x64.Build.0 = Debug|x64 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug|x86.ActiveCfg = Debug|Win32 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Debug|x86.Build.0 = Debug|Win32 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release JIT|x64.ActiveCfg = Release|x64 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release JIT|x64.Build.0 = Release|x64 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release JIT|x86.ActiveCfg = Release|Win32 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release JIT|x86.Build.0 = Release|Win32 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release|x64.ActiveCfg = Release|x64 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release|x64.Build.0 = Release|x64 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release|x86.ActiveCfg = Release|Win32 + {7BCEAB0D-0C62-46E1-BA1E-AF42798B67D0}.Release|x86.Build.0 = Release|Win32 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug JIT|x64.ActiveCfg = Debug|x64 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug JIT|x64.Build.0 = Debug|x64 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug JIT|x86.ActiveCfg = Debug|Win32 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug JIT|x86.Build.0 = Debug|Win32 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug|x64.ActiveCfg = Debug|x64 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug|x64.Build.0 = Debug|x64 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug|x86.ActiveCfg = Debug|Win32 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Debug|x86.Build.0 = Debug|Win32 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release JIT|x64.ActiveCfg = Release|x64 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release JIT|x64.Build.0 = Release|x64 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release JIT|x86.ActiveCfg = Release|Win32 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release JIT|x86.Build.0 = Release|Win32 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release|x64.ActiveCfg = Release|x64 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release|x64.Build.0 = Release|x64 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release|x86.ActiveCfg = Release|Win32 + {1A9EA738-8DA7-422F-9E0D-BE92893C0E48}.Release|x86.Build.0 = Release|Win32 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug JIT|x64.ActiveCfg = Debug|x64 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug JIT|x64.Build.0 = Debug|x64 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug JIT|x86.ActiveCfg = Debug|Win32 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug JIT|x86.Build.0 = Debug|Win32 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug|x64.ActiveCfg = Debug|x64 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug|x64.Build.0 = Debug|x64 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug|x86.ActiveCfg = Debug|Win32 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Debug|x86.Build.0 = Debug|Win32 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release JIT|x64.ActiveCfg = Release|x64 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release JIT|x64.Build.0 = Release|x64 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release JIT|x86.ActiveCfg = Release|Win32 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release JIT|x86.Build.0 = Release|Win32 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release|x64.ActiveCfg = Release|x64 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release|x64.Build.0 = Release|x64 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release|x86.ActiveCfg = Release|Win32 + {95933FE9-C27C-41F0-B4AF-EAAADE94FD04}.Release|x86.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug JIT|x64.ActiveCfg = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug JIT|x64.Build.0 = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug JIT|x86.ActiveCfg = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug JIT|x86.Build.0 = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x86.ActiveCfg = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x86.Build.0 = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release JIT|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release JIT|x64.Build.0 = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release JIT|x86.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release JIT|x86.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x86.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x86.Build.0 = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug JIT|x64.ActiveCfg = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug JIT|x64.Build.0 = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug JIT|x86.ActiveCfg = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug JIT|x86.Build.0 = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x86.ActiveCfg = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x86.Build.0 = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release JIT|x64.ActiveCfg = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release JIT|x64.Build.0 = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release JIT|x86.ActiveCfg = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release JIT|x86.Build.0 = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x86.ActiveCfg = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/BasiliskII/src/Windows/BasiliskII.vcxproj b/BasiliskII/src/Windows/BasiliskII.vcxproj index cd05c309..ef01b7ed 100644 --- a/BasiliskII/src/Windows/BasiliskII.vcxproj +++ b/BasiliskII/src/Windows/BasiliskII.vcxproj @@ -1,685 +1,697 @@ - - - - - Debug JIT - Win32 - - - Debug JIT - x64 - - - Debug - Win32 - - - Debug - x64 - - - Release JIT - Win32 - - - Release JIT - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - true - - - true - true - true - true - true - true - true - true - - - true - true - true - true - - - true - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {81ce8daf-ebb2-4761-8e45-b71abcca8c68} - - - {da956fd3-e142-46f2-9dd5-c78bebb56b7a} - - - - {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0} - Win32Proj - BasiliskII - 8.1 - - - - Application - true - v140_xp - Unicode - - - Application - true - v140_xp - Unicode - - - Application - true - v140_xp - Unicode - - - Application - true - v140_xp - Unicode - - - Application - false - v140_xp - true - Unicode - - - Application - false - v140_xp - true - Unicode - - - Application - false - v140_xp - true - Unicode - - - Application - false - v140_xp - true - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - $(Configuration)\$(ProjectName)\ - ClCompile - - - ClCompile - true - - - true - $(Configuration)\$(ProjectName)\ - ClCompile - - - ClCompile - true - - - false - $(Configuration)\$(ProjectName)\ - ClCompile - - - ClCompile - false - - - false - $(Configuration)\$(ProjectName)\ - ClCompile - - - ClCompile - false - - - - - - Level3 - Disabled - HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\..\SDL-1.2.15\include - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - - - Windows - true - WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - - + + + + + Debug JIT + Win32 + + + Debug JIT + x64 + + + Debug + Win32 + + + Debug + x64 + + + Release JIT + Win32 + + + Release JIT + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + + true + true + true + true + true + true + true + true + + + true + true + true + true + + + true + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {da956fd3-e142-46f2-9dd5-c78bebb56b7a} + + + {81ce8daf-ebb2-4761-8e45-b71abcca8c68} + + + + {1AAA5D96-9498-4EB5-A436-0143E2B7A0B0} + Win32Proj + BasiliskII + 8.1 + + + + Application + true + v140_xp + Unicode + + + Application + true + v140_xp + Unicode + + + Application + true + v140_xp + Unicode + + + Application + true + v140_xp + Unicode + + + Application + false + v140_xp + true + Unicode + + + Application + false + v140_xp + true + Unicode + + + Application + false + v140_xp + true + Unicode + + + Application + false + v140_xp + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + $(Configuration)\$(ProjectName)\ + ClCompile + + + ClCompile + true + + + true + $(Configuration)\$(ProjectName)\ + ClCompile + + + ClCompile + true + + + false + $(Configuration)\$(ProjectName)\ + ClCompile + + + ClCompile + false + + + false + $(Configuration)\$(ProjectName)\ + ClCompile + + + ClCompile + false + + + + + + Level3 + Disabled + HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\external\SDL\include + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + + + Windows + true + WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) + + cd ..\uae_cpu "$(ToolsDir)gencpu" "$(ToolsDir)gencomp" - - - - Generating CPU emulation sources... - - - ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) - - - $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe - - - - - - - Level3 - Disabled - HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\..\SDL-1.2.15\include - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - - - Windows - true - WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - - + + + + Generating CPU emulation sources... + + + ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) + + + $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe + + + BasiliskII_MSVC_PostBuild.bat "$(SolutionDir)" "$(Platform)" "$(Configuration)" "$(OutDir)" + + + + + + + Level3 + Disabled + HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\external\SDL\include + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + + + Windows + true + WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) + + cd ..\uae_cpu "$(ToolsDir)gencpu" "$(ToolsDir)gencomp" - - - - Generating CPU emulation sources... - - - ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) - - - $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe - - - - - - - Level3 - Disabled - HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;USE_JIT;USE_JIT_FPU;JIT_DEBUG;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\..\SDL-1.2.15\include - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - - - Windows - true - WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - - + + + + Generating CPU emulation sources... + + + ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) + + + $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe + + + + + + + Level3 + Disabled + HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;USE_JIT;USE_JIT_FPU;JIT_DEBUG;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\external\SDL\include + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + + + Windows + true + WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) + + cd ..\uae_cpu "$(ToolsDir)gencpu" "$(ToolsDir)gencomp" - - - - Generating CPU emulation sources... - - - ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) - - - $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe - - - - - - - Level3 - Disabled - HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;USE_JIT;USE_JIT_FPU;JIT_DEBUG;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\..\SDL-1.2.15\include - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - - - Windows - true - WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - - + + + + Generating CPU emulation sources... + + + ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) + + + $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe + + + BasiliskII_MSVC_PostBuild.bat "$(SolutionDir)" "$(Platform)" "$(Configuration)" "$(OutDir)" + + + + + + + Level3 + Disabled + HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;USE_JIT;USE_JIT_FPU;JIT_DEBUG;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\external\SDL\include + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + + + Windows + true + WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) + + cd ..\uae_cpu "$(ToolsDir)gencpu" "$(ToolsDir)gencomp" - - - - Generating CPU emulation sources... - - - ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) - - - $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe - - - - - Level3 - - - MaxSpeed - true - true - HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;OPTIMIZED_FLAGS;%(PreprocessorDefinitions) - ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\..\SDL-1.2.15\include - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - - - Windows - true - true - true - WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - - + + + + Generating CPU emulation sources... + + + ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) + + + $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe + + + + + Level3 + + + MaxSpeed + true + true + HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;OPTIMIZED_FLAGS;%(PreprocessorDefinitions) + ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\external\SDL\include + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + + + Windows + true + true + true + WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) + + cd ..\uae_cpu "$(ToolsDir)gencpu" "$(ToolsDir)gencomp" - - - - Generating CPU emulation sources... - - - ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) - - - $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe - - - - - Level3 - - - MaxSpeed - true - true - HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;OPTIMIZED_FLAGS;%(PreprocessorDefinitions) - ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\..\SDL-1.2.15\include - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - - - Windows - true - true - true - WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - - + + + + Generating CPU emulation sources... + + + ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) + + + $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe + + + BasiliskII_MSVC_PostBuild.bat "$(SolutionDir)" "$(Platform)" "$(Configuration)" "$(OutDir)" + + + + + Level3 + + + MaxSpeed + true + true + HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;OPTIMIZED_FLAGS;%(PreprocessorDefinitions) + ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\external\SDL\include + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + + + Windows + true + true + true + WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) + + cd ..\uae_cpu "$(ToolsDir)gencpu" "$(ToolsDir)gencomp" - - - - Generating CPU emulation sources... - - - ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) - - - $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe - - - - - Level3 - - - MaxSpeed - true - true - HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;OPTIMIZED_FLAGS;USE_JIT;USE_JIT_FPU;%(PreprocessorDefinitions) - ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\..\SDL-1.2.15\include - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - - - Windows - true - true - true - WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - - + + + + Generating CPU emulation sources... + + + ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) + + + $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe + + + + + Level3 + + + MaxSpeed + true + true + HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;OPTIMIZED_FLAGS;USE_JIT;USE_JIT_FPU;%(PreprocessorDefinitions) + ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\external\SDL\include + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + + + Windows + true + true + true + WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) + + cd ..\uae_cpu "$(ToolsDir)gencpu" "$(ToolsDir)gencomp" - - - - Generating CPU emulation sources... - - - ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) - - - $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe - - - - - Level3 - - - MaxSpeed - true - true - HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;OPTIMIZED_FLAGS;USE_JIT;USE_JIT_FPU;%(PreprocessorDefinitions) - ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\..\SDL-1.2.15\include - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - $(IntDir)%(RelativeDir) - - - Windows - true - true - true - WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - - + + + + Generating CPU emulation sources... + + + ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) + + + $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe + + + BasiliskII_MSVC_PostBuild.bat "$(SolutionDir)" "$(Platform)" "$(Configuration)" "$(OutDir)" + + + + + Level3 + + + MaxSpeed + true + true + HAVE_CONFIG_H;DIRECT_ADDRESSING;UNALIGNED_PROFITABLE;MSVC_INTRINSICS;OPTIMIZED_FLAGS;SAHF_SETO_PROFITABLE;FPU_IEEE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;OPTIMIZED_FLAGS;USE_JIT;USE_JIT_FPU;%(PreprocessorDefinitions) + ..\include;..\uae_cpu;.;..\CrossPlatform;..\slirp;..\..\..\external\SDL\include + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + $(IntDir)%(RelativeDir) + + + Windows + true + true + true + WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) + + cd ..\uae_cpu "$(ToolsDir)gencpu" "$(ToolsDir)gencomp" - - - - Generating CPU emulation sources... - - - ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) - - - $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe - - - - - + + + + Generating CPU emulation sources... + + + ..\uae_cpu\cpustbl.cpp;..\uae_cpu\cpustbl_nf.cpp;..\uae_cpu\cputbl.h;..\uae_cpu\cpuemu.cpp;..\uae_cpu\cpuemu_nf.cpp;..\uae_cpu\compstbl.cpp;..\uae_cpu\comptbl.h;..\uae_cpu\compemu.cpp;%(Outputs) + + + $(ToolsDir)gencpu.exe;$(ToolsDir)gencomp.exe + + + + + \ No newline at end of file diff --git a/BasiliskII/src/Windows/b2ether/packet32.cpp b/BasiliskII/src/Windows/b2ether/packet32.cpp index 72efb1fe..93dd647f 100755 --- a/BasiliskII/src/Windows/b2ether/packet32.cpp +++ b/BasiliskII/src/Windows/b2ether/packet32.cpp @@ -26,7 +26,6 @@ #include #include #include "cpu_emulation.h" -typedef unsigned long ULONG_PTR, *PULONG_PTR; // VC6 does not have this, Platform SDK has. // In case of errors, try to comment out, the needed diff --git a/BasiliskII/src/Windows/main_windows.cpp b/BasiliskII/src/Windows/main_windows.cpp index 7d555c98..45d50a7e 100755 --- a/BasiliskII/src/Windows/main_windows.cpp +++ b/BasiliskII/src/Windows/main_windows.cpp @@ -283,10 +283,6 @@ int main(int argc, char **argv) QuitEmulator(); #endif - // FIXME: default to DIB driver - if (getenv("SDL_VIDEODRIVER") == NULL) - putenv("SDL_VIDEODRIVER=windib"); - // Initialize SDL system int sdl_flags = 0; #ifdef USE_SDL_VIDEO @@ -400,7 +396,7 @@ int main(int argc, char **argv) emul_thread = GetCurrentThread(); // SDL threads available, start 60Hz thread - tick_thread_active = ((tick_thread = SDL_CreateThread(tick_func, NULL)) != NULL); + tick_thread_active = ((tick_thread = SDL_CreateThread(tick_func, "Redraw Thread", NULL)) != NULL); if (!tick_thread_active) { sprintf(str, GetString(STR_TICK_THREAD_ERR), strerror(errno)); ErrorAlert(str); @@ -410,7 +406,7 @@ int main(int argc, char **argv) // Start XPRAM watchdog thread memcpy(last_xpram, XPRAM, XPRAM_SIZE); - xpram_thread_active = ((xpram_thread = SDL_CreateThread(xpram_func, NULL)) != NULL); + xpram_thread_active = ((xpram_thread = SDL_CreateThread(xpram_func, "XPRAM Thread", NULL)) != NULL); D(bug("XPRAM thread started\n")); // Start 68k and jump to ROM boot routine @@ -625,11 +621,21 @@ static int tick_func(void *arg) #ifdef USE_SDL_VIDEO #include +extern SDL_Window *sdl_window; HWND GetMainWindowHandle(void) { SDL_SysWMinfo wmInfo; SDL_VERSION(&wmInfo.version); - return SDL_GetWMInfo(&wmInfo) ? wmInfo.window : NULL; + if (!sdl_window) { + return NULL; + } + if (!SDL_GetWindowWMInfo(sdl_window, &wmInfo)) { + return NULL; + } + if (wmInfo.subsystem != SDL_SYSWM_WINDOWS) { + return NULL; + } + return wmInfo.info.win.window; } #endif From 8874ba549fc234197cfc8772465aa9666cfd06b7 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 23 Jul 2017 21:05:08 -0400 Subject: [PATCH 15/85] added missing MSVC post-build script --- BasiliskII/src/Windows/BasiliskII_MSVC_PostBuild.bat | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 BasiliskII/src/Windows/BasiliskII_MSVC_PostBuild.bat diff --git a/BasiliskII/src/Windows/BasiliskII_MSVC_PostBuild.bat b/BasiliskII/src/Windows/BasiliskII_MSVC_PostBuild.bat new file mode 100644 index 00000000..54d63182 --- /dev/null +++ b/BasiliskII/src/Windows/BasiliskII_MSVC_PostBuild.bat @@ -0,0 +1,7 @@ +@echo off +set SOLUTION_DIR=%~1 +set PLATFORM=%~2 +set CONFIGURATION=%~3 +set CONFIGURATION=%CONFIGURATION: JIT=% +set OUT_DIR=%~4 +xcopy /y "%SOLUTION_DIR%%PLATFORM%\%CONFIGURATION%\SDL2.dll" "%OUT_DIR%" From eadd2951b739963c12cafa07721f743c727d7f08 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Wed, 26 Jul 2017 22:03:56 -0400 Subject: [PATCH 16/85] added gitignore settings for Jetbrains' IDEs --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 8a9e32bb..4c203053 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,8 @@ xcuserdata/ *.moved-aside *.xccheckout *.xcscmblueprint + +# +# JetBrains IDE settings +# +*.idea From e0cdbe2a305c39b9bb6ebce69cf446cce73203fc Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Tue, 1 Aug 2017 18:02:29 -0400 Subject: [PATCH 17/85] added "idlewait" support to SDL2 backend --- BasiliskII/src/SDL/prefs_sdl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/BasiliskII/src/SDL/prefs_sdl.cpp b/BasiliskII/src/SDL/prefs_sdl.cpp index 577d1084..c9d99816 100644 --- a/BasiliskII/src/SDL/prefs_sdl.cpp +++ b/BasiliskII/src/SDL/prefs_sdl.cpp @@ -30,6 +30,7 @@ // Platform-specific preferences items prefs_desc platform_prefs_items[] = { + {"idlewait", TYPE_BOOLEAN, false, "sleep when idle"}, {NULL, TYPE_END, false} // End of list }; From 251c185dcd892d7fd3dccc41fbdc87143f778db8 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Thu, 10 Aug 2017 10:57:58 -0400 Subject: [PATCH 18/85] renamed variables in SDL2 backend, for improved readability --- BasiliskII/src/SDL/video_sdl.cpp | 68 ++++++++++++++++---------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 23f6efc8..7d019114 100644 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -130,10 +130,10 @@ static int keycode_table[256]; // X keycode -> Mac keycode translation tabl // SDL variables SDL_Window * sdl_window = NULL; // Wraps an OS-native window -static SDL_Surface * inner_sdl_surface = NULL; // Surface in guest-OS display format -static SDL_Surface * outer_sdl_surface = NULL; // Surface in host-OS display format +static SDL_Surface * host_surface = NULL; // Surface in host-OS display format +static SDL_Surface * guest_surface = NULL; // Surface in guest-OS display format static SDL_Renderer * sdl_renderer = NULL; // Handle to SDL2 renderer -static SDL_Texture * sdl_texture = NULL; // Handle to a GPU texture, with which to draw outer_sdl_surface to +static SDL_Texture * sdl_texture = NULL; // Handle to a GPU texture, with which to draw guest_surface to static int screen_depth; // Depth of current screen //static SDL_Cursor *sdl_cursor; // Copy of Mac cursor static SDL_Palette *sdl_palette = NULL; // Color palette to be used as CLUT and gamma table @@ -649,18 +649,18 @@ static void delete_sdl_video_surfaces() sdl_texture = NULL; } - if (inner_sdl_surface) { - if (inner_sdl_surface == outer_sdl_surface) { - outer_sdl_surface = NULL; + if (host_surface) { + if (host_surface == guest_surface) { + guest_surface = NULL; } - SDL_FreeSurface(inner_sdl_surface); - inner_sdl_surface = NULL; + SDL_FreeSurface(host_surface); + host_surface = NULL; } - if (outer_sdl_surface) { - SDL_FreeSurface(outer_sdl_surface); - outer_sdl_surface = NULL; + if (guest_surface) { + SDL_FreeSurface(guest_surface); + guest_surface = NULL; } } @@ -685,7 +685,7 @@ static void shutdown_sdl_video() static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags) { - if (outer_sdl_surface) { + if (guest_surface) { delete_sdl_video_surfaces(); } @@ -746,61 +746,61 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags return NULL; } - SDL_assert(outer_sdl_surface == NULL); - SDL_assert(inner_sdl_surface == NULL); + SDL_assert(guest_surface == NULL); + SDL_assert(host_surface == NULL); switch (bpp) { case 8: - outer_sdl_surface = SDL_CreateRGBSurface(0, width, height, 8, 0, 0, 0, 0); + guest_surface = SDL_CreateRGBSurface(0, width, height, 8, 0, 0, 0, 0); break; case 16: - outer_sdl_surface = SDL_CreateRGBSurfaceWithFormat(0, width, height, 16, SDL_PIXELFORMAT_RGB565); + guest_surface = SDL_CreateRGBSurfaceWithFormat(0, width, height, 16, SDL_PIXELFORMAT_RGB565); break; case 32: - outer_sdl_surface = SDL_CreateRGBSurface(0, width, height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); - inner_sdl_surface = outer_sdl_surface; + guest_surface = SDL_CreateRGBSurface(0, width, height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); + host_surface = guest_surface; break; default: printf("WARNING: An unsupported bpp of %d was used\n", bpp); break; } - if (!outer_sdl_surface) { + if (!guest_surface) { shutdown_sdl_video(); return NULL; } - if (!inner_sdl_surface) { - inner_sdl_surface = SDL_CreateRGBSurface(0, width, height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); - if (!inner_sdl_surface) { + if (!host_surface) { + host_surface = SDL_CreateRGBSurface(0, width, height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); + if (!host_surface) { shutdown_sdl_video(); return NULL; } } - return outer_sdl_surface; + return guest_surface; } static int update_sdl_video() { - if (!sdl_renderer || !sdl_texture || !outer_sdl_surface) { + if (!sdl_renderer || !sdl_texture || !guest_surface) { printf("WARNING: A video mode does not appear to have been set.\n"); return -1; } - if (inner_sdl_surface != outer_sdl_surface && - inner_sdl_surface != NULL && - outer_sdl_surface != NULL) + if (host_surface != guest_surface && + host_surface != NULL && + guest_surface != NULL) { - SDL_Rect destRect = {0, 0, inner_sdl_surface->w, inner_sdl_surface->h}; - if (SDL_BlitSurface(outer_sdl_surface, NULL, inner_sdl_surface, &destRect) != 0) { + SDL_Rect destRect = {0, 0, host_surface->w, host_surface->h}; + if (SDL_BlitSurface(guest_surface, NULL, host_surface, &destRect) != 0) { return -1; } } - if (SDL_UpdateTexture(sdl_texture, NULL, inner_sdl_surface->pixels, inner_sdl_surface->pitch) != 0) { + if (SDL_UpdateTexture(sdl_texture, NULL, host_surface->pixels, host_surface->pitch) != 0) { return -1; } - SDL_Rect src_rect = {0, 0, inner_sdl_surface->w, inner_sdl_surface->h}; + SDL_Rect src_rect = {0, 0, host_surface->w, host_surface->h}; if (SDL_RenderCopy(sdl_renderer, sdl_texture, &src_rect, NULL) != 0) { return -1; } @@ -1884,7 +1884,7 @@ static void force_complete_window_refresh() static void scale_mouse_event_coordinates(void *userdata, SDL_Event * event) { - if (!inner_sdl_surface || !sdl_window) { + if (!host_surface || !sdl_window) { return; } @@ -1895,8 +1895,8 @@ static void scale_mouse_event_coordinates(void *userdata, SDL_Event * event) return; } - float scale_x = (float)inner_sdl_surface->w / (float)window_width; - float scale_y = (float)inner_sdl_surface->h / (float)window_height; + float scale_x = (float)host_surface->w / (float)window_width; + float scale_y = (float)host_surface->h / (float)window_height; switch (event->type) { case SDL_MOUSEBUTTONDOWN: From c6fefd0750f7c5df34013464e6c87cf98d93b77f Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Thu, 10 Aug 2017 12:31:41 -0400 Subject: [PATCH 19/85] fixed issue #1: SDL2 backend did not support 2 or 4 bit color, in guest OS --- BasiliskII/src/CrossPlatform/video_blit.cpp | 6 ++- BasiliskII/src/SDL/video_sdl.cpp | 48 ++++----------------- 2 files changed, 13 insertions(+), 41 deletions(-) diff --git a/BasiliskII/src/CrossPlatform/video_blit.cpp b/BasiliskII/src/CrossPlatform/video_blit.cpp index 19e400fd..c9c8e504 100644 --- a/BasiliskII/src/CrossPlatform/video_blit.cpp +++ b/BasiliskII/src/CrossPlatform/video_blit.cpp @@ -498,12 +498,16 @@ bool Screen_blitter_init(VisualFormat const & visual_format, bool native_byte_or #else const bool use_sdl_video = false; #endif -#if REAL_ADDRESSING || DIRECT_ADDRESSING +#if REAL_ADDRESSING || DIRECT_ADDRESSING || USE_SDL_VIDEO if (mac_depth == 1 && !use_sdl_video && !visual_format.fullscreen) { // Windowed 1-bit mode uses a 1-bit X image, so there's no need for special blitting routines Screen_blit = Blit_Copy_Raw; + } else if (mac_depth == 16) { + + Screen_blit = Blit_Copy_Raw; + } else { // Compute RGB shift values diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 7d019114..660e26a4 100644 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -810,6 +810,12 @@ static int update_sdl_video() return 0; } +static int update_sdl_video(SDL_Surface *s, int x, int y, int w, int h) +{ + // HACK, dludwig@pobox.com: for now, just update the whole screen + return update_sdl_video(); +} + void driver_base::set_video_mode(int flags) { int depth = sdl_depth_of_video_depth(VIDEO_MODE_DEPTH); @@ -2061,43 +2067,6 @@ static void handle_events(void) // Static display update (fixed frame rate, but incremental) static void update_display_static(driver_base *drv) { - // Lock surface, if required - if (SDL_MUSTLOCK(drv->s)) - SDL_LockSurface(drv->s); - - const VIDEO_MODE &mode = drv->mode; - - memcpy(the_buffer_copy, the_buffer, the_buffer_size); - - // HACK: Create a temporary surface, with which to use in color conversion - SDL_Surface * mid_surface = NULL; - switch (mode.depth) { - case VDEPTH_1BIT: { - const int pixels_per_byte = VIDEO_MODE_X / VIDEO_MODE_ROW_BYTES; - mid_surface = SDL_CreateRGBSurfaceFrom(the_buffer_copy, VIDEO_MODE_X, VIDEO_MODE_Y, 1, (VIDEO_MODE_X / pixels_per_byte), 1, 1, 1, 0); - } break; - - // Consider using Screen_blit, for other depths - - default: { - printf("WARNING: Unhandled depth mode in SDL backend: %s\n", NameOfDepth(mode.depth)); - } break; - } - - // Blit to screen surface - if (mid_surface) { - SDL_BlitSurface(mid_surface, NULL, drv->s, NULL); - SDL_FreeSurface(mid_surface); - } - - // Unlock surface, if required - if (SDL_MUSTLOCK(drv->s)) - SDL_UnlockSurface(drv->s); - - // Refresh display - update_sdl_video(); - -/* // Incremental update code int wide = 0, high = 0; uint32 x1, x2, y1, y2; @@ -2181,7 +2150,7 @@ static void update_display_static(driver_base *drv) SDL_UnlockSurface(drv->s); // Refresh display - SDL_UpdateRect(drv->s, x1, y1, wide, high); + update_sdl_video(drv->s, x1, y1, wide, high); } } else { @@ -2237,11 +2206,10 @@ static void update_display_static(driver_base *drv) SDL_UnlockSurface(drv->s); // Refresh display - SDL_UpdateRect(drv->s, x1, y1, wide, high); + update_sdl_video(drv->s, x1, y1, wide, high); } } } - */ } // Static display update (fixed frame rate, bounding boxes based) From 99f50637e1fbdcd6e2e8e3d3a910ff096e16920d Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 14 Aug 2017 12:01:34 -0400 Subject: [PATCH 20/85] possible fix for Issue #13: replace SDL_CreateRGBSurfaceWithFormat calls with older + backwards-compatible SDL_CreateRGBSurface calls --- BasiliskII/src/SDL/video_sdl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 660e26a4..e4bf0d88 100644 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -753,7 +753,7 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags guest_surface = SDL_CreateRGBSurface(0, width, height, 8, 0, 0, 0, 0); break; case 16: - guest_surface = SDL_CreateRGBSurfaceWithFormat(0, width, height, 16, SDL_PIXELFORMAT_RGB565); + guest_surface = SDL_CreateRGBSurface(0, width, height, 16, 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000); break; case 32: guest_surface = SDL_CreateRGBSurface(0, width, height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); From d871b70240ff19b9ddd33ae56926a335fb188965 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 14 Aug 2017 12:28:10 -0400 Subject: [PATCH 21/85] fixed issue #12: make autotools test for SDL2 --- BasiliskII/src/CrossPlatform/sigsegv.cpp | 2 ++ BasiliskII/src/CrossPlatform/vm_alloc.cpp | 2 ++ BasiliskII/src/Unix/configure.ac | 12 ++++++------ 3 files changed, 10 insertions(+), 6 deletions(-) mode change 100644 => 100755 BasiliskII/src/CrossPlatform/sigsegv.cpp mode change 100644 => 100755 BasiliskII/src/CrossPlatform/vm_alloc.cpp mode change 100644 => 100755 BasiliskII/src/Unix/configure.ac diff --git a/BasiliskII/src/CrossPlatform/sigsegv.cpp b/BasiliskII/src/CrossPlatform/sigsegv.cpp old mode 100644 new mode 100755 index 6a7c6aaa..f1322d1e --- a/BasiliskII/src/CrossPlatform/sigsegv.cpp +++ b/BasiliskII/src/CrossPlatform/sigsegv.cpp @@ -31,7 +31,9 @@ #include #endif +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #include #include diff --git a/BasiliskII/src/CrossPlatform/vm_alloc.cpp b/BasiliskII/src/CrossPlatform/vm_alloc.cpp old mode 100644 new mode 100755 index a797579c..005cb727 --- a/BasiliskII/src/CrossPlatform/vm_alloc.cpp +++ b/BasiliskII/src/CrossPlatform/vm_alloc.cpp @@ -19,7 +19,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #ifdef HAVE_FCNTL_H #include diff --git a/BasiliskII/src/Unix/configure.ac b/BasiliskII/src/Unix/configure.ac old mode 100644 new mode 100755 index c634da92..8e7b59f9 --- a/BasiliskII/src/Unix/configure.ac +++ b/BasiliskII/src/Unix/configure.ac @@ -266,7 +266,7 @@ AC_DEFUN([AC_CHECK_SDLFRAMEWORK], [ fi fi saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$SDL_FRAMEWORK/SDL.framework/Headers" + CPPFLAGS="$CPPFLAGS -I$SDL_FRAMEWORK/SDL2.framework/Headers" AC_TRY_LINK( [$2 #undef main], [], @@ -295,15 +295,15 @@ if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; then fi if [[ "x$WANT_SDL" = "xyes" ]]; then if [[ "x$WANT_SDL_FRAMEWORK" = "xyes" ]]; then - AC_CHECK_SDLFRAMEWORK(SDL, [#include ]) + AC_CHECK_SDLFRAMEWORK(SDL2, [#include ]) else ac_cv_framework_SDL=no fi if [[ "x$ac_cv_framework_SDL" = "xno" ]]; then - PKG_CHECK_MODULES([sdl], [sdl >= 1.2], [ - CFLAGS="$CFLAGS $sdl_CFLAGS" - CXXFLAGS="$CXXFLAGS $sdl_CFLAGS" - LIBS="$LIBS $sdl_LIBS" + PKG_CHECK_MODULES([sdl2], [sdl2 >= 2.0], [ + CFLAGS="$CFLAGS $sdl2_CFLAGS" + CXXFLAGS="$CXXFLAGS $sdl2_CFLAGS" + LIBS="$LIBS $sdl2_LIBS" ], [ WANT_SDL=no ]) From 09c100ff425435709addae2dda1b14a88f2e92e1 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 14 Aug 2017 12:48:36 -0400 Subject: [PATCH 22/85] partial fix for issue #16: color is incorrect on Linux Thousands of Colors mode is still broken, however, Millions of Colors does work, which did not before this commit. --- BasiliskII/src/SDL/video_sdl.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) mode change 100644 => 100755 BasiliskII/src/SDL/video_sdl.cpp diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp old mode 100644 new mode 100755 index e4bf0d88..7655420d --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -769,8 +769,24 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags } if (!host_surface) { - host_surface = SDL_CreateRGBSurface(0, width, height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); + Uint32 texture_format; + if (SDL_QueryTexture(sdl_texture, &texture_format, NULL, NULL, NULL) != 0) { + printf("ERROR: Unable to get the SDL texture's pixel format: %s\n", SDL_GetError()); + shutdown_sdl_video(); + return NULL; + } + + int bpp; + Uint32 Rmask, Gmask, Bmask, Amask; + if (!SDL_PixelFormatEnumToMasks(texture_format, &bpp, &Rmask, &Gmask, &Bmask, &Amask)) { + printf("ERROR: Unable to determine format for host SDL_surface: %s\n", SDL_GetError()); + shutdown_sdl_video(); + return NULL; + } + + host_surface = SDL_CreateRGBSurface(0, width, height, bpp, Rmask, Gmask, Bmask, Amask); if (!host_surface) { + printf("ERROR: Unable to create host SDL_surface: %s\n", SDL_GetError()); shutdown_sdl_video(); return NULL; } From 0a7640070ab0ac24ec913952902a5f82bb214697 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 14 Aug 2017 13:45:15 -0400 Subject: [PATCH 23/85] finished fixing issue #16: fixed Thousands of Colors on Linux --- BasiliskII/src/CrossPlatform/video_blit.cpp | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 BasiliskII/src/CrossPlatform/video_blit.cpp diff --git a/BasiliskII/src/CrossPlatform/video_blit.cpp b/BasiliskII/src/CrossPlatform/video_blit.cpp old mode 100644 new mode 100755 index c9c8e504..5059e1e3 --- a/BasiliskII/src/CrossPlatform/video_blit.cpp +++ b/BasiliskII/src/CrossPlatform/video_blit.cpp @@ -504,9 +504,11 @@ bool Screen_blitter_init(VisualFormat const & visual_format, bool native_byte_or // Windowed 1-bit mode uses a 1-bit X image, so there's no need for special blitting routines Screen_blit = Blit_Copy_Raw; +/* // dludwig@pobox.com, TODO: This works on OSX (64-bit, at least), but not Linux (32-bit?). Why? } else if (mac_depth == 16) { Screen_blit = Blit_Copy_Raw; +*/ } else { From 6600081b29e0d47c34777f96502e5b8b179cb510 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 14 Aug 2017 13:56:36 -0400 Subject: [PATCH 24/85] build fix for OSX + Xcode --- BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index 52bebbe5..a7db92db 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -943,8 +943,9 @@ GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", "$(inherited)", + HAVE_CONFIG_H, + DEBUG, ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; @@ -995,6 +996,10 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + HAVE_CONFIG_H, + ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; From 53cadd7fd01f8b7e6bb45ae11f006bbb58dba4b7 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 14 Aug 2017 13:57:11 -0400 Subject: [PATCH 25/85] restored OSX 'DEBUG' macro to DEBUG=1 --- BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index a7db92db..faec22df 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -945,7 +945,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", HAVE_CONFIG_H, - DEBUG, + "DEBUG=1", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; From 80a30aeca172ec0a9ee908be6cba20a02402d818 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 14 Aug 2017 14:08:30 -0400 Subject: [PATCH 26/85] HACK fix for Issue #17: Thousands of Colors not working on OSX --- BasiliskII/src/CrossPlatform/video_blit.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/BasiliskII/src/CrossPlatform/video_blit.cpp b/BasiliskII/src/CrossPlatform/video_blit.cpp index 5059e1e3..c6b3c12b 100755 --- a/BasiliskII/src/CrossPlatform/video_blit.cpp +++ b/BasiliskII/src/CrossPlatform/video_blit.cpp @@ -22,6 +22,10 @@ #include "video.h" #include "video_blit.h" +#if USE_SDL_VIDEO +#include +#endif + #include #include @@ -504,11 +508,14 @@ bool Screen_blitter_init(VisualFormat const & visual_format, bool native_byte_or // Windowed 1-bit mode uses a 1-bit X image, so there's no need for special blitting routines Screen_blit = Blit_Copy_Raw; -/* // dludwig@pobox.com, TODO: This works on OSX (64-bit, at least), but not Linux (32-bit?). Why? +#if __MACOSX__ + // dludwig@pobox.com, HACK: This works on OSX (64-bit, at least), but not Linux (32-bit?). Why? + // To note, __MACOSX__ is an SDL-declared macro (for platform identification at compile time). } else if (mac_depth == 16) { Screen_blit = Blit_Copy_Raw; -*/ + +#endif } else { From 0e5ce49f46a70f87e1c9db1d36c20d5ba73bdb62 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 14 Aug 2017 14:26:54 -0400 Subject: [PATCH 27/85] fixed issue #9: maintain guest OS' aspect ratio, when in fullscreen --- BasiliskII/src/SDL/video_sdl.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 7655420d..d016245f 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -791,6 +791,13 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags return NULL; } } + + if (SDL_RenderSetLogicalSize(sdl_renderer, width, height) != 0) { + printf("ERROR: Unable to set SDL rendeer's logical size (to %dx%d): %s\n", + width, height, SDL_GetError()); + shutdown_sdl_video(); + return NULL; + } return guest_surface; } @@ -801,6 +808,13 @@ static int update_sdl_video() printf("WARNING: A video mode does not appear to have been set.\n"); return -1; } + + // Make sure the display's internal (to SDL, possibly the OS) buffer gets + // cleared. Not doing so can, if and when letterboxing is applied (whereby + // colored bars are drawn on the screen's sides to help with aspect-ratio + // correction), the colored bars can be an unknown color. + SDL_SetRenderDrawColor(sdl_renderer, 0, 0, 0, 0); // Use black + SDL_RenderClear(sdl_renderer); // Clear the display if (host_surface != guest_surface && host_surface != NULL && From 9116cae2836aaefef0aed9fbdfe4ac28758e31c8 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 14 Aug 2017 14:41:04 -0400 Subject: [PATCH 28/85] apply anti-aliasing where available and appropriate --- BasiliskII/src/SDL/video_sdl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index d016245f..7effccb1 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -791,7 +791,8 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags return NULL; } } - + + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); if (SDL_RenderSetLogicalSize(sdl_renderer, width, height) != 0) { printf("ERROR: Unable to set SDL rendeer's logical size (to %dx%d): %s\n", width, height, SDL_GetError()); From f7fceaf096171b920b902cb0b46bc420ea3afbdd Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 14 Aug 2017 14:44:09 -0400 Subject: [PATCH 29/85] fix Issue #18: 512x384 guest display leads to app exit-on-startup --- BasiliskII/src/SDL/video_sdl.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 7effccb1..ebef5367 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -1294,8 +1294,6 @@ bool VideoInit(bool classic) const int h = video_modes[i].h; if (i > 0 && (w >= default_width || h >= default_height)) continue; - if (w == 512 && h == 384) - continue; for (int d = VIDEO_DEPTH_1BIT; d <= default_depth; d++) add_mode(display_type, w, h, video_modes[i].resolution_id, TrivialBytesPerRow(w, (video_depth)d), d); } From 2d035eb3e9286ef7b4aec17eb198df829af3c75d Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 14 Aug 2017 14:49:29 -0400 Subject: [PATCH 30/85] bug-fix: mouse cursor could get locked to top-left corner, when in fullscreen --- BasiliskII/src/SDL/video_sdl.cpp | 36 -------------------------------- 1 file changed, 36 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index ebef5367..27a1d722 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -1917,38 +1917,6 @@ static void force_complete_window_refresh() * SDL event handling */ -static void scale_mouse_event_coordinates(void *userdata, SDL_Event * event) -{ - if (!host_surface || !sdl_window) { - return; - } - - int window_width = 0; - int window_height = 0; - SDL_GetWindowSize(sdl_window, &window_width, &window_height); - if (window_width == 0 || window_height == 0) { - return; - } - - float scale_x = (float)host_surface->w / (float)window_width; - float scale_y = (float)host_surface->h / (float)window_height; - - switch (event->type) { - case SDL_MOUSEBUTTONDOWN: - case SDL_MOUSEBUTTONUP: - event->button.x = (int)(event->button.x * scale_x); - event->button.y = (int)(event->button.y * scale_y); - break; - - case SDL_MOUSEMOTION: - event->motion.x = (int)(event->motion.x * scale_x); - event->motion.y = (int)(event->motion.y * scale_y); - event->motion.xrel = (int)(event->motion.xrel * scale_x); - event->motion.yrel = (int)(event->motion.yrel * scale_y); - break; - } -} - static void handle_events(void) { SDL_Event events[10]; @@ -1959,10 +1927,6 @@ static void handle_events(void) for (int i = 0; i < n_events; i++) { SDL_Event & event = events[i]; - // Make sure events with mouse coordinates get scaled, in case the Mac's - // display size is different than the host OS' window. - scale_mouse_event_coordinates(NULL, &events[i]); - switch (event.type) { // Mouse button From b9c968715359edafc8e3157f8dc5f8858acb7f0f Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 14 Aug 2017 14:50:05 -0400 Subject: [PATCH 31/85] bug-fix: anti-aliasing not always working --- BasiliskII/src/SDL/video_sdl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 27a1d722..45e06da7 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -716,6 +716,9 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags delete_sdl_video_window(); } } + + // Apply anti-aliasing, if and when appropriate (usually in fullscreen) + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); if (!sdl_window) { sdl_window = SDL_CreateWindow( @@ -792,7 +795,6 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags } } - SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); if (SDL_RenderSetLogicalSize(sdl_renderer, width, height) != 0) { printf("ERROR: Unable to set SDL rendeer's logical size (to %dx%d): %s\n", width, height, SDL_GetError()); From 6abc599ddfe0a7a33bd420094277bd78142f4e2b Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 14 Aug 2017 21:14:34 -0400 Subject: [PATCH 32/85] added code to help debug issue #6: made Win32 app show stdout and stderr, if and when it is run from a command prompt window --- BasiliskII/src/Windows/main_windows.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BasiliskII/src/Windows/main_windows.cpp b/BasiliskII/src/Windows/main_windows.cpp index 45d50a7e..9fa4e1c0 100755 --- a/BasiliskII/src/Windows/main_windows.cpp +++ b/BasiliskII/src/Windows/main_windows.cpp @@ -212,6 +212,13 @@ int main(int argc, char **argv) char str[256]; bool cd_boot = false; + // Make sure stdout and stderr gets displayed, if and when the app is run + // via a command prompt window. + if (AttachConsole(ATTACH_PARENT_PROCESS)) { + freopen("CONOUT$", "w", stdout); + freopen("CONOUT$", "w", stderr); + } + // Initialize variables RAMBaseHost = NULL; ROMBaseHost = NULL; From 109bc3979b989969fdfba947286c771623d6b69a Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Tue, 15 Aug 2017 21:41:59 -0400 Subject: [PATCH 33/85] implemented issue #7: output stdout and stderr to a log file; removed output redirection to win32 console, which was buggy --- BasiliskII/src/Windows/main_windows.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/BasiliskII/src/Windows/main_windows.cpp b/BasiliskII/src/Windows/main_windows.cpp index 9fa4e1c0..f54e595a 100755 --- a/BasiliskII/src/Windows/main_windows.cpp +++ b/BasiliskII/src/Windows/main_windows.cpp @@ -212,12 +212,25 @@ int main(int argc, char **argv) char str[256]; bool cd_boot = false; - // Make sure stdout and stderr gets displayed, if and when the app is run - // via a command prompt window. - if (AttachConsole(ATTACH_PARENT_PROCESS)) { - freopen("CONOUT$", "w", stdout); - freopen("CONOUT$", "w", stderr); - } + // Redirect stdout and stderr to a log file, for diagnostic purposes. + // Unbuffered file IO will be used (setup via setvbuf() calls), so as + // to write log file data ASAP, lest it get lost in case of program + // termination. + wchar_t logFileName[4096]; + logFileName[0] = L'\0'; + _wgetcwd(logFileName, SDL_arraysize(logFileName)); + if (logFileName[0] != L'\0') { + SDL_wcslcat(logFileName, L"\\BasiliskII_log.txt", SDL_arraysize(logFileName)); + FILE * fp; + fp = _wfreopen(logFileName, L"w", stdout); + if (fp) { + setvbuf(stdout, NULL, _IONBF, 0); + } + fp = _wfreopen(logFileName, L"w", stderr); + if (fp) { + setvbuf(stderr, NULL, _IONBF, 0); + } + } // Initialize variables RAMBaseHost = NULL; From e49cd855c2e860cdada49e648c596fca903e5268 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Tue, 15 Aug 2017 21:47:45 -0400 Subject: [PATCH 34/85] made windowed-mode windows be resize-able/scale-able - guest OS display size is retained, though --- BasiliskII/src/SDL/video_sdl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 45e06da7..c2356ce3 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -703,6 +703,8 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags window_flags |= SDL_WINDOW_FULLSCREEN_DESKTOP; window_width = desktop_mode.w; window_height = desktop_mode.h; + } else { + window_flags |= SDL_WINDOW_RESIZABLE; } if (sdl_window) { From 5d4560c1a7a9cb05cda2d2a6e846ee44a2d94a23 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 19 Aug 2017 17:45:26 -0400 Subject: [PATCH 35/85] fixed issue #21, "BasiliskII, Win32: resizing a window does not stretch screen" --- BasiliskII/src/SDL/video_sdl.cpp | 37 +++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index c2356ce3..7073908f 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -133,6 +133,7 @@ SDL_Window * sdl_window = NULL; // Wraps an OS-native window static SDL_Surface * host_surface = NULL; // Surface in host-OS display format static SDL_Surface * guest_surface = NULL; // Surface in guest-OS display format static SDL_Renderer * sdl_renderer = NULL; // Handle to SDL2 renderer +static SDL_threadID sdl_renderer_thread_id = 0; // Thread ID where the SDL_renderer was created, and SDL_renderer ops should run (for compatibility w/ d3d9) static SDL_Texture * sdl_texture = NULL; // Handle to a GPU texture, with which to draw guest_surface to static int screen_depth; // Depth of current screen //static SDL_Cursor *sdl_cursor; // Copy of Mac cursor @@ -165,6 +166,7 @@ static void (*video_refresh)(void); // Prototypes static int redraw_func(void *arg); static int update_sdl_video(); +static int present_sdl_video(); // From sys_unix.cpp extern void SysMountFirstFloppy(void); @@ -742,6 +744,7 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags shutdown_sdl_video(); return NULL; } + sdl_renderer_thread_id = SDL_ThreadID(); } SDL_assert(sdl_texture == NULL); @@ -807,13 +810,21 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags return guest_surface; } -static int update_sdl_video() +static int present_sdl_video() { if (!sdl_renderer || !sdl_texture || !guest_surface) { printf("WARNING: A video mode does not appear to have been set.\n"); return -1; } + // Some systems, such as D3D9, can fail if and when they are used across + // certain operations. To address this, only utilize SDL_Renderer in a + // single thread, preferably the main thread. + // + // This was added as part of a fix for https://github.com/DavidLudwig/macemu/issues/21 + // "BasiliskII, Win32: resizing a window does not stretch " + SDL_assert(SDL_ThreadID() == sdl_renderer_thread_id); + // Make sure the display's internal (to SDL, possibly the OS) buffer gets // cleared. Not doing so can, if and when letterboxing is applied (whereby // colored bars are drawn on the screen's sides to help with aspect-ratio @@ -845,10 +856,28 @@ static int update_sdl_video() return 0; } +static int update_sdl_video() +{ + // HACK, dludwig@pobox.com: for now, just update the whole screen, via + // VideoInterrupt(), which gets called on the main thread. + // + // TODO: make sure SDL_Renderer resources get displayed, if and when + // MacsBug is running (and VideoInterrupt() might not get called) + // + // TODO: cache rects to update, then use rects in present_sdl_video() + return 0; +} + static int update_sdl_video(SDL_Surface *s, int x, int y, int w, int h) { - // HACK, dludwig@pobox.com: for now, just update the whole screen - return update_sdl_video(); + // HACK, dludwig@pobox.com: for now, just update the whole screen, via + // VideoInterrupt(), which gets called on the main thread. + // + // TODO: make sure SDL_Renderer resources get displayed, if and when + // MacsBug is running (and VideoInterrupt() might not get called) + // + // TODO: cache rects to update, then use rects in present_sdl_video() + return 0; } void driver_base::set_video_mode(int flags) @@ -1518,6 +1547,8 @@ void VideoInterrupt(void) if (toggle_fullscreen) do_toggle_fullscreen(); + present_sdl_video(); + // Temporarily give up frame buffer lock (this is the point where // we are suspended when the user presses Ctrl-Tab) UNLOCK_FRAME_BUFFER; From 7767f128e56e4dc73ffa6bee8d0f38bf40bc3ef7 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Wed, 23 Aug 2017 20:52:30 -0400 Subject: [PATCH 36/85] fixed issue #19: on OS X, display can slide around if initial clicks are near top of screen --- BasiliskII/src/MacOSX/utils_macosx.mm | 16 ++++ BasiliskII/src/SDL/video_sdl.cpp | 107 ++++++++++++++++++++------ 2 files changed, 101 insertions(+), 22 deletions(-) diff --git a/BasiliskII/src/MacOSX/utils_macosx.mm b/BasiliskII/src/MacOSX/utils_macosx.mm index 4dd359b2..c047e275 100644 --- a/BasiliskII/src/MacOSX/utils_macosx.mm +++ b/BasiliskII/src/MacOSX/utils_macosx.mm @@ -20,6 +20,7 @@ #include #include "utils_macosx.h" +#include // This is used from video_sdl.cpp. void NSAutoReleasePool_wrap(void (*fn)(void)) @@ -40,3 +41,18 @@ void disable_SDL2_macosx_menu_bar_keyboard_shortcuts() { } } +bool is_fullscreen_osx(SDL_Window * window) +{ + if (!window) { + return false; + } + + SDL_SysWMinfo wmInfo; + SDL_VERSION(&wmInfo.version); + if (!SDL_GetWindowWMInfo(window, &wmInfo)) { + return false; + } + + const NSWindowStyleMask styleMask = [wmInfo.info.cocoa.window styleMask]; + return (styleMask & NSWindowStyleMaskFullScreen) != 0; +} diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 7073908f..eb55d559 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -140,6 +140,7 @@ static int screen_depth; // Depth of current screen static SDL_Palette *sdl_palette = NULL; // Color palette to be used as CLUT and gamma table static bool sdl_palette_changed = false; // Flag: Palette changed, redraw thread must set new colors static bool toggle_fullscreen = false; +static bool did_add_event_watch = false; static bool mouse_grabbed = false; @@ -167,6 +168,7 @@ static void (*video_refresh)(void); static int redraw_func(void *arg); static int update_sdl_video(); static int present_sdl_video(); +static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event); // From sys_unix.cpp extern void SysMountFirstFloppy(void); @@ -695,7 +697,7 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags int window_height = height; Uint32 window_flags = 0; const int window_flags_to_monitor = SDL_WINDOW_FULLSCREEN; - + if (flags & SDL_WINDOW_FULLSCREEN) { SDL_DisplayMode desktop_mode; if (SDL_GetDesktopDisplayMode(0, &desktop_mode) != 0) { @@ -705,8 +707,6 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags window_flags |= SDL_WINDOW_FULLSCREEN_DESKTOP; window_width = desktop_mode.w; window_height = desktop_mode.h; - } else { - window_flags |= SDL_WINDOW_RESIZABLE; } if (sdl_window) { @@ -724,6 +724,10 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags // Apply anti-aliasing, if and when appropriate (usually in fullscreen) SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); + // Always use a resize-able window. This helps allow SDL to manage + // transitions involving fullscreen to or from windowed-mode. + window_flags |= SDL_WINDOW_RESIZABLE; + if (!sdl_window) { sdl_window = SDL_CreateWindow( "Basilisk II", @@ -737,6 +741,14 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags return NULL; } } + + // Some SDL events (regarding some native-window events), need processing + // as they are generated. SDL2 has a facility, SDL_AddEventWatch(), which + // allows events to be processed as they are generated. + if (!did_add_event_watch) { + SDL_AddEventWatch(&on_sdl_event_generated, NULL); + did_add_event_watch = true; + } if (!sdl_renderer) { sdl_renderer = SDL_CreateRenderer(sdl_window, -1, SDL_RENDERER_ACCELERATED); @@ -1041,11 +1053,11 @@ void driver_base::restore_mouse_accel(void) // Toggle mouse grab void driver_base::toggle_mouse_grab(void) { - if (mouse_grabbed) - ungrab_mouse(); - else - grab_mouse(); -} + if (mouse_grabbed) + ungrab_mouse(); + else + grab_mouse(); + } // Grab mouse, switch to relative mouse mode void driver_base::grab_mouse(void) @@ -1470,14 +1482,18 @@ static void do_toggle_fullscreen(void) int x, y; SDL_GetMouseState(&x, &y); - // save the screen contents - SDL_Surface *tmp_surface = SDL_ConvertSurface(drv->s, drv->s->format, - drv->s->flags); + // Apply fullscreen + if (sdl_window) { + if (display_type == DISPLAY_SCREEN) { + display_type = DISPLAY_WINDOW; + SDL_SetWindowFullscreen(sdl_window, 0); + } else { + display_type = DISPLAY_SCREEN; + SDL_SetWindowFullscreen(sdl_window, SDL_WINDOW_FULLSCREEN_DESKTOP); + } + } // switch modes - display_type = (display_type == DISPLAY_SCREEN) ? DISPLAY_WINDOW - : DISPLAY_SCREEN; - drv->set_video_mode(display_type == DISPLAY_SCREEN ? SDL_WINDOW_FULLSCREEN : 0); drv->adapt_to_video_mode(); // reset the palette @@ -1486,11 +1502,6 @@ static void do_toggle_fullscreen(void) #endif drv->update_palette(); - // restore the screen contents - SDL_BlitSurface(tmp_surface, NULL, drv->s, NULL); - SDL_FreeSurface(tmp_surface); - update_sdl_video(); - // reset the video refresh handler VideoRefreshInit(); @@ -1499,7 +1510,7 @@ static void do_toggle_fullscreen(void) // restore the mouse position SDL_WarpMouseGlobal(x, y); - + // resume redraw thread toggle_fullscreen = false; #ifndef USE_CPU_EMUL_SERVICES @@ -1514,6 +1525,26 @@ static void do_toggle_fullscreen(void) /* * Execute video VBL routine */ + +static bool is_fullscreen(SDL_Window * window) +{ +#ifdef __MACOSX__ + // On OSX, SDL, at least as of 2.0.5 (and possibly beyond), does not always + // report changes to fullscreen via the SDL_WINDOW_FULLSCREEN flag. + // (Example: https://bugzilla.libsdl.org/show_bug.cgi?id=3766 , which + // involves fullscreen/windowed toggles via window-manager UI controls). + // Until it does, or adds a facility to do so, we'll use a platform-specific + // code path to detect fullscreen changes. + extern bool is_fullscreen_osx(SDL_Window * window); + return is_fullscreen_osx(sdl_window); +#else + if (!window) { + return false; + } + const Uint32 sdl_window_flags = SDL_GetWindowFlags(sdl_window); + return (sdl_window_flags & SDL_WINDOW_FULLSCREEN) != 0; +#endif +} #ifdef SHEEPSHAVER void VideoVBL(void) @@ -1952,6 +1983,38 @@ static void force_complete_window_refresh() * SDL event handling */ +static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event) +{ + switch (event->type) { + case SDL_WINDOWEVENT: { + switch (event->window.event) { + case SDL_WINDOWEVENT_RESIZED: { + // Handle changes of fullscreen. This is done here, in + // on_sdl_event_generated() and not the main SDL_Event-processing + // loop, in order to perform this change on the main thread. + // (Some os'es UI APIs, such as OSX's NSWindow, are not + // thread-safe.) + const bool is_full = is_fullscreen(sdl_window); + const bool adjust_fullscreen = \ + (display_type == DISPLAY_WINDOW && is_full) || + (display_type == DISPLAY_SCREEN && !is_full); + if (adjust_fullscreen) { + do_toggle_fullscreen(); + if (is_fullscreen(sdl_window)) { + SDL_SetRelativeMouseMode(SDL_TRUE); + } else { + SDL_SetRelativeMouseMode(SDL_FALSE); + } + } + } break; + } + } break; + } + + return 1; // return 1 to add event to queue, 0 to drop it +} + + static void handle_events(void) { SDL_Event events[10]; @@ -1961,7 +2024,7 @@ static void handle_events(void) while ((n_events = SDL_PeepEvents(events, n_max_events, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT)) > 0) { for (int i = 0; i < n_events; i++) { SDL_Event & event = events[i]; - + switch (event.type) { // Mouse button @@ -2072,7 +2135,7 @@ static void handle_events(void) case SDL_WINDOWEVENT_RESTORED: force_complete_window_refresh(); break; - + } break; } From 3bae0bbda9aee6516a994ea13d6408eaacecb602 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Wed, 23 Aug 2017 20:56:54 -0400 Subject: [PATCH 37/85] commented on use of SDL_SetRelativeMouseMode --- BasiliskII/src/SDL/video_sdl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index eb55d559..31da853a 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -2000,6 +2000,11 @@ static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event) (display_type == DISPLAY_SCREEN && !is_full); if (adjust_fullscreen) { do_toggle_fullscreen(); + + // Utilizing SDL2's 'relative mouse mode', when in fullscreen, + // fixes an issue on OSX hosts whereby a fullscreen window + // can, in some cases, be dragged around. + // ( https://github.com/DavidLudwig/macemu/issues/19 ) if (is_fullscreen(sdl_window)) { SDL_SetRelativeMouseMode(SDL_TRUE); } else { From e55df3de9641b4686c4e5e05fb3917bf432d22a8 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Fri, 25 Aug 2017 17:01:31 -0400 Subject: [PATCH 38/85] build SheepShaver against SDL2, when using its Xcode 8 project file --- BasiliskII/src/SDL/video_sdl.cpp | 22 +--- .../project.pbxproj | 121 ++++++++++++++++-- SheepShaver/src/Unix/main_unix.cpp | 11 ++ 3 files changed, 120 insertions(+), 34 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 31da853a..babc1750 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -136,7 +136,7 @@ static SDL_Renderer * sdl_renderer = NULL; // Handle to SDL2 renderer static SDL_threadID sdl_renderer_thread_id = 0; // Thread ID where the SDL_renderer was created, and SDL_renderer ops should run (for compatibility w/ d3d9) static SDL_Texture * sdl_texture = NULL; // Handle to a GPU texture, with which to draw guest_surface to static int screen_depth; // Depth of current screen -//static SDL_Cursor *sdl_cursor; // Copy of Mac cursor +static SDL_Cursor *sdl_cursor = NULL; // Copy of Mac cursor static SDL_Palette *sdl_palette = NULL; // Color palette to be used as CLUT and gamma table static bool sdl_palette_changed = false; // Flag: Palette changed, redraw thread must set new colors static bool toggle_fullscreen = false; @@ -1728,25 +1728,7 @@ bool video_can_change_cursor(void) if (display_type != DISPLAY_WINDOW) return false; -#if defined(__APPLE__) - static char driver[] = "Quartz?"; - static int quartzok = -1; - - if (quartzok < 0) { - if (SDL_VideoDriverName(driver, sizeof driver) == NULL || strncmp(driver, "Quartz", sizeof driver)) - quartzok = true; - else { - // Quartz driver bug prevents cursor changing in SDL 1.2.11 to 1.2.14. - const SDL_version *vp = SDL_Linked_Version(); - int version = SDL_VERSIONNUM(vp->major, vp->minor, vp->patch); - quartzok = (version <= SDL_VERSIONNUM(1, 2, 10) || version >= SDL_VERSIONNUM(1, 2, 15)); - } - } - - return quartzok; -#else return true; -#endif } #endif @@ -1781,7 +1763,7 @@ void video_set_cursor(void) if (visible) { int x, y; SDL_GetMouseState(&x, &y); - SDL_WarpMouse(x, y); + SDL_WarpMouseGlobal(x, y); } } } diff --git a/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj b/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj index bdde7b99..61a7539c 100644 --- a/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj +++ b/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj @@ -31,7 +31,6 @@ 0846E4C114B1268B00574779 /* jit-cache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CDCD14A99EEF000B1711 /* jit-cache.cpp */; }; 0846E4C214B1269600574779 /* basic-dyngen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CDC514A99EEF000B1711 /* basic-dyngen.cpp */; }; 0846E51314B128ED00574779 /* sheepshaver_glue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CDBB14A99EEF000B1711 /* sheepshaver_glue.cpp */; }; - 0846E65414B513CE00574779 /* SDL.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 0856D17414A9A1A2000B1711 /* SDL.framework */; }; 0856CFC114A99EF0000B1711 /* adb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CD4B14A99EEF000B1711 /* adb.cpp */; }; 0856CFC214A99EF0000B1711 /* audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CD4C14A99EEF000B1711 /* audio.cpp */; }; 0856CFE214A99EF0000B1711 /* cdrom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CD7814A99EEF000B1711 /* cdrom.cpp */; }; @@ -54,7 +53,6 @@ 0856D06014A99EF1000B1711 /* rsrc_patches.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CE8D14A99EF0000B1711 /* rsrc_patches.cpp */; }; 0856D06114A99EF1000B1711 /* scsi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CE8E14A99EF0000B1711 /* scsi.cpp */; }; 0856D06214A99EF1000B1711 /* audio_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CE9014A99EF0000B1711 /* audio_sdl.cpp */; }; - 0856D06414A99EF1000B1711 /* SDLMain.m in Sources */ = {isa = PBXBuildFile; fileRef = 0856CE9314A99EF0000B1711 /* SDLMain.m */; }; 0856D06514A99EF1000B1711 /* video_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CE9414A99EF0000B1711 /* video_sdl.cpp */; }; 0856D06614A99EF1000B1711 /* serial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CE9514A99EF0000B1711 /* serial.cpp */; }; 0856D06714A99EF1000B1711 /* bootp.c in Sources */ = {isa = PBXBuildFile; fileRef = 0856CE9714A99EF0000B1711 /* bootp.c */; }; @@ -94,7 +92,6 @@ 0856D11714A99EF1000B1711 /* user_strings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CF7714A99EF0000B1711 /* user_strings.cpp */; }; 0856D11814A99EF1000B1711 /* video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CF7814A99EF0000B1711 /* video.cpp */; }; 0856D13F14A99EF1000B1711 /* xpram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CFC014A99EF0000B1711 /* xpram.cpp */; }; - 0856D17514A9A1A2000B1711 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0856D17414A9A1A2000B1711 /* SDL.framework */; }; 0856D21514A9A6C6000B1711 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0856D21414A9A6C6000B1711 /* IOKit.framework */; }; 0856D33514A9A704000B1711 /* VMSettingsWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = 0856D30714A9A704000B1711 /* VMSettingsWindow.nib */; }; 0856D33914A9A704000B1711 /* VMSettingsController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0856D31214A9A704000B1711 /* VMSettingsController.mm */; }; @@ -105,6 +102,8 @@ 08CD42DC14B7B85B009CA2A2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08CD42DB14B7B85B009CA2A2 /* Cocoa.framework */; }; 08CD42E814B7B8AA009CA2A2 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08CD42E714B7B8AA009CA2A2 /* Carbon.framework */; }; 08E877521E0640E800A90A2C /* clip_macosx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CE2C14A99EF0000B1711 /* clip_macosx.cpp */; }; + 7539EDF51F50C40100454E81 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7539EDE91F50C3D600454E81 /* SDL2.framework */; }; + 7539EDF61F50C40100454E81 /* SDL2.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 7539EDE91F50C3D600454E81 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; A7B1921418C35D4700791D8D /* DiskType.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B1921318C35D4700791D8D /* DiskType.m */; }; /* End PBXBuildFile section */ @@ -123,6 +122,41 @@ remoteGlobalIDString = 0846E49914B124DE00574779; remoteInfo = kpx_cpu; }; + 7539EDE81F50C3D600454E81 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7539EDE11F50C3D600454E81 /* SDL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = BECDF66C0761BA81005FE872; + remoteInfo = Framework; + }; + 7539EDEA1F50C3D600454E81 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7539EDE11F50C3D600454E81 /* SDL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = BECDF6B30761BA81005FE872; + remoteInfo = "Static Library"; + }; + 7539EDEC1F50C3D600454E81 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7539EDE11F50C3D600454E81 /* SDL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = DB31407717554B71006C0E22; + remoteInfo = "Shared Library"; + }; + 7539EDEE1F50C3D600454E81 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7539EDE11F50C3D600454E81 /* SDL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = BECDF6BE0761BA81005FE872; + remoteInfo = "Standard DMG"; + }; + 7539EDF71F50C40100454E81 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7539EDE11F50C3D600454E81 /* SDL.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = BECDF5FE0761BA81005FE872; + remoteInfo = Framework; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -132,7 +166,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 0846E65414B513CE00574779 /* SDL.framework in Copy Frameworks */, + 7539EDF61F50C40100454E81 /* SDL2.framework in Copy Frameworks */, ); name = "Copy Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -276,8 +310,6 @@ 0856CE8E14A99EF0000B1711 /* scsi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = scsi.cpp; path = ../scsi.cpp; sourceTree = SOURCE_ROOT; }; 0856CE9014A99EF0000B1711 /* audio_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audio_sdl.cpp; sourceTree = ""; }; 0856CE9114A99EF0000B1711 /* keycodes */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = keycodes; sourceTree = ""; }; - 0856CE9214A99EF0000B1711 /* SDLMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLMain.h; sourceTree = ""; }; - 0856CE9314A99EF0000B1711 /* SDLMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLMain.m; sourceTree = ""; }; 0856CE9414A99EF0000B1711 /* video_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = video_sdl.cpp; sourceTree = ""; }; 0856CE9514A99EF0000B1711 /* serial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = serial.cpp; path = ../serial.cpp; sourceTree = SOURCE_ROOT; }; 0856CE9714A99EF0000B1711 /* bootp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bootp.c; sourceTree = ""; }; @@ -348,7 +380,6 @@ 0856CF7714A99EF0000B1711 /* user_strings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = user_strings.cpp; path = ../user_strings.cpp; sourceTree = SOURCE_ROOT; }; 0856CF7814A99EF0000B1711 /* video.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = video.cpp; path = ../video.cpp; sourceTree = SOURCE_ROOT; }; 0856CFC014A99EF0000B1711 /* xpram.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = xpram.cpp; path = ../xpram.cpp; sourceTree = SOURCE_ROOT; }; - 0856D17414A9A1A2000B1711 /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = /Library/Frameworks/SDL.framework; sourceTree = ""; }; 0856D21414A9A6C6000B1711 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; 0856D30814A9A704000B1711 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/VMSettingsWindow.nib; sourceTree = ""; }; 0856D31114A9A704000B1711 /* VMSettingsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VMSettingsController.h; sourceTree = ""; }; @@ -377,6 +408,7 @@ 08CD42DB14B7B85B009CA2A2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 08CD42E714B7B8AA009CA2A2 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 08D93A15159FE174003B04EC /* clip_macosx64.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = clip_macosx64.mm; sourceTree = ""; }; + 7539EDE11F50C3D600454E81 /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../../../external/SDL/Xcode/SDL/SDL.xcodeproj; sourceTree = ""; }; A7B1921218C35D4700791D8D /* DiskType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiskType.h; sourceTree = ""; }; A7B1921318C35D4700791D8D /* DiskType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DiskType.m; sourceTree = ""; }; /* End PBXFileReference section */ @@ -400,10 +432,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0856D17514A9A1A2000B1711 /* SDL.framework in Frameworks */, 0856D21514A9A6C6000B1711 /* IOKit.framework in Frameworks */, 08CD42DC14B7B85B009CA2A2 /* Cocoa.framework in Frameworks */, 08CD42E814B7B8AA009CA2A2 /* Carbon.framework in Frameworks */, + 7539EDF51F50C40100454E81 /* SDL2.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -435,6 +467,7 @@ 0856CCAC14A99DE0000B1711 = { isa = PBXGroup; children = ( + 7539EDE01F50C3BE00454E81 /* external */, 0856CCC814A99E30000B1711 /* Sources */, 08CD42DF14B7B865009CA2A2 /* Frameworks */, 0856CCC214A99E1C000B1711 /* Products */, @@ -735,8 +768,6 @@ children = ( 0856CE9014A99EF0000B1711 /* audio_sdl.cpp */, 0856CE9114A99EF0000B1711 /* keycodes */, - 0856CE9214A99EF0000B1711 /* SDLMain.h */, - 0856CE9314A99EF0000B1711 /* SDLMain.m */, 0856CE9414A99EF0000B1711 /* video_sdl.cpp */, ); name = SDL; @@ -872,11 +903,29 @@ 08CD42E714B7B8AA009CA2A2 /* Carbon.framework */, 08CD42DB14B7B85B009CA2A2 /* Cocoa.framework */, 0856D21414A9A6C6000B1711 /* IOKit.framework */, - 0856D17414A9A1A2000B1711 /* SDL.framework */, ); name = Frameworks; sourceTree = ""; }; + 7539EDE01F50C3BE00454E81 /* external */ = { + isa = PBXGroup; + children = ( + 7539EDE11F50C3D600454E81 /* SDL.xcodeproj */, + ); + name = external; + sourceTree = ""; + }; + 7539EDE21F50C3D600454E81 /* Products */ = { + isa = PBXGroup; + children = ( + 7539EDE91F50C3D600454E81 /* SDL2.framework */, + 7539EDEB1F50C3D600454E81 /* libSDL2.a */, + 7539EDED1F50C3D600454E81 /* libSDL2.dylib */, + 7539EDEF1F50C3D600454E81 /* Standard DMG */, + ); + name = Products; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -947,6 +996,7 @@ dependencies = ( 0846E4A714B1253500574779 /* PBXTargetDependency */, 082AC26814AA5A4800071F5E /* PBXTargetDependency */, + 7539EDF81F50C40100454E81 /* PBXTargetDependency */, ); name = SheepShaver; productName = SheepShaver; @@ -974,6 +1024,12 @@ mainGroup = 0856CCAC14A99DE0000B1711; productRefGroup = 0856CCC214A99E1C000B1711 /* Products */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 7539EDE21F50C3D600454E81 /* Products */; + ProjectRef = 7539EDE11F50C3D600454E81 /* SDL.xcodeproj */; + }, + ); projectRoot = ""; targets = ( 0856CCC014A99E1C000B1711 /* SheepShaver */, @@ -983,6 +1039,37 @@ }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + 7539EDE91F50C3D600454E81 /* SDL2.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = SDL2.framework; + remoteRef = 7539EDE81F50C3D600454E81 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7539EDEB1F50C3D600454E81 /* libSDL2.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libSDL2.a; + remoteRef = 7539EDEA1F50C3D600454E81 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7539EDED1F50C3D600454E81 /* libSDL2.dylib */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.dylib"; + path = libSDL2.dylib; + remoteRef = 7539EDEC1F50C3D600454E81 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7539EDEF1F50C3D600454E81 /* Standard DMG */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = "Standard DMG"; + remoteRef = 7539EDEE1F50C3D600454E81 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ 0856CCBD14A99E1C000B1711 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -1096,7 +1183,6 @@ 0856D06014A99EF1000B1711 /* rsrc_patches.cpp in Sources */, 0856D06114A99EF1000B1711 /* scsi.cpp in Sources */, 0856D06214A99EF1000B1711 /* audio_sdl.cpp in Sources */, - 0856D06414A99EF1000B1711 /* SDLMain.m in Sources */, 0856D06514A99EF1000B1711 /* video_sdl.cpp in Sources */, 0856D06614A99EF1000B1711 /* serial.cpp in Sources */, 0856D06714A99EF1000B1711 /* bootp.c in Sources */, @@ -1161,6 +1247,11 @@ target = 0846E49914B124DE00574779 /* kpx_cpu */; targetProxy = 0846E4A614B1253500574779 /* PBXContainerItemProxy */; }; + 7539EDF81F50C40100454E81 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Framework; + targetProxy = 7539EDF71F50C40100454E81 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -1337,7 +1428,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL.framework/Versions/A/Headers/, + "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", ./config/, ../Unix, ../MacOSX/Launcher, @@ -1350,6 +1441,7 @@ INFOPLIST_PREFIX_HEADER = ""; INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.6; OTHER_CFLAGS = ""; OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; @@ -1394,7 +1486,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL.framework/Versions/A/Headers/, + "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", ./config/, ../Unix, ../MacOSX/Launcher, @@ -1408,6 +1500,7 @@ INFOPLIST_PREFIX_HEADER = ""; INFOPLIST_PREPROCESS = NO; INSTALL_PATH = "$(HOME)/Applications"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.6; OTHER_CFLAGS = ""; OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; diff --git a/SheepShaver/src/Unix/main_unix.cpp b/SheepShaver/src/Unix/main_unix.cpp index 3d0ee43e..a99e5b53 100644 --- a/SheepShaver/src/Unix/main_unix.cpp +++ b/SheepShaver/src/Unix/main_unix.cpp @@ -754,6 +754,17 @@ int main(int argc, char **argv) } break; } + +#if defined(__APPLE__) && defined(__MACH__) + // Mac OS X likes to pass in various options of its own, when launching an app. + // Attempt to ignore these. + const char * mac_psn_prefix = "-psn_"; + if (strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0) { + argv[i] = NULL; + } else if (strncmp(mac_psn_prefix, argv[i], strlen(mac_psn_prefix)) == 0) { + argv[i] = NULL; + } +#endif } // Remove processed arguments From eb36b341065aa15279d7935c1c0e4507117ea485 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Fri, 25 Aug 2017 17:19:36 -0400 Subject: [PATCH 39/85] Sheepshaver: misc, runtime fixes on OSX hosts --- BasiliskII/src/SDL/video_sdl.cpp | 2 ++ SheepShaver/src/Unix/main_unix.cpp | 29 ++++++++++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index babc1750..e3797e98 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -1555,6 +1555,8 @@ void VideoVBL(void) if (toggle_fullscreen) do_toggle_fullscreen(); + + present_sdl_video(); // Temporarily give up frame buffer lock (this is the point where // we are suspended when the user presses Ctrl-Tab) diff --git a/SheepShaver/src/Unix/main_unix.cpp b/SheepShaver/src/Unix/main_unix.cpp index a99e5b53..e9da908f 100644 --- a/SheepShaver/src/Unix/main_unix.cpp +++ b/SheepShaver/src/Unix/main_unix.cpp @@ -729,7 +729,25 @@ int main(int argc, char **argv) #endif // Parse command line arguments + +#if defined(__APPLE__) && defined(__MACH__) + // Mac OS X likes to pass in various options of its own, when launching an app. + // Attempt to ignore these. for (int i=1; i Date: Sun, 27 Aug 2017 17:05:02 -0400 Subject: [PATCH 40/85] fixed issue #14: Basilisk II: make Xcode generate UAE's CPU-emulation sources at build-time --- .../BasiliskII.xcodeproj/project.pbxproj | 366 +- .../src/MacOSX/run_build68k_for_xcode.sh | 33 + BasiliskII/src/MacOSX/run_gencpu_for_xcode.sh | 33 + BasiliskII/src/uae_cpu/cpuemu.cpp | 45296 ---------------- BasiliskII/src/uae_cpu/cpuemu_nf.cpp | 2 - BasiliskII/src/uae_cpu/cpustbl.cpp | 8720 --- BasiliskII/src/uae_cpu/cpustbl_nf.cpp | 2 - BasiliskII/src/uae_cpu/cputbl.h | 4322 -- BasiliskII/src/uae_cpu/defs68k.c | 185 - BasiliskII/src/uae_cpu/osx_generate_files.sh | 22 - 10 files changed, 408 insertions(+), 58573 deletions(-) create mode 100755 BasiliskII/src/MacOSX/run_build68k_for_xcode.sh create mode 100755 BasiliskII/src/MacOSX/run_gencpu_for_xcode.sh delete mode 100644 BasiliskII/src/uae_cpu/cpuemu.cpp delete mode 100644 BasiliskII/src/uae_cpu/cpuemu_nf.cpp delete mode 100644 BasiliskII/src/uae_cpu/cpustbl.cpp delete mode 100644 BasiliskII/src/uae_cpu/cpustbl_nf.cpp delete mode 100644 BasiliskII/src/uae_cpu/cputbl.h delete mode 100644 BasiliskII/src/uae_cpu/defs68k.c delete mode 100755 BasiliskII/src/uae_cpu/osx_generate_files.sh diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index faec22df..a881f455 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -13,6 +13,16 @@ 752F27031F242F51001032B4 /* xpram_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 752F27021F242F51001032B4 /* xpram_sdl.cpp */; }; 752F27141F251B5C001032B4 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F270D1F251B4A001032B4 /* SDL2.framework */; }; 752F27151F251B5C001032B4 /* SDL2.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 752F270D1F251B4A001032B4 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 753252E91F535A0C0024025B /* build68k.c in Sources */ = {isa = PBXBuildFile; fileRef = 753252E51F5359040024025B /* build68k.c */; }; + 753252EE1F535DD10024025B /* defs68k.c in Sources */ = {isa = PBXBuildFile; fileRef = 753252ED1F535DD10024025B /* defs68k.c */; }; + 753253021F535F210024025B /* gencpu.c in Sources */ = {isa = PBXBuildFile; fileRef = 753253011F535F210024025B /* gencpu.c */; }; + 753253151F5363400024025B /* defs68k.c in Sources */ = {isa = PBXBuildFile; fileRef = 753252ED1F535DD10024025B /* defs68k.c */; }; + 753253201F53650F0024025B /* readcpu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0CE1F23B25A006B2DF2 /* readcpu.cpp */; }; + 753253311F5368370024025B /* cpuemu_nf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7532532C1F5368370024025B /* cpuemu_nf.cpp */; }; + 753253321F5368370024025B /* cpuemu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7532532D1F5368370024025B /* cpuemu.cpp */; }; + 753253331F5368370024025B /* cpustbl_nf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7532532E1F5368370024025B /* cpustbl_nf.cpp */; }; + 753253341F5368370024025B /* cpustbl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7532532F1F5368370024025B /* cpustbl.cpp */; }; + 753253351F53688D0024025B /* readcpu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0CE1F23B25A006B2DF2 /* readcpu.cpp */; }; 7539DFBF1F23B17E006B2DF2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7539DFBE1F23B17E006B2DF2 /* Assets.xcassets */; }; 7539E1251F23B25A006B2DF2 /* adb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFC91F23B25A006B2DF2 /* adb.cpp */; }; 7539E1261F23B25A006B2DF2 /* audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539DFCA1F23B25A006B2DF2 /* audio.cpp */; }; @@ -52,7 +62,6 @@ 7539E19D1F23B25A006B2DF2 /* mathlib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0C21F23B25A006B2DF2 /* mathlib.cpp */; }; 7539E19E1F23B25A006B2DF2 /* rounding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0C41F23B25A006B2DF2 /* rounding.cpp */; }; 7539E1A01F23B25A006B2DF2 /* memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0C91F23B25A006B2DF2 /* memory.cpp */; }; - 7539E1A21F23B25A006B2DF2 /* readcpu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0CE1F23B25A006B2DF2 /* readcpu.cpp */; }; 7539E1A31F23B25A006B2DF2 /* table68k in Resources */ = {isa = PBXBuildFile; fileRef = 7539E0D11F23B25A006B2DF2 /* table68k */; }; 7539E1E11F23B25A006B2DF2 /* user_strings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E1221F23B25A006B2DF2 /* user_strings.cpp */; }; 7539E1E21F23B25A006B2DF2 /* video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E1231F23B25A006B2DF2 /* video.cpp */; }; @@ -94,11 +103,6 @@ 7539E2971F23C5FD006B2DF2 /* newcpu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2961F23C5FD006B2DF2 /* newcpu.cpp */; }; 7539E29D1F23C83F006B2DF2 /* sys_darwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E29C1F23C83F006B2DF2 /* sys_darwin.cpp */; }; 7539E29F1F23C939006B2DF2 /* fpu_uae.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E29E1F23C939006B2DF2 /* fpu_uae.cpp */; }; - 7539E2A51F23CB9B006B2DF2 /* cpuemu_nf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2A01F23CB9B006B2DF2 /* cpuemu_nf.cpp */; }; - 7539E2A61F23CB9B006B2DF2 /* cpuemu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2A11F23CB9B006B2DF2 /* cpuemu.cpp */; }; - 7539E2A71F23CB9B006B2DF2 /* cpustbl_nf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2A21F23CB9B006B2DF2 /* cpustbl_nf.cpp */; }; - 7539E2A81F23CB9B006B2DF2 /* cpustbl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2A31F23CB9B006B2DF2 /* cpustbl.cpp */; }; - 7539E2A91F23CB9B006B2DF2 /* defs68k.c in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2A41F23CB9B006B2DF2 /* defs68k.c */; }; 7539E2AB1F23CDB7006B2DF2 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 7539E2AA1F23CDB7006B2DF2 /* Info.plist */; }; 756C1B341F252FC100620917 /* utils_macosx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 756C1B331F252FC100620917 /* utils_macosx.mm */; }; 756C1B391F25306A00620917 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 756C1B381F25306A00620917 /* AppKit.framework */; }; @@ -140,6 +144,34 @@ remoteGlobalIDString = BECDF5FE0761BA81005FE872; remoteInfo = Framework; }; + 7532530B1F53611F0024025B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7539DFAA1F23B17E006B2DF2 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 753252D91F5358D30024025B; + remoteInfo = build68k; + }; + 7532531A1F5364030024025B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7539DFAA1F23B17E006B2DF2 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 753252F21F535E1E0024025B; + remoteInfo = gencpu; + }; + 7532531C1F53640B0024025B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7539DFAA1F23B17E006B2DF2 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 753253071F5360E30024025B; + remoteInfo = RunBuild68k; + }; + 7532531E1F5364170024025B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7539DFAA1F23B17E006B2DF2 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 753253161F5363D20024025B; + remoteInfo = RunGencpu; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -154,6 +186,24 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + 753252D81F5358D30024025B /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; + 753252F11F535E1E0024025B /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -162,6 +212,16 @@ 752F27001F242BAF001032B4 /* prefs_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = prefs_sdl.cpp; sourceTree = ""; }; 752F27021F242F51001032B4 /* xpram_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = xpram_sdl.cpp; sourceTree = ""; }; 752F27051F251B4A001032B4 /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../../../external/SDL/Xcode/SDL/SDL.xcodeproj; sourceTree = ""; }; + 753252DA1F5358D30024025B /* build68k */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = build68k; sourceTree = BUILT_PRODUCTS_DIR; }; + 753252E51F5359040024025B /* build68k.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = build68k.c; sourceTree = ""; }; + 753252ED1F535DD10024025B /* defs68k.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = defs68k.c; path = build68k_output/defs68k.c; sourceTree = BUILT_PRODUCTS_DIR; }; + 753252F31F535E1E0024025B /* gencpu */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = gencpu; sourceTree = BUILT_PRODUCTS_DIR; }; + 753253011F535F210024025B /* gencpu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gencpu.c; sourceTree = ""; }; + 7532532C1F5368370024025B /* cpuemu_nf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cpuemu_nf.cpp; path = gencpu_output/cpuemu_nf.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; + 7532532D1F5368370024025B /* cpuemu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cpuemu.cpp; path = gencpu_output/cpuemu.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; + 7532532E1F5368370024025B /* cpustbl_nf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cpustbl_nf.cpp; path = gencpu_output/cpustbl_nf.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; + 7532532F1F5368370024025B /* cpustbl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cpustbl.cpp; path = gencpu_output/cpustbl.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; + 753253301F5368370024025B /* cputbl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cputbl.h; path = gencpu_output/cputbl.h; sourceTree = BUILT_PRODUCTS_DIR; }; 7539DFB21F23B17E006B2DF2 /* BasiliskII.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BasiliskII.app; sourceTree = BUILT_PRODUCTS_DIR; }; 7539DFBE1F23B17E006B2DF2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 7539DFC91F23B25A006B2DF2 /* adb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = adb.cpp; path = ../adb.cpp; sourceTree = ""; }; @@ -312,11 +372,6 @@ 7539E2961F23C5FD006B2DF2 /* newcpu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = newcpu.cpp; sourceTree = ""; }; 7539E29C1F23C83F006B2DF2 /* sys_darwin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sys_darwin.cpp; sourceTree = ""; }; 7539E29E1F23C939006B2DF2 /* fpu_uae.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fpu_uae.cpp; sourceTree = ""; }; - 7539E2A01F23CB9B006B2DF2 /* cpuemu_nf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cpuemu_nf.cpp; sourceTree = ""; }; - 7539E2A11F23CB9B006B2DF2 /* cpuemu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cpuemu.cpp; sourceTree = ""; }; - 7539E2A21F23CB9B006B2DF2 /* cpustbl_nf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cpustbl_nf.cpp; sourceTree = ""; }; - 7539E2A31F23CB9B006B2DF2 /* cpustbl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cpustbl.cpp; sourceTree = ""; }; - 7539E2A41F23CB9B006B2DF2 /* defs68k.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = defs68k.c; sourceTree = ""; }; 7539E2AA1F23CDB7006B2DF2 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 756C1B321F252FC100620917 /* utils_macosx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils_macosx.h; sourceTree = ""; }; 756C1B331F252FC100620917 /* utils_macosx.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = utils_macosx.mm; sourceTree = ""; }; @@ -324,6 +379,20 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 753252D71F5358D30024025B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 753252F01F535E1E0024025B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7539DFAF1F23B17E006B2DF2 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -367,10 +436,40 @@ name = Products; sourceTree = ""; }; + 753252FF1F535E5D0024025B /* generated src */ = { + isa = PBXGroup; + children = ( + 753253001F535E840024025B /* build68k output */, + 7532532B1F53675E0024025B /* gencpu output */, + ); + name = "generated src"; + sourceTree = ""; + }; + 753253001F535E840024025B /* build68k output */ = { + isa = PBXGroup; + children = ( + 753252ED1F535DD10024025B /* defs68k.c */, + ); + name = "build68k output"; + sourceTree = ""; + }; + 7532532B1F53675E0024025B /* gencpu output */ = { + isa = PBXGroup; + children = ( + 7532532C1F5368370024025B /* cpuemu_nf.cpp */, + 7532532D1F5368370024025B /* cpuemu.cpp */, + 7532532E1F5368370024025B /* cpustbl_nf.cpp */, + 7532532F1F5368370024025B /* cpustbl.cpp */, + 753253301F5368370024025B /* cputbl.h */, + ); + name = "gencpu output"; + sourceTree = ""; + }; 7539DFA91F23B17E006B2DF2 = { isa = PBXGroup; children = ( 7539E1E41F23B25E006B2DF2 /* src */, + 753252FF1F535E5D0024025B /* generated src */, 752F27041F251B27001032B4 /* external */, 7539DFB41F23B17E006B2DF2 /* Assets */, 7539DFB31F23B17E006B2DF2 /* Products */, @@ -382,9 +481,12 @@ isa = PBXGroup; children = ( 7539DFB21F23B17E006B2DF2 /* BasiliskII.app */, + 753252DA1F5358D30024025B /* build68k */, + 753252F31F535E1E0024025B /* gencpu */, ); name = Products; - sourceTree = ""; + path = ../../../../../../../../Documents/Code/macemu/BasiliskII/src/MacOSX; + sourceTree = BUILT_PRODUCTS_DIR; }; 7539DFB41F23B17E006B2DF2 /* Assets */ = { isa = PBXGroup; @@ -492,14 +594,11 @@ isa = PBXGroup; children = ( 7539E0A61F23B25A006B2DF2 /* basilisk_glue.cpp */, + 753252E51F5359040024025B /* build68k.c */, 7539E0A81F23B25A006B2DF2 /* compiler */, 7539E0B11F23B25A006B2DF2 /* cpu_emulation.h */, - 7539E2A01F23CB9B006B2DF2 /* cpuemu_nf.cpp */, - 7539E2A11F23CB9B006B2DF2 /* cpuemu.cpp */, - 7539E2A21F23CB9B006B2DF2 /* cpustbl_nf.cpp */, - 7539E2A31F23CB9B006B2DF2 /* cpustbl.cpp */, - 7539E2A41F23CB9B006B2DF2 /* defs68k.c */, 7539E0B31F23B25A006B2DF2 /* fpu */, + 753253011F535F210024025B /* gencpu.c */, 7539E0C81F23B25A006B2DF2 /* m68k.h */, 7539E0C91F23B25A006B2DF2 /* memory.cpp */, 7539E0CA1F23B25A006B2DF2 /* memory.h */, @@ -669,7 +768,75 @@ }; /* End PBXGroup section */ +/* Begin PBXLegacyTarget section */ + 753253071F5360E30024025B /* run_build68k */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "$(ACTION)"; + buildConfigurationList = 753253081F5360E30024025B /* Build configuration list for PBXLegacyTarget "run_build68k" */; + buildPhases = ( + ); + buildToolPath = "$(PROJECT_DIR)/run_build68k_for_xcode.sh"; + buildWorkingDirectory = ""; + dependencies = ( + 7532530C1F53611F0024025B /* PBXTargetDependency */, + ); + name = run_build68k; + passBuildSettingsInEnvironment = 1; + productName = RunBuild68k; + }; + 753253161F5363D20024025B /* run_gencpu */ = { + isa = PBXLegacyTarget; + buildArgumentsString = "$(ACTION)"; + buildConfigurationList = 753253171F5363D20024025B /* Build configuration list for PBXLegacyTarget "run_gencpu" */; + buildPhases = ( + ); + buildToolPath = "$(PROJECT_DIR)/run_gencpu_for_xcode.sh"; + buildWorkingDirectory = ""; + dependencies = ( + 7532531B1F5364030024025B /* PBXTargetDependency */, + ); + name = run_gencpu; + passBuildSettingsInEnvironment = 1; + productName = RunGencpu; + }; +/* End PBXLegacyTarget section */ + /* Begin PBXNativeTarget section */ + 753252D91F5358D30024025B /* build68k */ = { + isa = PBXNativeTarget; + buildConfigurationList = 753252E31F5358D30024025B /* Build configuration list for PBXNativeTarget "build68k" */; + buildPhases = ( + 753252D61F5358D30024025B /* Sources */, + 753252D71F5358D30024025B /* Frameworks */, + 753252D81F5358D30024025B /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = build68k; + productName = build68k; + productReference = 753252DA1F5358D30024025B /* build68k */; + productType = "com.apple.product-type.tool"; + }; + 753252F21F535E1E0024025B /* gencpu */ = { + isa = PBXNativeTarget; + buildConfigurationList = 753252F71F535E1E0024025B /* Build configuration list for PBXNativeTarget "gencpu" */; + buildPhases = ( + 753252EF1F535E1E0024025B /* Sources */, + 753252F01F535E1E0024025B /* Frameworks */, + 753252F11F535E1E0024025B /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 7532531D1F53640B0024025B /* PBXTargetDependency */, + ); + name = gencpu; + productName = gencpu; + productReference = 753252F31F535E1E0024025B /* gencpu */; + productType = "com.apple.product-type.tool"; + }; 7539DFB11F23B17E006B2DF2 /* BasiliskII */ = { isa = PBXNativeTarget; buildConfigurationList = 7539DFC61F23B17E006B2DF2 /* Build configuration list for PBXNativeTarget "BasiliskII" */; @@ -683,6 +850,7 @@ buildRules = ( ); dependencies = ( + 7532531F1F5364170024025B /* PBXTargetDependency */, 752F27171F251B5C001032B4 /* PBXTargetDependency */, ); name = BasiliskII; @@ -698,6 +866,22 @@ attributes = { LastUpgradeCheck = 0830; TargetAttributes = { + 753252D91F5358D30024025B = { + CreatedOnToolsVersion = 8.3.3; + ProvisioningStyle = Automatic; + }; + 753252F21F535E1E0024025B = { + CreatedOnToolsVersion = 8.3.3; + ProvisioningStyle = Automatic; + }; + 753253071F5360E30024025B = { + CreatedOnToolsVersion = 8.3.3; + ProvisioningStyle = Automatic; + }; + 753253161F5363D20024025B = { + CreatedOnToolsVersion = 8.3.3; + ProvisioningStyle = Automatic; + }; 7539DFB11F23B17E006B2DF2 = { CreatedOnToolsVersion = 8.3.3; ProvisioningStyle = Automatic; @@ -729,6 +913,10 @@ projectRoot = ""; targets = ( 7539DFB11F23B17E006B2DF2 /* BasiliskII */, + 753252D91F5358D30024025B /* build68k */, + 753252F21F535E1E0024025B /* gencpu */, + 753253071F5360E30024025B /* run_build68k */, + 753253161F5363D20024025B /* run_gencpu */, ); }; /* End PBXProject section */ @@ -816,11 +1004,29 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "echo Hello World"; + shellScript = "# ${PROJECT_DIR}/generate_cpu_srcs_for_xcode.sh"; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 753252D61F5358D30024025B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 753252E91F535A0C0024025B /* build68k.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 753252EF1F535E1E0024025B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 753253021F535F210024025B /* gencpu.c in Sources */, + 753253201F53650F0024025B /* readcpu.cpp in Sources */, + 753253151F5363400024025B /* defs68k.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 7539DFAE1F23B17E006B2DF2 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -830,17 +1036,18 @@ 7539E1291F23B25A006B2DF2 /* video_blit.cpp in Sources */, 7539E28E1F23C56F006B2DF2 /* clip_dummy.cpp in Sources */, 7539E1A01F23B25A006B2DF2 /* memory.cpp in Sources */, + 753253351F53688D0024025B /* readcpu.cpp in Sources */, 7539E1741F23B25A006B2DF2 /* audio_sdl.cpp in Sources */, 7539E1771F23B25A006B2DF2 /* video_sdl.cpp in Sources */, + 753252EE1F535DD10024025B /* defs68k.c in Sources */, 7539E29F1F23C939006B2DF2 /* fpu_uae.cpp in Sources */, - 7539E2A81F23CB9B006B2DF2 /* cpustbl.cpp in Sources */, 7539E1E21F23B25A006B2DF2 /* video.cpp in Sources */, 7539E18F1F23B25A006B2DF2 /* timer.cpp in Sources */, - 7539E2A71F23CB9B006B2DF2 /* cpustbl_nf.cpp in Sources */, 7539E1711F23B25A006B2DF2 /* rom_patches.cpp in Sources */, 7539E1281F23B25A006B2DF2 /* sigsegv.cpp in Sources */, - 7539E1A21F23B25A006B2DF2 /* readcpu.cpp in Sources */, + 753253341F5368370024025B /* cpustbl.cpp in Sources */, 756C1B341F252FC100620917 /* utils_macosx.mm in Sources */, + 753253321F5368370024025B /* cpuemu.cpp in Sources */, 7539E2701F23B32A006B2DF2 /* tinyxml2.cpp in Sources */, 7539E28F1F23C56F006B2DF2 /* ether_dummy.cpp in Sources */, 7539E1721F23B25A006B2DF2 /* rsrc_patches.cpp in Sources */, @@ -848,16 +1055,16 @@ 7539E1981F23B25A006B2DF2 /* exceptions.cpp in Sources */, 7539E1901F23B25A006B2DF2 /* basilisk_glue.cpp in Sources */, 7539E2801F23C4CA006B2DF2 /* main_unix.cpp in Sources */, - 7539E2A61F23CB9B006B2DF2 /* cpuemu.cpp in Sources */, 7539E1E11F23B25A006B2DF2 /* user_strings.cpp in Sources */, 752F27011F242BAF001032B4 /* prefs_sdl.cpp in Sources */, - 7539E2A51F23CB9B006B2DF2 /* cpuemu_nf.cpp in Sources */, 7539E2971F23C5FD006B2DF2 /* newcpu.cpp in Sources */, 7539E12A1F23B25A006B2DF2 /* vm_alloc.cpp in Sources */, + 753253331F5368370024025B /* cpustbl_nf.cpp in Sources */, 7539E16C1F23B25A006B2DF2 /* main.cpp in Sources */, 7539E26D1F23B32A006B2DF2 /* strlcpy.c in Sources */, 7539E26E1F23B32A006B2DF2 /* sys_unix.cpp in Sources */, 7539E1271F23B25A006B2DF2 /* cdrom.cpp in Sources */, + 753253311F5368370024025B /* cpuemu_nf.cpp in Sources */, 7539E1261F23B25A006B2DF2 /* audio.cpp in Sources */, 7539E1701F23B25A006B2DF2 /* prefs.cpp in Sources */, 7539E12D1F23B25A006B2DF2 /* ether.cpp in Sources */, @@ -869,7 +1076,6 @@ 7539E18E1F23B25A006B2DF2 /* sony.cpp in Sources */, 7539E2941F23C56F006B2DF2 /* user_strings_dummy.cpp in Sources */, 7539E26F1F23B32A006B2DF2 /* timer_unix.cpp in Sources */, - 7539E2A91F23CB9B006B2DF2 /* defs68k.c in Sources */, 7539E12E1F23B25A006B2DF2 /* extfs.cpp in Sources */, 7539E23F1F23B32A006B2DF2 /* bincue_unix.cpp in Sources */, 7539E12C1F23B25A006B2DF2 /* emul_op.cpp in Sources */, @@ -897,6 +1103,26 @@ name = Framework; targetProxy = 752F27161F251B5C001032B4 /* PBXContainerItemProxy */; }; + 7532530C1F53611F0024025B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 753252D91F5358D30024025B /* build68k */; + targetProxy = 7532530B1F53611F0024025B /* PBXContainerItemProxy */; + }; + 7532531B1F5364030024025B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 753252F21F535E1E0024025B /* gencpu */; + targetProxy = 7532531A1F5364030024025B /* PBXContainerItemProxy */; + }; + 7532531D1F53640B0024025B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 753253071F5360E30024025B /* run_build68k */; + targetProxy = 7532531C1F53640B0024025B /* PBXContainerItemProxy */; + }; + 7532531F1F5364170024025B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 753253161F5363D20024025B /* run_gencpu */; + targetProxy = 7532531E1F5364170024025B /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -911,6 +1137,62 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 753252DE1F5358D30024025B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 753252DF1F5358D30024025B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 753252F81F535E1E0024025B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 753252F91F535E1E0024025B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 753253091F5360E30024025B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 7532530A1F5360E30024025B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 753253181F5363D20024025B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 753253191F5363D20024025B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; 7539DFC41F23B17E006B2DF2 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1054,6 +1336,42 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 753252E31F5358D30024025B /* Build configuration list for PBXNativeTarget "build68k" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 753252DE1F5358D30024025B /* Debug */, + 753252DF1F5358D30024025B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 753252F71F535E1E0024025B /* Build configuration list for PBXNativeTarget "gencpu" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 753252F81F535E1E0024025B /* Debug */, + 753252F91F535E1E0024025B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 753253081F5360E30024025B /* Build configuration list for PBXLegacyTarget "run_build68k" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 753253091F5360E30024025B /* Debug */, + 7532530A1F5360E30024025B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 753253171F5363D20024025B /* Build configuration list for PBXLegacyTarget "run_gencpu" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 753253181F5363D20024025B /* Debug */, + 753253191F5363D20024025B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 7539DFAD1F23B17E006B2DF2 /* Build configuration list for PBXProject "BasiliskII" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/BasiliskII/src/MacOSX/run_build68k_for_xcode.sh b/BasiliskII/src/MacOSX/run_build68k_for_xcode.sh new file mode 100755 index 00000000..30047f7f --- /dev/null +++ b/BasiliskII/src/MacOSX/run_build68k_for_xcode.sh @@ -0,0 +1,33 @@ +#!/bin/bash -e + +# +# run_build68k_for_xcode.sh +# +# Generates files for 68k emulation, via UAE's virtual cpu, for use on Mac OS X hosts +# + +if [ ! -d "$BUILT_PRODUCTS_DIR" ] || [ ! "$PROJECT_DIR" ]; then + echo "ERROR: $(basename $0) must be run from an Xcode 'External Build System' target" + exit 1 +fi + +# Log some debugging information +echo "1=$1" +echo "BUILT_PRODUCTS_DIR=$BUILT_PRODUCTS_DIR" +echo "PROJECT_DIR=$PROJECT_DIR" + +# Perform actions, given the passed-in build step +case "$1" in + "clean") + echo "Cleaning build68k output(s)" + rm -rf "$BUILT_PRODUCTS_DIR/build68k_output" + ;; + "") + echo "Running build68k" + cd "$BUILT_PRODUCTS_DIR" + mkdir -p build68k_output + cd build68k_output + cat "$PROJECT_DIR/../uae_cpu/table68k" | "$BUILT_PRODUCTS_DIR/build68k" > "./defs68k.c" + ls -al + ;; +esac diff --git a/BasiliskII/src/MacOSX/run_gencpu_for_xcode.sh b/BasiliskII/src/MacOSX/run_gencpu_for_xcode.sh new file mode 100755 index 00000000..16c014df --- /dev/null +++ b/BasiliskII/src/MacOSX/run_gencpu_for_xcode.sh @@ -0,0 +1,33 @@ +#!/bin/bash -e + +# +# run_gemcpu_for_xcode.sh +# +# Generates files for 68k emulation, via UAE's virtual cpu, for use on Mac OS X hosts +# + +if [ ! -d "$BUILT_PRODUCTS_DIR" ] || [ ! "$PROJECT_DIR" ]; then + echo "ERROR: $(basename $0) must be run from an Xcode 'External Build System' target" + exit 1 +fi + +# Log some debugging information +echo "1=$1" +echo "BUILT_PRODUCTS_DIR=$BUILT_PRODUCTS_DIR" +echo "PROJECT_DIR=$PROJECT_DIR" + +# Perform actions, given the passed-in build step +case "$1" in + "clean") + echo "Cleaning gencpu output(s)" + rm -rf "$BUILT_PRODUCTS_DIR/gencpu_output" + ;; + "") + echo "Running gencpu" + cd "$BUILT_PRODUCTS_DIR" + mkdir -p gencpu_output + cd gencpu_output + "$BUILT_PRODUCTS_DIR/gencpu" + ls -al + ;; +esac diff --git a/BasiliskII/src/uae_cpu/cpuemu.cpp b/BasiliskII/src/uae_cpu/cpuemu.cpp deleted file mode 100644 index 52a0dc9c..00000000 --- a/BasiliskII/src/uae_cpu/cpuemu.cpp +++ /dev/null @@ -1,45296 +0,0 @@ -#include "sysdeps.h" -#include "m68k.h" -#include "memory.h" -#include "readcpu.h" -#include "newcpu.h" -#include "compiler/compemu.h" -#include "fpu/fpu.h" -#include "cputbl.h" -#define SET_CFLG_ALWAYS(x) SET_CFLG(x) -#define SET_NFLG_ALWAYS(x) SET_NFLG(x) -#define CPUFUNC_FF(x) x##_ff -#define CPUFUNC_NF(x) x##_nf -#define CPUFUNC(x) CPUFUNC_FF(x) -#ifdef NOFLAGS -# include "noflags.h" -#endif - -#ifdef _MSC_VER -#pragma warning(disable:4102) /* unreferenced label */ -#endif - -#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) -#define PART_1 1 -#define PART_2 1 -#define PART_3 1 -#define PART_4 1 -#define PART_5 1 -#define PART_6 1 -#define PART_7 1 -#define PART_8 1 -#endif - -#ifdef PART_1 -void REGPARAM2 CPUFUNC(op_0_0)(uae_u32 opcode) /* OR.B #.B,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10_0)(uae_u32 opcode) /* OR.B #.B,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_18_0)(uae_u32 opcode) /* OR.B #.B,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20_0)(uae_u32 opcode) /* OR.B #.B,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_28_0)(uae_u32 opcode) /* OR.B #.B,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30_0)(uae_u32 opcode) /* OR.B #.B,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_38_0)(uae_u32 opcode) /* OR.B #.B,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_39_0)(uae_u32 opcode) /* OR.B #.B,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s8 dst = get_byte(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3c_0)(uae_u32 opcode) /* ORSR.B #.W */ -{ - cpuop_begin(); -{ MakeSR(); -{ uae_s16 src = get_iword(2); - src &= 0xFF; - regs.sr |= src; - MakeFromSR(); -}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_40_0)(uae_u32 opcode) /* OR.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_50_0)(uae_u32 opcode) /* OR.W #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_58_0)(uae_u32 opcode) /* OR.W #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_60_0)(uae_u32 opcode) /* OR.W #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_68_0)(uae_u32 opcode) /* OR.W #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_70_0)(uae_u32 opcode) /* OR.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 dst = get_word(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_78_0)(uae_u32 opcode) /* OR.W #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_79_0)(uae_u32 opcode) /* OR.W #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s16 dst = get_word(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_7c_0)(uae_u32 opcode) /* ORSR.W #.W */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel18; } -{ MakeSR(); -{ uae_s16 src = get_iword(2); - regs.sr |= src; - MakeFromSR(); -}}}m68k_incpc(4); -endlabel18: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80_0)(uae_u32 opcode) /* OR.L #.L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_90_0)(uae_u32 opcode) /* OR.L #.L,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_98_0)(uae_u32 opcode) /* OR.L #.L,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a0_0)(uae_u32 opcode) /* OR.L #.L,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a8_0)(uae_u32 opcode) /* OR.L #.L,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 dst = get_long(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0_0)(uae_u32 opcode) /* OR.L #.L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{m68k_incpc(6); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b8_0)(uae_u32 opcode) /* OR.L #.L,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 dst = get_long(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b9_0)(uae_u32 opcode) /* OR.L #.L,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = get_ilong(6); -{ uae_s32 dst = get_long(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(10); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d0_0)(uae_u32 opcode) /* CHK2.B #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1); - if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg; - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel27; } -} -}}}m68k_incpc(4); -endlabel27: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e8_0)(uae_u32 opcode) /* CHK2.B #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1); - if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg; - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel28; } -} -}}}m68k_incpc(6); -endlabel28: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_f0_0)(uae_u32 opcode) /* CHK2.B #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1); - if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg; - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel29; } -} -}}}}endlabel29: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_f8_0)(uae_u32 opcode) /* CHK2.B #.W,(xxx).W */ -{ - cpuop_begin(); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1); - if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg; - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel30; } -} -}}}m68k_incpc(6); -endlabel30: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_f9_0)(uae_u32 opcode) /* CHK2.B #.W,(xxx).L */ -{ - cpuop_begin(); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = get_ilong(4); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1); - if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg; - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel31; } -} -}}}m68k_incpc(8); -endlabel31: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_fa_0)(uae_u32 opcode) /* CHK2.B #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_getpc () + 4; - dsta += (uae_s32)(uae_s16)get_iword(4); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1); - if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg; - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel32; } -} -}}}m68k_incpc(6); -endlabel32: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_fb_0)(uae_u32 opcode) /* CHK2.B #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1); - if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg; - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel33; } -} -}}}}endlabel33: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_100_0)(uae_u32 opcode) /* BTST.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= 31; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}m68k_incpc(2); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_108_0)(uae_u32 opcode) /* MVPMR.W (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr memp = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_u16 val = (get_byte(memp) << 8) + get_byte(memp + 2); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_110_0)(uae_u32 opcode) /* BTST.B Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_118_0)(uae_u32 opcode) /* BTST.B Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_120_0)(uae_u32 opcode) /* BTST.B Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_128_0)(uae_u32 opcode) /* BTST.B Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_130_0)(uae_u32 opcode) /* BTST.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_138_0)(uae_u32 opcode) /* BTST.B Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_139_0)(uae_u32 opcode) /* BTST.B Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13a_0)(uae_u32 opcode) /* BTST.B Dn,(d16,PC) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif - uae_u32 dstreg = 2; -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_getpc () + 2; - dsta += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13b_0)(uae_u32 opcode) /* BTST.B Dn,(d8,PC,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif - uae_u32 dstreg = 3; -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13c_0)(uae_u32 opcode) /* BTST.B Dn,#.B */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_s8 dst = get_ibyte(2); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_140_0)(uae_u32 opcode) /* BCHG.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= 31; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - m68k_dreg(regs, dstreg) = (dst); -}}}m68k_incpc(2); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_148_0)(uae_u32 opcode) /* MVPMR.L (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr memp = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_u32 val = (get_byte(memp) << 24) + (get_byte(memp + 2) << 16) - + (get_byte(memp + 4) << 8) + get_byte(memp + 6); - m68k_dreg(regs, dstreg) = (val); -}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_150_0)(uae_u32 opcode) /* BCHG.B Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_158_0)(uae_u32 opcode) /* BCHG.B Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_160_0)(uae_u32 opcode) /* BCHG.B Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_168_0)(uae_u32 opcode) /* BCHG.B Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_170_0)(uae_u32 opcode) /* BCHG.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_178_0)(uae_u32 opcode) /* BCHG.B Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_179_0)(uae_u32 opcode) /* BCHG.B Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_17a_0)(uae_u32 opcode) /* BCHG.B Dn,(d16,PC) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif - uae_u32 dstreg = 2; -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_getpc () + 2; - dsta += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_17b_0)(uae_u32 opcode) /* BCHG.B Dn,(d8,PC,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif - uae_u32 dstreg = 3; -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_180_0)(uae_u32 opcode) /* BCLR.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= 31; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - m68k_dreg(regs, dstreg) = (dst); -}}}m68k_incpc(2); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_188_0)(uae_u32 opcode) /* MVPRM.W Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); - uaecptr memp = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - put_byte(memp, src >> 8); put_byte(memp + 2, src); -}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_190_0)(uae_u32 opcode) /* BCLR.B Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_198_0)(uae_u32 opcode) /* BCLR.B Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1a0_0)(uae_u32 opcode) /* BCLR.B Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1a8_0)(uae_u32 opcode) /* BCLR.B Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1b0_0)(uae_u32 opcode) /* BCLR.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1b8_0)(uae_u32 opcode) /* BCLR.B Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1b9_0)(uae_u32 opcode) /* BCLR.B Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1ba_0)(uae_u32 opcode) /* BCLR.B Dn,(d16,PC) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif - uae_u32 dstreg = 2; -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_getpc () + 2; - dsta += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1bb_0)(uae_u32 opcode) /* BCLR.B Dn,(d8,PC,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif - uae_u32 dstreg = 3; -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1c0_0)(uae_u32 opcode) /* BSET.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= 31; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - m68k_dreg(regs, dstreg) = (dst); -}}}m68k_incpc(2); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_1c8_0)(uae_u32 opcode) /* MVPRM.L Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); - uaecptr memp = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - put_byte(memp, src >> 24); put_byte(memp + 2, src >> 16); - put_byte(memp + 4, src >> 8); put_byte(memp + 6, src); -}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_1d0_0)(uae_u32 opcode) /* BSET.B Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1d8_0)(uae_u32 opcode) /* BSET.B Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1e0_0)(uae_u32 opcode) /* BSET.B Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1e8_0)(uae_u32 opcode) /* BSET.B Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1f0_0)(uae_u32 opcode) /* BSET.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1f8_0)(uae_u32 opcode) /* BSET.B Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1f9_0)(uae_u32 opcode) /* BSET.B Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1fa_0)(uae_u32 opcode) /* BSET.B Dn,(d16,PC) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif - uae_u32 dstreg = 2; -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_getpc () + 2; - dsta += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1fb_0)(uae_u32 opcode) /* BSET.B Dn,(d8,PC,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif - uae_u32 dstreg = 3; -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_200_0)(uae_u32 opcode) /* AND.B #.B,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_210_0)(uae_u32 opcode) /* AND.B #.B,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_218_0)(uae_u32 opcode) /* AND.B #.B,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_220_0)(uae_u32 opcode) /* AND.B #.B,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_228_0)(uae_u32 opcode) /* AND.B #.B,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_230_0)(uae_u32 opcode) /* AND.B #.B,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_238_0)(uae_u32 opcode) /* AND.B #.B,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_239_0)(uae_u32 opcode) /* AND.B #.B,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s8 dst = get_byte(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23c_0)(uae_u32 opcode) /* ANDSR.B #.W */ -{ - cpuop_begin(); -{ MakeSR(); -{ uae_s16 src = get_iword(2); - src |= 0xFF00; - regs.sr &= src; - MakeFromSR(); -}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_240_0)(uae_u32 opcode) /* AND.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_250_0)(uae_u32 opcode) /* AND.W #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_258_0)(uae_u32 opcode) /* AND.W #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_260_0)(uae_u32 opcode) /* AND.W #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_268_0)(uae_u32 opcode) /* AND.W #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_270_0)(uae_u32 opcode) /* AND.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 dst = get_word(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_278_0)(uae_u32 opcode) /* AND.W #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_279_0)(uae_u32 opcode) /* AND.W #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s16 dst = get_word(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_27c_0)(uae_u32 opcode) /* ANDSR.W #.W */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel96; } -{ MakeSR(); -{ uae_s16 src = get_iword(2); - regs.sr &= src; - MakeFromSR(); -}}}m68k_incpc(4); -endlabel96: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_280_0)(uae_u32 opcode) /* AND.L #.L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_290_0)(uae_u32 opcode) /* AND.L #.L,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_298_0)(uae_u32 opcode) /* AND.L #.L,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2a0_0)(uae_u32 opcode) /* AND.L #.L,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2a8_0)(uae_u32 opcode) /* AND.L #.L,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 dst = get_long(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2b0_0)(uae_u32 opcode) /* AND.L #.L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{m68k_incpc(6); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2b8_0)(uae_u32 opcode) /* AND.L #.L,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 dst = get_long(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2b9_0)(uae_u32 opcode) /* AND.L #.L,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = get_ilong(6); -{ uae_s32 dst = get_long(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(10); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2d0_0)(uae_u32 opcode) /* CHK2.W #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2); - if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg; - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel105; } -} -}}}m68k_incpc(4); -endlabel105: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2e8_0)(uae_u32 opcode) /* CHK2.W #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2); - if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg; - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel106; } -} -}}}m68k_incpc(6); -endlabel106: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2f0_0)(uae_u32 opcode) /* CHK2.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2); - if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg; - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel107; } -} -}}}}endlabel107: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2f8_0)(uae_u32 opcode) /* CHK2.W #.W,(xxx).W */ -{ - cpuop_begin(); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2); - if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg; - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel108; } -} -}}}m68k_incpc(6); -endlabel108: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2f9_0)(uae_u32 opcode) /* CHK2.W #.W,(xxx).L */ -{ - cpuop_begin(); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = get_ilong(4); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2); - if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg; - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel109; } -} -}}}m68k_incpc(8); -endlabel109: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2fa_0)(uae_u32 opcode) /* CHK2.W #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_getpc () + 4; - dsta += (uae_s32)(uae_s16)get_iword(4); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2); - if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg; - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel110; } -} -}}}m68k_incpc(6); -endlabel110: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2fb_0)(uae_u32 opcode) /* CHK2.W #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2); - if ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg; - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel111; } -} -}}}}endlabel111: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_400_0)(uae_u32 opcode) /* SUB.B #.B,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_410_0)(uae_u32 opcode) /* SUB.B #.B,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_418_0)(uae_u32 opcode) /* SUB.B #.B,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_420_0)(uae_u32 opcode) /* SUB.B #.B,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_428_0)(uae_u32 opcode) /* SUB.B #.B,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_430_0)(uae_u32 opcode) /* SUB.B #.B,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_438_0)(uae_u32 opcode) /* SUB.B #.B,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_439_0)(uae_u32 opcode) /* SUB.B #.B,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_440_0)(uae_u32 opcode) /* SUB.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_450_0)(uae_u32 opcode) /* SUB.W #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_458_0)(uae_u32 opcode) /* SUB.W #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_460_0)(uae_u32 opcode) /* SUB.W #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_468_0)(uae_u32 opcode) /* SUB.W #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_470_0)(uae_u32 opcode) /* SUB.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_478_0)(uae_u32 opcode) /* SUB.W #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_479_0)(uae_u32 opcode) /* SUB.W #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_480_0)(uae_u32 opcode) /* SUB.L #.L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_490_0)(uae_u32 opcode) /* SUB.L #.L,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_498_0)(uae_u32 opcode) /* SUB.L #.L,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a0_0)(uae_u32 opcode) /* SUB.L #.L,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a8_0)(uae_u32 opcode) /* SUB.L #.L,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4b0_0)(uae_u32 opcode) /* SUB.L #.L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{m68k_incpc(6); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4b8_0)(uae_u32 opcode) /* SUB.L #.L,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4b9_0)(uae_u32 opcode) /* SUB.L #.L,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = get_ilong(6); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(10); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4d0_0)(uae_u32 opcode) /* CHK2.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=get_long(dsta); upper = get_long(dsta+4); - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel136; } -} -}}}m68k_incpc(4); -endlabel136: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4e8_0)(uae_u32 opcode) /* CHK2.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=get_long(dsta); upper = get_long(dsta+4); - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel137; } -} -}}}m68k_incpc(6); -endlabel137: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4f0_0)(uae_u32 opcode) /* CHK2.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=get_long(dsta); upper = get_long(dsta+4); - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel138; } -} -}}}}endlabel138: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4f8_0)(uae_u32 opcode) /* CHK2.L #.W,(xxx).W */ -{ - cpuop_begin(); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=get_long(dsta); upper = get_long(dsta+4); - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel139; } -} -}}}m68k_incpc(6); -endlabel139: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4f9_0)(uae_u32 opcode) /* CHK2.L #.W,(xxx).L */ -{ - cpuop_begin(); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = get_ilong(4); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=get_long(dsta); upper = get_long(dsta+4); - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel140; } -} -}}}m68k_incpc(8); -endlabel140: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4fa_0)(uae_u32 opcode) /* CHK2.L #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_getpc () + 4; - dsta += (uae_s32)(uae_s16)get_iword(4); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=get_long(dsta); upper = get_long(dsta+4); - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel141; } -} -}}}m68k_incpc(6); -endlabel141: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4fb_0)(uae_u32 opcode) /* CHK2.L #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); - {uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15]; - lower=get_long(dsta); upper = get_long(dsta+4); - SET_ZFLG (upper == reg || lower == reg); - SET_CFLG_ALWAYS (lower <= upper ? reg < lower || reg > upper : reg > upper || reg < lower); - if ((extra & 0x800) && GET_CFLG) { Exception(6,oldpc); goto endlabel142; } -} -}}}}endlabel142: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_600_0)(uae_u32 opcode) /* ADD.B #.B,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_610_0)(uae_u32 opcode) /* ADD.B #.B,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_618_0)(uae_u32 opcode) /* ADD.B #.B,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_620_0)(uae_u32 opcode) /* ADD.B #.B,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_628_0)(uae_u32 opcode) /* ADD.B #.B,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_630_0)(uae_u32 opcode) /* ADD.B #.B,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_638_0)(uae_u32 opcode) /* ADD.B #.B,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_639_0)(uae_u32 opcode) /* ADD.B #.B,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_640_0)(uae_u32 opcode) /* ADD.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_650_0)(uae_u32 opcode) /* ADD.W #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_658_0)(uae_u32 opcode) /* ADD.W #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_660_0)(uae_u32 opcode) /* ADD.W #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_668_0)(uae_u32 opcode) /* ADD.W #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_670_0)(uae_u32 opcode) /* ADD.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_678_0)(uae_u32 opcode) /* ADD.W #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_679_0)(uae_u32 opcode) /* ADD.W #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_680_0)(uae_u32 opcode) /* ADD.L #.L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_690_0)(uae_u32 opcode) /* ADD.L #.L,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_698_0)(uae_u32 opcode) /* ADD.L #.L,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_6a0_0)(uae_u32 opcode) /* ADD.L #.L,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_6a8_0)(uae_u32 opcode) /* ADD.L #.L,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_6b0_0)(uae_u32 opcode) /* ADD.L #.L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{m68k_incpc(6); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_6b8_0)(uae_u32 opcode) /* ADD.L #.L,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_6b9_0)(uae_u32 opcode) /* ADD.L #.L,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = get_ilong(6); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(10); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_6c0_0)(uae_u32 opcode) /* RTM.L Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{m68k_incpc(2); - op_illg(opcode); -} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_6c8_0)(uae_u32 opcode) /* RTM.L An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{m68k_incpc(2); - op_illg(opcode); -} cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6d0_0)(uae_u32 opcode) /* CALLM.L (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{m68k_incpc(2); - op_illg(opcode); -} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6e8_0)(uae_u32 opcode) /* CALLM.L (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{m68k_incpc(2); - op_illg(opcode); -} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6f0_0)(uae_u32 opcode) /* CALLM.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{m68k_incpc(2); - op_illg(opcode); -} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6f8_0)(uae_u32 opcode) /* CALLM.L (xxx).W */ -{ - cpuop_begin(); -{m68k_incpc(2); - op_illg(opcode); -} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6f9_0)(uae_u32 opcode) /* CALLM.L (xxx).L */ -{ - cpuop_begin(); -{m68k_incpc(2); - op_illg(opcode); -} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6fa_0)(uae_u32 opcode) /* CALLM.L (d16,PC) */ -{ - cpuop_begin(); -{m68k_incpc(2); - op_illg(opcode); -} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6fb_0)(uae_u32 opcode) /* CALLM.L (d8,PC,Xn) */ -{ - cpuop_begin(); -{m68k_incpc(2); - op_illg(opcode); -} cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_800_0)(uae_u32 opcode) /* BTST.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= 31; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_810_0)(uae_u32 opcode) /* BTST.B #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_818_0)(uae_u32 opcode) /* BTST.B #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_820_0)(uae_u32 opcode) /* BTST.B #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_828_0)(uae_u32 opcode) /* BTST.B #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_830_0)(uae_u32 opcode) /* BTST.B #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_838_0)(uae_u32 opcode) /* BTST.B #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_839_0)(uae_u32 opcode) /* BTST.B #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_83a_0)(uae_u32 opcode) /* BTST.B #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_getpc () + 4; - dsta += (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_83b_0)(uae_u32 opcode) /* BTST.B #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_83c_0)(uae_u32 opcode) /* BTST.B #.W,#.B */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uae_s8 dst = get_ibyte(4); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_840_0)(uae_u32 opcode) /* BCHG.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= 31; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - m68k_dreg(regs, dstreg) = (dst); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_850_0)(uae_u32 opcode) /* BCHG.B #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_858_0)(uae_u32 opcode) /* BCHG.B #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_860_0)(uae_u32 opcode) /* BCHG.B #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_868_0)(uae_u32 opcode) /* BCHG.B #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_870_0)(uae_u32 opcode) /* BCHG.B #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_878_0)(uae_u32 opcode) /* BCHG.B #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_879_0)(uae_u32 opcode) /* BCHG.B #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_87a_0)(uae_u32 opcode) /* BCHG.B #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_getpc () + 4; - dsta += (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_87b_0)(uae_u32 opcode) /* BCHG.B #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_880_0)(uae_u32 opcode) /* BCLR.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= 31; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - m68k_dreg(regs, dstreg) = (dst); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_890_0)(uae_u32 opcode) /* BCLR.B #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_898_0)(uae_u32 opcode) /* BCLR.B #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8a0_0)(uae_u32 opcode) /* BCLR.B #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8a8_0)(uae_u32 opcode) /* BCLR.B #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8b0_0)(uae_u32 opcode) /* BCLR.B #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8b8_0)(uae_u32 opcode) /* BCLR.B #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8b9_0)(uae_u32 opcode) /* BCLR.B #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8ba_0)(uae_u32 opcode) /* BCLR.B #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_getpc () + 4; - dsta += (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8bb_0)(uae_u32 opcode) /* BCLR.B #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8c0_0)(uae_u32 opcode) /* BSET.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= 31; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - m68k_dreg(regs, dstreg) = (dst); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8d0_0)(uae_u32 opcode) /* BSET.B #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8d8_0)(uae_u32 opcode) /* BSET.B #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8e0_0)(uae_u32 opcode) /* BSET.B #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8e8_0)(uae_u32 opcode) /* BSET.B #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8f0_0)(uae_u32 opcode) /* BSET.B #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8f8_0)(uae_u32 opcode) /* BSET.B #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8f9_0)(uae_u32 opcode) /* BSET.B #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8fa_0)(uae_u32 opcode) /* BSET.B #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_getpc () + 4; - dsta += (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8fb_0)(uae_u32 opcode) /* BSET.B #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a00_0)(uae_u32 opcode) /* EOR.B #.B,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a10_0)(uae_u32 opcode) /* EOR.B #.B,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a18_0)(uae_u32 opcode) /* EOR.B #.B,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a20_0)(uae_u32 opcode) /* EOR.B #.B,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a28_0)(uae_u32 opcode) /* EOR.B #.B,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a30_0)(uae_u32 opcode) /* EOR.B #.B,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a38_0)(uae_u32 opcode) /* EOR.B #.B,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a39_0)(uae_u32 opcode) /* EOR.B #.B,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s8 dst = get_byte(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a3c_0)(uae_u32 opcode) /* EORSR.B #.W */ -{ - cpuop_begin(); -{ MakeSR(); -{ uae_s16 src = get_iword(2); - src &= 0xFF; - regs.sr ^= src; - MakeFromSR(); -}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a40_0)(uae_u32 opcode) /* EOR.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a50_0)(uae_u32 opcode) /* EOR.W #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a58_0)(uae_u32 opcode) /* EOR.W #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a60_0)(uae_u32 opcode) /* EOR.W #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a68_0)(uae_u32 opcode) /* EOR.W #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a70_0)(uae_u32 opcode) /* EOR.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 dst = get_word(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a78_0)(uae_u32 opcode) /* EOR.W #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a79_0)(uae_u32 opcode) /* EOR.W #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s16 dst = get_word(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -#endif - -#ifdef PART_2 -void REGPARAM2 CPUFUNC(op_a7c_0)(uae_u32 opcode) /* EORSR.W #.W */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel234; } -{ MakeSR(); -{ uae_s16 src = get_iword(2); - regs.sr ^= src; - MakeFromSR(); -}}}m68k_incpc(4); -endlabel234: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a80_0)(uae_u32 opcode) /* EOR.L #.L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a90_0)(uae_u32 opcode) /* EOR.L #.L,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a98_0)(uae_u32 opcode) /* EOR.L #.L,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_aa0_0)(uae_u32 opcode) /* EOR.L #.L,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_aa8_0)(uae_u32 opcode) /* EOR.L #.L,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 dst = get_long(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ab0_0)(uae_u32 opcode) /* EOR.L #.L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{m68k_incpc(6); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ab8_0)(uae_u32 opcode) /* EOR.L #.L,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 dst = get_long(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ab9_0)(uae_u32 opcode) /* EOR.L #.L,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = get_ilong(6); -{ uae_s32 dst = get_long(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(10); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ad0_0)(uae_u32 opcode) /* CAS.B #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s8)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(m68k_dreg(regs, rc))) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_byte(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ad8_0)(uae_u32 opcode) /* CAS.B #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s8)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(m68k_dreg(regs, rc))) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_byte(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ae0_0)(uae_u32 opcode) /* CAS.B #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s8)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(m68k_dreg(regs, rc))) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_byte(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ae8_0)(uae_u32 opcode) /* CAS.B #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s8)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(m68k_dreg(regs, rc))) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_byte(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_af0_0)(uae_u32 opcode) /* CAS.B #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s8)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(m68k_dreg(regs, rc))) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_byte(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_af8_0)(uae_u32 opcode) /* CAS.B #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s8)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(m68k_dreg(regs, rc))) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_byte(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_af9_0)(uae_u32 opcode) /* CAS.B #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s8 dst = get_byte(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s8)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(m68k_dreg(regs, rc))) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_byte(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c00_0)(uae_u32 opcode) /* CMP.B #.B,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c10_0)(uae_u32 opcode) /* CMP.B #.B,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c18_0)(uae_u32 opcode) /* CMP.B #.B,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c20_0)(uae_u32 opcode) /* CMP.B #.B,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c28_0)(uae_u32 opcode) /* CMP.B #.B,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c30_0)(uae_u32 opcode) /* CMP.B #.B,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c38_0)(uae_u32 opcode) /* CMP.B #.B,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c39_0)(uae_u32 opcode) /* CMP.B #.B,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c3a_0)(uae_u32 opcode) /* CMP.B #.B,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_getpc () + 4; - dsta += (uae_s32)(uae_s16)get_iword(4); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c3b_0)(uae_u32 opcode) /* CMP.B #.B,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s8 src = get_ibyte(2); -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c40_0)(uae_u32 opcode) /* CMP.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c50_0)(uae_u32 opcode) /* CMP.W #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c58_0)(uae_u32 opcode) /* CMP.W #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c60_0)(uae_u32 opcode) /* CMP.W #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c68_0)(uae_u32 opcode) /* CMP.W #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c70_0)(uae_u32 opcode) /* CMP.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c78_0)(uae_u32 opcode) /* CMP.W #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c79_0)(uae_u32 opcode) /* CMP.W #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c7a_0)(uae_u32 opcode) /* CMP.W #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_getpc () + 4; - dsta += (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c7b_0)(uae_u32 opcode) /* CMP.W #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c80_0)(uae_u32 opcode) /* CMP.L #.L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c90_0)(uae_u32 opcode) /* CMP.L #.L,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c98_0)(uae_u32 opcode) /* CMP.L #.L,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ca0_0)(uae_u32 opcode) /* CMP.L #.L,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ca8_0)(uae_u32 opcode) /* CMP.L #.L,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_cb0_0)(uae_u32 opcode) /* CMP.L #.L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{m68k_incpc(6); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_cb8_0)(uae_u32 opcode) /* CMP.L #.L,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_cb9_0)(uae_u32 opcode) /* CMP.L #.L,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = get_ilong(6); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(10); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_cba_0)(uae_u32 opcode) /* CMP.L #.L,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_getpc () + 6; - dsta += (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_cbb_0)(uae_u32 opcode) /* CMP.L #.L,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s32 src = get_ilong(2); -{m68k_incpc(6); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_cd0_0)(uae_u32 opcode) /* CAS.W #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s16)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(m68k_dreg(regs, rc))) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_word(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_cd8_0)(uae_u32 opcode) /* CAS.W #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s16)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(m68k_dreg(regs, rc))) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_word(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ce0_0)(uae_u32 opcode) /* CAS.W #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s16)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(m68k_dreg(regs, rc))) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_word(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ce8_0)(uae_u32 opcode) /* CAS.W #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s16)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(m68k_dreg(regs, rc))) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_word(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_cf0_0)(uae_u32 opcode) /* CAS.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 dst = get_word(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s16)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(m68k_dreg(regs, rc))) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_word(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_cf8_0)(uae_u32 opcode) /* CAS.W #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s16 dst = get_word(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s16)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(m68k_dreg(regs, rc))) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_word(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_cf9_0)(uae_u32 opcode) /* CAS.W #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s16 dst = get_word(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s16)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(m68k_dreg(regs, rc))) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_word(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_cfc_0)(uae_u32 opcode) /* CAS2.W #.L */ -{ - cpuop_begin(); -{{ uae_s32 extra = get_ilong(2); - uae_u32 rn1 = regs.regs[(extra >> 28) & 15]; - uae_u32 rn2 = regs.regs[(extra >> 12) & 15]; - uae_u16 dst1 = get_word(rn1), dst2 = get_word(rn2); -{uae_u32 newv = ((uae_s16)(dst1)) - ((uae_s16)(m68k_dreg(regs, (extra >> 16) & 7))); -{ int flgs = ((uae_s16)(m68k_dreg(regs, (extra >> 16) & 7))) < 0; - int flgo = ((uae_s16)(dst1)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(m68k_dreg(regs, (extra >> 16) & 7))) > ((uae_u16)(dst1))); - SET_NFLG (flgn != 0); - if (GET_ZFLG) { -{uae_u32 newv = ((uae_s16)(dst2)) - ((uae_s16)(m68k_dreg(regs, extra & 7))); -{ int flgs = ((uae_s16)(m68k_dreg(regs, extra & 7))) < 0; - int flgo = ((uae_s16)(dst2)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(m68k_dreg(regs, extra & 7))) > ((uae_u16)(dst2))); - SET_NFLG (flgn != 0); - if (GET_ZFLG) { - put_word(rn1, m68k_dreg(regs, (extra >> 22) & 7)); - put_word(rn1, m68k_dreg(regs, (extra >> 6) & 7)); - }} -}}}} if (! GET_ZFLG) { - m68k_dreg(regs, (extra >> 22) & 7) = (m68k_dreg(regs, (extra >> 22) & 7) & ~0xffff) | (dst1 & 0xffff); - m68k_dreg(regs, (extra >> 6) & 7) = (m68k_dreg(regs, (extra >> 6) & 7) & ~0xffff) | (dst2 & 0xffff); - } -}}m68k_incpc(6); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e10_0)(uae_u32 opcode) /* MOVES.B #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel288; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = m68k_areg(regs, dstreg); - put_byte(dsta,src); -}}else{{ uaecptr srca = m68k_areg(regs, dstreg); -{ uae_s8 src = get_byte(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xff) | ((src) & 0xff); - } -}}}}}}m68k_incpc(4); -endlabel288: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e18_0)(uae_u32 opcode) /* MOVES.B #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel289; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - put_byte(dsta,src); -}}else{{ uaecptr srca = m68k_areg(regs, dstreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xff) | ((src) & 0xff); - } -}}}}}}m68k_incpc(4); -endlabel289: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e20_0)(uae_u32 opcode) /* MOVES.B #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel290; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; - m68k_areg (regs, dstreg) = dsta; - put_byte(dsta,src); -}}else{{ uaecptr srca = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, dstreg) = srca; - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xff) | ((src) & 0xff); - } -}}}}}}m68k_incpc(4); -endlabel290: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e28_0)(uae_u32 opcode) /* MOVES.B #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel291; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - put_byte(dsta,src); -}}else{{ uaecptr srca = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); -{ uae_s8 src = get_byte(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xff) | ((src) & 0xff); - } -}}}}}}m68k_incpc(8); -endlabel291: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e30_0)(uae_u32 opcode) /* MOVES.B #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel292; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - put_byte(dsta,src); -}}}else{{{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 src = get_byte(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xff) | ((src) & 0xff); - } -}}}}}}}endlabel292: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e38_0)(uae_u32 opcode) /* MOVES.B #.W,(xxx).W */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel293; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - put_byte(dsta,src); -}}else{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(6); -{ uae_s8 src = get_byte(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xff) | ((src) & 0xff); - } -}}}}}}m68k_incpc(8); -endlabel293: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e39_0)(uae_u32 opcode) /* MOVES.B #.W,(xxx).L */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel294; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = get_ilong(4); - put_byte(dsta,src); -}}else{{ uaecptr srca = get_ilong(8); -{ uae_s8 src = get_byte(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s8)src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xff) | ((src) & 0xff); - } -}}}}}}m68k_incpc(12); -endlabel294: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e50_0)(uae_u32 opcode) /* MOVES.W #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel295; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = m68k_areg(regs, dstreg); - put_word(dsta,src); -}}else{{ uaecptr srca = m68k_areg(regs, dstreg); -{ uae_s16 src = get_word(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xffff) | ((src) & 0xffff); - } -}}}}}}m68k_incpc(4); -endlabel295: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e58_0)(uae_u32 opcode) /* MOVES.W #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel296; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - put_word(dsta,src); -}}else{{ uaecptr srca = m68k_areg(regs, dstreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, dstreg) += 2; - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xffff) | ((src) & 0xffff); - } -}}}}}}m68k_incpc(4); -endlabel296: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e60_0)(uae_u32 opcode) /* MOVES.W #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel297; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - put_word(dsta,src); -}}else{{ uaecptr srca = m68k_areg(regs, dstreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, dstreg) = srca; - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xffff) | ((src) & 0xffff); - } -}}}}}}m68k_incpc(4); -endlabel297: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e68_0)(uae_u32 opcode) /* MOVES.W #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel298; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - put_word(dsta,src); -}}else{{ uaecptr srca = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); -{ uae_s16 src = get_word(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xffff) | ((src) & 0xffff); - } -}}}}}}m68k_incpc(8); -endlabel298: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e70_0)(uae_u32 opcode) /* MOVES.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel299; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - put_word(dsta,src); -}}}else{{{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 src = get_word(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xffff) | ((src) & 0xffff); - } -}}}}}}}endlabel299: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e78_0)(uae_u32 opcode) /* MOVES.W #.W,(xxx).W */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel300; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - put_word(dsta,src); -}}else{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(6); -{ uae_s16 src = get_word(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xffff) | ((src) & 0xffff); - } -}}}}}}m68k_incpc(8); -endlabel300: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e79_0)(uae_u32 opcode) /* MOVES.W #.W,(xxx).L */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel301; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = get_ilong(4); - put_word(dsta,src); -}}else{{ uaecptr srca = get_ilong(8); -{ uae_s16 src = get_word(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = (uae_s32)(uae_s16)src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (m68k_dreg(regs, (extra >> 12) & 7) & ~0xffff) | ((src) & 0xffff); - } -}}}}}}m68k_incpc(12); -endlabel301: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e90_0)(uae_u32 opcode) /* MOVES.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel302; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = m68k_areg(regs, dstreg); - put_long(dsta,src); -}}else{{ uaecptr srca = m68k_areg(regs, dstreg); -{ uae_s32 src = get_long(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (src); - } -}}}}}}m68k_incpc(4); -endlabel302: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_e98_0)(uae_u32 opcode) /* MOVES.L #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel303; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - put_long(dsta,src); -}}else{{ uaecptr srca = m68k_areg(regs, dstreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, dstreg) += 4; - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (src); - } -}}}}}}m68k_incpc(4); -endlabel303: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_ea0_0)(uae_u32 opcode) /* MOVES.L #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel304; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - put_long(dsta,src); -}}else{{ uaecptr srca = m68k_areg(regs, dstreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, dstreg) = srca; - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (src); - } -}}}}}}m68k_incpc(4); -endlabel304: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_ea8_0)(uae_u32 opcode) /* MOVES.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel305; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - put_long(dsta,src); -}}else{{ uaecptr srca = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 src = get_long(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (src); - } -}}}}}}m68k_incpc(8); -endlabel305: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_eb0_0)(uae_u32 opcode) /* MOVES.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel306; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - put_long(dsta,src); -}}}else{{{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 src = get_long(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (src); - } -}}}}}}}endlabel306: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_eb8_0)(uae_u32 opcode) /* MOVES.L #.W,(xxx).W */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel307; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - put_long(dsta,src); -}}else{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(6); -{ uae_s32 src = get_long(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (src); - } -}}}}}}m68k_incpc(8); -endlabel307: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_eb9_0)(uae_u32 opcode) /* MOVES.L #.W,(xxx).L */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel308; } -{{ uae_s16 extra = get_iword(2); - if (extra & 0x800) -{ uae_u32 src = regs.regs[(extra >> 12) & 15]; -{ uaecptr dsta = get_ilong(4); - put_long(dsta,src); -}}else{{ uaecptr srca = get_ilong(8); -{ uae_s32 src = get_long(srca); - if (extra & 0x8000) { - m68k_areg(regs, (extra >> 12) & 7) = src; - } else { - m68k_dreg(regs, (extra >> 12) & 7) = (src); - } -}}}}}}m68k_incpc(12); -endlabel308: ; - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_ed0_0)(uae_u32 opcode) /* CAS.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s32)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(m68k_dreg(regs, rc))) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_long(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ed8_0)(uae_u32 opcode) /* CAS.L #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s32)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(m68k_dreg(regs, rc))) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_long(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ee0_0)(uae_u32 opcode) /* CAS.L #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s32)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(m68k_dreg(regs, rc))) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_long(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ee8_0)(uae_u32 opcode) /* CAS.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 dst = get_long(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s32)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(m68k_dreg(regs, rc))) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_long(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ef0_0)(uae_u32 opcode) /* CAS.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s32)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(m68k_dreg(regs, rc))) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_long(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ef8_0)(uae_u32 opcode) /* CAS.L #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 dst = get_long(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s32)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(m68k_dreg(regs, rc))) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_long(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ef9_0)(uae_u32 opcode) /* CAS.L #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s32 dst = get_long(dsta); -{ int ru = (src >> 6) & 7; - int rc = src & 7; -{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(m68k_dreg(regs, rc))); -{ int flgs = ((uae_s32)(m68k_dreg(regs, rc))) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(m68k_dreg(regs, rc))) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); - if (GET_ZFLG){ put_long(dsta,(m68k_dreg(regs, ru))); -}else{m68k_dreg(regs, rc) = dst; -}}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_efc_0)(uae_u32 opcode) /* CAS2.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 extra = get_ilong(2); - uae_u32 rn1 = regs.regs[(extra >> 28) & 15]; - uae_u32 rn2 = regs.regs[(extra >> 12) & 15]; - uae_u32 dst1 = get_long(rn1), dst2 = get_long(rn2); -{uae_u32 newv = ((uae_s32)(dst1)) - ((uae_s32)(m68k_dreg(regs, (extra >> 16) & 7))); -{ int flgs = ((uae_s32)(m68k_dreg(regs, (extra >> 16) & 7))) < 0; - int flgo = ((uae_s32)(dst1)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(m68k_dreg(regs, (extra >> 16) & 7))) > ((uae_u32)(dst1))); - SET_NFLG (flgn != 0); - if (GET_ZFLG) { -{uae_u32 newv = ((uae_s32)(dst2)) - ((uae_s32)(m68k_dreg(regs, extra & 7))); -{ int flgs = ((uae_s32)(m68k_dreg(regs, extra & 7))) < 0; - int flgo = ((uae_s32)(dst2)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(m68k_dreg(regs, extra & 7))) > ((uae_u32)(dst2))); - SET_NFLG (flgn != 0); - if (GET_ZFLG) { - put_long(rn1, m68k_dreg(regs, (extra >> 22) & 7)); - put_long(rn1, m68k_dreg(regs, (extra >> 6) & 7)); - }} -}}}} if (! GET_ZFLG) { - m68k_dreg(regs, (extra >> 22) & 7) = dst1; - m68k_dreg(regs, (extra >> 6) & 7) = dst2; - } -}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1000_0)(uae_u32 opcode) /* MOVE.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1010_0)(uae_u32 opcode) /* MOVE.B (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1018_0)(uae_u32 opcode) /* MOVE.B (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1020_0)(uae_u32 opcode) /* MOVE.B -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1028_0)(uae_u32 opcode) /* MOVE.B (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1030_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1038_0)(uae_u32 opcode) /* MOVE.B (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1039_0)(uae_u32 opcode) /* MOVE.B (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_103a_0)(uae_u32 opcode) /* MOVE.B (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_103b_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 src = get_byte(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_103c_0)(uae_u32 opcode) /* MOVE.B #.B,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1080_0)(uae_u32 opcode) /* MOVE.B Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1090_0)(uae_u32 opcode) /* MOVE.B (An),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1098_0)(uae_u32 opcode) /* MOVE.B (An)+,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10a0_0)(uae_u32 opcode) /* MOVE.B -(An),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10a8_0)(uae_u32 opcode) /* MOVE.B (d16,An),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10b0_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10b8_0)(uae_u32 opcode) /* MOVE.B (xxx).W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10b9_0)(uae_u32 opcode) /* MOVE.B (xxx).L,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10ba_0)(uae_u32 opcode) /* MOVE.B (d16,PC),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10bb_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10bc_0)(uae_u32 opcode) /* MOVE.B #.B,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10c0_0)(uae_u32 opcode) /* MOVE.B Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10d0_0)(uae_u32 opcode) /* MOVE.B (An),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10d8_0)(uae_u32 opcode) /* MOVE.B (An)+,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10e0_0)(uae_u32 opcode) /* MOVE.B -(An),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10e8_0)(uae_u32 opcode) /* MOVE.B (d16,An),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10f0_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10f8_0)(uae_u32 opcode) /* MOVE.B (xxx).W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10f9_0)(uae_u32 opcode) /* MOVE.B (xxx).L,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10fa_0)(uae_u32 opcode) /* MOVE.B (d16,PC),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10fb_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10fc_0)(uae_u32 opcode) /* MOVE.B #.B,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1100_0)(uae_u32 opcode) /* MOVE.B Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1110_0)(uae_u32 opcode) /* MOVE.B (An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1118_0)(uae_u32 opcode) /* MOVE.B (An)+,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1120_0)(uae_u32 opcode) /* MOVE.B -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1128_0)(uae_u32 opcode) /* MOVE.B (d16,An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1130_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1138_0)(uae_u32 opcode) /* MOVE.B (xxx).W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1139_0)(uae_u32 opcode) /* MOVE.B (xxx).L,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_113a_0)(uae_u32 opcode) /* MOVE.B (d16,PC),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_113b_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_113c_0)(uae_u32 opcode) /* MOVE.B #.B,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1140_0)(uae_u32 opcode) /* MOVE.B Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1150_0)(uae_u32 opcode) /* MOVE.B (An),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1158_0)(uae_u32 opcode) /* MOVE.B (An)+,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1160_0)(uae_u32 opcode) /* MOVE.B -(An),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1168_0)(uae_u32 opcode) /* MOVE.B (d16,An),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1170_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1178_0)(uae_u32 opcode) /* MOVE.B (xxx).W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1179_0)(uae_u32 opcode) /* MOVE.B (xxx).L,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_117a_0)(uae_u32 opcode) /* MOVE.B (d16,PC),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_117b_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_117c_0)(uae_u32 opcode) /* MOVE.B #.B,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1180_0)(uae_u32 opcode) /* MOVE.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1190_0)(uae_u32 opcode) /* MOVE.B (An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1198_0)(uae_u32 opcode) /* MOVE.B (An)+,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11a0_0)(uae_u32 opcode) /* MOVE.B -(An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11a8_0)(uae_u32 opcode) /* MOVE.B (d16,An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11b0_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11b8_0)(uae_u32 opcode) /* MOVE.B (xxx).W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11b9_0)(uae_u32 opcode) /* MOVE.B (xxx).L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{m68k_incpc(6); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11ba_0)(uae_u32 opcode) /* MOVE.B (d16,PC),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11bb_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 src = get_byte(srca); -{{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11bc_0)(uae_u32 opcode) /* MOVE.B #.B,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11c0_0)(uae_u32 opcode) /* MOVE.B Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11d0_0)(uae_u32 opcode) /* MOVE.B (An),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11d8_0)(uae_u32 opcode) /* MOVE.B (An)+,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11e0_0)(uae_u32 opcode) /* MOVE.B -(An),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11e8_0)(uae_u32 opcode) /* MOVE.B (d16,An),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11f0_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11f8_0)(uae_u32 opcode) /* MOVE.B (xxx).W,(xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11f9_0)(uae_u32 opcode) /* MOVE.B (xxx).L,(xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11fa_0)(uae_u32 opcode) /* MOVE.B (d16,PC),(xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11fb_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(xxx).W */ -{ - cpuop_begin(); -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11fc_0)(uae_u32 opcode) /* MOVE.B #.B,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13c0_0)(uae_u32 opcode) /* MOVE.B Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13d0_0)(uae_u32 opcode) /* MOVE.B (An),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13d8_0)(uae_u32 opcode) /* MOVE.B (An)+,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uaecptr dsta = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13e0_0)(uae_u32 opcode) /* MOVE.B -(An),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13e8_0)(uae_u32 opcode) /* MOVE.B (d16,An),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13f0_0)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_ilong(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13f8_0)(uae_u32 opcode) /* MOVE.B (xxx).W,(xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13f9_0)(uae_u32 opcode) /* MOVE.B (xxx).L,(xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_ilong(6); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(10); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13fa_0)(uae_u32 opcode) /* MOVE.B (d16,PC),(xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13fb_0)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(xxx).L */ -{ - cpuop_begin(); -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_ilong(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13fc_0)(uae_u32 opcode) /* MOVE.B #.B,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2000_0)(uae_u32 opcode) /* MOVE.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2008_0)(uae_u32 opcode) /* MOVE.L An,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2010_0)(uae_u32 opcode) /* MOVE.L (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2018_0)(uae_u32 opcode) /* MOVE.L (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2020_0)(uae_u32 opcode) /* MOVE.L -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2028_0)(uae_u32 opcode) /* MOVE.L (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2030_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2038_0)(uae_u32 opcode) /* MOVE.L (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2039_0)(uae_u32 opcode) /* MOVE.L (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_203a_0)(uae_u32 opcode) /* MOVE.L (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_203b_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_203c_0)(uae_u32 opcode) /* MOVE.L #.L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}m68k_incpc(6); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_2040_0)(uae_u32 opcode) /* MOVEA.L Dn,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_u32 val = src; - m68k_areg(regs, dstreg) = (val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_2048_0)(uae_u32 opcode) /* MOVEA.L An,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uae_u32 val = src; - m68k_areg(regs, dstreg) = (val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_2050_0)(uae_u32 opcode) /* MOVEA.L (An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uae_u32 val = src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_2058_0)(uae_u32 opcode) /* MOVEA.L (An)+,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uae_u32 val = src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_2060_0)(uae_u32 opcode) /* MOVEA.L -(An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_u32 val = src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_2068_0)(uae_u32 opcode) /* MOVEA.L (d16,An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_u32 val = src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_2070_0)(uae_u32 opcode) /* MOVEA.L (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_u32 val = src; - m68k_areg(regs, dstreg) = (val); -}}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_2078_0)(uae_u32 opcode) /* MOVEA.L (xxx).W,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_u32 val = src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_2079_0)(uae_u32 opcode) /* MOVEA.L (xxx).L,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uae_u32 val = src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_207a_0)(uae_u32 opcode) /* MOVEA.L (d16,PC),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_u32 val = src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_207b_0)(uae_u32 opcode) /* MOVEA.L (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_u32 val = src; - m68k_areg(regs, dstreg) = (val); -}}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_207c_0)(uae_u32 opcode) /* MOVEA.L #.L,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_u32 val = src; - m68k_areg(regs, dstreg) = (val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_2080_0)(uae_u32 opcode) /* MOVE.L Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2088_0)(uae_u32 opcode) /* MOVE.L An,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2090_0)(uae_u32 opcode) /* MOVE.L (An),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2098_0)(uae_u32 opcode) /* MOVE.L (An)+,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20a0_0)(uae_u32 opcode) /* MOVE.L -(An),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20a8_0)(uae_u32 opcode) /* MOVE.L (d16,An),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20b0_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20b8_0)(uae_u32 opcode) /* MOVE.L (xxx).W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20b9_0)(uae_u32 opcode) /* MOVE.L (xxx).L,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20ba_0)(uae_u32 opcode) /* MOVE.L (d16,PC),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20bb_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20bc_0)(uae_u32 opcode) /* MOVE.L #.L,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20c0_0)(uae_u32 opcode) /* MOVE.L Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20c8_0)(uae_u32 opcode) /* MOVE.L An,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20d0_0)(uae_u32 opcode) /* MOVE.L (An),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20d8_0)(uae_u32 opcode) /* MOVE.L (An)+,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20e0_0)(uae_u32 opcode) /* MOVE.L -(An),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20e8_0)(uae_u32 opcode) /* MOVE.L (d16,An),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20f0_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20f8_0)(uae_u32 opcode) /* MOVE.L (xxx).W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20f9_0)(uae_u32 opcode) /* MOVE.L (xxx).L,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20fa_0)(uae_u32 opcode) /* MOVE.L (d16,PC),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20fb_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20fc_0)(uae_u32 opcode) /* MOVE.L #.L,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2100_0)(uae_u32 opcode) /* MOVE.L Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2108_0)(uae_u32 opcode) /* MOVE.L An,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2110_0)(uae_u32 opcode) /* MOVE.L (An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2118_0)(uae_u32 opcode) /* MOVE.L (An)+,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2120_0)(uae_u32 opcode) /* MOVE.L -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2128_0)(uae_u32 opcode) /* MOVE.L (d16,An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2130_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2138_0)(uae_u32 opcode) /* MOVE.L (xxx).W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2139_0)(uae_u32 opcode) /* MOVE.L (xxx).L,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_213a_0)(uae_u32 opcode) /* MOVE.L (d16,PC),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_213b_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_213c_0)(uae_u32 opcode) /* MOVE.L #.L,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2140_0)(uae_u32 opcode) /* MOVE.L Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2148_0)(uae_u32 opcode) /* MOVE.L An,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2150_0)(uae_u32 opcode) /* MOVE.L (An),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -#endif - -#ifdef PART_3 -void REGPARAM2 CPUFUNC(op_2158_0)(uae_u32 opcode) /* MOVE.L (An)+,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2160_0)(uae_u32 opcode) /* MOVE.L -(An),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2168_0)(uae_u32 opcode) /* MOVE.L (d16,An),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2170_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2178_0)(uae_u32 opcode) /* MOVE.L (xxx).W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2179_0)(uae_u32 opcode) /* MOVE.L (xxx).L,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_217a_0)(uae_u32 opcode) /* MOVE.L (d16,PC),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_217b_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_217c_0)(uae_u32 opcode) /* MOVE.L #.L,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2180_0)(uae_u32 opcode) /* MOVE.L Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2188_0)(uae_u32 opcode) /* MOVE.L An,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2190_0)(uae_u32 opcode) /* MOVE.L (An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2198_0)(uae_u32 opcode) /* MOVE.L (An)+,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21a0_0)(uae_u32 opcode) /* MOVE.L -(An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21a8_0)(uae_u32 opcode) /* MOVE.L (d16,An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21b0_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21b8_0)(uae_u32 opcode) /* MOVE.L (xxx).W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21b9_0)(uae_u32 opcode) /* MOVE.L (xxx).L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{m68k_incpc(6); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21ba_0)(uae_u32 opcode) /* MOVE.L (d16,PC),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21bb_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21bc_0)(uae_u32 opcode) /* MOVE.L #.L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{m68k_incpc(6); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21c0_0)(uae_u32 opcode) /* MOVE.L Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21c8_0)(uae_u32 opcode) /* MOVE.L An,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21d0_0)(uae_u32 opcode) /* MOVE.L (An),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21d8_0)(uae_u32 opcode) /* MOVE.L (An)+,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21e0_0)(uae_u32 opcode) /* MOVE.L -(An),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21e8_0)(uae_u32 opcode) /* MOVE.L (d16,An),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21f0_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21f8_0)(uae_u32 opcode) /* MOVE.L (xxx).W,(xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21f9_0)(uae_u32 opcode) /* MOVE.L (xxx).L,(xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21fa_0)(uae_u32 opcode) /* MOVE.L (d16,PC),(xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21fb_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(xxx).W */ -{ - cpuop_begin(); -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21fc_0)(uae_u32 opcode) /* MOVE.L #.L,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23c0_0)(uae_u32 opcode) /* MOVE.L Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23c8_0)(uae_u32 opcode) /* MOVE.L An,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23d0_0)(uae_u32 opcode) /* MOVE.L (An),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23d8_0)(uae_u32 opcode) /* MOVE.L (An)+,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uaecptr dsta = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23e0_0)(uae_u32 opcode) /* MOVE.L -(An),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23e8_0)(uae_u32 opcode) /* MOVE.L (d16,An),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23f0_0)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_ilong(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23f8_0)(uae_u32 opcode) /* MOVE.L (xxx).W,(xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23f9_0)(uae_u32 opcode) /* MOVE.L (xxx).L,(xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_ilong(6); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(10); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23fa_0)(uae_u32 opcode) /* MOVE.L (d16,PC),(xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23fb_0)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(xxx).L */ -{ - cpuop_begin(); -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_ilong(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23fc_0)(uae_u32 opcode) /* MOVE.L #.L,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = get_ilong(6); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(10); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3000_0)(uae_u32 opcode) /* MOVE.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3008_0)(uae_u32 opcode) /* MOVE.W An,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3010_0)(uae_u32 opcode) /* MOVE.W (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3018_0)(uae_u32 opcode) /* MOVE.W (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3020_0)(uae_u32 opcode) /* MOVE.W -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3028_0)(uae_u32 opcode) /* MOVE.W (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3030_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3038_0)(uae_u32 opcode) /* MOVE.W (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3039_0)(uae_u32 opcode) /* MOVE.W (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_303a_0)(uae_u32 opcode) /* MOVE.W (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_303b_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_303c_0)(uae_u32 opcode) /* MOVE.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}m68k_incpc(4); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_3040_0)(uae_u32 opcode) /* MOVEA.W Dn,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_u32 val = (uae_s32)(uae_s16)src; - m68k_areg(regs, dstreg) = (val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_3048_0)(uae_u32 opcode) /* MOVEA.W An,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ uae_u32 val = (uae_s32)(uae_s16)src; - m68k_areg(regs, dstreg) = (val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_3050_0)(uae_u32 opcode) /* MOVEA.W (An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_u32 val = (uae_s32)(uae_s16)src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_3058_0)(uae_u32 opcode) /* MOVEA.W (An)+,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_u32 val = (uae_s32)(uae_s16)src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_3060_0)(uae_u32 opcode) /* MOVEA.W -(An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_u32 val = (uae_s32)(uae_s16)src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_3068_0)(uae_u32 opcode) /* MOVEA.W (d16,An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_u32 val = (uae_s32)(uae_s16)src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_3070_0)(uae_u32 opcode) /* MOVEA.W (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_u32 val = (uae_s32)(uae_s16)src; - m68k_areg(regs, dstreg) = (val); -}}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_3078_0)(uae_u32 opcode) /* MOVEA.W (xxx).W,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_u32 val = (uae_s32)(uae_s16)src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_3079_0)(uae_u32 opcode) /* MOVEA.W (xxx).L,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_u32 val = (uae_s32)(uae_s16)src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_307a_0)(uae_u32 opcode) /* MOVEA.W (d16,PC),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_u32 val = (uae_s32)(uae_s16)src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_307b_0)(uae_u32 opcode) /* MOVEA.W (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_u32 val = (uae_s32)(uae_s16)src; - m68k_areg(regs, dstreg) = (val); -}}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_307c_0)(uae_u32 opcode) /* MOVEA.W #.W,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_u32 val = (uae_s32)(uae_s16)src; - m68k_areg(regs, dstreg) = (val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_3080_0)(uae_u32 opcode) /* MOVE.W Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3088_0)(uae_u32 opcode) /* MOVE.W An,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3090_0)(uae_u32 opcode) /* MOVE.W (An),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3098_0)(uae_u32 opcode) /* MOVE.W (An)+,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30a0_0)(uae_u32 opcode) /* MOVE.W -(An),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30a8_0)(uae_u32 opcode) /* MOVE.W (d16,An),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30b0_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30b8_0)(uae_u32 opcode) /* MOVE.W (xxx).W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30b9_0)(uae_u32 opcode) /* MOVE.W (xxx).L,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30ba_0)(uae_u32 opcode) /* MOVE.W (d16,PC),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30bb_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30bc_0)(uae_u32 opcode) /* MOVE.W #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30c0_0)(uae_u32 opcode) /* MOVE.W Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30c8_0)(uae_u32 opcode) /* MOVE.W An,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30d0_0)(uae_u32 opcode) /* MOVE.W (An),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30d8_0)(uae_u32 opcode) /* MOVE.W (An)+,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30e0_0)(uae_u32 opcode) /* MOVE.W -(An),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30e8_0)(uae_u32 opcode) /* MOVE.W (d16,An),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30f0_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30f8_0)(uae_u32 opcode) /* MOVE.W (xxx).W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30f9_0)(uae_u32 opcode) /* MOVE.W (xxx).L,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30fa_0)(uae_u32 opcode) /* MOVE.W (d16,PC),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30fb_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30fc_0)(uae_u32 opcode) /* MOVE.W #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3100_0)(uae_u32 opcode) /* MOVE.W Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3108_0)(uae_u32 opcode) /* MOVE.W An,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3110_0)(uae_u32 opcode) /* MOVE.W (An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3118_0)(uae_u32 opcode) /* MOVE.W (An)+,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3120_0)(uae_u32 opcode) /* MOVE.W -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3128_0)(uae_u32 opcode) /* MOVE.W (d16,An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3130_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3138_0)(uae_u32 opcode) /* MOVE.W (xxx).W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3139_0)(uae_u32 opcode) /* MOVE.W (xxx).L,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_313a_0)(uae_u32 opcode) /* MOVE.W (d16,PC),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_313b_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_313c_0)(uae_u32 opcode) /* MOVE.W #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3140_0)(uae_u32 opcode) /* MOVE.W Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3148_0)(uae_u32 opcode) /* MOVE.W An,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3150_0)(uae_u32 opcode) /* MOVE.W (An),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3158_0)(uae_u32 opcode) /* MOVE.W (An)+,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3160_0)(uae_u32 opcode) /* MOVE.W -(An),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3168_0)(uae_u32 opcode) /* MOVE.W (d16,An),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3170_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3178_0)(uae_u32 opcode) /* MOVE.W (xxx).W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3179_0)(uae_u32 opcode) /* MOVE.W (xxx).L,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(6); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_317a_0)(uae_u32 opcode) /* MOVE.W (d16,PC),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_317b_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_317c_0)(uae_u32 opcode) /* MOVE.W #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3180_0)(uae_u32 opcode) /* MOVE.W Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3188_0)(uae_u32 opcode) /* MOVE.W An,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3190_0)(uae_u32 opcode) /* MOVE.W (An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3198_0)(uae_u32 opcode) /* MOVE.W (An)+,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31a0_0)(uae_u32 opcode) /* MOVE.W -(An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31a8_0)(uae_u32 opcode) /* MOVE.W (d16,An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31b0_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31b8_0)(uae_u32 opcode) /* MOVE.W (xxx).W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31b9_0)(uae_u32 opcode) /* MOVE.W (xxx).L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{m68k_incpc(6); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31ba_0)(uae_u32 opcode) /* MOVE.W (d16,PC),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31bb_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31bc_0)(uae_u32 opcode) /* MOVE.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31c0_0)(uae_u32 opcode) /* MOVE.W Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31c8_0)(uae_u32 opcode) /* MOVE.W An,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31d0_0)(uae_u32 opcode) /* MOVE.W (An),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31d8_0)(uae_u32 opcode) /* MOVE.W (An)+,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31e0_0)(uae_u32 opcode) /* MOVE.W -(An),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31e8_0)(uae_u32 opcode) /* MOVE.W (d16,An),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31f0_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31f8_0)(uae_u32 opcode) /* MOVE.W (xxx).W,(xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31f9_0)(uae_u32 opcode) /* MOVE.W (xxx).L,(xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(6); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31fa_0)(uae_u32 opcode) /* MOVE.W (d16,PC),(xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31fb_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(xxx).W */ -{ - cpuop_begin(); -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31fc_0)(uae_u32 opcode) /* MOVE.W #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_33c0_0)(uae_u32 opcode) /* MOVE.W Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_33c8_0)(uae_u32 opcode) /* MOVE.W An,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_33d0_0)(uae_u32 opcode) /* MOVE.W (An),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_33d8_0)(uae_u32 opcode) /* MOVE.W (An)+,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uaecptr dsta = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_33e0_0)(uae_u32 opcode) /* MOVE.W -(An),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_33e8_0)(uae_u32 opcode) /* MOVE.W (d16,An),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_33f0_0)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_ilong(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_33f8_0)(uae_u32 opcode) /* MOVE.W (xxx).W,(xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_33f9_0)(uae_u32 opcode) /* MOVE.W (xxx).L,(xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_ilong(6); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(10); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_33fa_0)(uae_u32 opcode) /* MOVE.W (d16,PC),(xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_33fb_0)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(xxx).L */ -{ - cpuop_begin(); -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_ilong(0); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_33fc_0)(uae_u32 opcode) /* MOVE.W #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4000_0)(uae_u32 opcode) /* NEGX.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((newv) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4010_0)(uae_u32 opcode) /* NEGX.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4018_0)(uae_u32 opcode) /* NEGX.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4020_0)(uae_u32 opcode) /* NEGX.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4028_0)(uae_u32 opcode) /* NEGX.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4030_0)(uae_u32 opcode) /* NEGX.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4038_0)(uae_u32 opcode) /* NEGX.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4039_0)(uae_u32 opcode) /* NEGX.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4040_0)(uae_u32 opcode) /* NEGX.W Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); - SET_NFLG (((uae_s16)(newv)) < 0); - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((newv) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4050_0)(uae_u32 opcode) /* NEGX.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); - SET_NFLG (((uae_s16)(newv)) < 0); - put_word(srca,newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4058_0)(uae_u32 opcode) /* NEGX.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); - SET_NFLG (((uae_s16)(newv)) < 0); - put_word(srca,newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4060_0)(uae_u32 opcode) /* NEGX.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); - SET_NFLG (((uae_s16)(newv)) < 0); - put_word(srca,newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4068_0)(uae_u32 opcode) /* NEGX.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); - SET_NFLG (((uae_s16)(newv)) < 0); - put_word(srca,newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4070_0)(uae_u32 opcode) /* NEGX.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); - SET_NFLG (((uae_s16)(newv)) < 0); - put_word(srca,newv); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4078_0)(uae_u32 opcode) /* NEGX.W (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); - SET_NFLG (((uae_s16)(newv)) < 0); - put_word(srca,newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4079_0)(uae_u32 opcode) /* NEGX.W (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); - SET_NFLG (((uae_s16)(newv)) < 0); - put_word(srca,newv); -}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4080_0)(uae_u32 opcode) /* NEGX.L Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, srcreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4090_0)(uae_u32 opcode) /* NEGX.L (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); - SET_NFLG (((uae_s32)(newv)) < 0); - put_long(srca,newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4098_0)(uae_u32 opcode) /* NEGX.L (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); - SET_NFLG (((uae_s32)(newv)) < 0); - put_long(srca,newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_40a0_0)(uae_u32 opcode) /* NEGX.L -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); - SET_NFLG (((uae_s32)(newv)) < 0); - put_long(srca,newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_40a8_0)(uae_u32 opcode) /* NEGX.L (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); - SET_NFLG (((uae_s32)(newv)) < 0); - put_long(srca,newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_40b0_0)(uae_u32 opcode) /* NEGX.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); - SET_NFLG (((uae_s32)(newv)) < 0); - put_long(srca,newv); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_40b8_0)(uae_u32 opcode) /* NEGX.L (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); - SET_NFLG (((uae_s32)(newv)) < 0); - put_long(srca,newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_40b9_0)(uae_u32 opcode) /* NEGX.L (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); - SET_NFLG (((uae_s32)(newv)) < 0); - put_long(srca,newv); -}}}}}m68k_incpc(6); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40c0_0)(uae_u32 opcode) /* MVSR2.W Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel645; } -{{ MakeSR(); - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((regs.sr) & 0xffff); -}}}m68k_incpc(2); -endlabel645: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40d0_0)(uae_u32 opcode) /* MVSR2.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel646; } -{{ uaecptr srca = m68k_areg(regs, srcreg); - MakeSR(); - put_word(srca,regs.sr); -}}}m68k_incpc(2); -endlabel646: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40d8_0)(uae_u32 opcode) /* MVSR2.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel647; } -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += 2; - MakeSR(); - put_word(srca,regs.sr); -}}}m68k_incpc(2); -endlabel647: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40e0_0)(uae_u32 opcode) /* MVSR2.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel648; } -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; - m68k_areg (regs, srcreg) = srca; - MakeSR(); - put_word(srca,regs.sr); -}}}m68k_incpc(2); -endlabel648: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40e8_0)(uae_u32 opcode) /* MVSR2.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel649; } -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); - MakeSR(); - put_word(srca,regs.sr); -}}}m68k_incpc(4); -endlabel649: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40f0_0)(uae_u32 opcode) /* MVSR2.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel650; } -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); - MakeSR(); - put_word(srca,regs.sr); -}}}}endlabel650: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40f8_0)(uae_u32 opcode) /* MVSR2.W (xxx).W */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel651; } -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); - MakeSR(); - put_word(srca,regs.sr); -}}}m68k_incpc(4); -endlabel651: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40f9_0)(uae_u32 opcode) /* MVSR2.W (xxx).L */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel652; } -{{ uaecptr srca = get_ilong(2); - MakeSR(); - put_word(srca,regs.sr); -}}}m68k_incpc(6); -endlabel652: ; - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_4100_0)(uae_u32 opcode) /* CHK.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel653; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel653; } -}}}m68k_incpc(2); -endlabel653: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4110_0)(uae_u32 opcode) /* CHK.L (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel654; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel654; } -}}}}m68k_incpc(2); -endlabel654: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4118_0)(uae_u32 opcode) /* CHK.L (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel655; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel655; } -}}}}m68k_incpc(2); -endlabel655: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4120_0)(uae_u32 opcode) /* CHK.L -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel656; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel656; } -}}}}m68k_incpc(2); -endlabel656: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4128_0)(uae_u32 opcode) /* CHK.L (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel657; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel657; } -}}}}m68k_incpc(4); -endlabel657: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4130_0)(uae_u32 opcode) /* CHK.L (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel658; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel658; } -}}}}}endlabel658: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4138_0)(uae_u32 opcode) /* CHK.L (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel659; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel659; } -}}}}m68k_incpc(4); -endlabel659: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4139_0)(uae_u32 opcode) /* CHK.L (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel660; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel660; } -}}}}m68k_incpc(6); -endlabel660: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_413a_0)(uae_u32 opcode) /* CHK.L (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel661; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel661; } -}}}}m68k_incpc(4); -endlabel661: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_413b_0)(uae_u32 opcode) /* CHK.L (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel662; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel662; } -}}}}}endlabel662: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_413c_0)(uae_u32 opcode) /* CHK.L #.L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel663; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel663; } -}}}m68k_incpc(6); -endlabel663: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4180_0)(uae_u32 opcode) /* CHK.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel664; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel664; } -}}}m68k_incpc(2); -endlabel664: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4190_0)(uae_u32 opcode) /* CHK.W (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel665; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel665; } -}}}}m68k_incpc(2); -endlabel665: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4198_0)(uae_u32 opcode) /* CHK.W (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_s16 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel666; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel666; } -}}}}m68k_incpc(2); -endlabel666: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_41a0_0)(uae_u32 opcode) /* CHK.W -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s16 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel667; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel667; } -}}}}m68k_incpc(2); -endlabel667: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_41a8_0)(uae_u32 opcode) /* CHK.W (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel668; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel668; } -}}}}m68k_incpc(4); -endlabel668: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_41b0_0)(uae_u32 opcode) /* CHK.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel669; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel669; } -}}}}}endlabel669: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_41b8_0)(uae_u32 opcode) /* CHK.W (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel670; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel670; } -}}}}m68k_incpc(4); -endlabel670: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_41b9_0)(uae_u32 opcode) /* CHK.W (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel671; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel671; } -}}}}m68k_incpc(6); -endlabel671: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_41ba_0)(uae_u32 opcode) /* CHK.W (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel672; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel672; } -}}}}m68k_incpc(4); -endlabel672: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_41bb_0)(uae_u32 opcode) /* CHK.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel673; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel673; } -}}}}}endlabel673: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_41bc_0)(uae_u32 opcode) /* CHK.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 src = get_iword(2); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel674; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel674; } -}}}m68k_incpc(4); -endlabel674: ; - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_41d0_0)(uae_u32 opcode) /* LEA.L (An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ m68k_areg(regs, dstreg) = (srca); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_41e8_0)(uae_u32 opcode) /* LEA.L (d16,An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ m68k_areg(regs, dstreg) = (srca); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_41f0_0)(uae_u32 opcode) /* LEA.L (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ m68k_areg(regs, dstreg) = (srca); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_41f8_0)(uae_u32 opcode) /* LEA.L (xxx).W,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ m68k_areg(regs, dstreg) = (srca); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_41f9_0)(uae_u32 opcode) /* LEA.L (xxx).L,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ m68k_areg(regs, dstreg) = (srca); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_41fa_0)(uae_u32 opcode) /* LEA.L (d16,PC),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ m68k_areg(regs, dstreg) = (srca); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_41fb_0)(uae_u32 opcode) /* LEA.L (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ m68k_areg(regs, dstreg) = (srca); -}}}} cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_4200_0)(uae_u32 opcode) /* CLR.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ CLEAR_CZNV; - SET_ZFLG (((uae_s8)(0)) == 0); - SET_NFLG (((uae_s8)(0)) < 0); - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((0) & 0xff); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4210_0)(uae_u32 opcode) /* CLR.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(0)) == 0); - SET_NFLG (((uae_s8)(0)) < 0); - put_byte(srca,0); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4218_0)(uae_u32 opcode) /* CLR.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(0)) == 0); - SET_NFLG (((uae_s8)(0)) < 0); - put_byte(srca,0); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4220_0)(uae_u32 opcode) /* CLR.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(0)) == 0); - SET_NFLG (((uae_s8)(0)) < 0); - put_byte(srca,0); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4228_0)(uae_u32 opcode) /* CLR.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(0)) == 0); - SET_NFLG (((uae_s8)(0)) < 0); - put_byte(srca,0); -}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4230_0)(uae_u32 opcode) /* CLR.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(0)) == 0); - SET_NFLG (((uae_s8)(0)) < 0); - put_byte(srca,0); -}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4238_0)(uae_u32 opcode) /* CLR.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(0)) == 0); - SET_NFLG (((uae_s8)(0)) < 0); - put_byte(srca,0); -}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4239_0)(uae_u32 opcode) /* CLR.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(0)) == 0); - SET_NFLG (((uae_s8)(0)) < 0); - put_byte(srca,0); -}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4240_0)(uae_u32 opcode) /* CLR.W Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(0)) == 0); - SET_NFLG (((uae_s16)(0)) < 0); - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((0) & 0xffff); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4250_0)(uae_u32 opcode) /* CLR.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(0)) == 0); - SET_NFLG (((uae_s16)(0)) < 0); - put_word(srca,0); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4258_0)(uae_u32 opcode) /* CLR.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(0)) == 0); - SET_NFLG (((uae_s16)(0)) < 0); - put_word(srca,0); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4260_0)(uae_u32 opcode) /* CLR.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; - m68k_areg (regs, srcreg) = srca; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(0)) == 0); - SET_NFLG (((uae_s16)(0)) < 0); - put_word(srca,0); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4268_0)(uae_u32 opcode) /* CLR.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(0)) == 0); - SET_NFLG (((uae_s16)(0)) < 0); - put_word(srca,0); -}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4270_0)(uae_u32 opcode) /* CLR.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(0)) == 0); - SET_NFLG (((uae_s16)(0)) < 0); - put_word(srca,0); -}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4278_0)(uae_u32 opcode) /* CLR.W (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(0)) == 0); - SET_NFLG (((uae_s16)(0)) < 0); - put_word(srca,0); -}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4279_0)(uae_u32 opcode) /* CLR.W (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(0)) == 0); - SET_NFLG (((uae_s16)(0)) < 0); - put_word(srca,0); -}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4280_0)(uae_u32 opcode) /* CLR.L Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(0)) == 0); - SET_NFLG (((uae_s32)(0)) < 0); - m68k_dreg(regs, srcreg) = (0); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4290_0)(uae_u32 opcode) /* CLR.L (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(0)) == 0); - SET_NFLG (((uae_s32)(0)) < 0); - put_long(srca,0); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4298_0)(uae_u32 opcode) /* CLR.L (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(0)) == 0); - SET_NFLG (((uae_s32)(0)) < 0); - put_long(srca,0); -}}m68k_incpc(2); - cpuop_end(); -} -#endif - -#ifdef PART_4 -void REGPARAM2 CPUFUNC(op_42a0_0)(uae_u32 opcode) /* CLR.L -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; - m68k_areg (regs, srcreg) = srca; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(0)) == 0); - SET_NFLG (((uae_s32)(0)) < 0); - put_long(srca,0); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_42a8_0)(uae_u32 opcode) /* CLR.L (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(0)) == 0); - SET_NFLG (((uae_s32)(0)) < 0); - put_long(srca,0); -}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_42b0_0)(uae_u32 opcode) /* CLR.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(0)) == 0); - SET_NFLG (((uae_s32)(0)) < 0); - put_long(srca,0); -}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_42b8_0)(uae_u32 opcode) /* CLR.L (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(0)) == 0); - SET_NFLG (((uae_s32)(0)) < 0); - put_long(srca,0); -}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_42b9_0)(uae_u32 opcode) /* CLR.L (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(0)) == 0); - SET_NFLG (((uae_s32)(0)) < 0); - put_long(srca,0); -}}m68k_incpc(6); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_42c0_0)(uae_u32 opcode) /* MVSR2.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ MakeSR(); - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((regs.sr & 0xff) & 0xffff); -}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_42d0_0)(uae_u32 opcode) /* MVSR2.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - MakeSR(); - put_word(srca,regs.sr & 0xff); -}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_42d8_0)(uae_u32 opcode) /* MVSR2.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += 2; - MakeSR(); - put_word(srca,regs.sr & 0xff); -}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_42e0_0)(uae_u32 opcode) /* MVSR2.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; - m68k_areg (regs, srcreg) = srca; - MakeSR(); - put_word(srca,regs.sr & 0xff); -}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_42e8_0)(uae_u32 opcode) /* MVSR2.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); - MakeSR(); - put_word(srca,regs.sr & 0xff); -}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_42f0_0)(uae_u32 opcode) /* MVSR2.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); - MakeSR(); - put_word(srca,regs.sr & 0xff); -}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_42f8_0)(uae_u32 opcode) /* MVSR2.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); - MakeSR(); - put_word(srca,regs.sr & 0xff); -}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_42f9_0)(uae_u32 opcode) /* MVSR2.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); - MakeSR(); - put_word(srca,regs.sr & 0xff); -}}m68k_incpc(6); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_4400_0)(uae_u32 opcode) /* NEG.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(dst)) < 0; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((dst) & 0xff); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4410_0)(uae_u32 opcode) /* NEG.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(dst)) < 0; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(srca,dst); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4418_0)(uae_u32 opcode) /* NEG.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(dst)) < 0; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(srca,dst); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4420_0)(uae_u32 opcode) /* NEG.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(dst)) < 0; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(srca,dst); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4428_0)(uae_u32 opcode) /* NEG.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(dst)) < 0; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(srca,dst); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4430_0)(uae_u32 opcode) /* NEG.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(dst)) < 0; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(srca,dst); -}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4438_0)(uae_u32 opcode) /* NEG.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(dst)) < 0; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(srca,dst); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4439_0)(uae_u32 opcode) /* NEG.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(dst)) < 0; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(srca,dst); -}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4440_0)(uae_u32 opcode) /* NEG.W Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(dst)) < 0; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((dst) & 0xffff); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4450_0)(uae_u32 opcode) /* NEG.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(dst)) < 0; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(srca,dst); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4458_0)(uae_u32 opcode) /* NEG.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(dst)) < 0; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(srca,dst); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4460_0)(uae_u32 opcode) /* NEG.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(dst)) < 0; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(srca,dst); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4468_0)(uae_u32 opcode) /* NEG.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(dst)) < 0; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(srca,dst); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4470_0)(uae_u32 opcode) /* NEG.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(dst)) < 0; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(srca,dst); -}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4478_0)(uae_u32 opcode) /* NEG.W (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(dst)) < 0; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(srca,dst); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4479_0)(uae_u32 opcode) /* NEG.W (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(dst)) < 0; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(srca,dst); -}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4480_0)(uae_u32 opcode) /* NEG.L Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(dst)) < 0; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, srcreg) = (dst); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4490_0)(uae_u32 opcode) /* NEG.L (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(dst)) < 0; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(srca,dst); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4498_0)(uae_u32 opcode) /* NEG.L (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(dst)) < 0; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(srca,dst); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44a0_0)(uae_u32 opcode) /* NEG.L -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(dst)) < 0; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(srca,dst); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44a8_0)(uae_u32 opcode) /* NEG.L (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(dst)) < 0; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(srca,dst); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44b0_0)(uae_u32 opcode) /* NEG.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(dst)) < 0; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(srca,dst); -}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44b8_0)(uae_u32 opcode) /* NEG.L (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(dst)) < 0; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(srca,dst); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44b9_0)(uae_u32 opcode) /* NEG.L (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(dst)) < 0; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(srca,dst); -}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44c0_0)(uae_u32 opcode) /* MV2SR.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); - MakeSR(); - regs.sr &= 0xFF00; - regs.sr |= src & 0xFF; - MakeFromSR(); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44d0_0)(uae_u32 opcode) /* MV2SR.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - MakeSR(); - regs.sr &= 0xFF00; - regs.sr |= src & 0xFF; - MakeFromSR(); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44d8_0)(uae_u32 opcode) /* MV2SR.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; - MakeSR(); - regs.sr &= 0xFF00; - regs.sr |= src & 0xFF; - MakeFromSR(); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44e0_0)(uae_u32 opcode) /* MV2SR.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; - MakeSR(); - regs.sr &= 0xFF00; - regs.sr |= src & 0xFF; - MakeFromSR(); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44e8_0)(uae_u32 opcode) /* MV2SR.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); - MakeSR(); - regs.sr &= 0xFF00; - regs.sr |= src & 0xFF; - MakeFromSR(); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44f0_0)(uae_u32 opcode) /* MV2SR.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); - MakeSR(); - regs.sr &= 0xFF00; - regs.sr |= src & 0xFF; - MakeFromSR(); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44f8_0)(uae_u32 opcode) /* MV2SR.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); - MakeSR(); - regs.sr &= 0xFF00; - regs.sr |= src & 0xFF; - MakeFromSR(); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44f9_0)(uae_u32 opcode) /* MV2SR.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); - MakeSR(); - regs.sr &= 0xFF00; - regs.sr |= src & 0xFF; - MakeFromSR(); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44fa_0)(uae_u32 opcode) /* MV2SR.B (d16,PC) */ -{ - cpuop_begin(); -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); - MakeSR(); - regs.sr &= 0xFF00; - regs.sr |= src & 0xFF; - MakeFromSR(); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44fb_0)(uae_u32 opcode) /* MV2SR.B (d8,PC,Xn) */ -{ - cpuop_begin(); -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); - MakeSR(); - regs.sr &= 0xFF00; - regs.sr |= src & 0xFF; - MakeFromSR(); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44fc_0)(uae_u32 opcode) /* MV2SR.B #.B */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - MakeSR(); - regs.sr &= 0xFF00; - regs.sr |= src & 0xFF; - MakeFromSR(); -}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4600_0)(uae_u32 opcode) /* NOT.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_NFLG (((uae_s8)(dst)) < 0); - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((dst) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4610_0)(uae_u32 opcode) /* NOT.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_NFLG (((uae_s8)(dst)) < 0); - put_byte(srca,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4618_0)(uae_u32 opcode) /* NOT.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_NFLG (((uae_s8)(dst)) < 0); - put_byte(srca,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4620_0)(uae_u32 opcode) /* NOT.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_NFLG (((uae_s8)(dst)) < 0); - put_byte(srca,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4628_0)(uae_u32 opcode) /* NOT.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_NFLG (((uae_s8)(dst)) < 0); - put_byte(srca,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4630_0)(uae_u32 opcode) /* NOT.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_NFLG (((uae_s8)(dst)) < 0); - put_byte(srca,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4638_0)(uae_u32 opcode) /* NOT.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_NFLG (((uae_s8)(dst)) < 0); - put_byte(srca,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4639_0)(uae_u32 opcode) /* NOT.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_NFLG (((uae_s8)(dst)) < 0); - put_byte(srca,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4640_0)(uae_u32 opcode) /* NOT.W Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_NFLG (((uae_s16)(dst)) < 0); - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((dst) & 0xffff); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4650_0)(uae_u32 opcode) /* NOT.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_NFLG (((uae_s16)(dst)) < 0); - put_word(srca,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4658_0)(uae_u32 opcode) /* NOT.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_NFLG (((uae_s16)(dst)) < 0); - put_word(srca,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4660_0)(uae_u32 opcode) /* NOT.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_NFLG (((uae_s16)(dst)) < 0); - put_word(srca,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4668_0)(uae_u32 opcode) /* NOT.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_NFLG (((uae_s16)(dst)) < 0); - put_word(srca,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4670_0)(uae_u32 opcode) /* NOT.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_NFLG (((uae_s16)(dst)) < 0); - put_word(srca,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4678_0)(uae_u32 opcode) /* NOT.W (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_NFLG (((uae_s16)(dst)) < 0); - put_word(srca,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4679_0)(uae_u32 opcode) /* NOT.W (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_NFLG (((uae_s16)(dst)) < 0); - put_word(srca,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4680_0)(uae_u32 opcode) /* NOT.L Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_NFLG (((uae_s32)(dst)) < 0); - m68k_dreg(regs, srcreg) = (dst); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4690_0)(uae_u32 opcode) /* NOT.L (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_NFLG (((uae_s32)(dst)) < 0); - put_long(srca,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4698_0)(uae_u32 opcode) /* NOT.L (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_NFLG (((uae_s32)(dst)) < 0); - put_long(srca,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46a0_0)(uae_u32 opcode) /* NOT.L -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_NFLG (((uae_s32)(dst)) < 0); - put_long(srca,dst); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46a8_0)(uae_u32 opcode) /* NOT.L (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_NFLG (((uae_s32)(dst)) < 0); - put_long(srca,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46b0_0)(uae_u32 opcode) /* NOT.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_NFLG (((uae_s32)(dst)) < 0); - put_long(srca,dst); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46b8_0)(uae_u32 opcode) /* NOT.L (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_NFLG (((uae_s32)(dst)) < 0); - put_long(srca,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46b9_0)(uae_u32 opcode) /* NOT.L (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_NFLG (((uae_s32)(dst)) < 0); - put_long(srca,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46c0_0)(uae_u32 opcode) /* MV2SR.W Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel773; } -{{ uae_s16 src = m68k_dreg(regs, srcreg); - regs.sr = src; - MakeFromSR(); -}}}m68k_incpc(2); -endlabel773: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46d0_0)(uae_u32 opcode) /* MV2SR.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel774; } -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - regs.sr = src; - MakeFromSR(); -}}}}m68k_incpc(2); -endlabel774: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46d8_0)(uae_u32 opcode) /* MV2SR.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel775; } -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; - regs.sr = src; - MakeFromSR(); -}}}}m68k_incpc(2); -endlabel775: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46e0_0)(uae_u32 opcode) /* MV2SR.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel776; } -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; - regs.sr = src; - MakeFromSR(); -}}}}m68k_incpc(2); -endlabel776: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46e8_0)(uae_u32 opcode) /* MV2SR.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel777; } -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); - regs.sr = src; - MakeFromSR(); -}}}}m68k_incpc(4); -endlabel777: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46f0_0)(uae_u32 opcode) /* MV2SR.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel778; } -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); - regs.sr = src; - MakeFromSR(); -}}}}}endlabel778: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46f8_0)(uae_u32 opcode) /* MV2SR.W (xxx).W */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel779; } -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); - regs.sr = src; - MakeFromSR(); -}}}}m68k_incpc(4); -endlabel779: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46f9_0)(uae_u32 opcode) /* MV2SR.W (xxx).L */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel780; } -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); - regs.sr = src; - MakeFromSR(); -}}}}m68k_incpc(6); -endlabel780: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46fa_0)(uae_u32 opcode) /* MV2SR.W (d16,PC) */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel781; } -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); - regs.sr = src; - MakeFromSR(); -}}}}m68k_incpc(4); -endlabel781: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46fb_0)(uae_u32 opcode) /* MV2SR.W (d8,PC,Xn) */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel782; } -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); - regs.sr = src; - MakeFromSR(); -}}}}}endlabel782: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46fc_0)(uae_u32 opcode) /* MV2SR.W #.W */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel783; } -{{ uae_s16 src = get_iword(2); - regs.sr = src; - MakeFromSR(); -}}}m68k_incpc(4); -endlabel783: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4800_0)(uae_u32 opcode) /* NBCD.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((newv) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4808_0)(uae_u32 opcode) /* LINK.L An,#.L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr olda = m68k_areg(regs, 7) - 4; - m68k_areg (regs, 7) = olda; -{ uae_s32 src = m68k_areg(regs, srcreg); - put_long(olda,src); - m68k_areg(regs, srcreg) = (m68k_areg(regs, 7)); -{ uae_s32 offs = get_ilong(2); - m68k_areg(regs, 7) += offs; -}}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_4810_0)(uae_u32 opcode) /* NBCD.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - put_byte(srca,newv); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4818_0)(uae_u32 opcode) /* NBCD.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - put_byte(srca,newv); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4820_0)(uae_u32 opcode) /* NBCD.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - put_byte(srca,newv); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4828_0)(uae_u32 opcode) /* NBCD.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - put_byte(srca,newv); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4830_0)(uae_u32 opcode) /* NBCD.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - put_byte(srca,newv); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4838_0)(uae_u32 opcode) /* NBCD.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - put_byte(srca,newv); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4839_0)(uae_u32 opcode) /* NBCD.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - put_byte(srca,newv); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4840_0)(uae_u32 opcode) /* SWAP.W Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_u32 dst = ((src >> 16)&0xFFFF) | ((src&0xFFFF)<<16); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_NFLG (((uae_s32)(dst)) < 0); - m68k_dreg(regs, srcreg) = (dst); -}}}m68k_incpc(2); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4848_0)(uae_u32 opcode) /* BKPT.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{m68k_incpc(2); - op_illg(opcode); -} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4850_0)(uae_u32 opcode) /* PEA.L (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, 7) - 4; - m68k_areg (regs, 7) = dsta; - put_long(dsta,srca); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4868_0)(uae_u32 opcode) /* PEA.L (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uaecptr dsta = m68k_areg(regs, 7) - 4; - m68k_areg (regs, 7) = dsta; - put_long(dsta,srca); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4870_0)(uae_u32 opcode) /* PEA.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uaecptr dsta = m68k_areg(regs, 7) - 4; - m68k_areg (regs, 7) = dsta; - put_long(dsta,srca); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4878_0)(uae_u32 opcode) /* PEA.L (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uaecptr dsta = m68k_areg(regs, 7) - 4; - m68k_areg (regs, 7) = dsta; - put_long(dsta,srca); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4879_0)(uae_u32 opcode) /* PEA.L (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uaecptr dsta = m68k_areg(regs, 7) - 4; - m68k_areg (regs, 7) = dsta; - put_long(dsta,srca); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_487a_0)(uae_u32 opcode) /* PEA.L (d16,PC) */ -{ - cpuop_begin(); -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uaecptr dsta = m68k_areg(regs, 7) - 4; - m68k_areg (regs, 7) = dsta; - put_long(dsta,srca); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_487b_0)(uae_u32 opcode) /* PEA.L (d8,PC,Xn) */ -{ - cpuop_begin(); -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uaecptr dsta = m68k_areg(regs, 7) - 4; - m68k_areg (regs, 7) = dsta; - put_long(dsta,srca); -}}}} cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_4880_0)(uae_u32 opcode) /* EXT.W Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_u16 dst = (uae_s16)(uae_s8)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_NFLG (((uae_s16)(dst)) < 0); - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((dst) & 0xffff); -}}}m68k_incpc(2); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4890_0)(uae_u32 opcode) /* MVMLE.W #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); -{ uaecptr srca = m68k_areg(regs, dstreg); -{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; - while (dmask) { put_word(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 2; dmask = movem_next[dmask]; } - while (amask) { put_word(srca, m68k_areg(regs, movem_index1[amask])); srca += 2; amask = movem_next[amask]; } -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_48a0_0)(uae_u32 opcode) /* MVMLE.W #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); -{ uaecptr srca = m68k_areg(regs, dstreg) - 0; -{ uae_u16 amask = mask & 0xff, dmask = (mask >> 8) & 0xff; - while (amask) { srca -= 2; put_word(srca, m68k_areg(regs, movem_index2[amask])); amask = movem_next[amask]; } - while (dmask) { srca -= 2; put_word(srca, m68k_dreg(regs, movem_index2[dmask])); dmask = movem_next[dmask]; } - m68k_areg(regs, dstreg) = srca; -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_48a8_0)(uae_u32 opcode) /* MVMLE.W #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); -{ uaecptr srca = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; - while (dmask) { put_word(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 2; dmask = movem_next[dmask]; } - while (amask) { put_word(srca, m68k_areg(regs, movem_index1[amask])); srca += 2; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_48b0_0)(uae_u32 opcode) /* MVMLE.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); -{m68k_incpc(4); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; - while (dmask) { put_word(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 2; dmask = movem_next[dmask]; } - while (amask) { put_word(srca, m68k_areg(regs, movem_index1[amask])); srca += 2; amask = movem_next[amask]; } -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_48b8_0)(uae_u32 opcode) /* MVMLE.W #.W,(xxx).W */ -{ - cpuop_begin(); -{ uae_u16 mask = get_iword(2); -{ uaecptr srca = (uae_s32)(uae_s16)get_iword(4); -{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; - while (dmask) { put_word(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 2; dmask = movem_next[dmask]; } - while (amask) { put_word(srca, m68k_areg(regs, movem_index1[amask])); srca += 2; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_48b9_0)(uae_u32 opcode) /* MVMLE.W #.W,(xxx).L */ -{ - cpuop_begin(); -{ uae_u16 mask = get_iword(2); -{ uaecptr srca = get_ilong(4); -{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; - while (dmask) { put_word(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 2; dmask = movem_next[dmask]; } - while (amask) { put_word(srca, m68k_areg(regs, movem_index1[amask])); srca += 2; amask = movem_next[amask]; } -}}}m68k_incpc(8); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_48c0_0)(uae_u32 opcode) /* EXT.L Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_u32 dst = (uae_s32)(uae_s16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_NFLG (((uae_s32)(dst)) < 0); - m68k_dreg(regs, srcreg) = (dst); -}}}m68k_incpc(2); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_48d0_0)(uae_u32 opcode) /* MVMLE.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); -{ uaecptr srca = m68k_areg(regs, dstreg); -{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; - while (dmask) { put_long(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 4; dmask = movem_next[dmask]; } - while (amask) { put_long(srca, m68k_areg(regs, movem_index1[amask])); srca += 4; amask = movem_next[amask]; } -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_48e0_0)(uae_u32 opcode) /* MVMLE.L #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); -{ uaecptr srca = m68k_areg(regs, dstreg) - 0; -{ uae_u16 amask = mask & 0xff, dmask = (mask >> 8) & 0xff; - while (amask) { srca -= 4; put_long(srca, m68k_areg(regs, movem_index2[amask])); amask = movem_next[amask]; } - while (dmask) { srca -= 4; put_long(srca, m68k_dreg(regs, movem_index2[dmask])); dmask = movem_next[dmask]; } - m68k_areg(regs, dstreg) = srca; -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_48e8_0)(uae_u32 opcode) /* MVMLE.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); -{ uaecptr srca = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; - while (dmask) { put_long(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 4; dmask = movem_next[dmask]; } - while (amask) { put_long(srca, m68k_areg(regs, movem_index1[amask])); srca += 4; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_48f0_0)(uae_u32 opcode) /* MVMLE.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); -{m68k_incpc(4); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; - while (dmask) { put_long(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 4; dmask = movem_next[dmask]; } - while (amask) { put_long(srca, m68k_areg(regs, movem_index1[amask])); srca += 4; amask = movem_next[amask]; } -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_48f8_0)(uae_u32 opcode) /* MVMLE.L #.W,(xxx).W */ -{ - cpuop_begin(); -{ uae_u16 mask = get_iword(2); -{ uaecptr srca = (uae_s32)(uae_s16)get_iword(4); -{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; - while (dmask) { put_long(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 4; dmask = movem_next[dmask]; } - while (amask) { put_long(srca, m68k_areg(regs, movem_index1[amask])); srca += 4; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_48f9_0)(uae_u32 opcode) /* MVMLE.L #.W,(xxx).L */ -{ - cpuop_begin(); -{ uae_u16 mask = get_iword(2); -{ uaecptr srca = get_ilong(4); -{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; - while (dmask) { put_long(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 4; dmask = movem_next[dmask]; } - while (amask) { put_long(srca, m68k_areg(regs, movem_index1[amask])); srca += 4; amask = movem_next[amask]; } -}}}m68k_incpc(8); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_49c0_0)(uae_u32 opcode) /* EXT.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_u32 dst = (uae_s32)(uae_s8)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_NFLG (((uae_s32)(dst)) < 0); - m68k_dreg(regs, srcreg) = (dst); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a00_0)(uae_u32 opcode) /* TST.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a10_0)(uae_u32 opcode) /* TST.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a18_0)(uae_u32 opcode) /* TST.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a20_0)(uae_u32 opcode) /* TST.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a28_0)(uae_u32 opcode) /* TST.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a30_0)(uae_u32 opcode) /* TST.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a38_0)(uae_u32 opcode) /* TST.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a39_0)(uae_u32 opcode) /* TST.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a3a_0)(uae_u32 opcode) /* TST.B (d16,PC) */ -{ - cpuop_begin(); -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a3b_0)(uae_u32 opcode) /* TST.B (d8,PC,Xn) */ -{ - cpuop_begin(); -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a3c_0)(uae_u32 opcode) /* TST.B #.B */ -{ - cpuop_begin(); -{{ uae_s8 src = get_ibyte(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); -}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a40_0)(uae_u32 opcode) /* TST.W Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a48_0)(uae_u32 opcode) /* TST.W An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a50_0)(uae_u32 opcode) /* TST.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a58_0)(uae_u32 opcode) /* TST.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a60_0)(uae_u32 opcode) /* TST.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a68_0)(uae_u32 opcode) /* TST.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a70_0)(uae_u32 opcode) /* TST.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a78_0)(uae_u32 opcode) /* TST.W (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a79_0)(uae_u32 opcode) /* TST.W (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a7a_0)(uae_u32 opcode) /* TST.W (d16,PC) */ -{ - cpuop_begin(); -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a7b_0)(uae_u32 opcode) /* TST.W (d8,PC,Xn) */ -{ - cpuop_begin(); -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a7c_0)(uae_u32 opcode) /* TST.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); -}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a80_0)(uae_u32 opcode) /* TST.L Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a88_0)(uae_u32 opcode) /* TST.L An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a90_0)(uae_u32 opcode) /* TST.L (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a98_0)(uae_u32 opcode) /* TST.L (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4aa0_0)(uae_u32 opcode) /* TST.L -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4aa8_0)(uae_u32 opcode) /* TST.L (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4ab0_0)(uae_u32 opcode) /* TST.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4ab8_0)(uae_u32 opcode) /* TST.L (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4ab9_0)(uae_u32 opcode) /* TST.L (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4aba_0)(uae_u32 opcode) /* TST.L (d16,PC) */ -{ - cpuop_begin(); -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4abb_0)(uae_u32 opcode) /* TST.L (d8,PC,Xn) */ -{ - cpuop_begin(); -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4abc_0)(uae_u32 opcode) /* TST.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); -}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4ac0_0)(uae_u32 opcode) /* TAS.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - src |= 0x80; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((src) & 0xff); -}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4ad0_0)(uae_u32 opcode) /* TAS.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - src |= 0x80; - put_byte(srca,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4ad8_0)(uae_u32 opcode) /* TAS.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - src |= 0x80; - put_byte(srca,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4ae0_0)(uae_u32 opcode) /* TAS.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - src |= 0x80; - put_byte(srca,src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4ae8_0)(uae_u32 opcode) /* TAS.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - src |= 0x80; - put_byte(srca,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4af0_0)(uae_u32 opcode) /* TAS.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - src |= 0x80; - put_byte(srca,src); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4af8_0)(uae_u32 opcode) /* TAS.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - src |= 0x80; - put_byte(srca,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4af9_0)(uae_u32 opcode) /* TAS.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - src |= 0x80; - put_byte(srca,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c00_0)(uae_u32 opcode) /* MULL.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(4); - m68k_mull(opcode, dst, extra); -}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c10_0)(uae_u32 opcode) /* MULL.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); -m68k_incpc(4); - m68k_mull(opcode, dst, extra); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c18_0)(uae_u32 opcode) /* MULL.L #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; -m68k_incpc(4); - m68k_mull(opcode, dst, extra); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c20_0)(uae_u32 opcode) /* MULL.L #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; -m68k_incpc(4); - m68k_mull(opcode, dst, extra); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c28_0)(uae_u32 opcode) /* MULL.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 dst = get_long(dsta); -m68k_incpc(6); - m68k_mull(opcode, dst, extra); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c30_0)(uae_u32 opcode) /* MULL.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); - m68k_mull(opcode, dst, extra); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c38_0)(uae_u32 opcode) /* MULL.L #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 dst = get_long(dsta); -m68k_incpc(6); - m68k_mull(opcode, dst, extra); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c39_0)(uae_u32 opcode) /* MULL.L #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s32 dst = get_long(dsta); -m68k_incpc(8); - m68k_mull(opcode, dst, extra); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c3a_0)(uae_u32 opcode) /* MULL.L #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_getpc () + 4; - dsta += (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 dst = get_long(dsta); -m68k_incpc(6); - m68k_mull(opcode, dst, extra); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c3b_0)(uae_u32 opcode) /* MULL.L #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 dst = get_long(dsta); - m68k_mull(opcode, dst, extra); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c3c_0)(uae_u32 opcode) /* MULL.L #.W,#.L */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uae_s32 dst = get_ilong(4); -m68k_incpc(8); - m68k_mull(opcode, dst, extra); -}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c40_0)(uae_u32 opcode) /* DIVL.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{m68k_incpc(2); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(0); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(2); - m68k_divl(opcode, dst, extra, oldpc); -}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c50_0)(uae_u32 opcode) /* DIVL.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{m68k_incpc(2); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(0); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); -m68k_incpc(2); - m68k_divl(opcode, dst, extra, oldpc); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c58_0)(uae_u32 opcode) /* DIVL.L #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{m68k_incpc(2); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(0); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; -m68k_incpc(2); - m68k_divl(opcode, dst, extra, oldpc); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c60_0)(uae_u32 opcode) /* DIVL.L #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{m68k_incpc(2); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(0); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; -m68k_incpc(2); - m68k_divl(opcode, dst, extra, oldpc); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c68_0)(uae_u32 opcode) /* DIVL.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{m68k_incpc(2); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(0); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); -m68k_incpc(4); - m68k_divl(opcode, dst, extra, oldpc); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c70_0)(uae_u32 opcode) /* DIVL.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{m68k_incpc(2); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(0); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); - m68k_divl(opcode, dst, extra, oldpc); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c78_0)(uae_u32 opcode) /* DIVL.L #.W,(xxx).W */ -{ - cpuop_begin(); -{m68k_incpc(2); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(0); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); -m68k_incpc(4); - m68k_divl(opcode, dst, extra, oldpc); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c79_0)(uae_u32 opcode) /* DIVL.L #.W,(xxx).L */ -{ - cpuop_begin(); -{m68k_incpc(2); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(0); -{ uaecptr dsta = get_ilong(2); -{ uae_s32 dst = get_long(dsta); -m68k_incpc(6); - m68k_divl(opcode, dst, extra, oldpc); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c7a_0)(uae_u32 opcode) /* DIVL.L #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{m68k_incpc(2); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(0); -{ uaecptr dsta = m68k_getpc () + 2; - dsta += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); -m68k_incpc(4); - m68k_divl(opcode, dst, extra, oldpc); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c7b_0)(uae_u32 opcode) /* DIVL.L #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{m68k_incpc(2); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(0); -{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 dst = get_long(dsta); - m68k_divl(opcode, dst, extra, oldpc); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4c7c_0)(uae_u32 opcode) /* DIVL.L #.W,#.L */ -{ - cpuop_begin(); -{m68k_incpc(2); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 extra = get_iword(0); -{ uae_s32 dst = get_ilong(2); -m68k_incpc(6); - m68k_divl(opcode, dst, extra, oldpc); -}}}} cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4c90_0)(uae_u32 opcode) /* MVMEL.W #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr srca = m68k_areg(regs, dstreg); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4c98_0)(uae_u32 opcode) /* MVMEL.W #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr srca = m68k_areg(regs, dstreg); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } - m68k_areg(regs, dstreg) = srca; -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4ca8_0)(uae_u32 opcode) /* MVMEL.W #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr srca = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cb0_0)(uae_u32 opcode) /* MVMEL.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{m68k_incpc(4); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cb8_0)(uae_u32 opcode) /* MVMEL.W #.W,(xxx).W */ -{ - cpuop_begin(); -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr srca = (uae_s32)(uae_s16)get_iword(4); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cb9_0)(uae_u32 opcode) /* MVMEL.W #.W,(xxx).L */ -{ - cpuop_begin(); -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr srca = get_ilong(4); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } -}}}m68k_incpc(8); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cba_0)(uae_u32 opcode) /* MVMEL.W #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr srca = m68k_getpc () + 4; - srca += (uae_s32)(uae_s16)get_iword(4); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cbb_0)(uae_u32 opcode) /* MVMEL.W #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cd0_0)(uae_u32 opcode) /* MVMEL.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr srca = m68k_areg(regs, dstreg); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cd8_0)(uae_u32 opcode) /* MVMEL.L #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr srca = m68k_areg(regs, dstreg); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } - m68k_areg(regs, dstreg) = srca; -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4ce8_0)(uae_u32 opcode) /* MVMEL.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr srca = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cf0_0)(uae_u32 opcode) /* MVMEL.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{m68k_incpc(4); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cf8_0)(uae_u32 opcode) /* MVMEL.L #.W,(xxx).W */ -{ - cpuop_begin(); -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr srca = (uae_s32)(uae_s16)get_iword(4); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cf9_0)(uae_u32 opcode) /* MVMEL.L #.W,(xxx).L */ -{ - cpuop_begin(); -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr srca = get_ilong(4); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } -}}}m68k_incpc(8); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cfa_0)(uae_u32 opcode) /* MVMEL.L #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr srca = m68k_getpc () + 4; - srca += (uae_s32)(uae_s16)get_iword(4); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cfb_0)(uae_u32 opcode) /* MVMEL.L #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4e40_0)(uae_u32 opcode) /* TRAP.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 15); -#else - uae_u32 srcreg = (opcode & 15); -#endif -{{ uae_u32 src = srcreg; -m68k_incpc(2); - Exception(src+32,0); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4e50_0)(uae_u32 opcode) /* LINK.W An,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr olda = m68k_areg(regs, 7) - 4; - m68k_areg (regs, 7) = olda; -{ uae_s32 src = m68k_areg(regs, srcreg); - put_long(olda,src); - m68k_areg(regs, srcreg) = (m68k_areg(regs, 7)); -{ uae_s16 offs = get_iword(2); - m68k_areg(regs, 7) += offs; -}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4e58_0)(uae_u32 opcode) /* UNLK.L An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); - m68k_areg(regs, 7) = src; -{ uaecptr olda = m68k_areg(regs, 7); -{ uae_s32 old = get_long(olda); - m68k_areg(regs, 7) += 4; - m68k_areg(regs, srcreg) = (old); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4e60_0)(uae_u32 opcode) /* MVR2USP.L An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel901; } -{{ uae_s32 src = m68k_areg(regs, srcreg); - regs.usp = src; -}}}m68k_incpc(2); -endlabel901: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4e68_0)(uae_u32 opcode) /* MVUSP2R.L An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel902; } -{{ m68k_areg(regs, srcreg) = (regs.usp); -}}}m68k_incpc(2); -endlabel902: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4e70_0)(uae_u32 opcode) /* RESET.L */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel903; } -{}}m68k_incpc(2); -endlabel903: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4e71_0)(uae_u32 opcode) /* NOP.L */ -{ - cpuop_begin(); -{}m68k_incpc(2); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_4e72_0)(uae_u32 opcode) /* STOP.L #.W */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel905; } -{{ uae_s16 src = get_iword(2); - regs.sr = src; - MakeFromSR(); - m68k_setstopped(1); -}}}m68k_incpc(4); -endlabel905: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4e73_0)(uae_u32 opcode) /* RTE.L */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel906; } -{ uae_u16 newsr; uae_u32 newpc; for (;;) { -{ uaecptr sra = m68k_areg(regs, 7); -{ uae_s16 sr = get_word(sra); - m68k_areg(regs, 7) += 2; -{ uaecptr pca = m68k_areg(regs, 7); -{ uae_s32 pc = get_long(pca); - m68k_areg(regs, 7) += 4; -{ uaecptr formata = m68k_areg(regs, 7); -{ uae_s16 format = get_word(formata); - m68k_areg(regs, 7) += 2; - newsr = sr; newpc = pc; - if ((format & 0xF000) == 0x0000) { break; } - else if ((format & 0xF000) == 0x1000) { ; } - else if ((format & 0xF000) == 0x2000) { m68k_areg(regs, 7) += 4; break; } - else if ((format & 0xF000) == 0x3000) { m68k_areg(regs, 7) += 4; break; } - else if ((format & 0xF000) == 0x7000) { m68k_areg(regs, 7) += 52; break; } - else if ((format & 0xF000) == 0x8000) { m68k_areg(regs, 7) += 50; break; } - else if ((format & 0xF000) == 0x9000) { m68k_areg(regs, 7) += 12; break; } - else if ((format & 0xF000) == 0xa000) { m68k_areg(regs, 7) += 24; break; } - else if ((format & 0xF000) == 0xb000) { m68k_areg(regs, 7) += 84; break; } - else { Exception(14,0); goto endlabel906; } - regs.sr = newsr; MakeFromSR(); -} -}}}}}} regs.sr = newsr; MakeFromSR(); - m68k_setpc_rte(newpc); -}}endlabel906: ; - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4e74_0)(uae_u32 opcode) /* RTD.L #.W */ -{ - cpuop_begin(); -{{ uaecptr pca = m68k_areg(regs, 7); -{ uae_s32 pc = get_long(pca); - m68k_areg(regs, 7) += 4; -{ uae_s16 offs = get_iword(2); - m68k_areg(regs, 7) += offs; - m68k_setpc_rte(pc); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4e75_0)(uae_u32 opcode) /* RTS.L */ -{ - cpuop_begin(); -{ m68k_do_rts(); -} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4e76_0)(uae_u32 opcode) /* TRAPV.L */ -{ - cpuop_begin(); -{m68k_incpc(2); - if (GET_VFLG) { Exception(7,m68k_getpc()); goto endlabel909; } -}endlabel909: ; - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_4e77_0)(uae_u32 opcode) /* RTR.L */ -{ - cpuop_begin(); -{ MakeSR(); -{ uaecptr sra = m68k_areg(regs, 7); -{ uae_s16 sr = get_word(sra); - m68k_areg(regs, 7) += 2; -{ uaecptr pca = m68k_areg(regs, 7); -{ uae_s32 pc = get_long(pca); - m68k_areg(regs, 7) += 4; - regs.sr &= 0xFF00; sr &= 0xFF; - regs.sr |= sr; m68k_setpc(pc); - MakeFromSR(); -}}}}} cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4e7a_0)(uae_u32 opcode) /* MOVEC2.L #.W */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel911; } -{{ uae_s16 src = get_iword(2); -{ int regno = (src >> 12) & 15; - uae_u32 *regp = regs.regs + regno; - if (! m68k_movec2(src & 0xFFF, regp)) goto endlabel911; -}}}}m68k_incpc(4); -endlabel911: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4e7b_0)(uae_u32 opcode) /* MOVE2C.L #.W */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel912; } -{{ uae_s16 src = get_iword(2); -{ int regno = (src >> 12) & 15; - uae_u32 *regp = regs.regs + regno; - if (! m68k_move2c(src & 0xFFF, regp)) goto endlabel912; -}}}}m68k_incpc(4); -endlabel912: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4e90_0)(uae_u32 opcode) /* JSR.L (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_do_jsr(m68k_getpc() + 2, srca); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4ea8_0)(uae_u32 opcode) /* JSR.L (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); - m68k_do_jsr(m68k_getpc() + 4, srca); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4eb0_0)(uae_u32 opcode) /* JSR.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); - m68k_do_jsr(m68k_getpc() + 0, srca); -}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4eb8_0)(uae_u32 opcode) /* JSR.L (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); - m68k_do_jsr(m68k_getpc() + 4, srca); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4eb9_0)(uae_u32 opcode) /* JSR.L (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); - m68k_do_jsr(m68k_getpc() + 6, srca); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4eba_0)(uae_u32 opcode) /* JSR.L (d16,PC) */ -{ - cpuop_begin(); -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); - m68k_do_jsr(m68k_getpc() + 4, srca); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4ebb_0)(uae_u32 opcode) /* JSR.L (d8,PC,Xn) */ -{ - cpuop_begin(); -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); - m68k_do_jsr(m68k_getpc() + 0, srca); -}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4ed0_0)(uae_u32 opcode) /* JMP.L (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_setpc(srca); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4ee8_0)(uae_u32 opcode) /* JMP.L (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); - m68k_setpc(srca); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4ef0_0)(uae_u32 opcode) /* JMP.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); - m68k_setpc(srca); -}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4ef8_0)(uae_u32 opcode) /* JMP.L (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); - m68k_setpc(srca); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4ef9_0)(uae_u32 opcode) /* JMP.L (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); - m68k_setpc(srca); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4efa_0)(uae_u32 opcode) /* JMP.L (d16,PC) */ -{ - cpuop_begin(); -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); - m68k_setpc(srca); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4efb_0)(uae_u32 opcode) /* JMP.L (d8,PC,Xn) */ -{ - cpuop_begin(); -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); - m68k_setpc(srca); -}}} cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_5000_0)(uae_u32 opcode) /* ADD.B #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5010_0)(uae_u32 opcode) /* ADD.B #,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5018_0)(uae_u32 opcode) /* ADD.B #,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5020_0)(uae_u32 opcode) /* ADD.B #,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5028_0)(uae_u32 opcode) /* ADD.B #,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5030_0)(uae_u32 opcode) /* ADD.B #,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5038_0)(uae_u32 opcode) /* ADD.B #,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5039_0)(uae_u32 opcode) /* ADD.B #,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = get_ilong(2); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -#endif - -#ifdef PART_5 -void REGPARAM2 CPUFUNC(op_5040_0)(uae_u32 opcode) /* ADD.W #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5048_0)(uae_u32 opcode) /* ADDA.W #,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_5050_0)(uae_u32 opcode) /* ADD.W #,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5058_0)(uae_u32 opcode) /* ADD.W #,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5060_0)(uae_u32 opcode) /* ADD.W #,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5068_0)(uae_u32 opcode) /* ADD.W #,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5070_0)(uae_u32 opcode) /* ADD.W #,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5078_0)(uae_u32 opcode) /* ADD.W #,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5079_0)(uae_u32 opcode) /* ADD.W #,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = get_ilong(2); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5080_0)(uae_u32 opcode) /* ADD.L #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5088_0)(uae_u32 opcode) /* ADDA.L #,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_5090_0)(uae_u32 opcode) /* ADD.L #,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5098_0)(uae_u32 opcode) /* ADD.L #,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_50a0_0)(uae_u32 opcode) /* ADD.L #,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_50a8_0)(uae_u32 opcode) /* ADD.L #,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_50b0_0)(uae_u32 opcode) /* ADD.L #,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_50b8_0)(uae_u32 opcode) /* ADD.L #,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_50b9_0)(uae_u32 opcode) /* ADD.L #,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = get_ilong(2); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_50c0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(0) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_50c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(0)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel954: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_50d0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(0) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_50d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(0) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_50e0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(0) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_50e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(0) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_50f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(0) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_50f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(0) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_50f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(0) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_50fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(0)) { Exception(7,m68k_getpc()); goto endlabel962; } -}}m68k_incpc(4); -endlabel962: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_50fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(0)) { Exception(7,m68k_getpc()); goto endlabel963; } -}}m68k_incpc(6); -endlabel963: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_50fc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(0)) { Exception(7,m68k_getpc()); goto endlabel964; } -}m68k_incpc(2); -endlabel964: ; - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_5100_0)(uae_u32 opcode) /* SUB.B #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5110_0)(uae_u32 opcode) /* SUB.B #,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5118_0)(uae_u32 opcode) /* SUB.B #,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5120_0)(uae_u32 opcode) /* SUB.B #,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5128_0)(uae_u32 opcode) /* SUB.B #,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5130_0)(uae_u32 opcode) /* SUB.B #,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5138_0)(uae_u32 opcode) /* SUB.B #,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5139_0)(uae_u32 opcode) /* SUB.B #,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = get_ilong(2); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5140_0)(uae_u32 opcode) /* SUB.W #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5148_0)(uae_u32 opcode) /* SUBA.W #,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_5150_0)(uae_u32 opcode) /* SUB.W #,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5158_0)(uae_u32 opcode) /* SUB.W #,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5160_0)(uae_u32 opcode) /* SUB.W #,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5168_0)(uae_u32 opcode) /* SUB.W #,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5170_0)(uae_u32 opcode) /* SUB.W #,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5178_0)(uae_u32 opcode) /* SUB.W #,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5179_0)(uae_u32 opcode) /* SUB.W #,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = get_ilong(2); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5180_0)(uae_u32 opcode) /* SUB.L #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5188_0)(uae_u32 opcode) /* SUBA.L #,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_5190_0)(uae_u32 opcode) /* SUB.L #,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5198_0)(uae_u32 opcode) /* SUB.L #,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_51a0_0)(uae_u32 opcode) /* SUB.L #,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_51a8_0)(uae_u32 opcode) /* SUB.L #,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_51b0_0)(uae_u32 opcode) /* SUB.L #,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_51b8_0)(uae_u32 opcode) /* SUB.L #,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_51b9_0)(uae_u32 opcode) /* SUB.L #,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = get_ilong(2); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_51c0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(1) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_51c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(1)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel992: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_51d0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(1) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_51d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(1) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_51e0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(1) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_51e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(1) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_51f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(1) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_51f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(1) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_51f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(1) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_51fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(1)) { Exception(7,m68k_getpc()); goto endlabel1000; } -}}m68k_incpc(4); -endlabel1000: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_51fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(1)) { Exception(7,m68k_getpc()); goto endlabel1001; } -}}m68k_incpc(6); -endlabel1001: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_51fc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(1)) { Exception(7,m68k_getpc()); goto endlabel1002; } -}m68k_incpc(2); -endlabel1002: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_52c0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(2) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_52c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(2)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel1004: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_52d0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(2) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_52d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(2) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_52e0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(2) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_52e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(2) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_52f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(2) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_52f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(2) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_52f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(2) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_52fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(2)) { Exception(7,m68k_getpc()); goto endlabel1012; } -}}m68k_incpc(4); -endlabel1012: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_52fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(2)) { Exception(7,m68k_getpc()); goto endlabel1013; } -}}m68k_incpc(6); -endlabel1013: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_52fc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(2)) { Exception(7,m68k_getpc()); goto endlabel1014; } -}m68k_incpc(2); -endlabel1014: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_53c0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(3) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_53c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(3)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel1016: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_53d0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(3) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_53d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(3) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_53e0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(3) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_53e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(3) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_53f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(3) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_53f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(3) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_53f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(3) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_53fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(3)) { Exception(7,m68k_getpc()); goto endlabel1024; } -}}m68k_incpc(4); -endlabel1024: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_53fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(3)) { Exception(7,m68k_getpc()); goto endlabel1025; } -}}m68k_incpc(6); -endlabel1025: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_53fc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(3)) { Exception(7,m68k_getpc()); goto endlabel1026; } -}m68k_incpc(2); -endlabel1026: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_54c0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(4) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_54c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(4)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel1028: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_54d0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(4) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_54d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(4) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_54e0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(4) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_54e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(4) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_54f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(4) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_54f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(4) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_54f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(4) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_54fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(4)) { Exception(7,m68k_getpc()); goto endlabel1036; } -}}m68k_incpc(4); -endlabel1036: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_54fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(4)) { Exception(7,m68k_getpc()); goto endlabel1037; } -}}m68k_incpc(6); -endlabel1037: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_54fc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(4)) { Exception(7,m68k_getpc()); goto endlabel1038; } -}m68k_incpc(2); -endlabel1038: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_55c0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(5) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_55c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(5)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel1040: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_55d0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(5) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_55d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(5) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_55e0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(5) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_55e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(5) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_55f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(5) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_55f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(5) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_55f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(5) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_55fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(5)) { Exception(7,m68k_getpc()); goto endlabel1048; } -}}m68k_incpc(4); -endlabel1048: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_55fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(5)) { Exception(7,m68k_getpc()); goto endlabel1049; } -}}m68k_incpc(6); -endlabel1049: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_55fc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(5)) { Exception(7,m68k_getpc()); goto endlabel1050; } -}m68k_incpc(2); -endlabel1050: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_56c0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(6) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_56c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(6)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel1052: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_56d0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(6) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_56d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(6) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_56e0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(6) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_56e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(6) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_56f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(6) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_56f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(6) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_56f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(6) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_56fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(6)) { Exception(7,m68k_getpc()); goto endlabel1060; } -}}m68k_incpc(4); -endlabel1060: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_56fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(6)) { Exception(7,m68k_getpc()); goto endlabel1061; } -}}m68k_incpc(6); -endlabel1061: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_56fc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(6)) { Exception(7,m68k_getpc()); goto endlabel1062; } -}m68k_incpc(2); -endlabel1062: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_57c0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(7) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_57c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(7)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel1064: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_57d0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(7) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_57d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(7) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_57e0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(7) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_57e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(7) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_57f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(7) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_57f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(7) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_57f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(7) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_57fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(7)) { Exception(7,m68k_getpc()); goto endlabel1072; } -}}m68k_incpc(4); -endlabel1072: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_57fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(7)) { Exception(7,m68k_getpc()); goto endlabel1073; } -}}m68k_incpc(6); -endlabel1073: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_57fc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(7)) { Exception(7,m68k_getpc()); goto endlabel1074; } -}m68k_incpc(2); -endlabel1074: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_58c0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(8) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_58c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(8)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel1076: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_58d0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(8) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_58d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(8) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_58e0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(8) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_58e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(8) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_58f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(8) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_58f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(8) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_58f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(8) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_58fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(8)) { Exception(7,m68k_getpc()); goto endlabel1084; } -}}m68k_incpc(4); -endlabel1084: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_58fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(8)) { Exception(7,m68k_getpc()); goto endlabel1085; } -}}m68k_incpc(6); -endlabel1085: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_58fc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(8)) { Exception(7,m68k_getpc()); goto endlabel1086; } -}m68k_incpc(2); -endlabel1086: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_59c0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(9) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_59c8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(9)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel1088: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_59d0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(9) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_59d8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(9) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_59e0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(9) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_59e8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(9) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_59f0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(9) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_59f8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(9) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_59f9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(9) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_59fa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(9)) { Exception(7,m68k_getpc()); goto endlabel1096; } -}}m68k_incpc(4); -endlabel1096: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_59fb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(9)) { Exception(7,m68k_getpc()); goto endlabel1097; } -}}m68k_incpc(6); -endlabel1097: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_59fc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(9)) { Exception(7,m68k_getpc()); goto endlabel1098; } -}m68k_incpc(2); -endlabel1098: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ac0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(10) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ac8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(10)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel1100: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ad0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(10) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ad8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(10) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ae0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(10) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ae8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(10) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5af0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(10) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5af8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(10) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5af9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(10) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5afa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(10)) { Exception(7,m68k_getpc()); goto endlabel1108; } -}}m68k_incpc(4); -endlabel1108: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5afb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(10)) { Exception(7,m68k_getpc()); goto endlabel1109; } -}}m68k_incpc(6); -endlabel1109: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5afc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(10)) { Exception(7,m68k_getpc()); goto endlabel1110; } -}m68k_incpc(2); -endlabel1110: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5bc0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(11) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5bc8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(11)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel1112: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5bd0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(11) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5bd8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(11) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5be0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(11) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5be8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(11) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5bf0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(11) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5bf8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(11) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5bf9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(11) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5bfa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(11)) { Exception(7,m68k_getpc()); goto endlabel1120; } -}}m68k_incpc(4); -endlabel1120: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5bfb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(11)) { Exception(7,m68k_getpc()); goto endlabel1121; } -}}m68k_incpc(6); -endlabel1121: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5bfc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(11)) { Exception(7,m68k_getpc()); goto endlabel1122; } -}m68k_incpc(2); -endlabel1122: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5cc0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(12) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5cc8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(12)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel1124: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5cd0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(12) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5cd8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(12) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ce0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(12) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ce8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(12) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5cf0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(12) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5cf8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(12) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5cf9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(12) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5cfa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(12)) { Exception(7,m68k_getpc()); goto endlabel1132; } -}}m68k_incpc(4); -endlabel1132: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5cfb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(12)) { Exception(7,m68k_getpc()); goto endlabel1133; } -}}m68k_incpc(6); -endlabel1133: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5cfc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(12)) { Exception(7,m68k_getpc()); goto endlabel1134; } -}m68k_incpc(2); -endlabel1134: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5dc0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(13) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5dc8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(13)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel1136: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5dd0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(13) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5dd8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(13) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5de0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(13) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5de8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(13) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5df0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(13) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5df8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(13) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5df9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(13) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5dfa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(13)) { Exception(7,m68k_getpc()); goto endlabel1144; } -}}m68k_incpc(4); -endlabel1144: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5dfb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(13)) { Exception(7,m68k_getpc()); goto endlabel1145; } -}}m68k_incpc(6); -endlabel1145: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5dfc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(13)) { Exception(7,m68k_getpc()); goto endlabel1146; } -}m68k_incpc(2); -endlabel1146: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ec0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(14) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ec8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(14)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel1148: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ed0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(14) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ed8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(14) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ee0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(14) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ee8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(14) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ef0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(14) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ef8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(14) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ef9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(14) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5efa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(14)) { Exception(7,m68k_getpc()); goto endlabel1156; } -}}m68k_incpc(4); -endlabel1156: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5efb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(14)) { Exception(7,m68k_getpc()); goto endlabel1157; } -}}m68k_incpc(6); -endlabel1157: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5efc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(14)) { Exception(7,m68k_getpc()); goto endlabel1158; } -}m68k_incpc(2); -endlabel1158: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5fc0_0)(uae_u32 opcode) /* Scc.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{{ int val = cctrue(15) ? 0xff : 0; - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((val) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5fc8_0)(uae_u32 opcode) /* DBcc.W Dn,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 offs = get_iword(2); - if (!cctrue(15)) { - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | (((src-1)) & 0xffff); - if (src) { - m68k_incpc((uae_s32)offs + 2); -return; - } - } -}}}m68k_incpc(4); -endlabel1160: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5fd0_0)(uae_u32 opcode) /* Scc.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ int val = cctrue(15) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5fd8_0)(uae_u32 opcode) /* Scc.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ int val = cctrue(15) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5fe0_0)(uae_u32 opcode) /* Scc.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; - m68k_areg (regs, srcreg) = srca; -{ int val = cctrue(15) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5fe8_0)(uae_u32 opcode) /* Scc.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(15) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ff0_0)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ int val = cctrue(15) ? 0xff : 0; - put_byte(srca,val); -}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ff8_0)(uae_u32 opcode) /* Scc.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ int val = cctrue(15) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ff9_0)(uae_u32 opcode) /* Scc.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ int val = cctrue(15) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#endif - -#ifdef PART_6 -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ffa_0)(uae_u32 opcode) /* TRAPcc.L #.W */ -{ - cpuop_begin(); -{{ uae_s16 dummy = get_iword(2); - if (cctrue(15)) { Exception(7,m68k_getpc()); goto endlabel1168; } -}}m68k_incpc(4); -endlabel1168: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ffb_0)(uae_u32 opcode) /* TRAPcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 dummy = get_ilong(2); - if (cctrue(15)) { Exception(7,m68k_getpc()); goto endlabel1169; } -}}m68k_incpc(6); -endlabel1169: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ffc_0)(uae_u32 opcode) /* TRAPcc.L */ -{ - cpuop_begin(); -{ if (cctrue(15)) { Exception(7,m68k_getpc()); goto endlabel1170; } -}m68k_incpc(2); -endlabel1170: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6000_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(0)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1171: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6001_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(0)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1172: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_60ff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(0)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1173: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6100_0)(uae_u32 opcode) /* BSR.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - uae_s32 s = (uae_s32)src + 2; - m68k_do_bsr(m68k_getpc() + 4, s); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6101_0)(uae_u32 opcode) /* BSR.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - uae_s32 s = (uae_s32)src + 2; - m68k_do_bsr(m68k_getpc() + 2, s); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_61ff_0)(uae_u32 opcode) /* BSR.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - uae_s32 s = (uae_s32)src + 2; - m68k_do_bsr(m68k_getpc() + 6, s); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6200_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(2)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1177: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6201_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(2)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1178: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_62ff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(2)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1179: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6300_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(3)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1180: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6301_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(3)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1181: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_63ff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(3)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1182: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6400_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(4)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1183: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6401_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(4)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1184: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_64ff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(4)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1185: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6500_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(5)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1186: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6501_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(5)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1187: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_65ff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(5)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1188: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6600_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(6)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1189: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6601_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(6)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1190: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_66ff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(6)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1191: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6700_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(7)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1192: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6701_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(7)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1193: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_67ff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(7)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1194: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6800_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(8)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1195: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6801_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(8)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1196: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_68ff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(8)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1197: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6900_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(9)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1198: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6901_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(9)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1199: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_69ff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(9)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1200: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6a00_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(10)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1201: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6a01_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(10)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1202: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6aff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(10)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1203: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6b00_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(11)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1204: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6b01_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(11)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1205: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6bff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(11)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1206: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6c00_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(12)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1207: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6c01_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(12)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1208: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6cff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(12)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1209: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6d00_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(13)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1210: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6d01_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(13)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1211: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6dff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(13)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1212: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6e00_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(14)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1213: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6e01_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(14)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1214: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6eff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(14)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1215: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6f00_0)(uae_u32 opcode) /* Bcc.W #.W */ -{ - cpuop_begin(); -{{ uae_s16 src = get_iword(2); - if (!cctrue(15)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(4); -endlabel1216: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6f01_0)(uae_u32 opcode) /* Bcc.B # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -{{ uae_u32 src = srcreg; - if (!cctrue(15)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(2); -endlabel1217: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6fff_0)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{{ uae_s32 src = get_ilong(2); - if (!cctrue(15)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel1218: ; - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_7000_0)(uae_u32 opcode) /* MOVE.L #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 8) & 255); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)(opcode & 255); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_u32 src = srcreg; -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}m68k_incpc(2); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_7100_0)(uae_u32 opcode) /* EMULOP_RETURN.L */ -{ - cpuop_begin(); -{ m68k_emulop_return(); -} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_7101_0)(uae_u32 opcode) /* EMULOP.L # */ -{ - cpuop_begin(); -{ -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - m68k_emulop(opcode); -}m68k_incpc(2); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_8000_0)(uae_u32 opcode) /* OR.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8010_0)(uae_u32 opcode) /* OR.B (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8018_0)(uae_u32 opcode) /* OR.B (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8020_0)(uae_u32 opcode) /* OR.B -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8028_0)(uae_u32 opcode) /* OR.B (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8030_0)(uae_u32 opcode) /* OR.B (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8038_0)(uae_u32 opcode) /* OR.B (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8039_0)(uae_u32 opcode) /* OR.B (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_803a_0)(uae_u32 opcode) /* OR.B (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_803b_0)(uae_u32 opcode) /* OR.B (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_803c_0)(uae_u32 opcode) /* OR.B #.B,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8040_0)(uae_u32 opcode) /* OR.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8050_0)(uae_u32 opcode) /* OR.W (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8058_0)(uae_u32 opcode) /* OR.W (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8060_0)(uae_u32 opcode) /* OR.W -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8068_0)(uae_u32 opcode) /* OR.W (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8070_0)(uae_u32 opcode) /* OR.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8078_0)(uae_u32 opcode) /* OR.W (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8079_0)(uae_u32 opcode) /* OR.W (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_807a_0)(uae_u32 opcode) /* OR.W (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_807b_0)(uae_u32 opcode) /* OR.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_807c_0)(uae_u32 opcode) /* OR.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8080_0)(uae_u32 opcode) /* OR.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8090_0)(uae_u32 opcode) /* OR.L (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8098_0)(uae_u32 opcode) /* OR.L (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80a0_0)(uae_u32 opcode) /* OR.L -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80a8_0)(uae_u32 opcode) /* OR.L (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80b0_0)(uae_u32 opcode) /* OR.L (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80b8_0)(uae_u32 opcode) /* OR.L (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80b9_0)(uae_u32 opcode) /* OR.L (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80ba_0)(uae_u32 opcode) /* OR.L (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80bb_0)(uae_u32 opcode) /* OR.L (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80bc_0)(uae_u32 opcode) /* OR.L #.L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80c0_0)(uae_u32 opcode) /* DIVU.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(2); - if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1255; } else { - uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; - uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; - if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}endlabel1255: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80d0_0)(uae_u32 opcode) /* DIVU.W (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(2); - if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1256; } else { - uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; - uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; - if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel1256: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80d8_0)(uae_u32 opcode) /* DIVU.W (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(2); - if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1257; } else { - uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; - uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; - if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel1257: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80e0_0)(uae_u32 opcode) /* DIVU.W -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(2); - if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1258; } else { - uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; - uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; - if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel1258: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80e8_0)(uae_u32 opcode) /* DIVU.W (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(4); - if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1259; } else { - uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; - uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; - if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel1259: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80f0_0)(uae_u32 opcode) /* DIVU.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1260; } else { - uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; - uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; - if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}}endlabel1260: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80f8_0)(uae_u32 opcode) /* DIVU.W (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(4); - if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1261; } else { - uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; - uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; - if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel1261: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80f9_0)(uae_u32 opcode) /* DIVU.W (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(6); - if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1262; } else { - uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; - uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; - if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel1262: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80fa_0)(uae_u32 opcode) /* DIVU.W (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(4); - if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1263; } else { - uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; - uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; - if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel1263: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80fb_0)(uae_u32 opcode) /* DIVU.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1264; } else { - uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; - uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; - if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}}endlabel1264: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80fc_0)(uae_u32 opcode) /* DIVU.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 src = get_iword(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(4); - if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel1265; } else { - uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; - uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; - if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}endlabel1265: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8100_0)(uae_u32 opcode) /* SBCD.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{ uae_u16 newv_lo = (dst & 0xF) - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = (dst & 0xF0) - (src & 0xF0); - uae_u16 newv, tmp_newv; - int bcd = 0; - newv = tmp_newv = newv_hi + newv_lo; - if (newv_lo & 0xF0) { newv -= 6; bcd = 6; }; - if ((((dst & 0xFF) - (src & 0xFF) - (GET_XFLG ? 1 : 0)) & 0x100) > 0xFF) { newv -= 0x60; } - SET_CFLG ((((dst & 0xFF) - (src & 0xFF) - bcd - (GET_XFLG ? 1 : 0)) & 0x300) > 0xFF); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8108_0)(uae_u32 opcode) /* SBCD.B -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; -{ uae_u16 newv_lo = (dst & 0xF) - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = (dst & 0xF0) - (src & 0xF0); - uae_u16 newv, tmp_newv; - int bcd = 0; - newv = tmp_newv = newv_hi + newv_lo; - if (newv_lo & 0xF0) { newv -= 6; bcd = 6; }; - if ((((dst & 0xFF) - (src & 0xFF) - (GET_XFLG ? 1 : 0)) & 0x100) > 0xFF) { newv -= 0x60; } - SET_CFLG ((((dst & 0xFF) - (src & 0xFF) - bcd - (GET_XFLG ? 1 : 0)) & 0x300) > 0xFF); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - put_byte(dsta,newv); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8110_0)(uae_u32 opcode) /* OR.B Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8118_0)(uae_u32 opcode) /* OR.B Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8120_0)(uae_u32 opcode) /* OR.B Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8128_0)(uae_u32 opcode) /* OR.B Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8130_0)(uae_u32 opcode) /* OR.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8138_0)(uae_u32 opcode) /* OR.B Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8139_0)(uae_u32 opcode) /* OR.B Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s8 dst = get_byte(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_8140_0)(uae_u32 opcode) /* PACK.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uae_u16 val = m68k_dreg(regs, srcreg) + get_iword(2); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & 0xffffff00) | ((val >> 4) & 0xf0) | (val & 0xf); -}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_8148_0)(uae_u32 opcode) /* PACK.L -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uae_u16 val; - m68k_areg(regs, srcreg) -= areg_byteinc[srcreg]; - val = (uae_u16)get_byte(m68k_areg(regs, srcreg)); - m68k_areg(regs, srcreg) -= areg_byteinc[srcreg]; - val = (val | ((uae_u16)get_byte(m68k_areg(regs, srcreg)) << 8)) + get_iword(2); - m68k_areg(regs, dstreg) -= areg_byteinc[dstreg]; - put_byte(m68k_areg(regs, dstreg),((val >> 4) & 0xf0) | (val & 0xf)); -}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_8150_0)(uae_u32 opcode) /* OR.W Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8158_0)(uae_u32 opcode) /* OR.W Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8160_0)(uae_u32 opcode) /* OR.W Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8168_0)(uae_u32 opcode) /* OR.W Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 dst = get_word(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8170_0)(uae_u32 opcode) /* OR.W Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 dst = get_word(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8178_0)(uae_u32 opcode) /* OR.W Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 dst = get_word(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8179_0)(uae_u32 opcode) /* OR.W Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s16 dst = get_word(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_8180_0)(uae_u32 opcode) /* UNPK.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uae_u16 val = m68k_dreg(regs, srcreg); - val = (((val << 4) & 0xf00) | (val & 0xf)) + get_iword(2); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & 0xffff0000) | (val & 0xffff); -}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_8188_0)(uae_u32 opcode) /* UNPK.L -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uae_u16 val; - m68k_areg(regs, srcreg) -= areg_byteinc[srcreg]; - val = (uae_u16)get_byte(m68k_areg(regs, srcreg)); - val = (((val << 4) & 0xf00) | (val & 0xf)) + get_iword(2); - m68k_areg(regs, dstreg) -= areg_byteinc[dstreg]; - put_byte(m68k_areg(regs, dstreg),val); - m68k_areg(regs, dstreg) -= areg_byteinc[dstreg]; - put_byte(m68k_areg(regs, dstreg),val >> 8); -}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_8190_0)(uae_u32 opcode) /* OR.L Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8198_0)(uae_u32 opcode) /* OR.L Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81a0_0)(uae_u32 opcode) /* OR.L Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81a8_0)(uae_u32 opcode) /* OR.L Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81b0_0)(uae_u32 opcode) /* OR.L Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81b8_0)(uae_u32 opcode) /* OR.L Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81b9_0)(uae_u32 opcode) /* OR.L Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s32 dst = get_long(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81c0_0)(uae_u32 opcode) /* DIVS.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(2); - if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1293; } else { - uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; - uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; - if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}endlabel1293: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81d0_0)(uae_u32 opcode) /* DIVS.W (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(2); - if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1294; } else { - uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; - uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; - if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel1294: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81d8_0)(uae_u32 opcode) /* DIVS.W (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(2); - if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1295; } else { - uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; - uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; - if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel1295: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81e0_0)(uae_u32 opcode) /* DIVS.W -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(2); - if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1296; } else { - uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; - uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; - if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel1296: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81e8_0)(uae_u32 opcode) /* DIVS.W (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(4); - if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1297; } else { - uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; - uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; - if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel1297: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81f0_0)(uae_u32 opcode) /* DIVS.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1298; } else { - uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; - uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; - if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}}endlabel1298: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81f8_0)(uae_u32 opcode) /* DIVS.W (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(4); - if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1299; } else { - uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; - uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; - if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel1299: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81f9_0)(uae_u32 opcode) /* DIVS.W (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(6); - if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1300; } else { - uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; - uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; - if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel1300: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81fa_0)(uae_u32 opcode) /* DIVS.W (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(4); - if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1301; } else { - uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; - uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; - if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel1301: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81fb_0)(uae_u32 opcode) /* DIVS.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1302; } else { - uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; - uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; - if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}}endlabel1302: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81fc_0)(uae_u32 opcode) /* DIVS.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 src = get_iword(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(4); - if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel1303; } else { - uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; - uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; - if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}endlabel1303: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9000_0)(uae_u32 opcode) /* SUB.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9010_0)(uae_u32 opcode) /* SUB.B (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9018_0)(uae_u32 opcode) /* SUB.B (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9020_0)(uae_u32 opcode) /* SUB.B -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9028_0)(uae_u32 opcode) /* SUB.B (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9030_0)(uae_u32 opcode) /* SUB.B (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9038_0)(uae_u32 opcode) /* SUB.B (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9039_0)(uae_u32 opcode) /* SUB.B (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_903a_0)(uae_u32 opcode) /* SUB.B (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_903b_0)(uae_u32 opcode) /* SUB.B (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_903c_0)(uae_u32 opcode) /* SUB.B #.B,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9040_0)(uae_u32 opcode) /* SUB.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9048_0)(uae_u32 opcode) /* SUB.W An,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9050_0)(uae_u32 opcode) /* SUB.W (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9058_0)(uae_u32 opcode) /* SUB.W (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9060_0)(uae_u32 opcode) /* SUB.W -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9068_0)(uae_u32 opcode) /* SUB.W (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9070_0)(uae_u32 opcode) /* SUB.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9078_0)(uae_u32 opcode) /* SUB.W (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9079_0)(uae_u32 opcode) /* SUB.W (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_907a_0)(uae_u32 opcode) /* SUB.W (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_907b_0)(uae_u32 opcode) /* SUB.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_907c_0)(uae_u32 opcode) /* SUB.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9080_0)(uae_u32 opcode) /* SUB.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9088_0)(uae_u32 opcode) /* SUB.L An,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9090_0)(uae_u32 opcode) /* SUB.L (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9098_0)(uae_u32 opcode) /* SUB.L (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_90a0_0)(uae_u32 opcode) /* SUB.L -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_90a8_0)(uae_u32 opcode) /* SUB.L (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_90b0_0)(uae_u32 opcode) /* SUB.L (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_90b8_0)(uae_u32 opcode) /* SUB.L (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_90b9_0)(uae_u32 opcode) /* SUB.L (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_90ba_0)(uae_u32 opcode) /* SUB.L (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_90bb_0)(uae_u32 opcode) /* SUB.L (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_90bc_0)(uae_u32 opcode) /* SUB.L #.L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}m68k_incpc(6); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_90c0_0)(uae_u32 opcode) /* SUBA.W Dn,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_90c8_0)(uae_u32 opcode) /* SUBA.W An,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_90d0_0)(uae_u32 opcode) /* SUBA.W (An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_90d8_0)(uae_u32 opcode) /* SUBA.W (An)+,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_90e0_0)(uae_u32 opcode) /* SUBA.W -(An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_90e8_0)(uae_u32 opcode) /* SUBA.W (d16,An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_90f0_0)(uae_u32 opcode) /* SUBA.W (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_90f8_0)(uae_u32 opcode) /* SUBA.W (xxx).W,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_90f9_0)(uae_u32 opcode) /* SUBA.W (xxx).L,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_90fa_0)(uae_u32 opcode) /* SUBA.W (d16,PC),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_90fb_0)(uae_u32 opcode) /* SUBA.W (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_90fc_0)(uae_u32 opcode) /* SUBA.W #.W,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_9100_0)(uae_u32 opcode) /* SUBX.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = dst - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9108_0)(uae_u32 opcode) /* SUBX.B -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; -{ uae_u32 newv = dst - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9110_0)(uae_u32 opcode) /* SUB.B Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9118_0)(uae_u32 opcode) /* SUB.B Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9120_0)(uae_u32 opcode) /* SUB.B Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9128_0)(uae_u32 opcode) /* SUB.B Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9130_0)(uae_u32 opcode) /* SUB.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9138_0)(uae_u32 opcode) /* SUB.B Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9139_0)(uae_u32 opcode) /* SUB.B Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9140_0)(uae_u32 opcode) /* SUBX.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = dst - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); - SET_NFLG (((uae_s16)(newv)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9148_0)(uae_u32 opcode) /* SUBX.W -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; -{ uae_u32 newv = dst - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); - SET_NFLG (((uae_s16)(newv)) < 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9150_0)(uae_u32 opcode) /* SUB.W Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9158_0)(uae_u32 opcode) /* SUB.W Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9160_0)(uae_u32 opcode) /* SUB.W Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9168_0)(uae_u32 opcode) /* SUB.W Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9170_0)(uae_u32 opcode) /* SUB.W Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9178_0)(uae_u32 opcode) /* SUB.W Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9179_0)(uae_u32 opcode) /* SUB.W Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9180_0)(uae_u32 opcode) /* SUBX.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = dst - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9188_0)(uae_u32 opcode) /* SUBX.L -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; -{ uae_u32 newv = dst - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); - SET_NFLG (((uae_s32)(newv)) < 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9190_0)(uae_u32 opcode) /* SUB.L Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9198_0)(uae_u32 opcode) /* SUB.L Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_91a0_0)(uae_u32 opcode) /* SUB.L Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_91a8_0)(uae_u32 opcode) /* SUB.L Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_91b0_0)(uae_u32 opcode) /* SUB.L Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_91b8_0)(uae_u32 opcode) /* SUB.L Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_91b9_0)(uae_u32 opcode) /* SUB.L Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_91c0_0)(uae_u32 opcode) /* SUBA.L Dn,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_91c8_0)(uae_u32 opcode) /* SUBA.L An,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_91d0_0)(uae_u32 opcode) /* SUBA.L (An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_91d8_0)(uae_u32 opcode) /* SUBA.L (An)+,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_91e0_0)(uae_u32 opcode) /* SUBA.L -(An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_91e8_0)(uae_u32 opcode) /* SUBA.L (d16,An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_91f0_0)(uae_u32 opcode) /* SUBA.L (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_91f8_0)(uae_u32 opcode) /* SUBA.L (xxx).W,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_91f9_0)(uae_u32 opcode) /* SUBA.L (xxx).L,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_91fa_0)(uae_u32 opcode) /* SUBA.L (d16,PC),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_91fb_0)(uae_u32 opcode) /* SUBA.L (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_91fc_0)(uae_u32 opcode) /* SUBA.L #.L,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_b000_0)(uae_u32 opcode) /* CMP.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b010_0)(uae_u32 opcode) /* CMP.B (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b018_0)(uae_u32 opcode) /* CMP.B (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b020_0)(uae_u32 opcode) /* CMP.B -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b028_0)(uae_u32 opcode) /* CMP.B (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b030_0)(uae_u32 opcode) /* CMP.B (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b038_0)(uae_u32 opcode) /* CMP.B (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b039_0)(uae_u32 opcode) /* CMP.B (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b03a_0)(uae_u32 opcode) /* CMP.B (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b03b_0)(uae_u32 opcode) /* CMP.B (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b03c_0)(uae_u32 opcode) /* CMP.B #.B,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b040_0)(uae_u32 opcode) /* CMP.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -#endif - -#ifdef PART_7 -void REGPARAM2 CPUFUNC(op_b048_0)(uae_u32 opcode) /* CMP.W An,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b050_0)(uae_u32 opcode) /* CMP.W (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b058_0)(uae_u32 opcode) /* CMP.W (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b060_0)(uae_u32 opcode) /* CMP.W -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b068_0)(uae_u32 opcode) /* CMP.W (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b070_0)(uae_u32 opcode) /* CMP.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b078_0)(uae_u32 opcode) /* CMP.W (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b079_0)(uae_u32 opcode) /* CMP.W (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b07a_0)(uae_u32 opcode) /* CMP.W (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b07b_0)(uae_u32 opcode) /* CMP.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b07c_0)(uae_u32 opcode) /* CMP.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b080_0)(uae_u32 opcode) /* CMP.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b088_0)(uae_u32 opcode) /* CMP.L An,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b090_0)(uae_u32 opcode) /* CMP.L (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b098_0)(uae_u32 opcode) /* CMP.L (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0a0_0)(uae_u32 opcode) /* CMP.L -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0a8_0)(uae_u32 opcode) /* CMP.L (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0b0_0)(uae_u32 opcode) /* CMP.L (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0b8_0)(uae_u32 opcode) /* CMP.L (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0b9_0)(uae_u32 opcode) /* CMP.L (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0ba_0)(uae_u32 opcode) /* CMP.L (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0bb_0)(uae_u32 opcode) /* CMP.L (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0bc_0)(uae_u32 opcode) /* CMP.L #.L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0c0_0)(uae_u32 opcode) /* CMPA.W Dn,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0c8_0)(uae_u32 opcode) /* CMPA.W An,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0d0_0)(uae_u32 opcode) /* CMPA.W (An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0d8_0)(uae_u32 opcode) /* CMPA.W (An)+,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0e0_0)(uae_u32 opcode) /* CMPA.W -(An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0e8_0)(uae_u32 opcode) /* CMPA.W (d16,An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0f0_0)(uae_u32 opcode) /* CMPA.W (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0f8_0)(uae_u32 opcode) /* CMPA.W (xxx).W,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0f9_0)(uae_u32 opcode) /* CMPA.W (xxx).L,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0fa_0)(uae_u32 opcode) /* CMPA.W (d16,PC),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0fb_0)(uae_u32 opcode) /* CMPA.W (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0fc_0)(uae_u32 opcode) /* CMPA.W #.W,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b100_0)(uae_u32 opcode) /* EOR.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b108_0)(uae_u32 opcode) /* CMPM.B (An)+,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b110_0)(uae_u32 opcode) /* EOR.B Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b118_0)(uae_u32 opcode) /* EOR.B Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b120_0)(uae_u32 opcode) /* EOR.B Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b128_0)(uae_u32 opcode) /* EOR.B Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b130_0)(uae_u32 opcode) /* EOR.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b138_0)(uae_u32 opcode) /* EOR.B Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b139_0)(uae_u32 opcode) /* EOR.B Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s8 dst = get_byte(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b140_0)(uae_u32 opcode) /* EOR.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b148_0)(uae_u32 opcode) /* CMPM.W (An)+,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b150_0)(uae_u32 opcode) /* EOR.W Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b158_0)(uae_u32 opcode) /* EOR.W Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b160_0)(uae_u32 opcode) /* EOR.W Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b168_0)(uae_u32 opcode) /* EOR.W Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 dst = get_word(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b170_0)(uae_u32 opcode) /* EOR.W Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 dst = get_word(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b178_0)(uae_u32 opcode) /* EOR.W Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 dst = get_word(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b179_0)(uae_u32 opcode) /* EOR.W Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s16 dst = get_word(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b180_0)(uae_u32 opcode) /* EOR.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b188_0)(uae_u32 opcode) /* CMPM.L (An)+,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b190_0)(uae_u32 opcode) /* EOR.L Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b198_0)(uae_u32 opcode) /* EOR.L Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1a0_0)(uae_u32 opcode) /* EOR.L Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1a8_0)(uae_u32 opcode) /* EOR.L Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1b0_0)(uae_u32 opcode) /* EOR.L Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1b8_0)(uae_u32 opcode) /* EOR.L Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1b9_0)(uae_u32 opcode) /* EOR.L Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s32 dst = get_long(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1c0_0)(uae_u32 opcode) /* CMPA.L Dn,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1c8_0)(uae_u32 opcode) /* CMPA.L An,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1d0_0)(uae_u32 opcode) /* CMPA.L (An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1d8_0)(uae_u32 opcode) /* CMPA.L (An)+,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1e0_0)(uae_u32 opcode) /* CMPA.L -(An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1e8_0)(uae_u32 opcode) /* CMPA.L (d16,An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1f0_0)(uae_u32 opcode) /* CMPA.L (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1f8_0)(uae_u32 opcode) /* CMPA.L (xxx).W,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1f9_0)(uae_u32 opcode) /* CMPA.L (xxx).L,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1fa_0)(uae_u32 opcode) /* CMPA.L (d16,PC),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1fb_0)(uae_u32 opcode) /* CMPA.L (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1fc_0)(uae_u32 opcode) /* CMPA.L #.L,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c000_0)(uae_u32 opcode) /* AND.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c010_0)(uae_u32 opcode) /* AND.B (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c018_0)(uae_u32 opcode) /* AND.B (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c020_0)(uae_u32 opcode) /* AND.B -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c028_0)(uae_u32 opcode) /* AND.B (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c030_0)(uae_u32 opcode) /* AND.B (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c038_0)(uae_u32 opcode) /* AND.B (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c039_0)(uae_u32 opcode) /* AND.B (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c03a_0)(uae_u32 opcode) /* AND.B (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c03b_0)(uae_u32 opcode) /* AND.B (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c03c_0)(uae_u32 opcode) /* AND.B #.B,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c040_0)(uae_u32 opcode) /* AND.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c050_0)(uae_u32 opcode) /* AND.W (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c058_0)(uae_u32 opcode) /* AND.W (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c060_0)(uae_u32 opcode) /* AND.W -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c068_0)(uae_u32 opcode) /* AND.W (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c070_0)(uae_u32 opcode) /* AND.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c078_0)(uae_u32 opcode) /* AND.W (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c079_0)(uae_u32 opcode) /* AND.W (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c07a_0)(uae_u32 opcode) /* AND.W (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c07b_0)(uae_u32 opcode) /* AND.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c07c_0)(uae_u32 opcode) /* AND.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c080_0)(uae_u32 opcode) /* AND.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c090_0)(uae_u32 opcode) /* AND.L (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c098_0)(uae_u32 opcode) /* AND.L (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0a0_0)(uae_u32 opcode) /* AND.L -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0a8_0)(uae_u32 opcode) /* AND.L (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0b0_0)(uae_u32 opcode) /* AND.L (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0b8_0)(uae_u32 opcode) /* AND.L (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0b9_0)(uae_u32 opcode) /* AND.L (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0ba_0)(uae_u32 opcode) /* AND.L (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0bb_0)(uae_u32 opcode) /* AND.L (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0bc_0)(uae_u32 opcode) /* AND.L #.L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0c0_0)(uae_u32 opcode) /* MULU.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0d0_0)(uae_u32 opcode) /* MULU.W (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0d8_0)(uae_u32 opcode) /* MULU.W (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0e0_0)(uae_u32 opcode) /* MULU.W -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0e8_0)(uae_u32 opcode) /* MULU.W (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0f0_0)(uae_u32 opcode) /* MULU.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0f8_0)(uae_u32 opcode) /* MULU.W (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0f9_0)(uae_u32 opcode) /* MULU.W (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0fa_0)(uae_u32 opcode) /* MULU.W (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0fb_0)(uae_u32 opcode) /* MULU.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0fc_0)(uae_u32 opcode) /* MULU.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c100_0)(uae_u32 opcode) /* ABCD.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{ uae_u16 newv_lo = (src & 0xF) + (dst & 0xF) + (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = (src & 0xF0) + (dst & 0xF0); - uae_u16 newv, tmp_newv; - int cflg; - newv = tmp_newv = newv_hi + newv_lo; - if (newv_lo > 9) { newv += 6; } - cflg = (newv & 0x3F0) > 0x90; - if (cflg) newv += 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c108_0)(uae_u32 opcode) /* ABCD.B -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; -{ uae_u16 newv_lo = (src & 0xF) + (dst & 0xF) + (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = (src & 0xF0) + (dst & 0xF0); - uae_u16 newv, tmp_newv; - int cflg; - newv = tmp_newv = newv_hi + newv_lo; - if (newv_lo > 9) { newv += 6; } - cflg = (newv & 0x3F0) > 0x90; - if (cflg) newv += 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - put_byte(dsta,newv); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c110_0)(uae_u32 opcode) /* AND.B Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c118_0)(uae_u32 opcode) /* AND.B Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c120_0)(uae_u32 opcode) /* AND.B Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c128_0)(uae_u32 opcode) /* AND.B Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c130_0)(uae_u32 opcode) /* AND.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c138_0)(uae_u32 opcode) /* AND.B Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c139_0)(uae_u32 opcode) /* AND.B Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s8 dst = get_byte(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_c140_0)(uae_u32 opcode) /* EXG.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - m68k_dreg(regs, srcreg) = (dst); - m68k_dreg(regs, dstreg) = (src); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_c148_0)(uae_u32 opcode) /* EXG.L An,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uae_s32 dst = m68k_areg(regs, dstreg); - m68k_areg(regs, srcreg) = (dst); - m68k_areg(regs, dstreg) = (src); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_c150_0)(uae_u32 opcode) /* AND.W Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c158_0)(uae_u32 opcode) /* AND.W Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c160_0)(uae_u32 opcode) /* AND.W Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c168_0)(uae_u32 opcode) /* AND.W Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 dst = get_word(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c170_0)(uae_u32 opcode) /* AND.W Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 dst = get_word(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c178_0)(uae_u32 opcode) /* AND.W Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 dst = get_word(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c179_0)(uae_u32 opcode) /* AND.W Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s16 dst = get_word(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_c188_0)(uae_u32 opcode) /* EXG.L Dn,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_areg(regs, dstreg); - m68k_dreg(regs, srcreg) = (dst); - m68k_areg(regs, dstreg) = (src); -}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_c190_0)(uae_u32 opcode) /* AND.L Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c198_0)(uae_u32 opcode) /* AND.L Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1a0_0)(uae_u32 opcode) /* AND.L Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1a8_0)(uae_u32 opcode) /* AND.L Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1b0_0)(uae_u32 opcode) /* AND.L Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1b8_0)(uae_u32 opcode) /* AND.L Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1b9_0)(uae_u32 opcode) /* AND.L Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s32 dst = get_long(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1c0_0)(uae_u32 opcode) /* MULS.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1d0_0)(uae_u32 opcode) /* MULS.W (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1d8_0)(uae_u32 opcode) /* MULS.W (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1e0_0)(uae_u32 opcode) /* MULS.W -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1e8_0)(uae_u32 opcode) /* MULS.W (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1f0_0)(uae_u32 opcode) /* MULS.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1f8_0)(uae_u32 opcode) /* MULS.W (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1f9_0)(uae_u32 opcode) /* MULS.W (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1fa_0)(uae_u32 opcode) /* MULS.W (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1fb_0)(uae_u32 opcode) /* MULS.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1fc_0)(uae_u32 opcode) /* MULS.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d000_0)(uae_u32 opcode) /* ADD.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d010_0)(uae_u32 opcode) /* ADD.B (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d018_0)(uae_u32 opcode) /* ADD.B (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d020_0)(uae_u32 opcode) /* ADD.B -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d028_0)(uae_u32 opcode) /* ADD.B (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d030_0)(uae_u32 opcode) /* ADD.B (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d038_0)(uae_u32 opcode) /* ADD.B (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d039_0)(uae_u32 opcode) /* ADD.B (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d03a_0)(uae_u32 opcode) /* ADD.B (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d03b_0)(uae_u32 opcode) /* ADD.B (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d03c_0)(uae_u32 opcode) /* ADD.B #.B,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d040_0)(uae_u32 opcode) /* ADD.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d048_0)(uae_u32 opcode) /* ADD.W An,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d050_0)(uae_u32 opcode) /* ADD.W (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d058_0)(uae_u32 opcode) /* ADD.W (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d060_0)(uae_u32 opcode) /* ADD.W -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d068_0)(uae_u32 opcode) /* ADD.W (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d070_0)(uae_u32 opcode) /* ADD.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d078_0)(uae_u32 opcode) /* ADD.W (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d079_0)(uae_u32 opcode) /* ADD.W (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d07a_0)(uae_u32 opcode) /* ADD.W (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d07b_0)(uae_u32 opcode) /* ADD.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d07c_0)(uae_u32 opcode) /* ADD.W #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d080_0)(uae_u32 opcode) /* ADD.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d088_0)(uae_u32 opcode) /* ADD.L An,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d090_0)(uae_u32 opcode) /* ADD.L (An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d098_0)(uae_u32 opcode) /* ADD.L (An)+,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d0a0_0)(uae_u32 opcode) /* ADD.L -(An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d0a8_0)(uae_u32 opcode) /* ADD.L (d16,An),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d0b0_0)(uae_u32 opcode) /* ADD.L (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d0b8_0)(uae_u32 opcode) /* ADD.L (xxx).W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d0b9_0)(uae_u32 opcode) /* ADD.L (xxx).L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d0ba_0)(uae_u32 opcode) /* ADD.L (d16,PC),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d0bb_0)(uae_u32 opcode) /* ADD.L (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d0bc_0)(uae_u32 opcode) /* ADD.L #.L,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}m68k_incpc(6); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d0c0_0)(uae_u32 opcode) /* ADDA.W Dn,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d0c8_0)(uae_u32 opcode) /* ADDA.W An,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d0d0_0)(uae_u32 opcode) /* ADDA.W (An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d0d8_0)(uae_u32 opcode) /* ADDA.W (An)+,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d0e0_0)(uae_u32 opcode) /* ADDA.W -(An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d0e8_0)(uae_u32 opcode) /* ADDA.W (d16,An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d0f0_0)(uae_u32 opcode) /* ADDA.W (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d0f8_0)(uae_u32 opcode) /* ADDA.W (xxx).W,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d0f9_0)(uae_u32 opcode) /* ADDA.W (xxx).L,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d0fa_0)(uae_u32 opcode) /* ADDA.W (d16,PC),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d0fb_0)(uae_u32 opcode) /* ADDA.W (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d0fc_0)(uae_u32 opcode) /* ADDA.W #.W,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_d100_0)(uae_u32 opcode) /* ADDX.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = dst + src + (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgo) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d108_0)(uae_u32 opcode) /* ADDX.B -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; -{ uae_u32 newv = dst + src + (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgo) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d110_0)(uae_u32 opcode) /* ADD.B Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d118_0)(uae_u32 opcode) /* ADD.B Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s8 dst = get_byte(dsta); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d120_0)(uae_u32 opcode) /* ADD.B Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d128_0)(uae_u32 opcode) /* ADD.B Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d130_0)(uae_u32 opcode) /* ADD.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d138_0)(uae_u32 opcode) /* ADD.B Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d139_0)(uae_u32 opcode) /* ADD.B Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d140_0)(uae_u32 opcode) /* ADDX.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = dst + src + (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgo) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); - SET_NFLG (((uae_s16)(newv)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d148_0)(uae_u32 opcode) /* ADDX.W -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; -{ uae_u32 newv = dst + src + (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgo) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); - SET_NFLG (((uae_s16)(newv)) < 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d150_0)(uae_u32 opcode) /* ADD.W Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d158_0)(uae_u32 opcode) /* ADD.W Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s16 dst = get_word(dsta); - m68k_areg(regs, dstreg) += 2; -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d160_0)(uae_u32 opcode) /* ADD.W Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; -{ uae_s16 dst = get_word(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d168_0)(uae_u32 opcode) /* ADD.W Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d170_0)(uae_u32 opcode) /* ADD.W Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d178_0)(uae_u32 opcode) /* ADD.W Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d179_0)(uae_u32 opcode) /* ADD.W Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d180_0)(uae_u32 opcode) /* ADDX.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = dst + src + (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgo) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d188_0)(uae_u32 opcode) /* ADDX.L -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; -{ uae_u32 newv = dst + src + (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgo) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); - SET_NFLG (((uae_s32)(newv)) < 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d190_0)(uae_u32 opcode) /* ADD.L Dn,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d198_0)(uae_u32 opcode) /* ADD.L Dn,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 dst = get_long(dsta); - m68k_areg(regs, dstreg) += 4; -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d1a0_0)(uae_u32 opcode) /* ADD.L Dn,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; -{ uae_s32 dst = get_long(dsta); - m68k_areg (regs, dstreg) = dsta; -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d1a8_0)(uae_u32 opcode) /* ADD.L Dn,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d1b0_0)(uae_u32 opcode) /* ADD.L Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{m68k_incpc(2); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d1b8_0)(uae_u32 opcode) /* ADD.L Dn,(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d1b9_0)(uae_u32 opcode) /* ADD.L Dn,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_ilong(2); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d1c0_0)(uae_u32 opcode) /* ADDA.L Dn,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d1c8_0)(uae_u32 opcode) /* ADDA.L An,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d1d0_0)(uae_u32 opcode) /* ADDA.L (An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d1d8_0)(uae_u32 opcode) /* ADDA.L (An)+,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#endif - -#ifdef PART_8 -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d1e0_0)(uae_u32 opcode) /* ADDA.L -(An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d1e8_0)(uae_u32 opcode) /* ADDA.L (d16,An),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d1f0_0)(uae_u32 opcode) /* ADDA.L (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d1f8_0)(uae_u32 opcode) /* ADDA.L (xxx).W,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d1f9_0)(uae_u32 opcode) /* ADDA.L (xxx).L,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d1fa_0)(uae_u32 opcode) /* ADDA.L (d16,PC),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d1fb_0)(uae_u32 opcode) /* ADDA.L (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{m68k_incpc(2); -{ uaecptr tmppc = m68k_getpc(); - uaecptr srca = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d1fc_0)(uae_u32 opcode) /* ADDA.L #.L,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_e000_0)(uae_u32 opcode) /* ASR.B #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - uae_u32 sign = (0x80 & val) >> 7; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 8) { - val = 0xff & (uae_u32)-(uae_s32)sign; - SET_CFLG (sign); - COPY_CARRY; - } else { - val >>= cnt - 1; - SET_CFLG (val & 1); - COPY_CARRY; - val >>= 1; - val |= (0xff << (8 - cnt)) & (uae_u32)-(uae_s32)sign; - val &= 0xff; - } - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e008_0)(uae_u32 opcode) /* LSR.B #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 8) { - SET_CFLG ((cnt == 8) & (val >> 7)); - COPY_CARRY; - val = 0; - } else { - val >>= cnt - 1; - SET_CFLG (val & 1); - COPY_CARRY; - val >>= 1; - } - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e010_0)(uae_u32 opcode) /* ROXR.B #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - cnt &= 63; - CLEAR_CZNV; -{ cnt--; - { - uae_u32 carry; - uae_u32 hival = (val << 1) | GET_XFLG; - hival <<= (7 - cnt); - val >>= cnt; - carry = val & 1; - val >>= 1; - val |= hival; - SET_XFLG (carry); - val &= 0xff; - } } - SET_CFLG (GET_XFLG); - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e018_0)(uae_u32 opcode) /* ROR.B #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - cnt &= 63; - CLEAR_CZNV; -{ uae_u32 hival; - cnt &= 7; - hival = val << (8 - cnt); - val >>= cnt; - val |= hival; - val &= 0xff; - SET_CFLG ((val & 0x80) >> 7); - } - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e020_0)(uae_u32 opcode) /* ASR.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 cnt = m68k_dreg(regs, srcreg); -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - uae_u32 sign = (0x80 & val) >> 7; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 8) { - val = 0xff & (uae_u32)-(uae_s32)sign; - SET_CFLG (sign); - COPY_CARRY; - } else if (cnt > 0) { - val >>= cnt - 1; - SET_CFLG (val & 1); - COPY_CARRY; - val >>= 1; - val |= (0xff << (8 - cnt)) & (uae_u32)-(uae_s32)sign; - val &= 0xff; - } - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e028_0)(uae_u32 opcode) /* LSR.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 cnt = m68k_dreg(regs, srcreg); -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 8) { - SET_CFLG ((cnt == 8) & (val >> 7)); - COPY_CARRY; - val = 0; - } else if (cnt > 0) { - val >>= cnt - 1; - SET_CFLG (val & 1); - COPY_CARRY; - val >>= 1; - } - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e030_0)(uae_u32 opcode) /* ROXR.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 cnt = m68k_dreg(regs, srcreg); -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 36) cnt -= 36; - if (cnt >= 18) cnt -= 18; - if (cnt >= 9) cnt -= 9; - if (cnt > 0) { - cnt--; - { - uae_u32 carry; - uae_u32 hival = (val << 1) | GET_XFLG; - hival <<= (7 - cnt); - val >>= cnt; - carry = val & 1; - val >>= 1; - val |= hival; - SET_XFLG (carry); - val &= 0xff; - } } - SET_CFLG (GET_XFLG); - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e038_0)(uae_u32 opcode) /* ROR.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 cnt = m68k_dreg(regs, srcreg); -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt > 0) { uae_u32 hival; - cnt &= 7; - hival = val << (8 - cnt); - val >>= cnt; - val |= hival; - val &= 0xff; - SET_CFLG ((val & 0x80) >> 7); - } - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e040_0)(uae_u32 opcode) /* ASR.W #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = (0x8000 & val) >> 15; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 16) { - val = 0xffff & (uae_u32)-(uae_s32)sign; - SET_CFLG (sign); - COPY_CARRY; - } else { - val >>= cnt - 1; - SET_CFLG (val & 1); - COPY_CARRY; - val >>= 1; - val |= (0xffff << (16 - cnt)) & (uae_u32)-(uae_s32)sign; - val &= 0xffff; - } - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e048_0)(uae_u32 opcode) /* LSR.W #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 16) { - SET_CFLG ((cnt == 16) & (val >> 15)); - COPY_CARRY; - val = 0; - } else { - val >>= cnt - 1; - SET_CFLG (val & 1); - COPY_CARRY; - val >>= 1; - } - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e050_0)(uae_u32 opcode) /* ROXR.W #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - cnt &= 63; - CLEAR_CZNV; -{ cnt--; - { - uae_u32 carry; - uae_u32 hival = (val << 1) | GET_XFLG; - hival <<= (15 - cnt); - val >>= cnt; - carry = val & 1; - val >>= 1; - val |= hival; - SET_XFLG (carry); - val &= 0xffff; - } } - SET_CFLG (GET_XFLG); - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e058_0)(uae_u32 opcode) /* ROR.W #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - cnt &= 63; - CLEAR_CZNV; -{ uae_u32 hival; - cnt &= 15; - hival = val << (16 - cnt); - val >>= cnt; - val |= hival; - val &= 0xffff; - SET_CFLG ((val & 0x8000) >> 15); - } - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e060_0)(uae_u32 opcode) /* ASR.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 cnt = m68k_dreg(regs, srcreg); -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = (0x8000 & val) >> 15; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 16) { - val = 0xffff & (uae_u32)-(uae_s32)sign; - SET_CFLG (sign); - COPY_CARRY; - } else if (cnt > 0) { - val >>= cnt - 1; - SET_CFLG (val & 1); - COPY_CARRY; - val >>= 1; - val |= (0xffff << (16 - cnt)) & (uae_u32)-(uae_s32)sign; - val &= 0xffff; - } - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e068_0)(uae_u32 opcode) /* LSR.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 cnt = m68k_dreg(regs, srcreg); -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 16) { - SET_CFLG ((cnt == 16) & (val >> 15)); - COPY_CARRY; - val = 0; - } else if (cnt > 0) { - val >>= cnt - 1; - SET_CFLG (val & 1); - COPY_CARRY; - val >>= 1; - } - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e070_0)(uae_u32 opcode) /* ROXR.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 cnt = m68k_dreg(regs, srcreg); -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 34) cnt -= 34; - if (cnt >= 17) cnt -= 17; - if (cnt > 0) { - cnt--; - { - uae_u32 carry; - uae_u32 hival = (val << 1) | GET_XFLG; - hival <<= (15 - cnt); - val >>= cnt; - carry = val & 1; - val >>= 1; - val |= hival; - SET_XFLG (carry); - val &= 0xffff; - } } - SET_CFLG (GET_XFLG); - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e078_0)(uae_u32 opcode) /* ROR.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 cnt = m68k_dreg(regs, srcreg); -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt > 0) { uae_u32 hival; - cnt &= 15; - hival = val << (16 - cnt); - val >>= cnt; - val |= hival; - val &= 0xffff; - SET_CFLG ((val & 0x8000) >> 15); - } - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e080_0)(uae_u32 opcode) /* ASR.L #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - uae_u32 sign = (0x80000000 & val) >> 31; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 32) { - val = 0xffffffff & (uae_u32)-(uae_s32)sign; - SET_CFLG (sign); - COPY_CARRY; - } else { - val >>= cnt - 1; - SET_CFLG (val & 1); - COPY_CARRY; - val >>= 1; - val |= (0xffffffff << (32 - cnt)) & (uae_u32)-(uae_s32)sign; - val &= 0xffffffff; - } - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e088_0)(uae_u32 opcode) /* LSR.L #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 32) { - SET_CFLG ((cnt == 32) & (val >> 31)); - COPY_CARRY; - val = 0; - } else { - val >>= cnt - 1; - SET_CFLG (val & 1); - COPY_CARRY; - val >>= 1; - } - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e090_0)(uae_u32 opcode) /* ROXR.L #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - cnt &= 63; - CLEAR_CZNV; -{ cnt--; - { - uae_u32 carry; - uae_u32 hival = (val << 1) | GET_XFLG; - hival <<= (31 - cnt); - val >>= cnt; - carry = val & 1; - val >>= 1; - val |= hival; - SET_XFLG (carry); - val &= 0xffffffff; - } } - SET_CFLG (GET_XFLG); - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e098_0)(uae_u32 opcode) /* ROR.L #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - cnt &= 63; - CLEAR_CZNV; -{ uae_u32 hival; - cnt &= 31; - hival = val << (32 - cnt); - val >>= cnt; - val |= hival; - val &= 0xffffffff; - SET_CFLG ((val & 0x80000000) >> 31); - } - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e0a0_0)(uae_u32 opcode) /* ASR.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 cnt = m68k_dreg(regs, srcreg); -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - uae_u32 sign = (0x80000000 & val) >> 31; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 32) { - val = 0xffffffff & (uae_u32)-(uae_s32)sign; - SET_CFLG (sign); - COPY_CARRY; - } else if (cnt > 0) { - val >>= cnt - 1; - SET_CFLG (val & 1); - COPY_CARRY; - val >>= 1; - val |= (0xffffffff << (32 - cnt)) & (uae_u32)-(uae_s32)sign; - val &= 0xffffffff; - } - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e0a8_0)(uae_u32 opcode) /* LSR.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 cnt = m68k_dreg(regs, srcreg); -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 32) { - SET_CFLG ((cnt == 32) & (val >> 31)); - COPY_CARRY; - val = 0; - } else if (cnt > 0) { - val >>= cnt - 1; - SET_CFLG (val & 1); - COPY_CARRY; - val >>= 1; - } - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e0b0_0)(uae_u32 opcode) /* ROXR.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 cnt = m68k_dreg(regs, srcreg); -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 33) cnt -= 33; - if (cnt > 0) { - cnt--; - { - uae_u32 carry; - uae_u32 hival = (val << 1) | GET_XFLG; - hival <<= (31 - cnt); - val >>= cnt; - carry = val & 1; - val >>= 1; - val |= hival; - SET_XFLG (carry); - val &= 0xffffffff; - } } - SET_CFLG (GET_XFLG); - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e0b8_0)(uae_u32 opcode) /* ROR.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 cnt = m68k_dreg(regs, srcreg); -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - cnt &= 63; - CLEAR_CZNV; - if (cnt > 0) { uae_u32 hival; - cnt &= 31; - hival = val << (32 - cnt); - val >>= cnt; - val |= hival; - val &= 0xffffffff; - SET_CFLG ((val & 0x80000000) >> 31); - } - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e0d0_0)(uae_u32 opcode) /* ASRW.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 cflg = val & 1; - val = (val >> 1) | sign; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - SET_CFLG (cflg); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e0d8_0)(uae_u32 opcode) /* ASRW.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); - m68k_areg(regs, srcreg) += 2; -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 cflg = val & 1; - val = (val >> 1) | sign; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - SET_CFLG (cflg); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e0e0_0)(uae_u32 opcode) /* ASRW.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; -{ uae_s16 data = get_word(dataa); - m68k_areg (regs, srcreg) = dataa; -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 cflg = val & 1; - val = (val >> 1) | sign; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - SET_CFLG (cflg); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e0e8_0)(uae_u32 opcode) /* ASRW.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 cflg = val & 1; - val = (val >> 1) | sign; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - SET_CFLG (cflg); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e0f0_0)(uae_u32 opcode) /* ASRW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 cflg = val & 1; - val = (val >> 1) | sign; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - SET_CFLG (cflg); - COPY_CARRY; - put_word(dataa,val); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e0f8_0)(uae_u32 opcode) /* ASRW.W (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 cflg = val & 1; - val = (val >> 1) | sign; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - SET_CFLG (cflg); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e0f9_0)(uae_u32 opcode) /* ASRW.W (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr dataa = get_ilong(2); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 cflg = val & 1; - val = (val >> 1) | sign; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - SET_CFLG (cflg); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e100_0)(uae_u32 opcode) /* ASL.B #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 8) { - SET_VFLG (val != 0); - SET_CFLG (cnt == 8 ? val & 1 : 0); - COPY_CARRY; - val = 0; - } else { - uae_u32 mask = (0xff << (7 - cnt)) & 0xff; - SET_VFLG ((val & mask) != mask && (val & mask) != 0); - val <<= cnt - 1; - SET_CFLG ((val & 0x80) >> 7); - COPY_CARRY; - val <<= 1; - val &= 0xff; - } - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e108_0)(uae_u32 opcode) /* LSL.B #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 8) { - SET_CFLG (cnt == 8 ? val & 1 : 0); - COPY_CARRY; - val = 0; - } else { - val <<= (cnt - 1); - SET_CFLG ((val & 0x80) >> 7); - COPY_CARRY; - val <<= 1; - val &= 0xff; - } - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e110_0)(uae_u32 opcode) /* ROXL.B #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - cnt &= 63; - CLEAR_CZNV; -{ cnt--; - { - uae_u32 carry; - uae_u32 loval = val >> (7 - cnt); - carry = loval & 1; - val = (((val << 1) | GET_XFLG) << cnt) | (loval >> 1); - SET_XFLG (carry); - val &= 0xff; - } } - SET_CFLG (GET_XFLG); - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e118_0)(uae_u32 opcode) /* ROL.B #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - cnt &= 63; - CLEAR_CZNV; -{ uae_u32 loval; - cnt &= 7; - loval = val >> (8 - cnt); - val <<= cnt; - val |= loval; - val &= 0xff; - SET_CFLG (val & 1); -} - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e120_0)(uae_u32 opcode) /* ASL.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 cnt = m68k_dreg(regs, srcreg); -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 8) { - SET_VFLG (val != 0); - SET_CFLG (cnt == 8 ? val & 1 : 0); - COPY_CARRY; - val = 0; - } else if (cnt > 0) { - uae_u32 mask = (0xff << (7 - cnt)) & 0xff; - SET_VFLG ((val & mask) != mask && (val & mask) != 0); - val <<= cnt - 1; - SET_CFLG ((val & 0x80) >> 7); - COPY_CARRY; - val <<= 1; - val &= 0xff; - } - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e128_0)(uae_u32 opcode) /* LSL.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 cnt = m68k_dreg(regs, srcreg); -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 8) { - SET_CFLG (cnt == 8 ? val & 1 : 0); - COPY_CARRY; - val = 0; - } else if (cnt > 0) { - val <<= (cnt - 1); - SET_CFLG ((val & 0x80) >> 7); - COPY_CARRY; - val <<= 1; - val &= 0xff; - } - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e130_0)(uae_u32 opcode) /* ROXL.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 cnt = m68k_dreg(regs, srcreg); -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 36) cnt -= 36; - if (cnt >= 18) cnt -= 18; - if (cnt >= 9) cnt -= 9; - if (cnt > 0) { - cnt--; - { - uae_u32 carry; - uae_u32 loval = val >> (7 - cnt); - carry = loval & 1; - val = (((val << 1) | GET_XFLG) << cnt) | (loval >> 1); - SET_XFLG (carry); - val &= 0xff; - } } - SET_CFLG (GET_XFLG); - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e138_0)(uae_u32 opcode) /* ROL.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 cnt = m68k_dreg(regs, srcreg); -{ uae_s8 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u8)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt > 0) { - uae_u32 loval; - cnt &= 7; - loval = val >> (8 - cnt); - val <<= cnt; - val |= loval; - val &= 0xff; - SET_CFLG (val & 1); -} - SET_ZFLG (((uae_s8)(val)) == 0); - SET_NFLG (((uae_s8)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((val) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e140_0)(uae_u32 opcode) /* ASL.W #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 16) { - SET_VFLG (val != 0); - SET_CFLG (cnt == 16 ? val & 1 : 0); - COPY_CARRY; - val = 0; - } else { - uae_u32 mask = (0xffff << (15 - cnt)) & 0xffff; - SET_VFLG ((val & mask) != mask && (val & mask) != 0); - val <<= cnt - 1; - SET_CFLG ((val & 0x8000) >> 15); - COPY_CARRY; - val <<= 1; - val &= 0xffff; - } - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e148_0)(uae_u32 opcode) /* LSL.W #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 16) { - SET_CFLG (cnt == 16 ? val & 1 : 0); - COPY_CARRY; - val = 0; - } else { - val <<= (cnt - 1); - SET_CFLG ((val & 0x8000) >> 15); - COPY_CARRY; - val <<= 1; - val &= 0xffff; - } - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e150_0)(uae_u32 opcode) /* ROXL.W #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - cnt &= 63; - CLEAR_CZNV; -{ cnt--; - { - uae_u32 carry; - uae_u32 loval = val >> (15 - cnt); - carry = loval & 1; - val = (((val << 1) | GET_XFLG) << cnt) | (loval >> 1); - SET_XFLG (carry); - val &= 0xffff; - } } - SET_CFLG (GET_XFLG); - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e158_0)(uae_u32 opcode) /* ROL.W #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - cnt &= 63; - CLEAR_CZNV; -{ uae_u32 loval; - cnt &= 15; - loval = val >> (16 - cnt); - val <<= cnt; - val |= loval; - val &= 0xffff; - SET_CFLG (val & 1); -} - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e160_0)(uae_u32 opcode) /* ASL.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 cnt = m68k_dreg(regs, srcreg); -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 16) { - SET_VFLG (val != 0); - SET_CFLG (cnt == 16 ? val & 1 : 0); - COPY_CARRY; - val = 0; - } else if (cnt > 0) { - uae_u32 mask = (0xffff << (15 - cnt)) & 0xffff; - SET_VFLG ((val & mask) != mask && (val & mask) != 0); - val <<= cnt - 1; - SET_CFLG ((val & 0x8000) >> 15); - COPY_CARRY; - val <<= 1; - val &= 0xffff; - } - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e168_0)(uae_u32 opcode) /* LSL.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 cnt = m68k_dreg(regs, srcreg); -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 16) { - SET_CFLG (cnt == 16 ? val & 1 : 0); - COPY_CARRY; - val = 0; - } else if (cnt > 0) { - val <<= (cnt - 1); - SET_CFLG ((val & 0x8000) >> 15); - COPY_CARRY; - val <<= 1; - val &= 0xffff; - } - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e170_0)(uae_u32 opcode) /* ROXL.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 cnt = m68k_dreg(regs, srcreg); -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 34) cnt -= 34; - if (cnt >= 17) cnt -= 17; - if (cnt > 0) { - cnt--; - { - uae_u32 carry; - uae_u32 loval = val >> (15 - cnt); - carry = loval & 1; - val = (((val << 1) | GET_XFLG) << cnt) | (loval >> 1); - SET_XFLG (carry); - val &= 0xffff; - } } - SET_CFLG (GET_XFLG); - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e178_0)(uae_u32 opcode) /* ROL.W Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 cnt = m68k_dreg(regs, srcreg); -{ uae_s16 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = (uae_u16)data; - cnt &= 63; - CLEAR_CZNV; - if (cnt > 0) { - uae_u32 loval; - cnt &= 15; - loval = val >> (16 - cnt); - val <<= cnt; - val |= loval; - val &= 0xffff; - SET_CFLG (val & 1); -} - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((val) & 0xffff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e180_0)(uae_u32 opcode) /* ASL.L #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 32) { - SET_VFLG (val != 0); - SET_CFLG (cnt == 32 ? val & 1 : 0); - COPY_CARRY; - val = 0; - } else { - uae_u32 mask = (0xffffffff << (31 - cnt)) & 0xffffffff; - SET_VFLG ((val & mask) != mask && (val & mask) != 0); - val <<= cnt - 1; - SET_CFLG ((val & 0x80000000) >> 31); - COPY_CARRY; - val <<= 1; - val &= 0xffffffff; - } - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e188_0)(uae_u32 opcode) /* LSL.L #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 32) { - SET_CFLG (cnt == 32 ? val & 1 : 0); - COPY_CARRY; - val = 0; - } else { - val <<= (cnt - 1); - SET_CFLG ((val & 0x80000000) >> 31); - COPY_CARRY; - val <<= 1; - val &= 0xffffffff; - } - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e190_0)(uae_u32 opcode) /* ROXL.L #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - cnt &= 63; - CLEAR_CZNV; -{ cnt--; - { - uae_u32 carry; - uae_u32 loval = val >> (31 - cnt); - carry = loval & 1; - val = (((val << 1) | GET_XFLG) << cnt) | (loval >> 1); - SET_XFLG (carry); - val &= 0xffffffff; - } } - SET_CFLG (GET_XFLG); - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e198_0)(uae_u32 opcode) /* ROL.L #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 cnt = srcreg; -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - cnt &= 63; - CLEAR_CZNV; -{ uae_u32 loval; - cnt &= 31; - loval = val >> (32 - cnt); - val <<= cnt; - val |= loval; - val &= 0xffffffff; - SET_CFLG (val & 1); -} - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e1a0_0)(uae_u32 opcode) /* ASL.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 cnt = m68k_dreg(regs, srcreg); -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 32) { - SET_VFLG (val != 0); - SET_CFLG (cnt == 32 ? val & 1 : 0); - COPY_CARRY; - val = 0; - } else if (cnt > 0) { - uae_u32 mask = (0xffffffff << (31 - cnt)) & 0xffffffff; - SET_VFLG ((val & mask) != mask && (val & mask) != 0); - val <<= cnt - 1; - SET_CFLG ((val & 0x80000000) >> 31); - COPY_CARRY; - val <<= 1; - val &= 0xffffffff; - } - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e1a8_0)(uae_u32 opcode) /* LSL.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 cnt = m68k_dreg(regs, srcreg); -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 32) { - SET_CFLG (cnt == 32 ? val & 1 : 0); - COPY_CARRY; - val = 0; - } else if (cnt > 0) { - val <<= (cnt - 1); - SET_CFLG ((val & 0x80000000) >> 31); - COPY_CARRY; - val <<= 1; - val &= 0xffffffff; - } - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e1b0_0)(uae_u32 opcode) /* ROXL.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 cnt = m68k_dreg(regs, srcreg); -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - cnt &= 63; - CLEAR_CZNV; - if (cnt >= 33) cnt -= 33; - if (cnt > 0) { - cnt--; - { - uae_u32 carry; - uae_u32 loval = val >> (31 - cnt); - carry = loval & 1; - val = (((val << 1) | GET_XFLG) << cnt) | (loval >> 1); - SET_XFLG (carry); - val &= 0xffffffff; - } } - SET_CFLG (GET_XFLG); - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e1b8_0)(uae_u32 opcode) /* ROL.L Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 cnt = m68k_dreg(regs, srcreg); -{ uae_s32 data = m68k_dreg(regs, dstreg); -{ uae_u32 val = data; - cnt &= 63; - CLEAR_CZNV; - if (cnt > 0) { - uae_u32 loval; - cnt &= 31; - loval = val >> (32 - cnt); - val <<= cnt; - val |= loval; - val &= 0xffffffff; - SET_CFLG (val & 1); -} - SET_ZFLG (((uae_s32)(val)) == 0); - SET_NFLG (((uae_s32)(val)) < 0); - m68k_dreg(regs, dstreg) = (val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e1d0_0)(uae_u32 opcode) /* ASLW.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 sign2; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - sign2 = 0x8000 & val; - SET_CFLG (sign != 0); - COPY_CARRY; - SET_VFLG (GET_VFLG | (sign2 != sign)); - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e1d8_0)(uae_u32 opcode) /* ASLW.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); - m68k_areg(regs, srcreg) += 2; -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 sign2; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - sign2 = 0x8000 & val; - SET_CFLG (sign != 0); - COPY_CARRY; - SET_VFLG (GET_VFLG | (sign2 != sign)); - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e1e0_0)(uae_u32 opcode) /* ASLW.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; -{ uae_s16 data = get_word(dataa); - m68k_areg (regs, srcreg) = dataa; -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 sign2; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - sign2 = 0x8000 & val; - SET_CFLG (sign != 0); - COPY_CARRY; - SET_VFLG (GET_VFLG | (sign2 != sign)); - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e1e8_0)(uae_u32 opcode) /* ASLW.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 sign2; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - sign2 = 0x8000 & val; - SET_CFLG (sign != 0); - COPY_CARRY; - SET_VFLG (GET_VFLG | (sign2 != sign)); - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e1f0_0)(uae_u32 opcode) /* ASLW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 sign2; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - sign2 = 0x8000 & val; - SET_CFLG (sign != 0); - COPY_CARRY; - SET_VFLG (GET_VFLG | (sign2 != sign)); - put_word(dataa,val); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e1f8_0)(uae_u32 opcode) /* ASLW.W (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 sign2; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - sign2 = 0x8000 & val; - SET_CFLG (sign != 0); - COPY_CARRY; - SET_VFLG (GET_VFLG | (sign2 != sign)); - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e1f9_0)(uae_u32 opcode) /* ASLW.W (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr dataa = get_ilong(2); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 sign2; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - sign2 = 0x8000 & val; - SET_CFLG (sign != 0); - COPY_CARRY; - SET_VFLG (GET_VFLG | (sign2 != sign)); - put_word(dataa,val); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e2d0_0)(uae_u32 opcode) /* LSRW.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 carry = val & 1; - val >>= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e2d8_0)(uae_u32 opcode) /* LSRW.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); - m68k_areg(regs, srcreg) += 2; -{ uae_u32 val = (uae_u16)data; - uae_u32 carry = val & 1; - val >>= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e2e0_0)(uae_u32 opcode) /* LSRW.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; -{ uae_s16 data = get_word(dataa); - m68k_areg (regs, srcreg) = dataa; -{ uae_u32 val = (uae_u16)data; - uae_u32 carry = val & 1; - val >>= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e2e8_0)(uae_u32 opcode) /* LSRW.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 carry = val & 1; - val >>= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e2f0_0)(uae_u32 opcode) /* LSRW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 carry = val & 1; - val >>= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e2f8_0)(uae_u32 opcode) /* LSRW.W (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 carry = val & 1; - val >>= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e2f9_0)(uae_u32 opcode) /* LSRW.W (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr dataa = get_ilong(2); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 carry = val & 1; - val >>= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e3d0_0)(uae_u32 opcode) /* LSLW.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e3d8_0)(uae_u32 opcode) /* LSLW.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); - m68k_areg(regs, srcreg) += 2; -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e3e0_0)(uae_u32 opcode) /* LSLW.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; -{ uae_s16 data = get_word(dataa); - m68k_areg (regs, srcreg) = dataa; -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e3e8_0)(uae_u32 opcode) /* LSLW.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e3f0_0)(uae_u32 opcode) /* LSLW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e3f8_0)(uae_u32 opcode) /* LSLW.W (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e3f9_0)(uae_u32 opcode) /* LSLW.W (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr dataa = get_ilong(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e4d0_0)(uae_u32 opcode) /* ROXRW.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (GET_XFLG) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e4d8_0)(uae_u32 opcode) /* ROXRW.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); - m68k_areg(regs, srcreg) += 2; -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (GET_XFLG) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e4e0_0)(uae_u32 opcode) /* ROXRW.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; -{ uae_s16 data = get_word(dataa); - m68k_areg (regs, srcreg) = dataa; -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (GET_XFLG) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e4e8_0)(uae_u32 opcode) /* ROXRW.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (GET_XFLG) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e4f0_0)(uae_u32 opcode) /* ROXRW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (GET_XFLG) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e4f8_0)(uae_u32 opcode) /* ROXRW.W (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (GET_XFLG) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e4f9_0)(uae_u32 opcode) /* ROXRW.W (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr dataa = get_ilong(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (GET_XFLG) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e5d0_0)(uae_u32 opcode) /* ROXLW.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (GET_XFLG) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e5d8_0)(uae_u32 opcode) /* ROXLW.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); - m68k_areg(regs, srcreg) += 2; -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (GET_XFLG) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e5e0_0)(uae_u32 opcode) /* ROXLW.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; -{ uae_s16 data = get_word(dataa); - m68k_areg (regs, srcreg) = dataa; -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (GET_XFLG) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e5e8_0)(uae_u32 opcode) /* ROXLW.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (GET_XFLG) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e5f0_0)(uae_u32 opcode) /* ROXLW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (GET_XFLG) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e5f8_0)(uae_u32 opcode) /* ROXLW.W (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (GET_XFLG) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e5f9_0)(uae_u32 opcode) /* ROXLW.W (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr dataa = get_ilong(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (GET_XFLG) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e6d0_0)(uae_u32 opcode) /* RORW.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (carry) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e6d8_0)(uae_u32 opcode) /* RORW.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); - m68k_areg(regs, srcreg) += 2; -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (carry) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e6e0_0)(uae_u32 opcode) /* RORW.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; -{ uae_s16 data = get_word(dataa); - m68k_areg (regs, srcreg) = dataa; -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (carry) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e6e8_0)(uae_u32 opcode) /* RORW.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (carry) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e6f0_0)(uae_u32 opcode) /* RORW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (carry) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - put_word(dataa,val); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e6f8_0)(uae_u32 opcode) /* RORW.W (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (carry) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e6f9_0)(uae_u32 opcode) /* RORW.W (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr dataa = get_ilong(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (carry) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - put_word(dataa,val); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e7d0_0)(uae_u32 opcode) /* ROLW.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (carry) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e7d8_0)(uae_u32 opcode) /* ROLW.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg); -{ uae_s16 data = get_word(dataa); - m68k_areg(regs, srcreg) += 2; -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (carry) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e7e0_0)(uae_u32 opcode) /* ROLW.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) - 2; -{ uae_s16 data = get_word(dataa); - m68k_areg (regs, srcreg) = dataa; -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (carry) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - put_word(dataa,val); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e7e8_0)(uae_u32 opcode) /* ROLW.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (carry) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e7f0_0)(uae_u32 opcode) /* ROLW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr dataa = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (carry) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - put_word(dataa,val); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e7f8_0)(uae_u32 opcode) /* ROLW.W (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr dataa = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (carry) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e7f9_0)(uae_u32 opcode) /* ROLW.W (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr dataa = get_ilong(2); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (carry) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - put_word(dataa,val); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e8c0_0)(uae_u32 opcode) /* BFTST.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e8d0_0)(uae_u32 opcode) /* BFTST.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e8e8_0)(uae_u32 opcode) /* BFTST.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e8f0_0)(uae_u32 opcode) /* BFTST.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e8f8_0)(uae_u32 opcode) /* BFTST.L #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e8f9_0)(uae_u32 opcode) /* BFTST.L #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e8fa_0)(uae_u32 opcode) /* BFTST.L #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_getpc () + 4; - dsta += (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e8fb_0)(uae_u32 opcode) /* BFTST.L #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e9c0_0)(uae_u32 opcode) /* BFEXTU.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e9d0_0)(uae_u32 opcode) /* BFEXTU.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e9e8_0)(uae_u32 opcode) /* BFEXTU.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e9f0_0)(uae_u32 opcode) /* BFEXTU.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e9f8_0)(uae_u32 opcode) /* BFEXTU.L #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e9f9_0)(uae_u32 opcode) /* BFEXTU.L #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e9fa_0)(uae_u32 opcode) /* BFEXTU.L #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_getpc () + 4; - dsta += (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e9fb_0)(uae_u32 opcode) /* BFEXTU.L #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_eac0_0)(uae_u32 opcode) /* BFCHG.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = ~tmp; - tmp <<= (32 - width); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ((offset & 0x1f) == 0 ? 0 : - (0xffffffff << (32 - (offset & 0x1f))))) | - (tmp >> (offset & 0x1f)) | - (((offset & 0x1f) + width) >= 32 ? 0 : - (m68k_dreg(regs, dstreg) & ((uae_u32)0xffffffff >> ((offset & 0x1f) + width)))); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ead0_0)(uae_u32 opcode) /* BFCHG.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = ~tmp; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_eae8_0)(uae_u32 opcode) /* BFCHG.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = ~tmp; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_eaf0_0)(uae_u32 opcode) /* BFCHG.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = ~tmp; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_eaf8_0)(uae_u32 opcode) /* BFCHG.L #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = ~tmp; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_eaf9_0)(uae_u32 opcode) /* BFCHG.L #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = ~tmp; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ebc0_0)(uae_u32 opcode) /* BFEXTS.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ebd0_0)(uae_u32 opcode) /* BFEXTS.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ebe8_0)(uae_u32 opcode) /* BFEXTS.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ebf0_0)(uae_u32 opcode) /* BFEXTS.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ebf8_0)(uae_u32 opcode) /* BFEXTS.L #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ebf9_0)(uae_u32 opcode) /* BFEXTS.L #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ebfa_0)(uae_u32 opcode) /* BFEXTS.L #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_getpc () + 4; - dsta += (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ebfb_0)(uae_u32 opcode) /* BFEXTS.L #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - if (GET_NFLG) tmp |= width == 32 ? 0 : (-1 << width); - m68k_dreg(regs, (extra >> 12) & 7) = tmp; -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ecc0_0)(uae_u32 opcode) /* BFCLR.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = 0; - tmp <<= (32 - width); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ((offset & 0x1f) == 0 ? 0 : - (0xffffffff << (32 - (offset & 0x1f))))) | - (tmp >> (offset & 0x1f)) | - (((offset & 0x1f) + width) >= 32 ? 0 : - (m68k_dreg(regs, dstreg) & ((uae_u32)0xffffffff >> ((offset & 0x1f) + width)))); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ecd0_0)(uae_u32 opcode) /* BFCLR.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = 0; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ece8_0)(uae_u32 opcode) /* BFCLR.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = 0; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ecf0_0)(uae_u32 opcode) /* BFCLR.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = 0; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ecf8_0)(uae_u32 opcode) /* BFCLR.L #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = 0; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ecf9_0)(uae_u32 opcode) /* BFCLR.L #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = 0; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_edc0_0)(uae_u32 opcode) /* BFFFO.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - { uae_u32 mask = 1 << (width-1); - while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} - m68k_dreg(regs, (extra >> 12) & 7) = offset; -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_edd0_0)(uae_u32 opcode) /* BFFFO.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - { uae_u32 mask = 1 << (width-1); - while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} - m68k_dreg(regs, (extra >> 12) & 7) = offset; -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_ede8_0)(uae_u32 opcode) /* BFFFO.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - { uae_u32 mask = 1 << (width-1); - while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} - m68k_dreg(regs, (extra >> 12) & 7) = offset; -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_edf0_0)(uae_u32 opcode) /* BFFFO.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - { uae_u32 mask = 1 << (width-1); - while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} - m68k_dreg(regs, (extra >> 12) & 7) = offset; -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_edf8_0)(uae_u32 opcode) /* BFFFO.L #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - { uae_u32 mask = 1 << (width-1); - while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} - m68k_dreg(regs, (extra >> 12) & 7) = offset; -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_edf9_0)(uae_u32 opcode) /* BFFFO.L #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - { uae_u32 mask = 1 << (width-1); - while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} - m68k_dreg(regs, (extra >> 12) & 7) = offset; -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_edfa_0)(uae_u32 opcode) /* BFFFO.L #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_getpc () + 4; - dsta += (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - { uae_u32 mask = 1 << (width-1); - while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} - m68k_dreg(regs, (extra >> 12) & 7) = offset; -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_edfb_0)(uae_u32 opcode) /* BFFFO.L #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr tmppc = m68k_getpc(); - uaecptr dsta = get_disp_ea_020(tmppc, next_iword()); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - { uae_u32 mask = 1 << (width-1); - while (mask) { if (tmp & mask) break; mask >>= 1; offset++; }} - m68k_dreg(regs, (extra >> 12) & 7) = offset; -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_eec0_0)(uae_u32 opcode) /* BFSET.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = 0xffffffff; - tmp <<= (32 - width); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ((offset & 0x1f) == 0 ? 0 : - (0xffffffff << (32 - (offset & 0x1f))))) | - (tmp >> (offset & 0x1f)) | - (((offset & 0x1f) + width) >= 32 ? 0 : - (m68k_dreg(regs, dstreg) & ((uae_u32)0xffffffff >> ((offset & 0x1f) + width)))); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_eed0_0)(uae_u32 opcode) /* BFSET.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = 0xffffffff; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_eee8_0)(uae_u32 opcode) /* BFSET.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = 0xffffffff; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_eef0_0)(uae_u32 opcode) /* BFSET.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = 0xffffffff; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_eef8_0)(uae_u32 opcode) /* BFSET.L #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = 0xffffffff; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_eef9_0)(uae_u32 opcode) /* BFSET.L #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = 0xffffffff; - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_efc0_0)(uae_u32 opcode) /* BFINS.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = m68k_dreg(regs, (extra >> 12) & 7); - SET_NFLG_ALWAYS (tmp & (1 << (width - 1)) ? 1 : 0); - SET_ZFLG (tmp == 0); - tmp <<= (32 - width); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ((offset & 0x1f) == 0 ? 0 : - (0xffffffff << (32 - (offset & 0x1f))))) | - (tmp >> (offset & 0x1f)) | - (((offset & 0x1f) + width) >= 32 ? 0 : - (m68k_dreg(regs, dstreg) & ((uae_u32)0xffffffff >> ((offset & 0x1f) + width)))); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_efd0_0)(uae_u32 opcode) /* BFINS.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = m68k_dreg(regs, (extra >> 12) & 7); - SET_NFLG_ALWAYS (tmp & (1 << (width - 1)) ? 1 : 0); - SET_ZFLG (tmp == 0); - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_efe8_0)(uae_u32 opcode) /* BFINS.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = m68k_dreg(regs, (extra >> 12) & 7); - SET_NFLG_ALWAYS (tmp & (1 << (width - 1)) ? 1 : 0); - SET_ZFLG (tmp == 0); - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_eff0_0)(uae_u32 opcode) /* BFINS.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -{m68k_incpc(4); -{ uaecptr dsta = get_disp_ea_020(m68k_areg(regs, dstreg), next_iword()); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = m68k_dreg(regs, (extra >> 12) & 7); - SET_NFLG_ALWAYS (tmp & (1 << (width - 1)) ? 1 : 0); - SET_ZFLG (tmp == 0); - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_eff8_0)(uae_u32 opcode) /* BFINS.L #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = m68k_dreg(regs, (extra >> 12) & 7); - SET_NFLG_ALWAYS (tmp & (1 << (width - 1)) ? 1 : 0); - SET_ZFLG (tmp == 0); - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_eff9_0)(uae_u32 opcode) /* BFINS.L #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -{ uaecptr dsta = get_ilong(4); -{ uae_s32 offset = extra & 0x800 ? m68k_dreg(regs, (extra >> 6) & 7) : (extra >> 6) & 0x1f; - int width = (((extra & 0x20 ? m68k_dreg(regs, extra & 7) : extra) -1) & 0x1f) +1; - uae_u32 tmp,bf0,bf1; - dsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0); - bf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff; - tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7))); - tmp >>= (32 - width); - SET_NFLG_ALWAYS (tmp & (1 << (width-1)) ? 1 : 0); - SET_ZFLG (tmp == 0); SET_VFLG (0); SET_CFLG (0); - tmp = m68k_dreg(regs, (extra >> 12) & 7); - SET_NFLG_ALWAYS (tmp & (1 << (width - 1)) ? 1 : 0); - SET_ZFLG (tmp == 0); - tmp <<= (32 - width); - bf0 = (bf0 & (0xff000000 << (8 - (offset & 7)))) | - (tmp >> (offset & 7)) | - (((offset & 7) + width) >= 32 ? 0 : - (bf0 & ((uae_u32)0xffffffff >> ((offset & 7) + width)))); - put_long(dsta,bf0 ); - if (((offset & 7) + width) > 32) { - bf1 = (bf1 & (0xff >> (width - 32 + (offset & 7)))) | - (tmp << (8 - (offset & 7))); - put_byte(dsta+4,bf1); - } -}}}}m68k_incpc(8); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f200_0)(uae_u32 opcode) /* FPP.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_arithmetic(opcode, extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f208_0)(uae_u32 opcode) /* FPP.L #.W,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_arithmetic(opcode, extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f210_0)(uae_u32 opcode) /* FPP.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_arithmetic(opcode, extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f218_0)(uae_u32 opcode) /* FPP.L #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_arithmetic(opcode, extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f220_0)(uae_u32 opcode) /* FPP.L #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_arithmetic(opcode, extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f228_0)(uae_u32 opcode) /* FPP.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_arithmetic(opcode, extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f230_0)(uae_u32 opcode) /* FPP.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_arithmetic(opcode, extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f238_0)(uae_u32 opcode) /* FPP.L #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_arithmetic(opcode, extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f239_0)(uae_u32 opcode) /* FPP.L #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_arithmetic(opcode, extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f23a_0)(uae_u32 opcode) /* FPP.L #.W,(d16,PC) */ -{ - cpuop_begin(); - uae_u32 dstreg = 2; -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_arithmetic(opcode, extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f23b_0)(uae_u32 opcode) /* FPP.L #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_arithmetic(opcode, extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f23c_0)(uae_u32 opcode) /* FPP.L #.W,#.L */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_arithmetic(opcode, extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f240_0)(uae_u32 opcode) /* FScc.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_scc(opcode,extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f248_0)(uae_u32 opcode) /* FDBcc.L #.W,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_dbcc(opcode, extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f250_0)(uae_u32 opcode) /* FScc.L #.W,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_scc(opcode,extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f258_0)(uae_u32 opcode) /* FScc.L #.W,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_scc(opcode,extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f260_0)(uae_u32 opcode) /* FScc.L #.W,-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_scc(opcode,extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f268_0)(uae_u32 opcode) /* FScc.L #.W,(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_scc(opcode,extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f270_0)(uae_u32 opcode) /* FScc.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_scc(opcode,extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f278_0)(uae_u32 opcode) /* FScc.L #.W,(xxx).W */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_scc(opcode,extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f279_0)(uae_u32 opcode) /* FScc.L #.W,(xxx).L */ -{ - cpuop_begin(); -{{ uae_s16 extra = get_iword(2); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_scc(opcode,extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f27a_0)(uae_u32 opcode) /* FTRAPcc.L #.W */ -{ - cpuop_begin(); -{m68k_incpc(2); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s16 dummy = get_iword(0); -m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_trapcc(opcode,oldpc); -}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f27b_0)(uae_u32 opcode) /* FTRAPcc.L #.L */ -{ - cpuop_begin(); -{m68k_incpc(2); -{ uaecptr oldpc = m68k_getpc(); -{ uae_s32 dummy = get_ilong(0); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_trapcc(opcode,oldpc); -}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f27c_0)(uae_u32 opcode) /* FTRAPcc.L */ -{ - cpuop_begin(); -{m68k_incpc(2); -{ uaecptr oldpc = m68k_getpc(); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_trapcc(opcode,oldpc); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f280_0)(uae_u32 opcode) /* FBcc.L #,#.W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 63); -#else - uae_u32 srcreg = (opcode & 63); -#endif -{m68k_incpc(2); -{ uaecptr pc = m68k_getpc(); -{ uae_s16 extra = get_iword(0); -m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_bcc(opcode,pc,extra); -}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f2c0_0)(uae_u32 opcode) /* FBcc.L #,#.L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 63); -#else - uae_u32 srcreg = (opcode & 63); -#endif -{m68k_incpc(2); -{ uaecptr pc = m68k_getpc(); -{ uae_s32 extra = get_ilong(0); -m68k_incpc(4); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_bcc(opcode,pc,extra); -}}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f310_0)(uae_u32 opcode) /* FSAVE.L (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1829; } -{m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_save(opcode); -}}endlabel1829: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f320_0)(uae_u32 opcode) /* FSAVE.L -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1830; } -{m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_save(opcode); -}}endlabel1830: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f328_0)(uae_u32 opcode) /* FSAVE.L (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1831; } -{m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_save(opcode); -}}endlabel1831: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f330_0)(uae_u32 opcode) /* FSAVE.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1832; } -{m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_save(opcode); -}}endlabel1832: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f338_0)(uae_u32 opcode) /* FSAVE.L (xxx).W */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel1833; } -{m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_save(opcode); -}}endlabel1833: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f339_0)(uae_u32 opcode) /* FSAVE.L (xxx).L */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel1834; } -{m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_save(opcode); -}}endlabel1834: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f350_0)(uae_u32 opcode) /* FRESTORE.L (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1835; } -{m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_restore(opcode); -}}endlabel1835: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f358_0)(uae_u32 opcode) /* FRESTORE.L (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1836; } -{m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_restore(opcode); -}}endlabel1836: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f368_0)(uae_u32 opcode) /* FRESTORE.L (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1837; } -{m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_restore(opcode); -}}endlabel1837: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f370_0)(uae_u32 opcode) /* FRESTORE.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1838; } -{m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_restore(opcode); -}}endlabel1838: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f378_0)(uae_u32 opcode) /* FRESTORE.L (xxx).W */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel1839; } -{m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_restore(opcode); -}}endlabel1839: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f379_0)(uae_u32 opcode) /* FRESTORE.L (xxx).L */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel1840; } -{m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_restore(opcode); -}}endlabel1840: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f37a_0)(uae_u32 opcode) /* FRESTORE.L (d16,PC) */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel1841; } -{m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_restore(opcode); -}}endlabel1841: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f37b_0)(uae_u32 opcode) /* FRESTORE.L (d8,PC,Xn) */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel1842; } -{m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - fpuop_restore(opcode); -}}endlabel1842: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f408_0)(uae_u32 opcode) /* CINVL.L #,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1843; } -{ if (srcreg&0x2) - flush_icache(31); -}}m68k_incpc(2); -endlabel1843: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f410_0)(uae_u32 opcode) /* CINVP.L #,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1844; } -{ if (srcreg&0x2) - flush_icache(32); -}}m68k_incpc(2); -endlabel1844: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f418_0)(uae_u32 opcode) /* CINVA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1845; } -{ if (srcreg&0x2) - flush_icache(33); -}}m68k_incpc(2); -endlabel1845: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f419_0)(uae_u32 opcode) /* CINVA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1846; } -{ if (srcreg&0x2) - flush_icache(33); -}}m68k_incpc(2); -endlabel1846: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f41a_0)(uae_u32 opcode) /* CINVA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1847; } -{ if (srcreg&0x2) - flush_icache(33); -}}m68k_incpc(2); -endlabel1847: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f41b_0)(uae_u32 opcode) /* CINVA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1848; } -{ if (srcreg&0x2) - flush_icache(33); -}}m68k_incpc(2); -endlabel1848: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f41c_0)(uae_u32 opcode) /* CINVA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1849; } -{ if (srcreg&0x2) - flush_icache(33); -}}m68k_incpc(2); -endlabel1849: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f41d_0)(uae_u32 opcode) /* CINVA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1850; } -{ if (srcreg&0x2) - flush_icache(33); -}}m68k_incpc(2); -endlabel1850: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f41e_0)(uae_u32 opcode) /* CINVA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1851; } -{ if (srcreg&0x2) - flush_icache(33); -}}m68k_incpc(2); -endlabel1851: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f41f_0)(uae_u32 opcode) /* CINVA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1852; } -{ if (srcreg&0x2) - flush_icache(33); -}}m68k_incpc(2); -endlabel1852: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f428_0)(uae_u32 opcode) /* CPUSHL.L #,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1853; } -{ if (srcreg&0x2) - flush_icache(41); -}}m68k_incpc(2); -endlabel1853: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f430_0)(uae_u32 opcode) /* CPUSHP.L #,An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1854; } -{ if (srcreg&0x2) - flush_icache(42); -}}m68k_incpc(2); -endlabel1854: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f438_0)(uae_u32 opcode) /* CPUSHA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1855; } -{ if (srcreg&0x2) - flush_icache(43); -}}m68k_incpc(2); -endlabel1855: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f439_0)(uae_u32 opcode) /* CPUSHA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1856; } -{ if (srcreg&0x2) - flush_icache(43); -}}m68k_incpc(2); -endlabel1856: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f43a_0)(uae_u32 opcode) /* CPUSHA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1857; } -{ if (srcreg&0x2) - flush_icache(43); -}}m68k_incpc(2); -endlabel1857: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f43b_0)(uae_u32 opcode) /* CPUSHA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1858; } -{ if (srcreg&0x2) - flush_icache(43); -}}m68k_incpc(2); -endlabel1858: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f43c_0)(uae_u32 opcode) /* CPUSHA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1859; } -{ if (srcreg&0x2) - flush_icache(43); -}}m68k_incpc(2); -endlabel1859: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f43d_0)(uae_u32 opcode) /* CPUSHA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1860; } -{ if (srcreg&0x2) - flush_icache(43); -}}m68k_incpc(2); -endlabel1860: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f43e_0)(uae_u32 opcode) /* CPUSHA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1861; } -{ if (srcreg&0x2) - flush_icache(43); -}}m68k_incpc(2); -endlabel1861: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f43f_0)(uae_u32 opcode) /* CPUSHA.L # */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 14) & 3); -#else - uae_u32 srcreg = ((opcode >> 6) & 3); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel1862; } -{ if (srcreg&0x2) - flush_icache(43); -}}m68k_incpc(2); -endlabel1862: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f500_0)(uae_u32 opcode) /* MMUOP.L #,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = (uae_s32)(uae_s8)(((opcode >> 11) | (opcode << 5)) & 7); -#else - uae_u32 srcreg = (uae_s32)(uae_s8)((opcode >> 3) & 255); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 extra = srcreg; -m68k_incpc(2); -#ifdef HAVE_GET_WORD_UNSWAPPED - opcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF); -#endif - mmu_op(opcode,extra); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f600_0)(uae_u32 opcode) /* MOVE16.L (An)+,(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr memsa = m68k_areg(regs, srcreg); -{ uaecptr memda = get_ilong(2); - memsa &= ~15; - memda &= ~15; - put_long(memda, get_long(memsa)); - put_long(memda+4, get_long(memsa+4)); - put_long(memda+8, get_long(memsa+8)); - put_long(memda+12, get_long(memsa+12)); - m68k_areg(regs, srcreg) += 16; -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f608_0)(uae_u32 opcode) /* MOVE16.L (xxx).L,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uaecptr memsa = get_ilong(2); -{ uaecptr memda = m68k_areg(regs, dstreg); - memsa &= ~15; - memda &= ~15; - put_long(memda, get_long(memsa)); - put_long(memda+4, get_long(memsa+4)); - put_long(memda+8, get_long(memsa+8)); - put_long(memda+12, get_long(memsa+12)); - m68k_areg(regs, dstreg) += 16; -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f610_0)(uae_u32 opcode) /* MOVE16.L (An),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr memsa = m68k_areg(regs, srcreg); -{ uaecptr memda = get_ilong(2); - memsa &= ~15; - memda &= ~15; - put_long(memda, get_long(memsa)); - put_long(memda+4, get_long(memsa+4)); - put_long(memda+8, get_long(memsa+8)); - put_long(memda+12, get_long(memsa+12)); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f618_0)(uae_u32 opcode) /* MOVE16.L (xxx).L,(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uaecptr memsa = get_ilong(2); -{ uaecptr memda = m68k_areg(regs, dstreg); - memsa &= ~15; - memda &= ~15; - put_long(memda, get_long(memsa)); - put_long(memda+4, get_long(memsa+4)); - put_long(memda+8, get_long(memsa+8)); - put_long(memda+12, get_long(memsa+12)); -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_f620_0)(uae_u32 opcode) /* MOVE16.L (An)+,(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif - uae_u32 dstreg = 0; -{ uaecptr mems = m68k_areg(regs, srcreg) & ~15, memd; - dstreg = (get_iword(2) >> 12) & 7; - memd = m68k_areg(regs, dstreg) & ~15; - put_long(memd, get_long(mems)); - put_long(memd+4, get_long(mems+4)); - put_long(memd+8, get_long(mems+8)); - put_long(memd+12, get_long(mems+12)); - if (srcreg != dstreg) - m68k_areg(regs, srcreg) += 16; - m68k_areg(regs, dstreg) += 16; -}m68k_incpc(4); - cpuop_end(); -} - -#endif -#endif - - -#ifdef _MSC_VER -#pragma warning(disable:4102) /* unreferenced label */ -#endif - -#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) -#define PART_1 1 -#define PART_2 1 -#define PART_3 1 -#define PART_4 1 -#define PART_5 1 -#define PART_6 1 -#define PART_7 1 -#define PART_8 1 -#endif - -#ifdef PART_1 -#endif - -#ifdef PART_2 -#endif - -#ifdef PART_3 -#endif - -#ifdef PART_4 -void REGPARAM2 CPUFUNC(op_4800_1)(uae_u32 opcode) /* NBCD.B Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xff) | ((newv) & 0xff); -}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4810_1)(uae_u32 opcode) /* NBCD.B (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4818_1)(uae_u32 opcode) /* NBCD.B (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4820_1)(uae_u32 opcode) /* NBCD.B -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4828_1)(uae_u32 opcode) /* NBCD.B (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4830_1)(uae_u32 opcode) /* NBCD.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{m68k_incpc(2); -{ uaecptr srca = get_disp_ea_020(m68k_areg(regs, srcreg), next_iword()); -{ uae_s8 src = get_byte(srca); -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}} cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4838_1)(uae_u32 opcode) /* NBCD.B (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4839_1)(uae_u32 opcode) /* NBCD.B (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}m68k_incpc(6); - cpuop_end(); -} -#endif - -#ifdef PART_5 -#endif - -#ifdef PART_6 -void REGPARAM2 CPUFUNC(op_8100_1)(uae_u32 opcode) /* SBCD.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{ uae_u16 newv_lo = (dst & 0xF) - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = (dst & 0xF0) - (src & 0xF0); - uae_u16 newv, tmp_newv; - int bcd = 0; - newv = tmp_newv = newv_hi + newv_lo; - if (newv_lo & 0xF0) { newv -= 6; bcd = 6; }; - if ((((dst & 0xFF) - (src & 0xFF) - (GET_XFLG ? 1 : 0)) & 0x100) > 0xFF) { newv -= 0x60; } - SET_CFLG ((((dst & 0xFF) - (src & 0xFF) - bcd - (GET_XFLG ? 1 : 0)) & 0x300) > 0xFF); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - SET_VFLG ((tmp_newv & 0x80) != 0 && (newv & 0x80) == 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8108_1)(uae_u32 opcode) /* SBCD.B -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; -{ uae_u16 newv_lo = (dst & 0xF) - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = (dst & 0xF0) - (src & 0xF0); - uae_u16 newv, tmp_newv; - int bcd = 0; - newv = tmp_newv = newv_hi + newv_lo; - if (newv_lo & 0xF0) { newv -= 6; bcd = 6; }; - if ((((dst & 0xFF) - (src & 0xFF) - (GET_XFLG ? 1 : 0)) & 0x100) > 0xFF) { newv -= 0x60; } - SET_CFLG ((((dst & 0xFF) - (src & 0xFF) - bcd - (GET_XFLG ? 1 : 0)) & 0x300) > 0xFF); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - SET_VFLG ((tmp_newv & 0x80) != 0 && (newv & 0x80) == 0); - put_byte(dsta,newv); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -#endif - -#ifdef PART_7 -void REGPARAM2 CPUFUNC(op_c100_1)(uae_u32 opcode) /* ABCD.B Dn,Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{ uae_u16 newv_lo = (src & 0xF) + (dst & 0xF) + (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = (src & 0xF0) + (dst & 0xF0); - uae_u16 newv, tmp_newv; - int cflg; - newv = tmp_newv = newv_hi + newv_lo; - if (newv_lo > 9) { newv += 6; } - cflg = (newv & 0x3F0) > 0x90; - if (cflg) newv += 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - SET_VFLG ((tmp_newv & 0x80) == 0 && (newv & 0x80) != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}m68k_incpc(2); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c108_1)(uae_u32 opcode) /* ABCD.B -(An),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; -{ uae_s8 dst = get_byte(dsta); - m68k_areg (regs, dstreg) = dsta; -{ uae_u16 newv_lo = (src & 0xF) + (dst & 0xF) + (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = (src & 0xF0) + (dst & 0xF0); - uae_u16 newv, tmp_newv; - int cflg; - newv = tmp_newv = newv_hi + newv_lo; - if (newv_lo > 9) { newv += 6; } - cflg = (newv & 0x3F0) > 0x90; - if (cflg) newv += 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - SET_VFLG ((tmp_newv & 0x80) == 0 && (newv & 0x80) != 0); - put_byte(dsta,newv); -}}}}}}m68k_incpc(2); - cpuop_end(); -} -#endif - -#ifdef PART_8 -#endif - - -#ifdef _MSC_VER -#pragma warning(disable:4102) /* unreferenced label */ -#endif - -#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) -#define PART_1 1 -#define PART_2 1 -#define PART_3 1 -#define PART_4 1 -#define PART_5 1 -#define PART_6 1 -#define PART_7 1 -#define PART_8 1 -#endif - -#ifdef PART_1 -#endif - -#ifdef PART_2 -#endif - -#ifdef PART_3 -#endif - -#ifdef PART_4 -#endif - -#ifdef PART_5 -#endif - -#ifdef PART_6 -#endif - -#ifdef PART_7 -#endif - -#ifdef PART_8 -#endif - - -#ifdef _MSC_VER -#pragma warning(disable:4102) /* unreferenced label */ -#endif - -#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) -#define PART_1 1 -#define PART_2 1 -#define PART_3 1 -#define PART_4 1 -#define PART_5 1 -#define PART_6 1 -#define PART_7 1 -#define PART_8 1 -#endif - -#ifdef PART_1 -void REGPARAM2 CPUFUNC(op_30_3)(uae_u32 opcode) /* OR.B #.B,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s8 dst = get_byte(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_70_3)(uae_u32 opcode) /* OR.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s16 dst = get_word(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0_3)(uae_u32 opcode) /* OR.L #.L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); -{ uae_s32 dst = get_long(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_130_3)(uae_u32 opcode) /* BTST.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13b_3)(uae_u32 opcode) /* BTST.B Dn,(d8,PC,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif - uae_u32 dstreg = 3; -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr dsta = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_170_3)(uae_u32 opcode) /* BCHG.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_17b_3)(uae_u32 opcode) /* BCHG.B Dn,(d8,PC,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif - uae_u32 dstreg = 3; -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr dsta = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1b0_3)(uae_u32 opcode) /* BCLR.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1bb_3)(uae_u32 opcode) /* BCLR.B Dn,(d8,PC,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif - uae_u32 dstreg = 3; -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr dsta = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1f0_3)(uae_u32 opcode) /* BSET.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1fb_3)(uae_u32 opcode) /* BSET.B Dn,(d8,PC,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif - uae_u32 dstreg = 3; -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr dsta = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_230_3)(uae_u32 opcode) /* AND.B #.B,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s8 dst = get_byte(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_270_3)(uae_u32 opcode) /* AND.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s16 dst = get_word(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2b0_3)(uae_u32 opcode) /* AND.L #.L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); -{ uae_s32 dst = get_long(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_430_3)(uae_u32 opcode) /* SUB.B #.B,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_470_3)(uae_u32 opcode) /* SUB.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4b0_3)(uae_u32 opcode) /* SUB.L #.L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_630_3)(uae_u32 opcode) /* ADD.B #.B,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_670_3)(uae_u32 opcode) /* ADD.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_6b0_3)(uae_u32 opcode) /* ADD.L #.L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_830_3)(uae_u32 opcode) /* BTST.B #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_83b_3)(uae_u32 opcode) /* BTST.B #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 src = get_iword(2); -{ uaecptr tmppc = m68k_getpc() + 4; - uaecptr dsta = get_disp_ea_000(tmppc, get_iword(4)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_870_3)(uae_u32 opcode) /* BCHG.B #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_87b_3)(uae_u32 opcode) /* BCHG.B #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 src = get_iword(2); -{ uaecptr tmppc = m68k_getpc() + 4; - uaecptr dsta = get_disp_ea_000(tmppc, get_iword(4)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - dst ^= (1 << src); - SET_ZFLG (((uae_u32)dst & (1 << src)) >> src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8b0_3)(uae_u32 opcode) /* BCLR.B #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8bb_3)(uae_u32 opcode) /* BCLR.B #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 src = get_iword(2); -{ uaecptr tmppc = m68k_getpc() + 4; - uaecptr dsta = get_disp_ea_000(tmppc, get_iword(4)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst &= ~(1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8f0_3)(uae_u32 opcode) /* BSET.B #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8fb_3)(uae_u32 opcode) /* BSET.B #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 src = get_iword(2); -{ uaecptr tmppc = m68k_getpc() + 4; - uaecptr dsta = get_disp_ea_000(tmppc, get_iword(4)); -{ uae_s8 dst = get_byte(dsta); - src &= 7; - SET_ZFLG (1 ^ ((dst >> src) & 1)); - dst |= (1 << src); - put_byte(dsta,dst); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a30_3)(uae_u32 opcode) /* EOR.B #.B,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s8 dst = get_byte(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_a70_3)(uae_u32 opcode) /* EOR.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s16 dst = get_word(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -#endif - -#ifdef PART_2 -void REGPARAM2 CPUFUNC(op_ab0_3)(uae_u32 opcode) /* EOR.L #.L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); -{ uae_s32 dst = get_long(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c30_3)(uae_u32 opcode) /* CMP.B #.B,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c3b_3)(uae_u32 opcode) /* CMP.B #.B,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s8 src = get_ibyte(2); -{ uaecptr tmppc = m68k_getpc() + 4; - uaecptr dsta = get_disp_ea_000(tmppc, get_iword(4)); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c70_3)(uae_u32 opcode) /* CMP.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c7b_3)(uae_u32 opcode) /* CMP.W #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s16 src = get_iword(2); -{ uaecptr tmppc = m68k_getpc() + 4; - uaecptr dsta = get_disp_ea_000(tmppc, get_iword(4)); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_cb0_3)(uae_u32 opcode) /* CMP.L #.L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_cbb_3)(uae_u32 opcode) /* CMP.L #.L,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{{ uae_s32 src = get_ilong(2); -{ uaecptr tmppc = m68k_getpc() + 6; - uaecptr dsta = get_disp_ea_000(tmppc, get_iword(6)); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1030_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_103b_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10b0_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10bb_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10f0_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_10fb_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += areg_byteinc[dstreg]; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1130_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_113b_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - areg_byteinc[dstreg]; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1170_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_117b_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1180_3)(uae_u32 opcode) /* MOVE.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1190_3)(uae_u32 opcode) /* MOVE.B (An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_1198_3)(uae_u32 opcode) /* MOVE.B (An)+,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s8 src = get_byte(srca); - m68k_areg(regs, srcreg) += areg_byteinc[srcreg]; -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11a0_3)(uae_u32 opcode) /* MOVE.B -(An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - areg_byteinc[srcreg]; -{ uae_s8 src = get_byte(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11a8_3)(uae_u32 opcode) /* MOVE.B (d16,An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11b0_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11b8_3)(uae_u32 opcode) /* MOVE.B (xxx).W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11b9_3)(uae_u32 opcode) /* MOVE.B (xxx).L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11ba_3)(uae_u32 opcode) /* MOVE.B (d16,PC),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11bb_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11bc_3)(uae_u32 opcode) /* MOVE.B #.B,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s8 src = get_ibyte(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11f0_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_11fb_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(xxx).W */ -{ - cpuop_begin(); -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13f0_3)(uae_u32 opcode) /* MOVE.B (d8,An,Xn),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_13fb_3)(uae_u32 opcode) /* MOVE.B (d8,PC,Xn),(xxx).L */ -{ - cpuop_begin(); -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2030_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_203b_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_2070_3)(uae_u32 opcode) /* MOVEA.L (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_u32 val = src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_207b_3)(uae_u32 opcode) /* MOVEA.L (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_u32 val = src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_20b0_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20bb_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20f0_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_20fb_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 4; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2130_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_213b_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 4; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -#endif - -#ifdef PART_3 -void REGPARAM2 CPUFUNC(op_2170_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_217b_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2180_3)(uae_u32 opcode) /* MOVE.L Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2188_3)(uae_u32 opcode) /* MOVE.L An,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = m68k_areg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2190_3)(uae_u32 opcode) /* MOVE.L (An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_2198_3)(uae_u32 opcode) /* MOVE.L (An)+,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s32 src = get_long(srca); - m68k_areg(regs, srcreg) += 4; -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21a0_3)(uae_u32 opcode) /* MOVE.L -(An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 4; -{ uae_s32 src = get_long(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21a8_3)(uae_u32 opcode) /* MOVE.L (d16,An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21b0_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21b8_3)(uae_u32 opcode) /* MOVE.L (xxx).W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21b9_3)(uae_u32 opcode) /* MOVE.L (xxx).L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21ba_3)(uae_u32 opcode) /* MOVE.L (d16,PC),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21bb_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21bc_3)(uae_u32 opcode) /* MOVE.L #.L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s32 src = get_ilong(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21f0_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_21fb_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(xxx).W */ -{ - cpuop_begin(); -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23f0_3)(uae_u32 opcode) /* MOVE.L (d8,An,Xn),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_23fb_3)(uae_u32 opcode) /* MOVE.L (d8,PC,Xn),(xxx).L */ -{ - cpuop_begin(); -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3030_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_303b_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_3070_3)(uae_u32 opcode) /* MOVEA.W (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_u32 val = (uae_s32)(uae_s16)src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_307b_3)(uae_u32 opcode) /* MOVEA.W (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_u32 val = (uae_s32)(uae_s16)src; - m68k_areg(regs, dstreg) = (val); -}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_30b0_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30bb_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30f0_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_30fb_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg); - m68k_areg(regs, dstreg) += 2; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3130_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_313b_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),-(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) - 2; - m68k_areg (regs, dstreg) = dsta; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3170_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_317b_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = m68k_areg(regs, dstreg) + (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3180_3)(uae_u32 opcode) /* MOVE.W Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3188_3)(uae_u32 opcode) /* MOVE.W An,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = m68k_areg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3190_3)(uae_u32 opcode) /* MOVE.W (An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_3198_3)(uae_u32 opcode) /* MOVE.W (An)+,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); -{ uae_s16 src = get_word(srca); - m68k_areg(regs, srcreg) += 2; -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31a0_3)(uae_u32 opcode) /* MOVE.W -(An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; -{ uae_s16 src = get_word(srca); - m68k_areg (regs, srcreg) = srca; -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31a8_3)(uae_u32 opcode) /* MOVE.W (d16,An),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31b0_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31b8_3)(uae_u32 opcode) /* MOVE.W (xxx).W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31b9_3)(uae_u32 opcode) /* MOVE.W (xxx).L,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_ilong(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(6)); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31ba_3)(uae_u32 opcode) /* MOVE.W (d16,PC),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = m68k_getpc () + 2; - srca += (uae_s32)(uae_s16)get_iword(2); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31bb_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31bc_3)(uae_u32 opcode) /* MOVE.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uae_s16 src = get_iword(2); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31f0_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(xxx).W */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_31fb_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(xxx).W */ -{ - cpuop_begin(); -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = (uae_s32)(uae_s16)get_iword(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(6); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_33f0_3)(uae_u32 opcode) /* MOVE.W (d8,An,Xn),(xxx).L */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_33fb_3)(uae_u32 opcode) /* MOVE.W (d8,PC,Xn),(xxx).L */ -{ - cpuop_begin(); -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uaecptr dsta = get_ilong(4); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(8); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4030_3)(uae_u32 opcode) /* NEGX.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4070_3)(uae_u32 opcode) /* NEGX.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s16)(newv)) == 0)); - SET_NFLG (((uae_s16)(newv)) < 0); - put_word(srca,newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_40b0_3)(uae_u32 opcode) /* NEGX.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_u32 newv = 0 - src - (GET_XFLG ? 1 : 0); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_VFLG ((flgs ^ flgo) & (flgo ^ flgn)); - SET_CFLG (flgs ^ ((flgs ^ flgn) & (flgo ^ flgn))); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s32)(newv)) == 0)); - SET_NFLG (((uae_s32)(newv)) < 0); - put_long(srca,newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40f0_3)(uae_u32 opcode) /* MVSR2.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel2002; } -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); - MakeSR(); - put_word(srca,regs.sr); -}}}m68k_incpc(4); -endlabel2002: ; - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_4130_3)(uae_u32 opcode) /* CHK.L (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel2003; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel2003; } -}}}}m68k_incpc(4); -endlabel2003: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_413b_3)(uae_u32 opcode) /* CHK.L (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel2004; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel2004; } -}}}}m68k_incpc(4); -endlabel2004: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_41b0_3)(uae_u32 opcode) /* CHK.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel2005; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel2005; } -}}}}m68k_incpc(4); -endlabel2005: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_41bb_3)(uae_u32 opcode) /* CHK.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - if ((uae_s32)dst < 0) { SET_NFLG (1); Exception(6,oldpc); goto endlabel2006; } - else if (dst > src) { SET_NFLG (0); Exception(6,oldpc); goto endlabel2006; } -}}}}m68k_incpc(4); -endlabel2006: ; - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_41f0_3)(uae_u32 opcode) /* LEA.L (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ m68k_areg(regs, dstreg) = (srca); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_41fb_3)(uae_u32 opcode) /* LEA.L (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ m68k_areg(regs, dstreg) = (srca); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_4230_3)(uae_u32 opcode) /* CLR.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(0)) == 0); - SET_NFLG (((uae_s8)(0)) < 0); - put_byte(srca,0); -}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4270_3)(uae_u32 opcode) /* CLR.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(0)) == 0); - SET_NFLG (((uae_s16)(0)) < 0); - put_word(srca,0); -}}m68k_incpc(4); - cpuop_end(); -} -#endif - -#ifdef PART_4 -void REGPARAM2 CPUFUNC(op_42b0_3)(uae_u32 opcode) /* CLR.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(0)) == 0); - SET_NFLG (((uae_s32)(0)) < 0); - put_long(srca,0); -}}m68k_incpc(4); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_42f0_3)(uae_u32 opcode) /* MVSR2.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); - MakeSR(); - put_word(srca,regs.sr & 0xff); -}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_4430_3)(uae_u32 opcode) /* NEG.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{{uae_u32 dst = ((uae_s8)(0)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(0)) < 0; - int flgn = ((uae_s8)(dst)) < 0; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(srca,dst); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4470_3)(uae_u32 opcode) /* NEG.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{{uae_u32 dst = ((uae_s16)(0)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(0)) < 0; - int flgn = ((uae_s16)(dst)) < 0; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(srca,dst); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44b0_3)(uae_u32 opcode) /* NEG.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{{uae_u32 dst = ((uae_s32)(0)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(0)) < 0; - int flgn = ((uae_s32)(dst)) < 0; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(0))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(srca,dst); -}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44f0_3)(uae_u32 opcode) /* MV2SR.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); - MakeSR(); - regs.sr &= 0xFF00; - regs.sr |= src & 0xFF; - MakeFromSR(); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_44fb_3)(uae_u32 opcode) /* MV2SR.B (d8,PC,Xn) */ -{ - cpuop_begin(); -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); - MakeSR(); - regs.sr &= 0xFF00; - regs.sr |= src & 0xFF; - MakeFromSR(); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4630_3)(uae_u32 opcode) /* NOT.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(dst)) == 0); - SET_NFLG (((uae_s8)(dst)) < 0); - put_byte(srca,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4670_3)(uae_u32 opcode) /* NOT.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(dst)) == 0); - SET_NFLG (((uae_s16)(dst)) < 0); - put_word(srca,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46b0_3)(uae_u32 opcode) /* NOT.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_u32 dst = ~src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(dst)) == 0); - SET_NFLG (((uae_s32)(dst)) < 0); - put_long(srca,dst); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46f0_3)(uae_u32 opcode) /* MV2SR.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{if (!regs.s) { Exception(8,0); goto endlabel2021; } -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); - regs.sr = src; - MakeFromSR(); -}}}}m68k_incpc(4); -endlabel2021: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_46fb_3)(uae_u32 opcode) /* MV2SR.W (d8,PC,Xn) */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel2022; } -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); - regs.sr = src; - MakeFromSR(); -}}}}m68k_incpc(4); -endlabel2022: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4830_3)(uae_u32 opcode) /* NBCD.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uae_u16 newv_lo = - (src & 0xF) - (GET_XFLG ? 1 : 0); - uae_u16 newv_hi = - (src & 0xF0); - uae_u16 newv; - int cflg; - if (newv_lo > 9) { newv_lo -= 6; } - newv = newv_hi + newv_lo; - cflg = (newv & 0x1F0) > 0x90; - if (cflg) newv -= 0x60; - SET_CFLG (cflg); - COPY_CARRY; - SET_ZFLG (GET_ZFLG & (((uae_s8)(newv)) == 0)); - SET_NFLG (((uae_s8)(newv)) < 0); - put_byte(srca,newv); -}}}}m68k_incpc(4); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4870_3)(uae_u32 opcode) /* PEA.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uaecptr dsta = m68k_areg(regs, 7) - 4; - m68k_areg (regs, 7) = dsta; - put_long(dsta,srca); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_487b_3)(uae_u32 opcode) /* PEA.L (d8,PC,Xn) */ -{ - cpuop_begin(); -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uaecptr dsta = m68k_areg(regs, 7) - 4; - m68k_areg (regs, 7) = dsta; - put_long(dsta,srca); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_48b0_3)(uae_u32 opcode) /* MVMLE.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); -{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; - while (dmask) { put_word(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 2; dmask = movem_next[dmask]; } - while (amask) { put_word(srca, m68k_areg(regs, movem_index1[amask])); srca += 2; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_48f0_3)(uae_u32 opcode) /* MVMLE.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); -{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ uae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff; - while (dmask) { put_long(srca, m68k_dreg(regs, movem_index1[dmask])); srca += 4; dmask = movem_next[dmask]; } - while (amask) { put_long(srca, m68k_areg(regs, movem_index1[amask])); srca += 4; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_4a30_3)(uae_u32 opcode) /* TST.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a3b_3)(uae_u32 opcode) /* TST.B (d8,PC,Xn) */ -{ - cpuop_begin(); -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a70_3)(uae_u32 opcode) /* TST.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4a7b_3)(uae_u32 opcode) /* TST.W (d8,PC,Xn) */ -{ - cpuop_begin(); -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4ab0_3)(uae_u32 opcode) /* TST.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4abb_3)(uae_u32 opcode) /* TST.L (d8,PC,Xn) */ -{ - cpuop_begin(); -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); -}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_4af0_3)(uae_u32 opcode) /* TAS.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - src |= 0x80; - put_byte(srca,src); -}}}m68k_incpc(4); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cb0_3)(uae_u32 opcode) /* MVMEL.W #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cbb_3)(uae_u32 opcode) /* MVMEL.W #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr tmppc = m68k_getpc() + 4; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(4)); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = (uae_s32)(uae_s16)get_word(srca); srca += 2; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cf0_3)(uae_u32 opcode) /* MVMEL.L #.W,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(4)); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4cfb_3)(uae_u32 opcode) /* MVMEL.L #.W,(d8,PC,Xn) */ -{ - cpuop_begin(); - uae_u32 dstreg = 3; -{ uae_u16 mask = get_iword(2); - unsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff; -{ uaecptr tmppc = m68k_getpc() + 4; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(4)); -{ while (dmask) { m68k_dreg(regs, movem_index1[dmask]) = get_long(srca); srca += 4; dmask = movem_next[dmask]; } - while (amask) { m68k_areg(regs, movem_index1[amask]) = get_long(srca); srca += 4; amask = movem_next[amask]; } -}}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4eb0_3)(uae_u32 opcode) /* JSR.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); - m68k_do_jsr(m68k_getpc() + 4, srca); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4ebb_3)(uae_u32 opcode) /* JSR.L (d8,PC,Xn) */ -{ - cpuop_begin(); -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); - m68k_do_jsr(m68k_getpc() + 4, srca); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4ef0_3)(uae_u32 opcode) /* JMP.L (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); - m68k_setpc(srca); -}} cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_4efb_3)(uae_u32 opcode) /* JMP.L (d8,PC,Xn) */ -{ - cpuop_begin(); -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); - m68k_setpc(srca); -}} cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_5030_3)(uae_u32 opcode) /* ADD.B #,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -#endif - -#ifdef PART_5 -void REGPARAM2 CPUFUNC(op_5070_3)(uae_u32 opcode) /* ADD.W #,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_50b0_3)(uae_u32 opcode) /* ADD.L #,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_50f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(0) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_5130_3)(uae_u32 opcode) /* SUB.B #,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_5170_3)(uae_u32 opcode) /* SUB.W #,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_51b0_3)(uae_u32 opcode) /* SUB.L #,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = imm8_table[((opcode >> 1) & 7)]; -#else - uae_u32 srcreg = imm8_table[((opcode >> 9) & 7)]; -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_u32 src = srcreg; -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_51f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(1) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_52f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(2) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_53f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(3) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_54f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(4) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_55f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(5) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_56f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(6) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_57f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(7) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_58f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(8) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_59f0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(9) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5af0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(10) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5bf0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(11) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5cf0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(12) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5df0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(13) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ef0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(14) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_5ff0_3)(uae_u32 opcode) /* Scc.B (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ int val = cctrue(15) ? 0xff : 0; - put_byte(srca,val); -}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#endif - -#ifdef PART_6 -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_60ff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(0)) goto endlabel2065; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2065; -{ uae_s32 src = get_ilong(2); - if (!cctrue(0)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2065: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_62ff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(2)) goto endlabel2066; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2066; -{ uae_s32 src = get_ilong(2); - if (!cctrue(2)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2066: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_63ff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(3)) goto endlabel2067; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2067; -{ uae_s32 src = get_ilong(2); - if (!cctrue(3)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2067: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_64ff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(4)) goto endlabel2068; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2068; -{ uae_s32 src = get_ilong(2); - if (!cctrue(4)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2068: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_65ff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(5)) goto endlabel2069; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2069; -{ uae_s32 src = get_ilong(2); - if (!cctrue(5)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2069: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_66ff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(6)) goto endlabel2070; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2070; -{ uae_s32 src = get_ilong(2); - if (!cctrue(6)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2070: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_67ff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(7)) goto endlabel2071; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2071; -{ uae_s32 src = get_ilong(2); - if (!cctrue(7)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2071: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_68ff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(8)) goto endlabel2072; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2072; -{ uae_s32 src = get_ilong(2); - if (!cctrue(8)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2072: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_69ff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(9)) goto endlabel2073; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2073; -{ uae_s32 src = get_ilong(2); - if (!cctrue(9)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2073: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6aff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(10)) goto endlabel2074; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2074; -{ uae_s32 src = get_ilong(2); - if (!cctrue(10)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2074: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6bff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(11)) goto endlabel2075; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2075; -{ uae_s32 src = get_ilong(2); - if (!cctrue(11)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2075: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6cff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(12)) goto endlabel2076; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2076; -{ uae_s32 src = get_ilong(2); - if (!cctrue(12)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2076: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6dff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(13)) goto endlabel2077; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2077; -{ uae_s32 src = get_ilong(2); - if (!cctrue(13)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2077: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6eff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(14)) goto endlabel2078; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2078; -{ uae_s32 src = get_ilong(2); - if (!cctrue(14)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2078: ; - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_6fff_3)(uae_u32 opcode) /* Bcc.L #.L */ -{ - cpuop_begin(); -{ m68k_incpc(2); - if (!cctrue(15)) goto endlabel2079; - last_addr_for_exception_3 = m68k_getpc() + 2; - last_fault_for_exception_3 = m68k_getpc() + 1; - last_op_for_exception_3 = opcode; Exception(3,0); goto endlabel2079; -{ uae_s32 src = get_ilong(2); - if (!cctrue(15)) goto didnt_jump; - m68k_incpc ((uae_s32)src + 2); -return; -didnt_jump:; -}}m68k_incpc(6); -endlabel2079: ; - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_8030_3)(uae_u32 opcode) /* OR.B (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_803b_3)(uae_u32 opcode) /* OR.B (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8070_3)(uae_u32 opcode) /* OR.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_807b_3)(uae_u32 opcode) /* OR.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80b0_3)(uae_u32 opcode) /* OR.L (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80bb_3)(uae_u32 opcode) /* OR.L (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80f0_3)(uae_u32 opcode) /* DIVU.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(4); - if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel2086; } else { - uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; - uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; - if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel2086: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_80fb_3)(uae_u32 opcode) /* DIVU.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(4); - if (src == 0) { SET_VFLG (0); Exception (5, oldpc); goto endlabel2087; } else { - uae_u32 newv = (uae_u32)dst / (uae_u32)(uae_u16)src; - uae_u32 rem = (uae_u32)dst % (uae_u32)(uae_u16)src; - if (newv > 0xffff) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel2087: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8130_3)(uae_u32 opcode) /* OR.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s8 dst = get_byte(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_8170_3)(uae_u32 opcode) /* OR.W Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s16 dst = get_word(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81b0_3)(uae_u32 opcode) /* OR.L Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s32 dst = get_long(dsta); - src |= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81f0_3)(uae_u32 opcode) /* DIVS.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(4); - if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel2091; } else { - uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; - uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; - if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel2091: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_81fb_3)(uae_u32 opcode) /* DIVS.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{ uaecptr oldpc = m68k_getpc(); -{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -m68k_incpc(4); - if (src == 0) { SET_VFLG (0); Exception(5,oldpc); goto endlabel2092; } else { - uae_s32 newv = (uae_s32)dst / (uae_s32)(uae_s16)src; - uae_u16 rem = (uae_s32)dst % (uae_s32)(uae_s16)src; - if ((newv & 0xffff8000) != 0 && (newv & 0xffff8000) != 0xffff8000) { SET_VFLG (1); SET_NFLG (1); SET_CFLG (0); } else - { - if (((uae_s16)rem < 0) != ((uae_s32)dst < 0)) rem = -rem; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_NFLG (((uae_s16)(newv)) < 0); - newv = (newv & 0xffff) | ((uae_u32)rem << 16); - m68k_dreg(regs, dstreg) = (newv); - } - } -}}}}endlabel2092: ; - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9030_3)(uae_u32 opcode) /* SUB.B (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_903b_3)(uae_u32 opcode) /* SUB.B (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9070_3)(uae_u32 opcode) /* SUB.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_907b_3)(uae_u32 opcode) /* SUB.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_90b0_3)(uae_u32 opcode) /* SUB.L (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_90bb_3)(uae_u32 opcode) /* SUB.L (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_90f0_3)(uae_u32 opcode) /* SUBA.W (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_90fb_3)(uae_u32 opcode) /* SUBA.W (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_9130_3)(uae_u32 opcode) /* SUB.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_9170_3)(uae_u32 opcode) /* SUB.W Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_91b0_3)(uae_u32 opcode) /* SUB.L Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgo) & (flgn ^ flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_91f0_3)(uae_u32 opcode) /* SUBA.L (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_91fb_3)(uae_u32 opcode) /* SUBA.L (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst - src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_b030_3)(uae_u32 opcode) /* CMP.B (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b03b_3)(uae_u32 opcode) /* CMP.B (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) - ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u8)(src)) > ((uae_u8)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -#endif - -#ifdef PART_7 -void REGPARAM2 CPUFUNC(op_b070_3)(uae_u32 opcode) /* CMP.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b07b_3)(uae_u32 opcode) /* CMP.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) - ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u16)(src)) > ((uae_u16)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0b0_3)(uae_u32 opcode) /* CMP.L (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0bb_3)(uae_u32 opcode) /* CMP.L (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0f0_3)(uae_u32 opcode) /* CMPA.W (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b0fb_3)(uae_u32 opcode) /* CMPA.W (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b130_3)(uae_u32 opcode) /* EOR.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s8 dst = get_byte(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b170_3)(uae_u32 opcode) /* EOR.W Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s16 dst = get_word(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1b0_3)(uae_u32 opcode) /* EOR.L Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s32 dst = get_long(dsta); - src ^= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1f0_3)(uae_u32 opcode) /* CMPA.L (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_b1fb_3)(uae_u32 opcode) /* CMPA.L (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) - ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs != flgo) && (flgn != flgo)); - SET_CFLG (((uae_u32)(src)) > ((uae_u32)(dst))); - SET_NFLG (flgn != 0); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c030_3)(uae_u32 opcode) /* AND.B (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c03b_3)(uae_u32 opcode) /* AND.B (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((src) & 0xff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c070_3)(uae_u32 opcode) /* AND.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c07b_3)(uae_u32 opcode) /* AND.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((src) & 0xffff); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0b0_3)(uae_u32 opcode) /* AND.L (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0bb_3)(uae_u32 opcode) /* AND.L (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - m68k_dreg(regs, dstreg) = (src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0f0_3)(uae_u32 opcode) /* MULU.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c0fb_3)(uae_u32 opcode) /* MULU.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_u32)(uae_u16)dst * (uae_u32)(uae_u16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c130_3)(uae_u32 opcode) /* AND.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s8 dst = get_byte(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s8)(src)) == 0); - SET_NFLG (((uae_s8)(src)) < 0); - put_byte(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c170_3)(uae_u32 opcode) /* AND.W Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s16 dst = get_word(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(src)) == 0); - SET_NFLG (((uae_s16)(src)) < 0); - put_word(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1b0_3)(uae_u32 opcode) /* AND.L Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s32 dst = get_long(dsta); - src &= dst; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(src)) == 0); - SET_NFLG (((uae_s32)(src)) < 0); - put_long(dsta,src); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1f0_3)(uae_u32 opcode) /* MULS.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_c1fb_3)(uae_u32 opcode) /* MULS.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{ uae_u32 newv = (uae_s32)(uae_s16)dst * (uae_s32)(uae_s16)src; - CLEAR_CZNV; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_NFLG (((uae_s32)(newv)) < 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d030_3)(uae_u32 opcode) /* ADD.B (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d03b_3)(uae_u32 opcode) /* ADD.B (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s8 src = get_byte(srca); -{ uae_s8 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xff) | ((newv) & 0xff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d070_3)(uae_u32 opcode) /* ADD.W (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d07b_3)(uae_u32 opcode) /* ADD.W (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s16 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (m68k_dreg(regs, dstreg) & ~0xffff) | ((newv) & 0xffff); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d0b0_3)(uae_u32 opcode) /* ADD.L (d8,An,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d0bb_3)(uae_u32 opcode) /* ADD.L (d8,PC,Xn),Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_dreg(regs, dstreg); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - m68k_dreg(regs, dstreg) = (newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d0f0_3)(uae_u32 opcode) /* ADDA.W (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d0fb_3)(uae_u32 opcode) /* ADDA.W (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s16 src = get_word(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_d130_3)(uae_u32 opcode) /* ADD.B Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s8 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s8 dst = get_byte(dsta); -{{uae_u32 newv = ((uae_s8)(dst)) + ((uae_s8)(src)); -{ int flgs = ((uae_s8)(src)) < 0; - int flgo = ((uae_s8)(dst)) < 0; - int flgn = ((uae_s8)(newv)) < 0; - SET_ZFLG (((uae_s8)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u8)(~dst)) < ((uae_u8)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_byte(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d170_3)(uae_u32 opcode) /* ADD.W Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s16 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s16 dst = get_word(dsta); -{{uae_u32 newv = ((uae_s16)(dst)) + ((uae_s16)(src)); -{ int flgs = ((uae_s16)(src)) < 0; - int flgo = ((uae_s16)(dst)) < 0; - int flgn = ((uae_s16)(newv)) < 0; - SET_ZFLG (((uae_s16)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u16)(~dst)) < ((uae_u16)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_word(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_d1b0_3)(uae_u32 opcode) /* ADD.L Dn,(d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 1) & 7); -#else - uae_u32 srcreg = ((opcode >> 9) & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 8) & 7; -#else - uae_u32 dstreg = opcode & 7; -#endif -{{ uae_s32 src = m68k_dreg(regs, srcreg); -{ uaecptr dsta = get_disp_ea_000(m68k_areg(regs, dstreg), get_iword(2)); -{ uae_s32 dst = get_long(dsta); -{{uae_u32 newv = ((uae_s32)(dst)) + ((uae_s32)(src)); -{ int flgs = ((uae_s32)(src)) < 0; - int flgo = ((uae_s32)(dst)) < 0; - int flgn = ((uae_s32)(newv)) < 0; - SET_ZFLG (((uae_s32)(newv)) == 0); - SET_VFLG ((flgs ^ flgn) & (flgo ^ flgn)); - SET_CFLG (((uae_u32)(~dst)) < ((uae_u32)(src))); - COPY_CARRY; - SET_NFLG (flgn != 0); - put_long(dsta,newv); -}}}}}}}m68k_incpc(4); - cpuop_end(); -} -#endif - -#ifdef PART_8 -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d1f0_3)(uae_u32 opcode) /* ADDA.L (d8,An,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_d1fb_3)(uae_u32 opcode) /* ADDA.L (d8,PC,Xn),An */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 dstreg = (opcode >> 1) & 7; -#else - uae_u32 dstreg = (opcode >> 9) & 7; -#endif -{{ uaecptr tmppc = m68k_getpc() + 2; - uaecptr srca = get_disp_ea_000(tmppc, get_iword(2)); -{ uae_s32 src = get_long(srca); -{ uae_s32 dst = m68k_areg(regs, dstreg); -{ uae_u32 newv = dst + src; - m68k_areg(regs, dstreg) = (newv); -}}}}}m68k_incpc(4); - cpuop_end(); -} - -#endif -void REGPARAM2 CPUFUNC(op_e0f0_3)(uae_u32 opcode) /* ASRW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 cflg = val & 1; - val = (val >> 1) | sign; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - SET_CFLG (cflg); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e1f0_3)(uae_u32 opcode) /* ASLW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 sign = 0x8000 & val; - uae_u32 sign2; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); - sign2 = 0x8000 & val; - SET_CFLG (sign != 0); - COPY_CARRY; - SET_VFLG (GET_VFLG | (sign2 != sign)); - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e2f0_3)(uae_u32 opcode) /* LSRW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 data = get_word(dataa); -{ uae_u32 val = (uae_u16)data; - uae_u32 carry = val & 1; - val >>= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e3f0_3)(uae_u32 opcode) /* LSLW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e4f0_3)(uae_u32 opcode) /* ROXRW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (GET_XFLG) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e5f0_3)(uae_u32 opcode) /* ROXLW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (GET_XFLG) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - COPY_CARRY; - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e6f0_3)(uae_u32 opcode) /* RORW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 1; - val >>= 1; - if (carry) val |= 0x8000; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry); - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -void REGPARAM2 CPUFUNC(op_e7f0_3)(uae_u32 opcode) /* ROLW.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr dataa = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); -{ uae_s16 data = get_word(dataa); -{ uae_u16 val = data; - uae_u32 carry = val & 0x8000; - val <<= 1; - if (carry) val |= 1; - CLEAR_CZNV; - SET_ZFLG (((uae_s16)(val)) == 0); - SET_NFLG (((uae_s16)(val)) < 0); -SET_CFLG (carry >> 15); - put_word(dataa,val); -}}}}m68k_incpc(4); - cpuop_end(); -} -#endif - - -#ifdef _MSC_VER -#pragma warning(disable:4102) /* unreferenced label */ -#endif - -#if !defined(PART_1) && !defined(PART_2) && !defined(PART_3) && !defined(PART_4) && !defined(PART_5) && !defined(PART_6) && !defined(PART_7) && !defined(PART_8) -#define PART_1 1 -#define PART_2 1 -#define PART_3 1 -#define PART_4 1 -#define PART_5 1 -#define PART_6 1 -#define PART_7 1 -#define PART_8 1 -#endif - -#ifdef PART_1 -#endif - -#ifdef PART_2 -#endif - -#ifdef PART_3 -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40c0_4)(uae_u32 opcode) /* MVSR2.W Dn */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ MakeSR(); - m68k_dreg(regs, srcreg) = (m68k_dreg(regs, srcreg) & ~0xffff) | ((regs.sr) & 0xffff); -}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40d0_4)(uae_u32 opcode) /* MVSR2.W (An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - MakeSR(); - put_word(srca,regs.sr); -}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40d8_4)(uae_u32 opcode) /* MVSR2.W (An)+ */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg); - m68k_areg(regs, srcreg) += 2; - MakeSR(); - put_word(srca,regs.sr); -}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40e0_4)(uae_u32 opcode) /* MVSR2.W -(An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) - 2; - m68k_areg (regs, srcreg) = srca; - MakeSR(); - put_word(srca,regs.sr); -}}m68k_incpc(2); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40e8_4)(uae_u32 opcode) /* MVSR2.W (d16,An) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = m68k_areg(regs, srcreg) + (uae_s32)(uae_s16)get_iword(2); - MakeSR(); - put_word(srca,regs.sr); -}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40f0_4)(uae_u32 opcode) /* MVSR2.W (d8,An,Xn) */ -{ - cpuop_begin(); -#ifdef HAVE_GET_WORD_UNSWAPPED - uae_u32 srcreg = ((opcode >> 8) & 7); -#else - uae_u32 srcreg = (opcode & 7); -#endif -{{ uaecptr srca = get_disp_ea_000(m68k_areg(regs, srcreg), get_iword(2)); - MakeSR(); - put_word(srca,regs.sr); -}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40f8_4)(uae_u32 opcode) /* MVSR2.W (xxx).W */ -{ - cpuop_begin(); -{{ uaecptr srca = (uae_s32)(uae_s16)get_iword(2); - MakeSR(); - put_word(srca,regs.sr); -}}m68k_incpc(4); - cpuop_end(); -} - -#endif -#ifndef NOFLAGS -void REGPARAM2 CPUFUNC(op_40f9_4)(uae_u32 opcode) /* MVSR2.W (xxx).L */ -{ - cpuop_begin(); -{{ uaecptr srca = get_ilong(2); - MakeSR(); - put_word(srca,regs.sr); -}}m68k_incpc(6); - cpuop_end(); -} - -#endif -#endif - -#ifdef PART_4 -void REGPARAM2 CPUFUNC(op_4e73_4)(uae_u32 opcode) /* RTE.L */ -{ - cpuop_begin(); -{if (!regs.s) { Exception(8,0); goto endlabel2161; } -{{ uaecptr sra = m68k_areg(regs, 7); -{ uae_s16 sr = get_word(sra); - m68k_areg(regs, 7) += 2; -{ uaecptr pca = m68k_areg(regs, 7); -{ uae_s32 pc = get_long(pca); - m68k_areg(regs, 7) += 4; - regs.sr = sr; m68k_setpc_rte(pc); - MakeFromSR(); -}}}}}}endlabel2161: ; - cpuop_end(); -} -#endif - -#ifdef PART_5 -#endif - -#ifdef PART_6 -#endif - -#ifdef PART_7 -#endif - -#ifdef PART_8 -#endif - diff --git a/BasiliskII/src/uae_cpu/cpuemu_nf.cpp b/BasiliskII/src/uae_cpu/cpuemu_nf.cpp deleted file mode 100644 index 72e965cf..00000000 --- a/BasiliskII/src/uae_cpu/cpuemu_nf.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#define NOFLAGS -#include "cpuemu.cpp" diff --git a/BasiliskII/src/uae_cpu/cpustbl.cpp b/BasiliskII/src/uae_cpu/cpustbl.cpp deleted file mode 100644 index 87fc85bf..00000000 --- a/BasiliskII/src/uae_cpu/cpustbl.cpp +++ /dev/null @@ -1,8720 +0,0 @@ -#include "sysdeps.h" -#include "m68k.h" -#include "memory.h" -#include "readcpu.h" -#include "newcpu.h" -#include "compiler/compemu.h" -#include "fpu/fpu.h" -#include "cputbl.h" -#define SET_CFLG_ALWAYS(x) SET_CFLG(x) -#define SET_NFLG_ALWAYS(x) SET_NFLG(x) -#define CPUFUNC_FF(x) x##_ff -#define CPUFUNC_NF(x) x##_nf -#define CPUFUNC(x) CPUFUNC_FF(x) -#ifdef NOFLAGS -# include "noflags.h" -#endif -struct cputbl CPUFUNC(op_smalltbl_0)[] = { -{ CPUFUNC(op_0_0), 0, 0 }, /* OR.B #.B,Dn */ -{ CPUFUNC(op_10_0), 0, 16 }, /* OR.B #.B,(An) */ -{ CPUFUNC(op_18_0), 0, 24 }, /* OR.B #.B,(An)+ */ -{ CPUFUNC(op_20_0), 0, 32 }, /* OR.B #.B,-(An) */ -{ CPUFUNC(op_28_0), 0, 40 }, /* OR.B #.B,(d16,An) */ -{ CPUFUNC(op_30_0), 0, 48 }, /* OR.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_38_0), 0, 56 }, /* OR.B #.B,(xxx).W */ -{ CPUFUNC(op_39_0), 0, 57 }, /* OR.B #.B,(xxx).L */ -{ CPUFUNC(op_3c_0), 0, 60 }, /* ORSR.B #.W */ -{ CPUFUNC(op_40_0), 0, 64 }, /* OR.W #.W,Dn */ -{ CPUFUNC(op_50_0), 0, 80 }, /* OR.W #.W,(An) */ -{ CPUFUNC(op_58_0), 0, 88 }, /* OR.W #.W,(An)+ */ -{ CPUFUNC(op_60_0), 0, 96 }, /* OR.W #.W,-(An) */ -{ CPUFUNC(op_68_0), 0, 104 }, /* OR.W #.W,(d16,An) */ -{ CPUFUNC(op_70_0), 0, 112 }, /* OR.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_78_0), 0, 120 }, /* OR.W #.W,(xxx).W */ -{ CPUFUNC(op_79_0), 0, 121 }, /* OR.W #.W,(xxx).L */ -{ CPUFUNC(op_7c_0), 0, 124 }, /* ORSR.W #.W */ -{ CPUFUNC(op_80_0), 0, 128 }, /* OR.L #.L,Dn */ -{ CPUFUNC(op_90_0), 0, 144 }, /* OR.L #.L,(An) */ -{ CPUFUNC(op_98_0), 0, 152 }, /* OR.L #.L,(An)+ */ -{ CPUFUNC(op_a0_0), 0, 160 }, /* OR.L #.L,-(An) */ -{ CPUFUNC(op_a8_0), 0, 168 }, /* OR.L #.L,(d16,An) */ -{ CPUFUNC(op_b0_0), 0, 176 }, /* OR.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_b8_0), 0, 184 }, /* OR.L #.L,(xxx).W */ -{ CPUFUNC(op_b9_0), 0, 185 }, /* OR.L #.L,(xxx).L */ -{ CPUFUNC(op_d0_0), 0, 208 }, /* CHK2.B #.W,(An) */ -{ CPUFUNC(op_e8_0), 0, 232 }, /* CHK2.B #.W,(d16,An) */ -{ CPUFUNC(op_f0_0), 0, 240 }, /* CHK2.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_f8_0), 0, 248 }, /* CHK2.B #.W,(xxx).W */ -{ CPUFUNC(op_f9_0), 0, 249 }, /* CHK2.B #.W,(xxx).L */ -{ CPUFUNC(op_fa_0), 0, 250 }, /* CHK2.B #.W,(d16,PC) */ -{ CPUFUNC(op_fb_0), 0, 251 }, /* CHK2.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_100_0), 0, 256 }, /* BTST.L Dn,Dn */ -{ CPUFUNC_FF(op_108_0), 0, 264 }, /* MVPMR.W (d16,An),Dn */ -{ CPUFUNC(op_110_0), 0, 272 }, /* BTST.B Dn,(An) */ -{ CPUFUNC(op_118_0), 0, 280 }, /* BTST.B Dn,(An)+ */ -{ CPUFUNC(op_120_0), 0, 288 }, /* BTST.B Dn,-(An) */ -{ CPUFUNC(op_128_0), 0, 296 }, /* BTST.B Dn,(d16,An) */ -{ CPUFUNC(op_130_0), 0, 304 }, /* BTST.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_138_0), 0, 312 }, /* BTST.B Dn,(xxx).W */ -{ CPUFUNC(op_139_0), 0, 313 }, /* BTST.B Dn,(xxx).L */ -{ CPUFUNC(op_13a_0), 0, 314 }, /* BTST.B Dn,(d16,PC) */ -{ CPUFUNC(op_13b_0), 0, 315 }, /* BTST.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_13c_0), 0, 316 }, /* BTST.B Dn,#.B */ -{ CPUFUNC(op_140_0), 0, 320 }, /* BCHG.L Dn,Dn */ -{ CPUFUNC_FF(op_148_0), 0, 328 }, /* MVPMR.L (d16,An),Dn */ -{ CPUFUNC(op_150_0), 0, 336 }, /* BCHG.B Dn,(An) */ -{ CPUFUNC(op_158_0), 0, 344 }, /* BCHG.B Dn,(An)+ */ -{ CPUFUNC(op_160_0), 0, 352 }, /* BCHG.B Dn,-(An) */ -{ CPUFUNC(op_168_0), 0, 360 }, /* BCHG.B Dn,(d16,An) */ -{ CPUFUNC(op_170_0), 0, 368 }, /* BCHG.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_178_0), 0, 376 }, /* BCHG.B Dn,(xxx).W */ -{ CPUFUNC(op_179_0), 0, 377 }, /* BCHG.B Dn,(xxx).L */ -{ CPUFUNC(op_17a_0), 0, 378 }, /* BCHG.B Dn,(d16,PC) */ -{ CPUFUNC(op_17b_0), 0, 379 }, /* BCHG.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_180_0), 0, 384 }, /* BCLR.L Dn,Dn */ -{ CPUFUNC_FF(op_188_0), 0, 392 }, /* MVPRM.W Dn,(d16,An) */ -{ CPUFUNC(op_190_0), 0, 400 }, /* BCLR.B Dn,(An) */ -{ CPUFUNC(op_198_0), 0, 408 }, /* BCLR.B Dn,(An)+ */ -{ CPUFUNC(op_1a0_0), 0, 416 }, /* BCLR.B Dn,-(An) */ -{ CPUFUNC(op_1a8_0), 0, 424 }, /* BCLR.B Dn,(d16,An) */ -{ CPUFUNC(op_1b0_0), 0, 432 }, /* BCLR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1b8_0), 0, 440 }, /* BCLR.B Dn,(xxx).W */ -{ CPUFUNC(op_1b9_0), 0, 441 }, /* BCLR.B Dn,(xxx).L */ -{ CPUFUNC(op_1ba_0), 0, 442 }, /* BCLR.B Dn,(d16,PC) */ -{ CPUFUNC(op_1bb_0), 0, 443 }, /* BCLR.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_1c0_0), 0, 448 }, /* BSET.L Dn,Dn */ -{ CPUFUNC_FF(op_1c8_0), 0, 456 }, /* MVPRM.L Dn,(d16,An) */ -{ CPUFUNC(op_1d0_0), 0, 464 }, /* BSET.B Dn,(An) */ -{ CPUFUNC(op_1d8_0), 0, 472 }, /* BSET.B Dn,(An)+ */ -{ CPUFUNC(op_1e0_0), 0, 480 }, /* BSET.B Dn,-(An) */ -{ CPUFUNC(op_1e8_0), 0, 488 }, /* BSET.B Dn,(d16,An) */ -{ CPUFUNC(op_1f0_0), 0, 496 }, /* BSET.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1f8_0), 0, 504 }, /* BSET.B Dn,(xxx).W */ -{ CPUFUNC(op_1f9_0), 0, 505 }, /* BSET.B Dn,(xxx).L */ -{ CPUFUNC(op_1fa_0), 0, 506 }, /* BSET.B Dn,(d16,PC) */ -{ CPUFUNC(op_1fb_0), 0, 507 }, /* BSET.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_200_0), 0, 512 }, /* AND.B #.B,Dn */ -{ CPUFUNC(op_210_0), 0, 528 }, /* AND.B #.B,(An) */ -{ CPUFUNC(op_218_0), 0, 536 }, /* AND.B #.B,(An)+ */ -{ CPUFUNC(op_220_0), 0, 544 }, /* AND.B #.B,-(An) */ -{ CPUFUNC(op_228_0), 0, 552 }, /* AND.B #.B,(d16,An) */ -{ CPUFUNC(op_230_0), 0, 560 }, /* AND.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_238_0), 0, 568 }, /* AND.B #.B,(xxx).W */ -{ CPUFUNC(op_239_0), 0, 569 }, /* AND.B #.B,(xxx).L */ -{ CPUFUNC(op_23c_0), 0, 572 }, /* ANDSR.B #.W */ -{ CPUFUNC(op_240_0), 0, 576 }, /* AND.W #.W,Dn */ -{ CPUFUNC(op_250_0), 0, 592 }, /* AND.W #.W,(An) */ -{ CPUFUNC(op_258_0), 0, 600 }, /* AND.W #.W,(An)+ */ -{ CPUFUNC(op_260_0), 0, 608 }, /* AND.W #.W,-(An) */ -{ CPUFUNC(op_268_0), 0, 616 }, /* AND.W #.W,(d16,An) */ -{ CPUFUNC(op_270_0), 0, 624 }, /* AND.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_278_0), 0, 632 }, /* AND.W #.W,(xxx).W */ -{ CPUFUNC(op_279_0), 0, 633 }, /* AND.W #.W,(xxx).L */ -{ CPUFUNC(op_27c_0), 0, 636 }, /* ANDSR.W #.W */ -{ CPUFUNC(op_280_0), 0, 640 }, /* AND.L #.L,Dn */ -{ CPUFUNC(op_290_0), 0, 656 }, /* AND.L #.L,(An) */ -{ CPUFUNC(op_298_0), 0, 664 }, /* AND.L #.L,(An)+ */ -{ CPUFUNC(op_2a0_0), 0, 672 }, /* AND.L #.L,-(An) */ -{ CPUFUNC(op_2a8_0), 0, 680 }, /* AND.L #.L,(d16,An) */ -{ CPUFUNC(op_2b0_0), 0, 688 }, /* AND.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_2b8_0), 0, 696 }, /* AND.L #.L,(xxx).W */ -{ CPUFUNC(op_2b9_0), 0, 697 }, /* AND.L #.L,(xxx).L */ -{ CPUFUNC(op_2d0_0), 0, 720 }, /* CHK2.W #.W,(An) */ -{ CPUFUNC(op_2e8_0), 0, 744 }, /* CHK2.W #.W,(d16,An) */ -{ CPUFUNC(op_2f0_0), 0, 752 }, /* CHK2.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_2f8_0), 0, 760 }, /* CHK2.W #.W,(xxx).W */ -{ CPUFUNC(op_2f9_0), 0, 761 }, /* CHK2.W #.W,(xxx).L */ -{ CPUFUNC(op_2fa_0), 0, 762 }, /* CHK2.W #.W,(d16,PC) */ -{ CPUFUNC(op_2fb_0), 0, 763 }, /* CHK2.W #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_400_0), 0, 1024 }, /* SUB.B #.B,Dn */ -{ CPUFUNC(op_410_0), 0, 1040 }, /* SUB.B #.B,(An) */ -{ CPUFUNC(op_418_0), 0, 1048 }, /* SUB.B #.B,(An)+ */ -{ CPUFUNC(op_420_0), 0, 1056 }, /* SUB.B #.B,-(An) */ -{ CPUFUNC(op_428_0), 0, 1064 }, /* SUB.B #.B,(d16,An) */ -{ CPUFUNC(op_430_0), 0, 1072 }, /* SUB.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_438_0), 0, 1080 }, /* SUB.B #.B,(xxx).W */ -{ CPUFUNC(op_439_0), 0, 1081 }, /* SUB.B #.B,(xxx).L */ -{ CPUFUNC(op_440_0), 0, 1088 }, /* SUB.W #.W,Dn */ -{ CPUFUNC(op_450_0), 0, 1104 }, /* SUB.W #.W,(An) */ -{ CPUFUNC(op_458_0), 0, 1112 }, /* SUB.W #.W,(An)+ */ -{ CPUFUNC(op_460_0), 0, 1120 }, /* SUB.W #.W,-(An) */ -{ CPUFUNC(op_468_0), 0, 1128 }, /* SUB.W #.W,(d16,An) */ -{ CPUFUNC(op_470_0), 0, 1136 }, /* SUB.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_478_0), 0, 1144 }, /* SUB.W #.W,(xxx).W */ -{ CPUFUNC(op_479_0), 0, 1145 }, /* SUB.W #.W,(xxx).L */ -{ CPUFUNC(op_480_0), 0, 1152 }, /* SUB.L #.L,Dn */ -{ CPUFUNC(op_490_0), 0, 1168 }, /* SUB.L #.L,(An) */ -{ CPUFUNC(op_498_0), 0, 1176 }, /* SUB.L #.L,(An)+ */ -{ CPUFUNC(op_4a0_0), 0, 1184 }, /* SUB.L #.L,-(An) */ -{ CPUFUNC(op_4a8_0), 0, 1192 }, /* SUB.L #.L,(d16,An) */ -{ CPUFUNC(op_4b0_0), 0, 1200 }, /* SUB.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_4b8_0), 0, 1208 }, /* SUB.L #.L,(xxx).W */ -{ CPUFUNC(op_4b9_0), 0, 1209 }, /* SUB.L #.L,(xxx).L */ -{ CPUFUNC(op_4d0_0), 0, 1232 }, /* CHK2.L #.W,(An) */ -{ CPUFUNC(op_4e8_0), 0, 1256 }, /* CHK2.L #.W,(d16,An) */ -{ CPUFUNC(op_4f0_0), 0, 1264 }, /* CHK2.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_4f8_0), 0, 1272 }, /* CHK2.L #.W,(xxx).W */ -{ CPUFUNC(op_4f9_0), 0, 1273 }, /* CHK2.L #.W,(xxx).L */ -{ CPUFUNC(op_4fa_0), 0, 1274 }, /* CHK2.L #.W,(d16,PC) */ -{ CPUFUNC(op_4fb_0), 0, 1275 }, /* CHK2.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_600_0), 0, 1536 }, /* ADD.B #.B,Dn */ -{ CPUFUNC(op_610_0), 0, 1552 }, /* ADD.B #.B,(An) */ -{ CPUFUNC(op_618_0), 0, 1560 }, /* ADD.B #.B,(An)+ */ -{ CPUFUNC(op_620_0), 0, 1568 }, /* ADD.B #.B,-(An) */ -{ CPUFUNC(op_628_0), 0, 1576 }, /* ADD.B #.B,(d16,An) */ -{ CPUFUNC(op_630_0), 0, 1584 }, /* ADD.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_638_0), 0, 1592 }, /* ADD.B #.B,(xxx).W */ -{ CPUFUNC(op_639_0), 0, 1593 }, /* ADD.B #.B,(xxx).L */ -{ CPUFUNC(op_640_0), 0, 1600 }, /* ADD.W #.W,Dn */ -{ CPUFUNC(op_650_0), 0, 1616 }, /* ADD.W #.W,(An) */ -{ CPUFUNC(op_658_0), 0, 1624 }, /* ADD.W #.W,(An)+ */ -{ CPUFUNC(op_660_0), 0, 1632 }, /* ADD.W #.W,-(An) */ -{ CPUFUNC(op_668_0), 0, 1640 }, /* ADD.W #.W,(d16,An) */ -{ CPUFUNC(op_670_0), 0, 1648 }, /* ADD.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_678_0), 0, 1656 }, /* ADD.W #.W,(xxx).W */ -{ CPUFUNC(op_679_0), 0, 1657 }, /* ADD.W #.W,(xxx).L */ -{ CPUFUNC(op_680_0), 0, 1664 }, /* ADD.L #.L,Dn */ -{ CPUFUNC(op_690_0), 0, 1680 }, /* ADD.L #.L,(An) */ -{ CPUFUNC(op_698_0), 0, 1688 }, /* ADD.L #.L,(An)+ */ -{ CPUFUNC(op_6a0_0), 0, 1696 }, /* ADD.L #.L,-(An) */ -{ CPUFUNC(op_6a8_0), 0, 1704 }, /* ADD.L #.L,(d16,An) */ -{ CPUFUNC(op_6b0_0), 0, 1712 }, /* ADD.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_6b8_0), 0, 1720 }, /* ADD.L #.L,(xxx).W */ -{ CPUFUNC(op_6b9_0), 0, 1721 }, /* ADD.L #.L,(xxx).L */ -{ CPUFUNC(op_6c0_0), 0, 1728 }, /* RTM.L Dn */ -{ CPUFUNC(op_6c8_0), 0, 1736 }, /* RTM.L An */ -{ CPUFUNC_FF(op_6d0_0), 0, 1744 }, /* CALLM.L (An) */ -{ CPUFUNC_FF(op_6e8_0), 0, 1768 }, /* CALLM.L (d16,An) */ -{ CPUFUNC_FF(op_6f0_0), 0, 1776 }, /* CALLM.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_6f8_0), 0, 1784 }, /* CALLM.L (xxx).W */ -{ CPUFUNC_FF(op_6f9_0), 0, 1785 }, /* CALLM.L (xxx).L */ -{ CPUFUNC_FF(op_6fa_0), 0, 1786 }, /* CALLM.L (d16,PC) */ -{ CPUFUNC_FF(op_6fb_0), 0, 1787 }, /* CALLM.L (d8,PC,Xn) */ -{ CPUFUNC(op_800_0), 0, 2048 }, /* BTST.L #.W,Dn */ -{ CPUFUNC(op_810_0), 0, 2064 }, /* BTST.B #.W,(An) */ -{ CPUFUNC(op_818_0), 0, 2072 }, /* BTST.B #.W,(An)+ */ -{ CPUFUNC(op_820_0), 0, 2080 }, /* BTST.B #.W,-(An) */ -{ CPUFUNC(op_828_0), 0, 2088 }, /* BTST.B #.W,(d16,An) */ -{ CPUFUNC(op_830_0), 0, 2096 }, /* BTST.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_838_0), 0, 2104 }, /* BTST.B #.W,(xxx).W */ -{ CPUFUNC(op_839_0), 0, 2105 }, /* BTST.B #.W,(xxx).L */ -{ CPUFUNC(op_83a_0), 0, 2106 }, /* BTST.B #.W,(d16,PC) */ -{ CPUFUNC(op_83b_0), 0, 2107 }, /* BTST.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_83c_0), 0, 2108 }, /* BTST.B #.W,#.B */ -{ CPUFUNC(op_840_0), 0, 2112 }, /* BCHG.L #.W,Dn */ -{ CPUFUNC(op_850_0), 0, 2128 }, /* BCHG.B #.W,(An) */ -{ CPUFUNC(op_858_0), 0, 2136 }, /* BCHG.B #.W,(An)+ */ -{ CPUFUNC(op_860_0), 0, 2144 }, /* BCHG.B #.W,-(An) */ -{ CPUFUNC(op_868_0), 0, 2152 }, /* BCHG.B #.W,(d16,An) */ -{ CPUFUNC(op_870_0), 0, 2160 }, /* BCHG.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_878_0), 0, 2168 }, /* BCHG.B #.W,(xxx).W */ -{ CPUFUNC(op_879_0), 0, 2169 }, /* BCHG.B #.W,(xxx).L */ -{ CPUFUNC(op_87a_0), 0, 2170 }, /* BCHG.B #.W,(d16,PC) */ -{ CPUFUNC(op_87b_0), 0, 2171 }, /* BCHG.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_880_0), 0, 2176 }, /* BCLR.L #.W,Dn */ -{ CPUFUNC(op_890_0), 0, 2192 }, /* BCLR.B #.W,(An) */ -{ CPUFUNC(op_898_0), 0, 2200 }, /* BCLR.B #.W,(An)+ */ -{ CPUFUNC(op_8a0_0), 0, 2208 }, /* BCLR.B #.W,-(An) */ -{ CPUFUNC(op_8a8_0), 0, 2216 }, /* BCLR.B #.W,(d16,An) */ -{ CPUFUNC(op_8b0_0), 0, 2224 }, /* BCLR.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_8b8_0), 0, 2232 }, /* BCLR.B #.W,(xxx).W */ -{ CPUFUNC(op_8b9_0), 0, 2233 }, /* BCLR.B #.W,(xxx).L */ -{ CPUFUNC(op_8ba_0), 0, 2234 }, /* BCLR.B #.W,(d16,PC) */ -{ CPUFUNC(op_8bb_0), 0, 2235 }, /* BCLR.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_8c0_0), 0, 2240 }, /* BSET.L #.W,Dn */ -{ CPUFUNC(op_8d0_0), 0, 2256 }, /* BSET.B #.W,(An) */ -{ CPUFUNC(op_8d8_0), 0, 2264 }, /* BSET.B #.W,(An)+ */ -{ CPUFUNC(op_8e0_0), 0, 2272 }, /* BSET.B #.W,-(An) */ -{ CPUFUNC(op_8e8_0), 0, 2280 }, /* BSET.B #.W,(d16,An) */ -{ CPUFUNC(op_8f0_0), 0, 2288 }, /* BSET.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_8f8_0), 0, 2296 }, /* BSET.B #.W,(xxx).W */ -{ CPUFUNC(op_8f9_0), 0, 2297 }, /* BSET.B #.W,(xxx).L */ -{ CPUFUNC(op_8fa_0), 0, 2298 }, /* BSET.B #.W,(d16,PC) */ -{ CPUFUNC(op_8fb_0), 0, 2299 }, /* BSET.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_a00_0), 0, 2560 }, /* EOR.B #.B,Dn */ -{ CPUFUNC(op_a10_0), 0, 2576 }, /* EOR.B #.B,(An) */ -{ CPUFUNC(op_a18_0), 0, 2584 }, /* EOR.B #.B,(An)+ */ -{ CPUFUNC(op_a20_0), 0, 2592 }, /* EOR.B #.B,-(An) */ -{ CPUFUNC(op_a28_0), 0, 2600 }, /* EOR.B #.B,(d16,An) */ -{ CPUFUNC(op_a30_0), 0, 2608 }, /* EOR.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_a38_0), 0, 2616 }, /* EOR.B #.B,(xxx).W */ -{ CPUFUNC(op_a39_0), 0, 2617 }, /* EOR.B #.B,(xxx).L */ -{ CPUFUNC(op_a3c_0), 0, 2620 }, /* EORSR.B #.W */ -{ CPUFUNC(op_a40_0), 0, 2624 }, /* EOR.W #.W,Dn */ -{ CPUFUNC(op_a50_0), 0, 2640 }, /* EOR.W #.W,(An) */ -{ CPUFUNC(op_a58_0), 0, 2648 }, /* EOR.W #.W,(An)+ */ -{ CPUFUNC(op_a60_0), 0, 2656 }, /* EOR.W #.W,-(An) */ -{ CPUFUNC(op_a68_0), 0, 2664 }, /* EOR.W #.W,(d16,An) */ -{ CPUFUNC(op_a70_0), 0, 2672 }, /* EOR.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_a78_0), 0, 2680 }, /* EOR.W #.W,(xxx).W */ -{ CPUFUNC(op_a79_0), 0, 2681 }, /* EOR.W #.W,(xxx).L */ -{ CPUFUNC(op_a7c_0), 0, 2684 }, /* EORSR.W #.W */ -{ CPUFUNC(op_a80_0), 0, 2688 }, /* EOR.L #.L,Dn */ -{ CPUFUNC(op_a90_0), 0, 2704 }, /* EOR.L #.L,(An) */ -{ CPUFUNC(op_a98_0), 0, 2712 }, /* EOR.L #.L,(An)+ */ -{ CPUFUNC(op_aa0_0), 0, 2720 }, /* EOR.L #.L,-(An) */ -{ CPUFUNC(op_aa8_0), 0, 2728 }, /* EOR.L #.L,(d16,An) */ -{ CPUFUNC(op_ab0_0), 0, 2736 }, /* EOR.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_ab8_0), 0, 2744 }, /* EOR.L #.L,(xxx).W */ -{ CPUFUNC(op_ab9_0), 0, 2745 }, /* EOR.L #.L,(xxx).L */ -{ CPUFUNC(op_ad0_0), 0, 2768 }, /* CAS.B #.W,(An) */ -{ CPUFUNC(op_ad8_0), 0, 2776 }, /* CAS.B #.W,(An)+ */ -{ CPUFUNC(op_ae0_0), 0, 2784 }, /* CAS.B #.W,-(An) */ -{ CPUFUNC(op_ae8_0), 0, 2792 }, /* CAS.B #.W,(d16,An) */ -{ CPUFUNC(op_af0_0), 0, 2800 }, /* CAS.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_af8_0), 0, 2808 }, /* CAS.B #.W,(xxx).W */ -{ CPUFUNC(op_af9_0), 0, 2809 }, /* CAS.B #.W,(xxx).L */ -{ CPUFUNC(op_c00_0), 0, 3072 }, /* CMP.B #.B,Dn */ -{ CPUFUNC(op_c10_0), 0, 3088 }, /* CMP.B #.B,(An) */ -{ CPUFUNC(op_c18_0), 0, 3096 }, /* CMP.B #.B,(An)+ */ -{ CPUFUNC(op_c20_0), 0, 3104 }, /* CMP.B #.B,-(An) */ -{ CPUFUNC(op_c28_0), 0, 3112 }, /* CMP.B #.B,(d16,An) */ -{ CPUFUNC(op_c30_0), 0, 3120 }, /* CMP.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_c38_0), 0, 3128 }, /* CMP.B #.B,(xxx).W */ -{ CPUFUNC(op_c39_0), 0, 3129 }, /* CMP.B #.B,(xxx).L */ -{ CPUFUNC(op_c3a_0), 0, 3130 }, /* CMP.B #.B,(d16,PC) */ -{ CPUFUNC(op_c3b_0), 0, 3131 }, /* CMP.B #.B,(d8,PC,Xn) */ -{ CPUFUNC(op_c40_0), 0, 3136 }, /* CMP.W #.W,Dn */ -{ CPUFUNC(op_c50_0), 0, 3152 }, /* CMP.W #.W,(An) */ -{ CPUFUNC(op_c58_0), 0, 3160 }, /* CMP.W #.W,(An)+ */ -{ CPUFUNC(op_c60_0), 0, 3168 }, /* CMP.W #.W,-(An) */ -{ CPUFUNC(op_c68_0), 0, 3176 }, /* CMP.W #.W,(d16,An) */ -{ CPUFUNC(op_c70_0), 0, 3184 }, /* CMP.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_c78_0), 0, 3192 }, /* CMP.W #.W,(xxx).W */ -{ CPUFUNC(op_c79_0), 0, 3193 }, /* CMP.W #.W,(xxx).L */ -{ CPUFUNC(op_c7a_0), 0, 3194 }, /* CMP.W #.W,(d16,PC) */ -{ CPUFUNC(op_c7b_0), 0, 3195 }, /* CMP.W #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_c80_0), 0, 3200 }, /* CMP.L #.L,Dn */ -{ CPUFUNC(op_c90_0), 0, 3216 }, /* CMP.L #.L,(An) */ -{ CPUFUNC(op_c98_0), 0, 3224 }, /* CMP.L #.L,(An)+ */ -{ CPUFUNC(op_ca0_0), 0, 3232 }, /* CMP.L #.L,-(An) */ -{ CPUFUNC(op_ca8_0), 0, 3240 }, /* CMP.L #.L,(d16,An) */ -{ CPUFUNC(op_cb0_0), 0, 3248 }, /* CMP.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_cb8_0), 0, 3256 }, /* CMP.L #.L,(xxx).W */ -{ CPUFUNC(op_cb9_0), 0, 3257 }, /* CMP.L #.L,(xxx).L */ -{ CPUFUNC(op_cba_0), 0, 3258 }, /* CMP.L #.L,(d16,PC) */ -{ CPUFUNC(op_cbb_0), 0, 3259 }, /* CMP.L #.L,(d8,PC,Xn) */ -{ CPUFUNC(op_cd0_0), 0, 3280 }, /* CAS.W #.W,(An) */ -{ CPUFUNC(op_cd8_0), 0, 3288 }, /* CAS.W #.W,(An)+ */ -{ CPUFUNC(op_ce0_0), 0, 3296 }, /* CAS.W #.W,-(An) */ -{ CPUFUNC(op_ce8_0), 0, 3304 }, /* CAS.W #.W,(d16,An) */ -{ CPUFUNC(op_cf0_0), 0, 3312 }, /* CAS.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_cf8_0), 0, 3320 }, /* CAS.W #.W,(xxx).W */ -{ CPUFUNC(op_cf9_0), 0, 3321 }, /* CAS.W #.W,(xxx).L */ -{ CPUFUNC(op_cfc_0), 0, 3324 }, /* CAS2.W #.L */ -{ CPUFUNC_FF(op_e10_0), 0, 3600 }, /* MOVES.B #.W,(An) */ -{ CPUFUNC_FF(op_e18_0), 0, 3608 }, /* MOVES.B #.W,(An)+ */ -{ CPUFUNC_FF(op_e20_0), 0, 3616 }, /* MOVES.B #.W,-(An) */ -{ CPUFUNC_FF(op_e28_0), 0, 3624 }, /* MOVES.B #.W,(d16,An) */ -{ CPUFUNC_FF(op_e30_0), 0, 3632 }, /* MOVES.B #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_e38_0), 0, 3640 }, /* MOVES.B #.W,(xxx).W */ -{ CPUFUNC_FF(op_e39_0), 0, 3641 }, /* MOVES.B #.W,(xxx).L */ -{ CPUFUNC_FF(op_e50_0), 0, 3664 }, /* MOVES.W #.W,(An) */ -{ CPUFUNC_FF(op_e58_0), 0, 3672 }, /* MOVES.W #.W,(An)+ */ -{ CPUFUNC_FF(op_e60_0), 0, 3680 }, /* MOVES.W #.W,-(An) */ -{ CPUFUNC_FF(op_e68_0), 0, 3688 }, /* MOVES.W #.W,(d16,An) */ -{ CPUFUNC_FF(op_e70_0), 0, 3696 }, /* MOVES.W #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_e78_0), 0, 3704 }, /* MOVES.W #.W,(xxx).W */ -{ CPUFUNC_FF(op_e79_0), 0, 3705 }, /* MOVES.W #.W,(xxx).L */ -{ CPUFUNC_FF(op_e90_0), 0, 3728 }, /* MOVES.L #.W,(An) */ -{ CPUFUNC_FF(op_e98_0), 0, 3736 }, /* MOVES.L #.W,(An)+ */ -{ CPUFUNC_FF(op_ea0_0), 0, 3744 }, /* MOVES.L #.W,-(An) */ -{ CPUFUNC_FF(op_ea8_0), 0, 3752 }, /* MOVES.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_eb0_0), 0, 3760 }, /* MOVES.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_eb8_0), 0, 3768 }, /* MOVES.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_eb9_0), 0, 3769 }, /* MOVES.L #.W,(xxx).L */ -{ CPUFUNC(op_ed0_0), 0, 3792 }, /* CAS.L #.W,(An) */ -{ CPUFUNC(op_ed8_0), 0, 3800 }, /* CAS.L #.W,(An)+ */ -{ CPUFUNC(op_ee0_0), 0, 3808 }, /* CAS.L #.W,-(An) */ -{ CPUFUNC(op_ee8_0), 0, 3816 }, /* CAS.L #.W,(d16,An) */ -{ CPUFUNC(op_ef0_0), 0, 3824 }, /* CAS.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_ef8_0), 0, 3832 }, /* CAS.L #.W,(xxx).W */ -{ CPUFUNC(op_ef9_0), 0, 3833 }, /* CAS.L #.W,(xxx).L */ -{ CPUFUNC(op_efc_0), 0, 3836 }, /* CAS2.L #.L */ -{ CPUFUNC(op_1000_0), 0, 4096 }, /* MOVE.B Dn,Dn */ -{ CPUFUNC(op_1010_0), 0, 4112 }, /* MOVE.B (An),Dn */ -{ CPUFUNC(op_1018_0), 0, 4120 }, /* MOVE.B (An)+,Dn */ -{ CPUFUNC(op_1020_0), 0, 4128 }, /* MOVE.B -(An),Dn */ -{ CPUFUNC(op_1028_0), 0, 4136 }, /* MOVE.B (d16,An),Dn */ -{ CPUFUNC(op_1030_0), 0, 4144 }, /* MOVE.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_1038_0), 0, 4152 }, /* MOVE.B (xxx).W,Dn */ -{ CPUFUNC(op_1039_0), 0, 4153 }, /* MOVE.B (xxx).L,Dn */ -{ CPUFUNC(op_103a_0), 0, 4154 }, /* MOVE.B (d16,PC),Dn */ -{ CPUFUNC(op_103b_0), 0, 4155 }, /* MOVE.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_103c_0), 0, 4156 }, /* MOVE.B #.B,Dn */ -{ CPUFUNC(op_1080_0), 0, 4224 }, /* MOVE.B Dn,(An) */ -{ CPUFUNC(op_1090_0), 0, 4240 }, /* MOVE.B (An),(An) */ -{ CPUFUNC(op_1098_0), 0, 4248 }, /* MOVE.B (An)+,(An) */ -{ CPUFUNC(op_10a0_0), 0, 4256 }, /* MOVE.B -(An),(An) */ -{ CPUFUNC(op_10a8_0), 0, 4264 }, /* MOVE.B (d16,An),(An) */ -{ CPUFUNC(op_10b0_0), 0, 4272 }, /* MOVE.B (d8,An,Xn),(An) */ -{ CPUFUNC(op_10b8_0), 0, 4280 }, /* MOVE.B (xxx).W,(An) */ -{ CPUFUNC(op_10b9_0), 0, 4281 }, /* MOVE.B (xxx).L,(An) */ -{ CPUFUNC(op_10ba_0), 0, 4282 }, /* MOVE.B (d16,PC),(An) */ -{ CPUFUNC(op_10bb_0), 0, 4283 }, /* MOVE.B (d8,PC,Xn),(An) */ -{ CPUFUNC(op_10bc_0), 0, 4284 }, /* MOVE.B #.B,(An) */ -{ CPUFUNC(op_10c0_0), 0, 4288 }, /* MOVE.B Dn,(An)+ */ -{ CPUFUNC(op_10d0_0), 0, 4304 }, /* MOVE.B (An),(An)+ */ -{ CPUFUNC(op_10d8_0), 0, 4312 }, /* MOVE.B (An)+,(An)+ */ -{ CPUFUNC(op_10e0_0), 0, 4320 }, /* MOVE.B -(An),(An)+ */ -{ CPUFUNC(op_10e8_0), 0, 4328 }, /* MOVE.B (d16,An),(An)+ */ -{ CPUFUNC(op_10f0_0), 0, 4336 }, /* MOVE.B (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_10f8_0), 0, 4344 }, /* MOVE.B (xxx).W,(An)+ */ -{ CPUFUNC(op_10f9_0), 0, 4345 }, /* MOVE.B (xxx).L,(An)+ */ -{ CPUFUNC(op_10fa_0), 0, 4346 }, /* MOVE.B (d16,PC),(An)+ */ -{ CPUFUNC(op_10fb_0), 0, 4347 }, /* MOVE.B (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_10fc_0), 0, 4348 }, /* MOVE.B #.B,(An)+ */ -{ CPUFUNC(op_1100_0), 0, 4352 }, /* MOVE.B Dn,-(An) */ -{ CPUFUNC(op_1110_0), 0, 4368 }, /* MOVE.B (An),-(An) */ -{ CPUFUNC(op_1118_0), 0, 4376 }, /* MOVE.B (An)+,-(An) */ -{ CPUFUNC(op_1120_0), 0, 4384 }, /* MOVE.B -(An),-(An) */ -{ CPUFUNC(op_1128_0), 0, 4392 }, /* MOVE.B (d16,An),-(An) */ -{ CPUFUNC(op_1130_0), 0, 4400 }, /* MOVE.B (d8,An,Xn),-(An) */ -{ CPUFUNC(op_1138_0), 0, 4408 }, /* MOVE.B (xxx).W,-(An) */ -{ CPUFUNC(op_1139_0), 0, 4409 }, /* MOVE.B (xxx).L,-(An) */ -{ CPUFUNC(op_113a_0), 0, 4410 }, /* MOVE.B (d16,PC),-(An) */ -{ CPUFUNC(op_113b_0), 0, 4411 }, /* MOVE.B (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_113c_0), 0, 4412 }, /* MOVE.B #.B,-(An) */ -{ CPUFUNC(op_1140_0), 0, 4416 }, /* MOVE.B Dn,(d16,An) */ -{ CPUFUNC(op_1150_0), 0, 4432 }, /* MOVE.B (An),(d16,An) */ -{ CPUFUNC(op_1158_0), 0, 4440 }, /* MOVE.B (An)+,(d16,An) */ -{ CPUFUNC(op_1160_0), 0, 4448 }, /* MOVE.B -(An),(d16,An) */ -{ CPUFUNC(op_1168_0), 0, 4456 }, /* MOVE.B (d16,An),(d16,An) */ -{ CPUFUNC(op_1170_0), 0, 4464 }, /* MOVE.B (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_1178_0), 0, 4472 }, /* MOVE.B (xxx).W,(d16,An) */ -{ CPUFUNC(op_1179_0), 0, 4473 }, /* MOVE.B (xxx).L,(d16,An) */ -{ CPUFUNC(op_117a_0), 0, 4474 }, /* MOVE.B (d16,PC),(d16,An) */ -{ CPUFUNC(op_117b_0), 0, 4475 }, /* MOVE.B (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_117c_0), 0, 4476 }, /* MOVE.B #.B,(d16,An) */ -{ CPUFUNC(op_1180_0), 0, 4480 }, /* MOVE.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1190_0), 0, 4496 }, /* MOVE.B (An),(d8,An,Xn) */ -{ CPUFUNC(op_1198_0), 0, 4504 }, /* MOVE.B (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_11a0_0), 0, 4512 }, /* MOVE.B -(An),(d8,An,Xn) */ -{ CPUFUNC(op_11a8_0), 0, 4520 }, /* MOVE.B (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_11b0_0), 0, 4528 }, /* MOVE.B (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_11b8_0), 0, 4536 }, /* MOVE.B (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_11b9_0), 0, 4537 }, /* MOVE.B (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_11ba_0), 0, 4538 }, /* MOVE.B (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_11bb_0), 0, 4539 }, /* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_11bc_0), 0, 4540 }, /* MOVE.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_11c0_0), 0, 4544 }, /* MOVE.B Dn,(xxx).W */ -{ CPUFUNC(op_11d0_0), 0, 4560 }, /* MOVE.B (An),(xxx).W */ -{ CPUFUNC(op_11d8_0), 0, 4568 }, /* MOVE.B (An)+,(xxx).W */ -{ CPUFUNC(op_11e0_0), 0, 4576 }, /* MOVE.B -(An),(xxx).W */ -{ CPUFUNC(op_11e8_0), 0, 4584 }, /* MOVE.B (d16,An),(xxx).W */ -{ CPUFUNC(op_11f0_0), 0, 4592 }, /* MOVE.B (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_11f8_0), 0, 4600 }, /* MOVE.B (xxx).W,(xxx).W */ -{ CPUFUNC(op_11f9_0), 0, 4601 }, /* MOVE.B (xxx).L,(xxx).W */ -{ CPUFUNC(op_11fa_0), 0, 4602 }, /* MOVE.B (d16,PC),(xxx).W */ -{ CPUFUNC(op_11fb_0), 0, 4603 }, /* MOVE.B (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_11fc_0), 0, 4604 }, /* MOVE.B #.B,(xxx).W */ -{ CPUFUNC(op_13c0_0), 0, 5056 }, /* MOVE.B Dn,(xxx).L */ -{ CPUFUNC(op_13d0_0), 0, 5072 }, /* MOVE.B (An),(xxx).L */ -{ CPUFUNC(op_13d8_0), 0, 5080 }, /* MOVE.B (An)+,(xxx).L */ -{ CPUFUNC(op_13e0_0), 0, 5088 }, /* MOVE.B -(An),(xxx).L */ -{ CPUFUNC(op_13e8_0), 0, 5096 }, /* MOVE.B (d16,An),(xxx).L */ -{ CPUFUNC(op_13f0_0), 0, 5104 }, /* MOVE.B (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_13f8_0), 0, 5112 }, /* MOVE.B (xxx).W,(xxx).L */ -{ CPUFUNC(op_13f9_0), 0, 5113 }, /* MOVE.B (xxx).L,(xxx).L */ -{ CPUFUNC(op_13fa_0), 0, 5114 }, /* MOVE.B (d16,PC),(xxx).L */ -{ CPUFUNC(op_13fb_0), 0, 5115 }, /* MOVE.B (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_13fc_0), 0, 5116 }, /* MOVE.B #.B,(xxx).L */ -{ CPUFUNC(op_2000_0), 0, 8192 }, /* MOVE.L Dn,Dn */ -{ CPUFUNC(op_2008_0), 0, 8200 }, /* MOVE.L An,Dn */ -{ CPUFUNC(op_2010_0), 0, 8208 }, /* MOVE.L (An),Dn */ -{ CPUFUNC(op_2018_0), 0, 8216 }, /* MOVE.L (An)+,Dn */ -{ CPUFUNC(op_2020_0), 0, 8224 }, /* MOVE.L -(An),Dn */ -{ CPUFUNC(op_2028_0), 0, 8232 }, /* MOVE.L (d16,An),Dn */ -{ CPUFUNC(op_2030_0), 0, 8240 }, /* MOVE.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_2038_0), 0, 8248 }, /* MOVE.L (xxx).W,Dn */ -{ CPUFUNC(op_2039_0), 0, 8249 }, /* MOVE.L (xxx).L,Dn */ -{ CPUFUNC(op_203a_0), 0, 8250 }, /* MOVE.L (d16,PC),Dn */ -{ CPUFUNC(op_203b_0), 0, 8251 }, /* MOVE.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_203c_0), 0, 8252 }, /* MOVE.L #.L,Dn */ -{ CPUFUNC_FF(op_2040_0), 0, 8256 }, /* MOVEA.L Dn,An */ -{ CPUFUNC_FF(op_2048_0), 0, 8264 }, /* MOVEA.L An,An */ -{ CPUFUNC_FF(op_2050_0), 0, 8272 }, /* MOVEA.L (An),An */ -{ CPUFUNC_FF(op_2058_0), 0, 8280 }, /* MOVEA.L (An)+,An */ -{ CPUFUNC_FF(op_2060_0), 0, 8288 }, /* MOVEA.L -(An),An */ -{ CPUFUNC_FF(op_2068_0), 0, 8296 }, /* MOVEA.L (d16,An),An */ -{ CPUFUNC_FF(op_2070_0), 0, 8304 }, /* MOVEA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_2078_0), 0, 8312 }, /* MOVEA.L (xxx).W,An */ -{ CPUFUNC_FF(op_2079_0), 0, 8313 }, /* MOVEA.L (xxx).L,An */ -{ CPUFUNC_FF(op_207a_0), 0, 8314 }, /* MOVEA.L (d16,PC),An */ -{ CPUFUNC_FF(op_207b_0), 0, 8315 }, /* MOVEA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_207c_0), 0, 8316 }, /* MOVEA.L #.L,An */ -{ CPUFUNC(op_2080_0), 0, 8320 }, /* MOVE.L Dn,(An) */ -{ CPUFUNC(op_2088_0), 0, 8328 }, /* MOVE.L An,(An) */ -{ CPUFUNC(op_2090_0), 0, 8336 }, /* MOVE.L (An),(An) */ -{ CPUFUNC(op_2098_0), 0, 8344 }, /* MOVE.L (An)+,(An) */ -{ CPUFUNC(op_20a0_0), 0, 8352 }, /* MOVE.L -(An),(An) */ -{ CPUFUNC(op_20a8_0), 0, 8360 }, /* MOVE.L (d16,An),(An) */ -{ CPUFUNC(op_20b0_0), 0, 8368 }, /* MOVE.L (d8,An,Xn),(An) */ -{ CPUFUNC(op_20b8_0), 0, 8376 }, /* MOVE.L (xxx).W,(An) */ -{ CPUFUNC(op_20b9_0), 0, 8377 }, /* MOVE.L (xxx).L,(An) */ -{ CPUFUNC(op_20ba_0), 0, 8378 }, /* MOVE.L (d16,PC),(An) */ -{ CPUFUNC(op_20bb_0), 0, 8379 }, /* MOVE.L (d8,PC,Xn),(An) */ -{ CPUFUNC(op_20bc_0), 0, 8380 }, /* MOVE.L #.L,(An) */ -{ CPUFUNC(op_20c0_0), 0, 8384 }, /* MOVE.L Dn,(An)+ */ -{ CPUFUNC(op_20c8_0), 0, 8392 }, /* MOVE.L An,(An)+ */ -{ CPUFUNC(op_20d0_0), 0, 8400 }, /* MOVE.L (An),(An)+ */ -{ CPUFUNC(op_20d8_0), 0, 8408 }, /* MOVE.L (An)+,(An)+ */ -{ CPUFUNC(op_20e0_0), 0, 8416 }, /* MOVE.L -(An),(An)+ */ -{ CPUFUNC(op_20e8_0), 0, 8424 }, /* MOVE.L (d16,An),(An)+ */ -{ CPUFUNC(op_20f0_0), 0, 8432 }, /* MOVE.L (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_20f8_0), 0, 8440 }, /* MOVE.L (xxx).W,(An)+ */ -{ CPUFUNC(op_20f9_0), 0, 8441 }, /* MOVE.L (xxx).L,(An)+ */ -{ CPUFUNC(op_20fa_0), 0, 8442 }, /* MOVE.L (d16,PC),(An)+ */ -{ CPUFUNC(op_20fb_0), 0, 8443 }, /* MOVE.L (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_20fc_0), 0, 8444 }, /* MOVE.L #.L,(An)+ */ -{ CPUFUNC(op_2100_0), 0, 8448 }, /* MOVE.L Dn,-(An) */ -{ CPUFUNC(op_2108_0), 0, 8456 }, /* MOVE.L An,-(An) */ -{ CPUFUNC(op_2110_0), 0, 8464 }, /* MOVE.L (An),-(An) */ -{ CPUFUNC(op_2118_0), 0, 8472 }, /* MOVE.L (An)+,-(An) */ -{ CPUFUNC(op_2120_0), 0, 8480 }, /* MOVE.L -(An),-(An) */ -{ CPUFUNC(op_2128_0), 0, 8488 }, /* MOVE.L (d16,An),-(An) */ -{ CPUFUNC(op_2130_0), 0, 8496 }, /* MOVE.L (d8,An,Xn),-(An) */ -{ CPUFUNC(op_2138_0), 0, 8504 }, /* MOVE.L (xxx).W,-(An) */ -{ CPUFUNC(op_2139_0), 0, 8505 }, /* MOVE.L (xxx).L,-(An) */ -{ CPUFUNC(op_213a_0), 0, 8506 }, /* MOVE.L (d16,PC),-(An) */ -{ CPUFUNC(op_213b_0), 0, 8507 }, /* MOVE.L (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_213c_0), 0, 8508 }, /* MOVE.L #.L,-(An) */ -{ CPUFUNC(op_2140_0), 0, 8512 }, /* MOVE.L Dn,(d16,An) */ -{ CPUFUNC(op_2148_0), 0, 8520 }, /* MOVE.L An,(d16,An) */ -{ CPUFUNC(op_2150_0), 0, 8528 }, /* MOVE.L (An),(d16,An) */ -{ CPUFUNC(op_2158_0), 0, 8536 }, /* MOVE.L (An)+,(d16,An) */ -{ CPUFUNC(op_2160_0), 0, 8544 }, /* MOVE.L -(An),(d16,An) */ -{ CPUFUNC(op_2168_0), 0, 8552 }, /* MOVE.L (d16,An),(d16,An) */ -{ CPUFUNC(op_2170_0), 0, 8560 }, /* MOVE.L (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_2178_0), 0, 8568 }, /* MOVE.L (xxx).W,(d16,An) */ -{ CPUFUNC(op_2179_0), 0, 8569 }, /* MOVE.L (xxx).L,(d16,An) */ -{ CPUFUNC(op_217a_0), 0, 8570 }, /* MOVE.L (d16,PC),(d16,An) */ -{ CPUFUNC(op_217b_0), 0, 8571 }, /* MOVE.L (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_217c_0), 0, 8572 }, /* MOVE.L #.L,(d16,An) */ -{ CPUFUNC(op_2180_0), 0, 8576 }, /* MOVE.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_2188_0), 0, 8584 }, /* MOVE.L An,(d8,An,Xn) */ -{ CPUFUNC(op_2190_0), 0, 8592 }, /* MOVE.L (An),(d8,An,Xn) */ -{ CPUFUNC(op_2198_0), 0, 8600 }, /* MOVE.L (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_21a0_0), 0, 8608 }, /* MOVE.L -(An),(d8,An,Xn) */ -{ CPUFUNC(op_21a8_0), 0, 8616 }, /* MOVE.L (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_21b0_0), 0, 8624 }, /* MOVE.L (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_21b8_0), 0, 8632 }, /* MOVE.L (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_21b9_0), 0, 8633 }, /* MOVE.L (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_21ba_0), 0, 8634 }, /* MOVE.L (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_21bb_0), 0, 8635 }, /* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_21bc_0), 0, 8636 }, /* MOVE.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_21c0_0), 0, 8640 }, /* MOVE.L Dn,(xxx).W */ -{ CPUFUNC(op_21c8_0), 0, 8648 }, /* MOVE.L An,(xxx).W */ -{ CPUFUNC(op_21d0_0), 0, 8656 }, /* MOVE.L (An),(xxx).W */ -{ CPUFUNC(op_21d8_0), 0, 8664 }, /* MOVE.L (An)+,(xxx).W */ -{ CPUFUNC(op_21e0_0), 0, 8672 }, /* MOVE.L -(An),(xxx).W */ -{ CPUFUNC(op_21e8_0), 0, 8680 }, /* MOVE.L (d16,An),(xxx).W */ -{ CPUFUNC(op_21f0_0), 0, 8688 }, /* MOVE.L (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_21f8_0), 0, 8696 }, /* MOVE.L (xxx).W,(xxx).W */ -{ CPUFUNC(op_21f9_0), 0, 8697 }, /* MOVE.L (xxx).L,(xxx).W */ -{ CPUFUNC(op_21fa_0), 0, 8698 }, /* MOVE.L (d16,PC),(xxx).W */ -{ CPUFUNC(op_21fb_0), 0, 8699 }, /* MOVE.L (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_21fc_0), 0, 8700 }, /* MOVE.L #.L,(xxx).W */ -{ CPUFUNC(op_23c0_0), 0, 9152 }, /* MOVE.L Dn,(xxx).L */ -{ CPUFUNC(op_23c8_0), 0, 9160 }, /* MOVE.L An,(xxx).L */ -{ CPUFUNC(op_23d0_0), 0, 9168 }, /* MOVE.L (An),(xxx).L */ -{ CPUFUNC(op_23d8_0), 0, 9176 }, /* MOVE.L (An)+,(xxx).L */ -{ CPUFUNC(op_23e0_0), 0, 9184 }, /* MOVE.L -(An),(xxx).L */ -{ CPUFUNC(op_23e8_0), 0, 9192 }, /* MOVE.L (d16,An),(xxx).L */ -{ CPUFUNC(op_23f0_0), 0, 9200 }, /* MOVE.L (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_23f8_0), 0, 9208 }, /* MOVE.L (xxx).W,(xxx).L */ -{ CPUFUNC(op_23f9_0), 0, 9209 }, /* MOVE.L (xxx).L,(xxx).L */ -{ CPUFUNC(op_23fa_0), 0, 9210 }, /* MOVE.L (d16,PC),(xxx).L */ -{ CPUFUNC(op_23fb_0), 0, 9211 }, /* MOVE.L (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_23fc_0), 0, 9212 }, /* MOVE.L #.L,(xxx).L */ -{ CPUFUNC(op_3000_0), 0, 12288 }, /* MOVE.W Dn,Dn */ -{ CPUFUNC(op_3008_0), 0, 12296 }, /* MOVE.W An,Dn */ -{ CPUFUNC(op_3010_0), 0, 12304 }, /* MOVE.W (An),Dn */ -{ CPUFUNC(op_3018_0), 0, 12312 }, /* MOVE.W (An)+,Dn */ -{ CPUFUNC(op_3020_0), 0, 12320 }, /* MOVE.W -(An),Dn */ -{ CPUFUNC(op_3028_0), 0, 12328 }, /* MOVE.W (d16,An),Dn */ -{ CPUFUNC(op_3030_0), 0, 12336 }, /* MOVE.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_3038_0), 0, 12344 }, /* MOVE.W (xxx).W,Dn */ -{ CPUFUNC(op_3039_0), 0, 12345 }, /* MOVE.W (xxx).L,Dn */ -{ CPUFUNC(op_303a_0), 0, 12346 }, /* MOVE.W (d16,PC),Dn */ -{ CPUFUNC(op_303b_0), 0, 12347 }, /* MOVE.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_303c_0), 0, 12348 }, /* MOVE.W #.W,Dn */ -{ CPUFUNC_FF(op_3040_0), 0, 12352 }, /* MOVEA.W Dn,An */ -{ CPUFUNC_FF(op_3048_0), 0, 12360 }, /* MOVEA.W An,An */ -{ CPUFUNC_FF(op_3050_0), 0, 12368 }, /* MOVEA.W (An),An */ -{ CPUFUNC_FF(op_3058_0), 0, 12376 }, /* MOVEA.W (An)+,An */ -{ CPUFUNC_FF(op_3060_0), 0, 12384 }, /* MOVEA.W -(An),An */ -{ CPUFUNC_FF(op_3068_0), 0, 12392 }, /* MOVEA.W (d16,An),An */ -{ CPUFUNC_FF(op_3070_0), 0, 12400 }, /* MOVEA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_3078_0), 0, 12408 }, /* MOVEA.W (xxx).W,An */ -{ CPUFUNC_FF(op_3079_0), 0, 12409 }, /* MOVEA.W (xxx).L,An */ -{ CPUFUNC_FF(op_307a_0), 0, 12410 }, /* MOVEA.W (d16,PC),An */ -{ CPUFUNC_FF(op_307b_0), 0, 12411 }, /* MOVEA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_307c_0), 0, 12412 }, /* MOVEA.W #.W,An */ -{ CPUFUNC(op_3080_0), 0, 12416 }, /* MOVE.W Dn,(An) */ -{ CPUFUNC(op_3088_0), 0, 12424 }, /* MOVE.W An,(An) */ -{ CPUFUNC(op_3090_0), 0, 12432 }, /* MOVE.W (An),(An) */ -{ CPUFUNC(op_3098_0), 0, 12440 }, /* MOVE.W (An)+,(An) */ -{ CPUFUNC(op_30a0_0), 0, 12448 }, /* MOVE.W -(An),(An) */ -{ CPUFUNC(op_30a8_0), 0, 12456 }, /* MOVE.W (d16,An),(An) */ -{ CPUFUNC(op_30b0_0), 0, 12464 }, /* MOVE.W (d8,An,Xn),(An) */ -{ CPUFUNC(op_30b8_0), 0, 12472 }, /* MOVE.W (xxx).W,(An) */ -{ CPUFUNC(op_30b9_0), 0, 12473 }, /* MOVE.W (xxx).L,(An) */ -{ CPUFUNC(op_30ba_0), 0, 12474 }, /* MOVE.W (d16,PC),(An) */ -{ CPUFUNC(op_30bb_0), 0, 12475 }, /* MOVE.W (d8,PC,Xn),(An) */ -{ CPUFUNC(op_30bc_0), 0, 12476 }, /* MOVE.W #.W,(An) */ -{ CPUFUNC(op_30c0_0), 0, 12480 }, /* MOVE.W Dn,(An)+ */ -{ CPUFUNC(op_30c8_0), 0, 12488 }, /* MOVE.W An,(An)+ */ -{ CPUFUNC(op_30d0_0), 0, 12496 }, /* MOVE.W (An),(An)+ */ -{ CPUFUNC(op_30d8_0), 0, 12504 }, /* MOVE.W (An)+,(An)+ */ -{ CPUFUNC(op_30e0_0), 0, 12512 }, /* MOVE.W -(An),(An)+ */ -{ CPUFUNC(op_30e8_0), 0, 12520 }, /* MOVE.W (d16,An),(An)+ */ -{ CPUFUNC(op_30f0_0), 0, 12528 }, /* MOVE.W (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_30f8_0), 0, 12536 }, /* MOVE.W (xxx).W,(An)+ */ -{ CPUFUNC(op_30f9_0), 0, 12537 }, /* MOVE.W (xxx).L,(An)+ */ -{ CPUFUNC(op_30fa_0), 0, 12538 }, /* MOVE.W (d16,PC),(An)+ */ -{ CPUFUNC(op_30fb_0), 0, 12539 }, /* MOVE.W (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_30fc_0), 0, 12540 }, /* MOVE.W #.W,(An)+ */ -{ CPUFUNC(op_3100_0), 0, 12544 }, /* MOVE.W Dn,-(An) */ -{ CPUFUNC(op_3108_0), 0, 12552 }, /* MOVE.W An,-(An) */ -{ CPUFUNC(op_3110_0), 0, 12560 }, /* MOVE.W (An),-(An) */ -{ CPUFUNC(op_3118_0), 0, 12568 }, /* MOVE.W (An)+,-(An) */ -{ CPUFUNC(op_3120_0), 0, 12576 }, /* MOVE.W -(An),-(An) */ -{ CPUFUNC(op_3128_0), 0, 12584 }, /* MOVE.W (d16,An),-(An) */ -{ CPUFUNC(op_3130_0), 0, 12592 }, /* MOVE.W (d8,An,Xn),-(An) */ -{ CPUFUNC(op_3138_0), 0, 12600 }, /* MOVE.W (xxx).W,-(An) */ -{ CPUFUNC(op_3139_0), 0, 12601 }, /* MOVE.W (xxx).L,-(An) */ -{ CPUFUNC(op_313a_0), 0, 12602 }, /* MOVE.W (d16,PC),-(An) */ -{ CPUFUNC(op_313b_0), 0, 12603 }, /* MOVE.W (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_313c_0), 0, 12604 }, /* MOVE.W #.W,-(An) */ -{ CPUFUNC(op_3140_0), 0, 12608 }, /* MOVE.W Dn,(d16,An) */ -{ CPUFUNC(op_3148_0), 0, 12616 }, /* MOVE.W An,(d16,An) */ -{ CPUFUNC(op_3150_0), 0, 12624 }, /* MOVE.W (An),(d16,An) */ -{ CPUFUNC(op_3158_0), 0, 12632 }, /* MOVE.W (An)+,(d16,An) */ -{ CPUFUNC(op_3160_0), 0, 12640 }, /* MOVE.W -(An),(d16,An) */ -{ CPUFUNC(op_3168_0), 0, 12648 }, /* MOVE.W (d16,An),(d16,An) */ -{ CPUFUNC(op_3170_0), 0, 12656 }, /* MOVE.W (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_3178_0), 0, 12664 }, /* MOVE.W (xxx).W,(d16,An) */ -{ CPUFUNC(op_3179_0), 0, 12665 }, /* MOVE.W (xxx).L,(d16,An) */ -{ CPUFUNC(op_317a_0), 0, 12666 }, /* MOVE.W (d16,PC),(d16,An) */ -{ CPUFUNC(op_317b_0), 0, 12667 }, /* MOVE.W (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_317c_0), 0, 12668 }, /* MOVE.W #.W,(d16,An) */ -{ CPUFUNC(op_3180_0), 0, 12672 }, /* MOVE.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_3188_0), 0, 12680 }, /* MOVE.W An,(d8,An,Xn) */ -{ CPUFUNC(op_3190_0), 0, 12688 }, /* MOVE.W (An),(d8,An,Xn) */ -{ CPUFUNC(op_3198_0), 0, 12696 }, /* MOVE.W (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_31a0_0), 0, 12704 }, /* MOVE.W -(An),(d8,An,Xn) */ -{ CPUFUNC(op_31a8_0), 0, 12712 }, /* MOVE.W (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_31b0_0), 0, 12720 }, /* MOVE.W (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_31b8_0), 0, 12728 }, /* MOVE.W (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_31b9_0), 0, 12729 }, /* MOVE.W (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_31ba_0), 0, 12730 }, /* MOVE.W (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_31bb_0), 0, 12731 }, /* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_31bc_0), 0, 12732 }, /* MOVE.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_31c0_0), 0, 12736 }, /* MOVE.W Dn,(xxx).W */ -{ CPUFUNC(op_31c8_0), 0, 12744 }, /* MOVE.W An,(xxx).W */ -{ CPUFUNC(op_31d0_0), 0, 12752 }, /* MOVE.W (An),(xxx).W */ -{ CPUFUNC(op_31d8_0), 0, 12760 }, /* MOVE.W (An)+,(xxx).W */ -{ CPUFUNC(op_31e0_0), 0, 12768 }, /* MOVE.W -(An),(xxx).W */ -{ CPUFUNC(op_31e8_0), 0, 12776 }, /* MOVE.W (d16,An),(xxx).W */ -{ CPUFUNC(op_31f0_0), 0, 12784 }, /* MOVE.W (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_31f8_0), 0, 12792 }, /* MOVE.W (xxx).W,(xxx).W */ -{ CPUFUNC(op_31f9_0), 0, 12793 }, /* MOVE.W (xxx).L,(xxx).W */ -{ CPUFUNC(op_31fa_0), 0, 12794 }, /* MOVE.W (d16,PC),(xxx).W */ -{ CPUFUNC(op_31fb_0), 0, 12795 }, /* MOVE.W (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_31fc_0), 0, 12796 }, /* MOVE.W #.W,(xxx).W */ -{ CPUFUNC(op_33c0_0), 0, 13248 }, /* MOVE.W Dn,(xxx).L */ -{ CPUFUNC(op_33c8_0), 0, 13256 }, /* MOVE.W An,(xxx).L */ -{ CPUFUNC(op_33d0_0), 0, 13264 }, /* MOVE.W (An),(xxx).L */ -{ CPUFUNC(op_33d8_0), 0, 13272 }, /* MOVE.W (An)+,(xxx).L */ -{ CPUFUNC(op_33e0_0), 0, 13280 }, /* MOVE.W -(An),(xxx).L */ -{ CPUFUNC(op_33e8_0), 0, 13288 }, /* MOVE.W (d16,An),(xxx).L */ -{ CPUFUNC(op_33f0_0), 0, 13296 }, /* MOVE.W (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_33f8_0), 0, 13304 }, /* MOVE.W (xxx).W,(xxx).L */ -{ CPUFUNC(op_33f9_0), 0, 13305 }, /* MOVE.W (xxx).L,(xxx).L */ -{ CPUFUNC(op_33fa_0), 0, 13306 }, /* MOVE.W (d16,PC),(xxx).L */ -{ CPUFUNC(op_33fb_0), 0, 13307 }, /* MOVE.W (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_33fc_0), 0, 13308 }, /* MOVE.W #.W,(xxx).L */ -{ CPUFUNC(op_4000_0), 0, 16384 }, /* NEGX.B Dn */ -{ CPUFUNC(op_4010_0), 0, 16400 }, /* NEGX.B (An) */ -{ CPUFUNC(op_4018_0), 0, 16408 }, /* NEGX.B (An)+ */ -{ CPUFUNC(op_4020_0), 0, 16416 }, /* NEGX.B -(An) */ -{ CPUFUNC(op_4028_0), 0, 16424 }, /* NEGX.B (d16,An) */ -{ CPUFUNC(op_4030_0), 0, 16432 }, /* NEGX.B (d8,An,Xn) */ -{ CPUFUNC(op_4038_0), 0, 16440 }, /* NEGX.B (xxx).W */ -{ CPUFUNC(op_4039_0), 0, 16441 }, /* NEGX.B (xxx).L */ -{ CPUFUNC(op_4040_0), 0, 16448 }, /* NEGX.W Dn */ -{ CPUFUNC(op_4050_0), 0, 16464 }, /* NEGX.W (An) */ -{ CPUFUNC(op_4058_0), 0, 16472 }, /* NEGX.W (An)+ */ -{ CPUFUNC(op_4060_0), 0, 16480 }, /* NEGX.W -(An) */ -{ CPUFUNC(op_4068_0), 0, 16488 }, /* NEGX.W (d16,An) */ -{ CPUFUNC(op_4070_0), 0, 16496 }, /* NEGX.W (d8,An,Xn) */ -{ CPUFUNC(op_4078_0), 0, 16504 }, /* NEGX.W (xxx).W */ -{ CPUFUNC(op_4079_0), 0, 16505 }, /* NEGX.W (xxx).L */ -{ CPUFUNC(op_4080_0), 0, 16512 }, /* NEGX.L Dn */ -{ CPUFUNC(op_4090_0), 0, 16528 }, /* NEGX.L (An) */ -{ CPUFUNC(op_4098_0), 0, 16536 }, /* NEGX.L (An)+ */ -{ CPUFUNC(op_40a0_0), 0, 16544 }, /* NEGX.L -(An) */ -{ CPUFUNC(op_40a8_0), 0, 16552 }, /* NEGX.L (d16,An) */ -{ CPUFUNC(op_40b0_0), 0, 16560 }, /* NEGX.L (d8,An,Xn) */ -{ CPUFUNC(op_40b8_0), 0, 16568 }, /* NEGX.L (xxx).W */ -{ CPUFUNC(op_40b9_0), 0, 16569 }, /* NEGX.L (xxx).L */ -{ CPUFUNC_FF(op_40c0_0), 0, 16576 }, /* MVSR2.W Dn */ -{ CPUFUNC_FF(op_40d0_0), 0, 16592 }, /* MVSR2.W (An) */ -{ CPUFUNC_FF(op_40d8_0), 0, 16600 }, /* MVSR2.W (An)+ */ -{ CPUFUNC_FF(op_40e0_0), 0, 16608 }, /* MVSR2.W -(An) */ -{ CPUFUNC_FF(op_40e8_0), 0, 16616 }, /* MVSR2.W (d16,An) */ -{ CPUFUNC_FF(op_40f0_0), 0, 16624 }, /* MVSR2.W (d8,An,Xn) */ -{ CPUFUNC_FF(op_40f8_0), 0, 16632 }, /* MVSR2.W (xxx).W */ -{ CPUFUNC_FF(op_40f9_0), 0, 16633 }, /* MVSR2.W (xxx).L */ -{ CPUFUNC(op_4100_0), 0, 16640 }, /* CHK.L Dn,Dn */ -{ CPUFUNC(op_4110_0), 0, 16656 }, /* CHK.L (An),Dn */ -{ CPUFUNC(op_4118_0), 0, 16664 }, /* CHK.L (An)+,Dn */ -{ CPUFUNC(op_4120_0), 0, 16672 }, /* CHK.L -(An),Dn */ -{ CPUFUNC(op_4128_0), 0, 16680 }, /* CHK.L (d16,An),Dn */ -{ CPUFUNC(op_4130_0), 0, 16688 }, /* CHK.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_4138_0), 0, 16696 }, /* CHK.L (xxx).W,Dn */ -{ CPUFUNC(op_4139_0), 0, 16697 }, /* CHK.L (xxx).L,Dn */ -{ CPUFUNC(op_413a_0), 0, 16698 }, /* CHK.L (d16,PC),Dn */ -{ CPUFUNC(op_413b_0), 0, 16699 }, /* CHK.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_413c_0), 0, 16700 }, /* CHK.L #.L,Dn */ -{ CPUFUNC(op_4180_0), 0, 16768 }, /* CHK.W Dn,Dn */ -{ CPUFUNC(op_4190_0), 0, 16784 }, /* CHK.W (An),Dn */ -{ CPUFUNC(op_4198_0), 0, 16792 }, /* CHK.W (An)+,Dn */ -{ CPUFUNC(op_41a0_0), 0, 16800 }, /* CHK.W -(An),Dn */ -{ CPUFUNC(op_41a8_0), 0, 16808 }, /* CHK.W (d16,An),Dn */ -{ CPUFUNC(op_41b0_0), 0, 16816 }, /* CHK.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_41b8_0), 0, 16824 }, /* CHK.W (xxx).W,Dn */ -{ CPUFUNC(op_41b9_0), 0, 16825 }, /* CHK.W (xxx).L,Dn */ -{ CPUFUNC(op_41ba_0), 0, 16826 }, /* CHK.W (d16,PC),Dn */ -{ CPUFUNC(op_41bb_0), 0, 16827 }, /* CHK.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_41bc_0), 0, 16828 }, /* CHK.W #.W,Dn */ -{ CPUFUNC_FF(op_41d0_0), 0, 16848 }, /* LEA.L (An),An */ -{ CPUFUNC_FF(op_41e8_0), 0, 16872 }, /* LEA.L (d16,An),An */ -{ CPUFUNC_FF(op_41f0_0), 0, 16880 }, /* LEA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_41f8_0), 0, 16888 }, /* LEA.L (xxx).W,An */ -{ CPUFUNC_FF(op_41f9_0), 0, 16889 }, /* LEA.L (xxx).L,An */ -{ CPUFUNC_FF(op_41fa_0), 0, 16890 }, /* LEA.L (d16,PC),An */ -{ CPUFUNC_FF(op_41fb_0), 0, 16891 }, /* LEA.L (d8,PC,Xn),An */ -{ CPUFUNC(op_4200_0), 0, 16896 }, /* CLR.B Dn */ -{ CPUFUNC(op_4210_0), 0, 16912 }, /* CLR.B (An) */ -{ CPUFUNC(op_4218_0), 0, 16920 }, /* CLR.B (An)+ */ -{ CPUFUNC(op_4220_0), 0, 16928 }, /* CLR.B -(An) */ -{ CPUFUNC(op_4228_0), 0, 16936 }, /* CLR.B (d16,An) */ -{ CPUFUNC(op_4230_0), 0, 16944 }, /* CLR.B (d8,An,Xn) */ -{ CPUFUNC(op_4238_0), 0, 16952 }, /* CLR.B (xxx).W */ -{ CPUFUNC(op_4239_0), 0, 16953 }, /* CLR.B (xxx).L */ -{ CPUFUNC(op_4240_0), 0, 16960 }, /* CLR.W Dn */ -{ CPUFUNC(op_4250_0), 0, 16976 }, /* CLR.W (An) */ -{ CPUFUNC(op_4258_0), 0, 16984 }, /* CLR.W (An)+ */ -{ CPUFUNC(op_4260_0), 0, 16992 }, /* CLR.W -(An) */ -{ CPUFUNC(op_4268_0), 0, 17000 }, /* CLR.W (d16,An) */ -{ CPUFUNC(op_4270_0), 0, 17008 }, /* CLR.W (d8,An,Xn) */ -{ CPUFUNC(op_4278_0), 0, 17016 }, /* CLR.W (xxx).W */ -{ CPUFUNC(op_4279_0), 0, 17017 }, /* CLR.W (xxx).L */ -{ CPUFUNC(op_4280_0), 0, 17024 }, /* CLR.L Dn */ -{ CPUFUNC(op_4290_0), 0, 17040 }, /* CLR.L (An) */ -{ CPUFUNC(op_4298_0), 0, 17048 }, /* CLR.L (An)+ */ -{ CPUFUNC(op_42a0_0), 0, 17056 }, /* CLR.L -(An) */ -{ CPUFUNC(op_42a8_0), 0, 17064 }, /* CLR.L (d16,An) */ -{ CPUFUNC(op_42b0_0), 0, 17072 }, /* CLR.L (d8,An,Xn) */ -{ CPUFUNC(op_42b8_0), 0, 17080 }, /* CLR.L (xxx).W */ -{ CPUFUNC(op_42b9_0), 0, 17081 }, /* CLR.L (xxx).L */ -{ CPUFUNC_FF(op_42c0_0), 0, 17088 }, /* MVSR2.B Dn */ -{ CPUFUNC_FF(op_42d0_0), 0, 17104 }, /* MVSR2.B (An) */ -{ CPUFUNC_FF(op_42d8_0), 0, 17112 }, /* MVSR2.B (An)+ */ -{ CPUFUNC_FF(op_42e0_0), 0, 17120 }, /* MVSR2.B -(An) */ -{ CPUFUNC_FF(op_42e8_0), 0, 17128 }, /* MVSR2.B (d16,An) */ -{ CPUFUNC_FF(op_42f0_0), 0, 17136 }, /* MVSR2.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_42f8_0), 0, 17144 }, /* MVSR2.B (xxx).W */ -{ CPUFUNC_FF(op_42f9_0), 0, 17145 }, /* MVSR2.B (xxx).L */ -{ CPUFUNC(op_4400_0), 0, 17408 }, /* NEG.B Dn */ -{ CPUFUNC(op_4410_0), 0, 17424 }, /* NEG.B (An) */ -{ CPUFUNC(op_4418_0), 0, 17432 }, /* NEG.B (An)+ */ -{ CPUFUNC(op_4420_0), 0, 17440 }, /* NEG.B -(An) */ -{ CPUFUNC(op_4428_0), 0, 17448 }, /* NEG.B (d16,An) */ -{ CPUFUNC(op_4430_0), 0, 17456 }, /* NEG.B (d8,An,Xn) */ -{ CPUFUNC(op_4438_0), 0, 17464 }, /* NEG.B (xxx).W */ -{ CPUFUNC(op_4439_0), 0, 17465 }, /* NEG.B (xxx).L */ -{ CPUFUNC(op_4440_0), 0, 17472 }, /* NEG.W Dn */ -{ CPUFUNC(op_4450_0), 0, 17488 }, /* NEG.W (An) */ -{ CPUFUNC(op_4458_0), 0, 17496 }, /* NEG.W (An)+ */ -{ CPUFUNC(op_4460_0), 0, 17504 }, /* NEG.W -(An) */ -{ CPUFUNC(op_4468_0), 0, 17512 }, /* NEG.W (d16,An) */ -{ CPUFUNC(op_4470_0), 0, 17520 }, /* NEG.W (d8,An,Xn) */ -{ CPUFUNC(op_4478_0), 0, 17528 }, /* NEG.W (xxx).W */ -{ CPUFUNC(op_4479_0), 0, 17529 }, /* NEG.W (xxx).L */ -{ CPUFUNC(op_4480_0), 0, 17536 }, /* NEG.L Dn */ -{ CPUFUNC(op_4490_0), 0, 17552 }, /* NEG.L (An) */ -{ CPUFUNC(op_4498_0), 0, 17560 }, /* NEG.L (An)+ */ -{ CPUFUNC(op_44a0_0), 0, 17568 }, /* NEG.L -(An) */ -{ CPUFUNC(op_44a8_0), 0, 17576 }, /* NEG.L (d16,An) */ -{ CPUFUNC(op_44b0_0), 0, 17584 }, /* NEG.L (d8,An,Xn) */ -{ CPUFUNC(op_44b8_0), 0, 17592 }, /* NEG.L (xxx).W */ -{ CPUFUNC(op_44b9_0), 0, 17593 }, /* NEG.L (xxx).L */ -{ CPUFUNC(op_44c0_0), 0, 17600 }, /* MV2SR.B Dn */ -{ CPUFUNC(op_44d0_0), 0, 17616 }, /* MV2SR.B (An) */ -{ CPUFUNC(op_44d8_0), 0, 17624 }, /* MV2SR.B (An)+ */ -{ CPUFUNC(op_44e0_0), 0, 17632 }, /* MV2SR.B -(An) */ -{ CPUFUNC(op_44e8_0), 0, 17640 }, /* MV2SR.B (d16,An) */ -{ CPUFUNC(op_44f0_0), 0, 17648 }, /* MV2SR.B (d8,An,Xn) */ -{ CPUFUNC(op_44f8_0), 0, 17656 }, /* MV2SR.B (xxx).W */ -{ CPUFUNC(op_44f9_0), 0, 17657 }, /* MV2SR.B (xxx).L */ -{ CPUFUNC(op_44fa_0), 0, 17658 }, /* MV2SR.B (d16,PC) */ -{ CPUFUNC(op_44fb_0), 0, 17659 }, /* MV2SR.B (d8,PC,Xn) */ -{ CPUFUNC(op_44fc_0), 0, 17660 }, /* MV2SR.B #.B */ -{ CPUFUNC(op_4600_0), 0, 17920 }, /* NOT.B Dn */ -{ CPUFUNC(op_4610_0), 0, 17936 }, /* NOT.B (An) */ -{ CPUFUNC(op_4618_0), 0, 17944 }, /* NOT.B (An)+ */ -{ CPUFUNC(op_4620_0), 0, 17952 }, /* NOT.B -(An) */ -{ CPUFUNC(op_4628_0), 0, 17960 }, /* NOT.B (d16,An) */ -{ CPUFUNC(op_4630_0), 0, 17968 }, /* NOT.B (d8,An,Xn) */ -{ CPUFUNC(op_4638_0), 0, 17976 }, /* NOT.B (xxx).W */ -{ CPUFUNC(op_4639_0), 0, 17977 }, /* NOT.B (xxx).L */ -{ CPUFUNC(op_4640_0), 0, 17984 }, /* NOT.W Dn */ -{ CPUFUNC(op_4650_0), 0, 18000 }, /* NOT.W (An) */ -{ CPUFUNC(op_4658_0), 0, 18008 }, /* NOT.W (An)+ */ -{ CPUFUNC(op_4660_0), 0, 18016 }, /* NOT.W -(An) */ -{ CPUFUNC(op_4668_0), 0, 18024 }, /* NOT.W (d16,An) */ -{ CPUFUNC(op_4670_0), 0, 18032 }, /* NOT.W (d8,An,Xn) */ -{ CPUFUNC(op_4678_0), 0, 18040 }, /* NOT.W (xxx).W */ -{ CPUFUNC(op_4679_0), 0, 18041 }, /* NOT.W (xxx).L */ -{ CPUFUNC(op_4680_0), 0, 18048 }, /* NOT.L Dn */ -{ CPUFUNC(op_4690_0), 0, 18064 }, /* NOT.L (An) */ -{ CPUFUNC(op_4698_0), 0, 18072 }, /* NOT.L (An)+ */ -{ CPUFUNC(op_46a0_0), 0, 18080 }, /* NOT.L -(An) */ -{ CPUFUNC(op_46a8_0), 0, 18088 }, /* NOT.L (d16,An) */ -{ CPUFUNC(op_46b0_0), 0, 18096 }, /* NOT.L (d8,An,Xn) */ -{ CPUFUNC(op_46b8_0), 0, 18104 }, /* NOT.L (xxx).W */ -{ CPUFUNC(op_46b9_0), 0, 18105 }, /* NOT.L (xxx).L */ -{ CPUFUNC(op_46c0_0), 0, 18112 }, /* MV2SR.W Dn */ -{ CPUFUNC(op_46d0_0), 0, 18128 }, /* MV2SR.W (An) */ -{ CPUFUNC(op_46d8_0), 0, 18136 }, /* MV2SR.W (An)+ */ -{ CPUFUNC(op_46e0_0), 0, 18144 }, /* MV2SR.W -(An) */ -{ CPUFUNC(op_46e8_0), 0, 18152 }, /* MV2SR.W (d16,An) */ -{ CPUFUNC(op_46f0_0), 0, 18160 }, /* MV2SR.W (d8,An,Xn) */ -{ CPUFUNC(op_46f8_0), 0, 18168 }, /* MV2SR.W (xxx).W */ -{ CPUFUNC(op_46f9_0), 0, 18169 }, /* MV2SR.W (xxx).L */ -{ CPUFUNC(op_46fa_0), 0, 18170 }, /* MV2SR.W (d16,PC) */ -{ CPUFUNC(op_46fb_0), 0, 18171 }, /* MV2SR.W (d8,PC,Xn) */ -{ CPUFUNC(op_46fc_0), 0, 18172 }, /* MV2SR.W #.W */ -{ CPUFUNC(op_4800_0), 0, 18432 }, /* NBCD.B Dn */ -{ CPUFUNC_FF(op_4808_0), 0, 18440 }, /* LINK.L An,#.L */ -{ CPUFUNC(op_4810_0), 0, 18448 }, /* NBCD.B (An) */ -{ CPUFUNC(op_4818_0), 0, 18456 }, /* NBCD.B (An)+ */ -{ CPUFUNC(op_4820_0), 0, 18464 }, /* NBCD.B -(An) */ -{ CPUFUNC(op_4828_0), 0, 18472 }, /* NBCD.B (d16,An) */ -{ CPUFUNC(op_4830_0), 0, 18480 }, /* NBCD.B (d8,An,Xn) */ -{ CPUFUNC(op_4838_0), 0, 18488 }, /* NBCD.B (xxx).W */ -{ CPUFUNC(op_4839_0), 0, 18489 }, /* NBCD.B (xxx).L */ -{ CPUFUNC(op_4840_0), 0, 18496 }, /* SWAP.W Dn */ -{ CPUFUNC_FF(op_4848_0), 0, 18504 }, /* BKPT.L # */ -{ CPUFUNC_FF(op_4850_0), 0, 18512 }, /* PEA.L (An) */ -{ CPUFUNC_FF(op_4868_0), 0, 18536 }, /* PEA.L (d16,An) */ -{ CPUFUNC_FF(op_4870_0), 0, 18544 }, /* PEA.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4878_0), 0, 18552 }, /* PEA.L (xxx).W */ -{ CPUFUNC_FF(op_4879_0), 0, 18553 }, /* PEA.L (xxx).L */ -{ CPUFUNC_FF(op_487a_0), 0, 18554 }, /* PEA.L (d16,PC) */ -{ CPUFUNC_FF(op_487b_0), 0, 18555 }, /* PEA.L (d8,PC,Xn) */ -{ CPUFUNC(op_4880_0), 0, 18560 }, /* EXT.W Dn */ -{ CPUFUNC_FF(op_4890_0), 0, 18576 }, /* MVMLE.W #.W,(An) */ -{ CPUFUNC_FF(op_48a0_0), 0, 18592 }, /* MVMLE.W #.W,-(An) */ -{ CPUFUNC_FF(op_48a8_0), 0, 18600 }, /* MVMLE.W #.W,(d16,An) */ -{ CPUFUNC_FF(op_48b0_0), 0, 18608 }, /* MVMLE.W #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_48b8_0), 0, 18616 }, /* MVMLE.W #.W,(xxx).W */ -{ CPUFUNC_FF(op_48b9_0), 0, 18617 }, /* MVMLE.W #.W,(xxx).L */ -{ CPUFUNC(op_48c0_0), 0, 18624 }, /* EXT.L Dn */ -{ CPUFUNC_FF(op_48d0_0), 0, 18640 }, /* MVMLE.L #.W,(An) */ -{ CPUFUNC_FF(op_48e0_0), 0, 18656 }, /* MVMLE.L #.W,-(An) */ -{ CPUFUNC_FF(op_48e8_0), 0, 18664 }, /* MVMLE.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_48f0_0), 0, 18672 }, /* MVMLE.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_48f8_0), 0, 18680 }, /* MVMLE.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_48f9_0), 0, 18681 }, /* MVMLE.L #.W,(xxx).L */ -{ CPUFUNC(op_49c0_0), 0, 18880 }, /* EXT.B Dn */ -{ CPUFUNC(op_4a00_0), 0, 18944 }, /* TST.B Dn */ -{ CPUFUNC(op_4a10_0), 0, 18960 }, /* TST.B (An) */ -{ CPUFUNC(op_4a18_0), 0, 18968 }, /* TST.B (An)+ */ -{ CPUFUNC(op_4a20_0), 0, 18976 }, /* TST.B -(An) */ -{ CPUFUNC(op_4a28_0), 0, 18984 }, /* TST.B (d16,An) */ -{ CPUFUNC(op_4a30_0), 0, 18992 }, /* TST.B (d8,An,Xn) */ -{ CPUFUNC(op_4a38_0), 0, 19000 }, /* TST.B (xxx).W */ -{ CPUFUNC(op_4a39_0), 0, 19001 }, /* TST.B (xxx).L */ -{ CPUFUNC(op_4a3a_0), 0, 19002 }, /* TST.B (d16,PC) */ -{ CPUFUNC(op_4a3b_0), 0, 19003 }, /* TST.B (d8,PC,Xn) */ -{ CPUFUNC(op_4a3c_0), 0, 19004 }, /* TST.B #.B */ -{ CPUFUNC(op_4a40_0), 0, 19008 }, /* TST.W Dn */ -{ CPUFUNC(op_4a48_0), 0, 19016 }, /* TST.W An */ -{ CPUFUNC(op_4a50_0), 0, 19024 }, /* TST.W (An) */ -{ CPUFUNC(op_4a58_0), 0, 19032 }, /* TST.W (An)+ */ -{ CPUFUNC(op_4a60_0), 0, 19040 }, /* TST.W -(An) */ -{ CPUFUNC(op_4a68_0), 0, 19048 }, /* TST.W (d16,An) */ -{ CPUFUNC(op_4a70_0), 0, 19056 }, /* TST.W (d8,An,Xn) */ -{ CPUFUNC(op_4a78_0), 0, 19064 }, /* TST.W (xxx).W */ -{ CPUFUNC(op_4a79_0), 0, 19065 }, /* TST.W (xxx).L */ -{ CPUFUNC(op_4a7a_0), 0, 19066 }, /* TST.W (d16,PC) */ -{ CPUFUNC(op_4a7b_0), 0, 19067 }, /* TST.W (d8,PC,Xn) */ -{ CPUFUNC(op_4a7c_0), 0, 19068 }, /* TST.W #.W */ -{ CPUFUNC(op_4a80_0), 0, 19072 }, /* TST.L Dn */ -{ CPUFUNC(op_4a88_0), 0, 19080 }, /* TST.L An */ -{ CPUFUNC(op_4a90_0), 0, 19088 }, /* TST.L (An) */ -{ CPUFUNC(op_4a98_0), 0, 19096 }, /* TST.L (An)+ */ -{ CPUFUNC(op_4aa0_0), 0, 19104 }, /* TST.L -(An) */ -{ CPUFUNC(op_4aa8_0), 0, 19112 }, /* TST.L (d16,An) */ -{ CPUFUNC(op_4ab0_0), 0, 19120 }, /* TST.L (d8,An,Xn) */ -{ CPUFUNC(op_4ab8_0), 0, 19128 }, /* TST.L (xxx).W */ -{ CPUFUNC(op_4ab9_0), 0, 19129 }, /* TST.L (xxx).L */ -{ CPUFUNC(op_4aba_0), 0, 19130 }, /* TST.L (d16,PC) */ -{ CPUFUNC(op_4abb_0), 0, 19131 }, /* TST.L (d8,PC,Xn) */ -{ CPUFUNC(op_4abc_0), 0, 19132 }, /* TST.L #.L */ -{ CPUFUNC(op_4ac0_0), 0, 19136 }, /* TAS.B Dn */ -{ CPUFUNC(op_4ad0_0), 0, 19152 }, /* TAS.B (An) */ -{ CPUFUNC(op_4ad8_0), 0, 19160 }, /* TAS.B (An)+ */ -{ CPUFUNC(op_4ae0_0), 0, 19168 }, /* TAS.B -(An) */ -{ CPUFUNC(op_4ae8_0), 0, 19176 }, /* TAS.B (d16,An) */ -{ CPUFUNC(op_4af0_0), 0, 19184 }, /* TAS.B (d8,An,Xn) */ -{ CPUFUNC(op_4af8_0), 0, 19192 }, /* TAS.B (xxx).W */ -{ CPUFUNC(op_4af9_0), 0, 19193 }, /* TAS.B (xxx).L */ -{ CPUFUNC(op_4c00_0), 0, 19456 }, /* MULL.L #.W,Dn */ -{ CPUFUNC(op_4c10_0), 0, 19472 }, /* MULL.L #.W,(An) */ -{ CPUFUNC(op_4c18_0), 0, 19480 }, /* MULL.L #.W,(An)+ */ -{ CPUFUNC(op_4c20_0), 0, 19488 }, /* MULL.L #.W,-(An) */ -{ CPUFUNC(op_4c28_0), 0, 19496 }, /* MULL.L #.W,(d16,An) */ -{ CPUFUNC(op_4c30_0), 0, 19504 }, /* MULL.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_4c38_0), 0, 19512 }, /* MULL.L #.W,(xxx).W */ -{ CPUFUNC(op_4c39_0), 0, 19513 }, /* MULL.L #.W,(xxx).L */ -{ CPUFUNC(op_4c3a_0), 0, 19514 }, /* MULL.L #.W,(d16,PC) */ -{ CPUFUNC(op_4c3b_0), 0, 19515 }, /* MULL.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_4c3c_0), 0, 19516 }, /* MULL.L #.W,#.L */ -{ CPUFUNC(op_4c40_0), 0, 19520 }, /* DIVL.L #.W,Dn */ -{ CPUFUNC(op_4c50_0), 0, 19536 }, /* DIVL.L #.W,(An) */ -{ CPUFUNC(op_4c58_0), 0, 19544 }, /* DIVL.L #.W,(An)+ */ -{ CPUFUNC(op_4c60_0), 0, 19552 }, /* DIVL.L #.W,-(An) */ -{ CPUFUNC(op_4c68_0), 0, 19560 }, /* DIVL.L #.W,(d16,An) */ -{ CPUFUNC(op_4c70_0), 0, 19568 }, /* DIVL.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_4c78_0), 0, 19576 }, /* DIVL.L #.W,(xxx).W */ -{ CPUFUNC(op_4c79_0), 0, 19577 }, /* DIVL.L #.W,(xxx).L */ -{ CPUFUNC(op_4c7a_0), 0, 19578 }, /* DIVL.L #.W,(d16,PC) */ -{ CPUFUNC(op_4c7b_0), 0, 19579 }, /* DIVL.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_4c7c_0), 0, 19580 }, /* DIVL.L #.W,#.L */ -{ CPUFUNC_FF(op_4c90_0), 0, 19600 }, /* MVMEL.W #.W,(An) */ -{ CPUFUNC_FF(op_4c98_0), 0, 19608 }, /* MVMEL.W #.W,(An)+ */ -{ CPUFUNC_FF(op_4ca8_0), 0, 19624 }, /* MVMEL.W #.W,(d16,An) */ -{ CPUFUNC_FF(op_4cb0_0), 0, 19632 }, /* MVMEL.W #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_4cb8_0), 0, 19640 }, /* MVMEL.W #.W,(xxx).W */ -{ CPUFUNC_FF(op_4cb9_0), 0, 19641 }, /* MVMEL.W #.W,(xxx).L */ -{ CPUFUNC_FF(op_4cba_0), 0, 19642 }, /* MVMEL.W #.W,(d16,PC) */ -{ CPUFUNC_FF(op_4cbb_0), 0, 19643 }, /* MVMEL.W #.W,(d8,PC,Xn) */ -{ CPUFUNC_FF(op_4cd0_0), 0, 19664 }, /* MVMEL.L #.W,(An) */ -{ CPUFUNC_FF(op_4cd8_0), 0, 19672 }, /* MVMEL.L #.W,(An)+ */ -{ CPUFUNC_FF(op_4ce8_0), 0, 19688 }, /* MVMEL.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_4cf0_0), 0, 19696 }, /* MVMEL.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_4cf8_0), 0, 19704 }, /* MVMEL.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_4cf9_0), 0, 19705 }, /* MVMEL.L #.W,(xxx).L */ -{ CPUFUNC_FF(op_4cfa_0), 0, 19706 }, /* MVMEL.L #.W,(d16,PC) */ -{ CPUFUNC_FF(op_4cfb_0), 0, 19707 }, /* MVMEL.L #.W,(d8,PC,Xn) */ -{ CPUFUNC_FF(op_4e40_0), 0, 20032 }, /* TRAP.L # */ -{ CPUFUNC_FF(op_4e50_0), 0, 20048 }, /* LINK.W An,#.W */ -{ CPUFUNC_FF(op_4e58_0), 0, 20056 }, /* UNLK.L An */ -{ CPUFUNC_FF(op_4e60_0), 0, 20064 }, /* MVR2USP.L An */ -{ CPUFUNC_FF(op_4e68_0), 0, 20072 }, /* MVUSP2R.L An */ -{ CPUFUNC_FF(op_4e70_0), 0, 20080 }, /* RESET.L */ -{ CPUFUNC_FF(op_4e71_0), 0, 20081 }, /* NOP.L */ -{ CPUFUNC(op_4e72_0), 0, 20082 }, /* STOP.L #.W */ -{ CPUFUNC(op_4e73_0), 0, 20083 }, /* RTE.L */ -{ CPUFUNC_FF(op_4e74_0), 0, 20084 }, /* RTD.L #.W */ -{ CPUFUNC_FF(op_4e75_0), 0, 20085 }, /* RTS.L */ -{ CPUFUNC_FF(op_4e76_0), 0, 20086 }, /* TRAPV.L */ -{ CPUFUNC(op_4e77_0), 0, 20087 }, /* RTR.L */ -{ CPUFUNC_FF(op_4e7a_0), 0, 20090 }, /* MOVEC2.L #.W */ -{ CPUFUNC_FF(op_4e7b_0), 0, 20091 }, /* MOVE2C.L #.W */ -{ CPUFUNC_FF(op_4e90_0), 0, 20112 }, /* JSR.L (An) */ -{ CPUFUNC_FF(op_4ea8_0), 0, 20136 }, /* JSR.L (d16,An) */ -{ CPUFUNC_FF(op_4eb0_0), 0, 20144 }, /* JSR.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4eb8_0), 0, 20152 }, /* JSR.L (xxx).W */ -{ CPUFUNC_FF(op_4eb9_0), 0, 20153 }, /* JSR.L (xxx).L */ -{ CPUFUNC_FF(op_4eba_0), 0, 20154 }, /* JSR.L (d16,PC) */ -{ CPUFUNC_FF(op_4ebb_0), 0, 20155 }, /* JSR.L (d8,PC,Xn) */ -{ CPUFUNC_FF(op_4ed0_0), 0, 20176 }, /* JMP.L (An) */ -{ CPUFUNC_FF(op_4ee8_0), 0, 20200 }, /* JMP.L (d16,An) */ -{ CPUFUNC_FF(op_4ef0_0), 0, 20208 }, /* JMP.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4ef8_0), 0, 20216 }, /* JMP.L (xxx).W */ -{ CPUFUNC_FF(op_4ef9_0), 0, 20217 }, /* JMP.L (xxx).L */ -{ CPUFUNC_FF(op_4efa_0), 0, 20218 }, /* JMP.L (d16,PC) */ -{ CPUFUNC_FF(op_4efb_0), 0, 20219 }, /* JMP.L (d8,PC,Xn) */ -{ CPUFUNC(op_5000_0), 0, 20480 }, /* ADD.B #,Dn */ -{ CPUFUNC(op_5010_0), 0, 20496 }, /* ADD.B #,(An) */ -{ CPUFUNC(op_5018_0), 0, 20504 }, /* ADD.B #,(An)+ */ -{ CPUFUNC(op_5020_0), 0, 20512 }, /* ADD.B #,-(An) */ -{ CPUFUNC(op_5028_0), 0, 20520 }, /* ADD.B #,(d16,An) */ -{ CPUFUNC(op_5030_0), 0, 20528 }, /* ADD.B #,(d8,An,Xn) */ -{ CPUFUNC(op_5038_0), 0, 20536 }, /* ADD.B #,(xxx).W */ -{ CPUFUNC(op_5039_0), 0, 20537 }, /* ADD.B #,(xxx).L */ -{ CPUFUNC(op_5040_0), 0, 20544 }, /* ADD.W #,Dn */ -{ CPUFUNC_FF(op_5048_0), 0, 20552 }, /* ADDA.W #,An */ -{ CPUFUNC(op_5050_0), 0, 20560 }, /* ADD.W #,(An) */ -{ CPUFUNC(op_5058_0), 0, 20568 }, /* ADD.W #,(An)+ */ -{ CPUFUNC(op_5060_0), 0, 20576 }, /* ADD.W #,-(An) */ -{ CPUFUNC(op_5068_0), 0, 20584 }, /* ADD.W #,(d16,An) */ -{ CPUFUNC(op_5070_0), 0, 20592 }, /* ADD.W #,(d8,An,Xn) */ -{ CPUFUNC(op_5078_0), 0, 20600 }, /* ADD.W #,(xxx).W */ -{ CPUFUNC(op_5079_0), 0, 20601 }, /* ADD.W #,(xxx).L */ -{ CPUFUNC(op_5080_0), 0, 20608 }, /* ADD.L #,Dn */ -{ CPUFUNC_FF(op_5088_0), 0, 20616 }, /* ADDA.L #,An */ -{ CPUFUNC(op_5090_0), 0, 20624 }, /* ADD.L #,(An) */ -{ CPUFUNC(op_5098_0), 0, 20632 }, /* ADD.L #,(An)+ */ -{ CPUFUNC(op_50a0_0), 0, 20640 }, /* ADD.L #,-(An) */ -{ CPUFUNC(op_50a8_0), 0, 20648 }, /* ADD.L #,(d16,An) */ -{ CPUFUNC(op_50b0_0), 0, 20656 }, /* ADD.L #,(d8,An,Xn) */ -{ CPUFUNC(op_50b8_0), 0, 20664 }, /* ADD.L #,(xxx).W */ -{ CPUFUNC(op_50b9_0), 0, 20665 }, /* ADD.L #,(xxx).L */ -{ CPUFUNC_FF(op_50c0_0), 0, 20672 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_50c8_0), 0, 20680 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_50d0_0), 0, 20688 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_50d8_0), 0, 20696 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_50e0_0), 0, 20704 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_50e8_0), 0, 20712 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_50f0_0), 0, 20720 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_50f8_0), 0, 20728 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_50f9_0), 0, 20729 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_50fa_0), 0, 20730 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_50fb_0), 0, 20731 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_50fc_0), 0, 20732 }, /* TRAPcc.L */ -{ CPUFUNC(op_5100_0), 0, 20736 }, /* SUB.B #,Dn */ -{ CPUFUNC(op_5110_0), 0, 20752 }, /* SUB.B #,(An) */ -{ CPUFUNC(op_5118_0), 0, 20760 }, /* SUB.B #,(An)+ */ -{ CPUFUNC(op_5120_0), 0, 20768 }, /* SUB.B #,-(An) */ -{ CPUFUNC(op_5128_0), 0, 20776 }, /* SUB.B #,(d16,An) */ -{ CPUFUNC(op_5130_0), 0, 20784 }, /* SUB.B #,(d8,An,Xn) */ -{ CPUFUNC(op_5138_0), 0, 20792 }, /* SUB.B #,(xxx).W */ -{ CPUFUNC(op_5139_0), 0, 20793 }, /* SUB.B #,(xxx).L */ -{ CPUFUNC(op_5140_0), 0, 20800 }, /* SUB.W #,Dn */ -{ CPUFUNC_FF(op_5148_0), 0, 20808 }, /* SUBA.W #,An */ -{ CPUFUNC(op_5150_0), 0, 20816 }, /* SUB.W #,(An) */ -{ CPUFUNC(op_5158_0), 0, 20824 }, /* SUB.W #,(An)+ */ -{ CPUFUNC(op_5160_0), 0, 20832 }, /* SUB.W #,-(An) */ -{ CPUFUNC(op_5168_0), 0, 20840 }, /* SUB.W #,(d16,An) */ -{ CPUFUNC(op_5170_0), 0, 20848 }, /* SUB.W #,(d8,An,Xn) */ -{ CPUFUNC(op_5178_0), 0, 20856 }, /* SUB.W #,(xxx).W */ -{ CPUFUNC(op_5179_0), 0, 20857 }, /* SUB.W #,(xxx).L */ -{ CPUFUNC(op_5180_0), 0, 20864 }, /* SUB.L #,Dn */ -{ CPUFUNC_FF(op_5188_0), 0, 20872 }, /* SUBA.L #,An */ -{ CPUFUNC(op_5190_0), 0, 20880 }, /* SUB.L #,(An) */ -{ CPUFUNC(op_5198_0), 0, 20888 }, /* SUB.L #,(An)+ */ -{ CPUFUNC(op_51a0_0), 0, 20896 }, /* SUB.L #,-(An) */ -{ CPUFUNC(op_51a8_0), 0, 20904 }, /* SUB.L #,(d16,An) */ -{ CPUFUNC(op_51b0_0), 0, 20912 }, /* SUB.L #,(d8,An,Xn) */ -{ CPUFUNC(op_51b8_0), 0, 20920 }, /* SUB.L #,(xxx).W */ -{ CPUFUNC(op_51b9_0), 0, 20921 }, /* SUB.L #,(xxx).L */ -{ CPUFUNC_FF(op_51c0_0), 0, 20928 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_51c8_0), 0, 20936 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_51d0_0), 0, 20944 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_51d8_0), 0, 20952 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_51e0_0), 0, 20960 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_51e8_0), 0, 20968 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_51f0_0), 0, 20976 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_51f8_0), 0, 20984 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_51f9_0), 0, 20985 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_51fa_0), 0, 20986 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_51fb_0), 0, 20987 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_51fc_0), 0, 20988 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_52c0_0), 0, 21184 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_52c8_0), 0, 21192 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_52d0_0), 0, 21200 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_52d8_0), 0, 21208 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_52e0_0), 0, 21216 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_52e8_0), 0, 21224 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_52f0_0), 0, 21232 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_52f8_0), 0, 21240 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_52f9_0), 0, 21241 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_52fa_0), 0, 21242 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_52fb_0), 0, 21243 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_52fc_0), 0, 21244 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_53c0_0), 0, 21440 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_53c8_0), 0, 21448 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_53d0_0), 0, 21456 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_53d8_0), 0, 21464 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_53e0_0), 0, 21472 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_53e8_0), 0, 21480 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_53f0_0), 0, 21488 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_53f8_0), 0, 21496 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_53f9_0), 0, 21497 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_53fa_0), 0, 21498 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_53fb_0), 0, 21499 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_53fc_0), 0, 21500 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_54c0_0), 0, 21696 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_54c8_0), 0, 21704 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_54d0_0), 0, 21712 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_54d8_0), 0, 21720 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_54e0_0), 0, 21728 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_54e8_0), 0, 21736 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_54f0_0), 0, 21744 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_54f8_0), 0, 21752 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_54f9_0), 0, 21753 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_54fa_0), 0, 21754 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_54fb_0), 0, 21755 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_54fc_0), 0, 21756 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_55c0_0), 0, 21952 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_55c8_0), 0, 21960 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_55d0_0), 0, 21968 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_55d8_0), 0, 21976 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_55e0_0), 0, 21984 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_55e8_0), 0, 21992 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_55f0_0), 0, 22000 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_55f8_0), 0, 22008 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_55f9_0), 0, 22009 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_55fa_0), 0, 22010 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_55fb_0), 0, 22011 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_55fc_0), 0, 22012 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_56c0_0), 0, 22208 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_56c8_0), 0, 22216 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_56d0_0), 0, 22224 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_56d8_0), 0, 22232 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_56e0_0), 0, 22240 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_56e8_0), 0, 22248 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_56f0_0), 0, 22256 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_56f8_0), 0, 22264 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_56f9_0), 0, 22265 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_56fa_0), 0, 22266 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_56fb_0), 0, 22267 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_56fc_0), 0, 22268 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_57c0_0), 0, 22464 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_57c8_0), 0, 22472 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_57d0_0), 0, 22480 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_57d8_0), 0, 22488 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_57e0_0), 0, 22496 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_57e8_0), 0, 22504 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_57f0_0), 0, 22512 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_57f8_0), 0, 22520 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_57f9_0), 0, 22521 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_57fa_0), 0, 22522 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_57fb_0), 0, 22523 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_57fc_0), 0, 22524 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_58c0_0), 0, 22720 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_58c8_0), 0, 22728 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_58d0_0), 0, 22736 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_58d8_0), 0, 22744 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_58e0_0), 0, 22752 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_58e8_0), 0, 22760 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_58f0_0), 0, 22768 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_58f8_0), 0, 22776 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_58f9_0), 0, 22777 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_58fa_0), 0, 22778 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_58fb_0), 0, 22779 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_58fc_0), 0, 22780 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_59c0_0), 0, 22976 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_59c8_0), 0, 22984 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_59d0_0), 0, 22992 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_59d8_0), 0, 23000 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_59e0_0), 0, 23008 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_59e8_0), 0, 23016 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_59f0_0), 0, 23024 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_59f8_0), 0, 23032 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_59f9_0), 0, 23033 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_59fa_0), 0, 23034 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_59fb_0), 0, 23035 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_59fc_0), 0, 23036 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5ac0_0), 0, 23232 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5ac8_0), 0, 23240 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5ad0_0), 0, 23248 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5ad8_0), 0, 23256 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ae0_0), 0, 23264 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ae8_0), 0, 23272 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5af0_0), 0, 23280 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5af8_0), 0, 23288 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5af9_0), 0, 23289 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5afa_0), 0, 23290 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5afb_0), 0, 23291 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5afc_0), 0, 23292 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5bc0_0), 0, 23488 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5bc8_0), 0, 23496 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5bd0_0), 0, 23504 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5bd8_0), 0, 23512 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5be0_0), 0, 23520 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5be8_0), 0, 23528 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5bf0_0), 0, 23536 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5bf8_0), 0, 23544 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5bf9_0), 0, 23545 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5bfa_0), 0, 23546 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5bfb_0), 0, 23547 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5bfc_0), 0, 23548 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5cc0_0), 0, 23744 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5cc8_0), 0, 23752 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5cd0_0), 0, 23760 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5cd8_0), 0, 23768 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ce0_0), 0, 23776 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ce8_0), 0, 23784 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5cf0_0), 0, 23792 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5cf8_0), 0, 23800 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5cf9_0), 0, 23801 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5cfa_0), 0, 23802 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5cfb_0), 0, 23803 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5cfc_0), 0, 23804 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5dc0_0), 0, 24000 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5dc8_0), 0, 24008 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5dd0_0), 0, 24016 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5dd8_0), 0, 24024 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5de0_0), 0, 24032 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5de8_0), 0, 24040 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5df0_0), 0, 24048 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5df8_0), 0, 24056 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5df9_0), 0, 24057 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5dfa_0), 0, 24058 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5dfb_0), 0, 24059 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5dfc_0), 0, 24060 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5ec0_0), 0, 24256 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5ec8_0), 0, 24264 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5ed0_0), 0, 24272 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5ed8_0), 0, 24280 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ee0_0), 0, 24288 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ee8_0), 0, 24296 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5ef0_0), 0, 24304 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5ef8_0), 0, 24312 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5ef9_0), 0, 24313 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5efa_0), 0, 24314 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5efb_0), 0, 24315 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5efc_0), 0, 24316 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5fc0_0), 0, 24512 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5fc8_0), 0, 24520 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5fd0_0), 0, 24528 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5fd8_0), 0, 24536 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5fe0_0), 0, 24544 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5fe8_0), 0, 24552 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5ff0_0), 0, 24560 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5ff8_0), 0, 24568 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5ff9_0), 0, 24569 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5ffa_0), 0, 24570 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5ffb_0), 0, 24571 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5ffc_0), 0, 24572 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_6000_0), 0, 24576 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6001_0), 0, 24577 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_60ff_0), 0, 24831 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6100_0), 0, 24832 }, /* BSR.W #.W */ -{ CPUFUNC_FF(op_6101_0), 0, 24833 }, /* BSR.B # */ -{ CPUFUNC_FF(op_61ff_0), 0, 25087 }, /* BSR.L #.L */ -{ CPUFUNC_FF(op_6200_0), 0, 25088 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6201_0), 0, 25089 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_62ff_0), 0, 25343 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6300_0), 0, 25344 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6301_0), 0, 25345 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_63ff_0), 0, 25599 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6400_0), 0, 25600 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6401_0), 0, 25601 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_64ff_0), 0, 25855 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6500_0), 0, 25856 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6501_0), 0, 25857 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_65ff_0), 0, 26111 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6600_0), 0, 26112 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6601_0), 0, 26113 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_66ff_0), 0, 26367 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6700_0), 0, 26368 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6701_0), 0, 26369 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_67ff_0), 0, 26623 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6800_0), 0, 26624 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6801_0), 0, 26625 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_68ff_0), 0, 26879 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6900_0), 0, 26880 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6901_0), 0, 26881 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_69ff_0), 0, 27135 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6a00_0), 0, 27136 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6a01_0), 0, 27137 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6aff_0), 0, 27391 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6b00_0), 0, 27392 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6b01_0), 0, 27393 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6bff_0), 0, 27647 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6c00_0), 0, 27648 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6c01_0), 0, 27649 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6cff_0), 0, 27903 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6d00_0), 0, 27904 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6d01_0), 0, 27905 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6dff_0), 0, 28159 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6e00_0), 0, 28160 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6e01_0), 0, 28161 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6eff_0), 0, 28415 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6f00_0), 0, 28416 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6f01_0), 0, 28417 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6fff_0), 0, 28671 }, /* Bcc.L #.L */ -{ CPUFUNC(op_7000_0), 0, 28672 }, /* MOVE.L #,Dn */ -{ CPUFUNC_FF(op_7100_0), 0, 28928 }, /* EMULOP_RETURN.L */ -{ CPUFUNC_FF(op_7101_0), 0, 28929 }, /* EMULOP.L # */ -{ CPUFUNC(op_8000_0), 0, 32768 }, /* OR.B Dn,Dn */ -{ CPUFUNC(op_8010_0), 0, 32784 }, /* OR.B (An),Dn */ -{ CPUFUNC(op_8018_0), 0, 32792 }, /* OR.B (An)+,Dn */ -{ CPUFUNC(op_8020_0), 0, 32800 }, /* OR.B -(An),Dn */ -{ CPUFUNC(op_8028_0), 0, 32808 }, /* OR.B (d16,An),Dn */ -{ CPUFUNC(op_8030_0), 0, 32816 }, /* OR.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_8038_0), 0, 32824 }, /* OR.B (xxx).W,Dn */ -{ CPUFUNC(op_8039_0), 0, 32825 }, /* OR.B (xxx).L,Dn */ -{ CPUFUNC(op_803a_0), 0, 32826 }, /* OR.B (d16,PC),Dn */ -{ CPUFUNC(op_803b_0), 0, 32827 }, /* OR.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_803c_0), 0, 32828 }, /* OR.B #.B,Dn */ -{ CPUFUNC(op_8040_0), 0, 32832 }, /* OR.W Dn,Dn */ -{ CPUFUNC(op_8050_0), 0, 32848 }, /* OR.W (An),Dn */ -{ CPUFUNC(op_8058_0), 0, 32856 }, /* OR.W (An)+,Dn */ -{ CPUFUNC(op_8060_0), 0, 32864 }, /* OR.W -(An),Dn */ -{ CPUFUNC(op_8068_0), 0, 32872 }, /* OR.W (d16,An),Dn */ -{ CPUFUNC(op_8070_0), 0, 32880 }, /* OR.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_8078_0), 0, 32888 }, /* OR.W (xxx).W,Dn */ -{ CPUFUNC(op_8079_0), 0, 32889 }, /* OR.W (xxx).L,Dn */ -{ CPUFUNC(op_807a_0), 0, 32890 }, /* OR.W (d16,PC),Dn */ -{ CPUFUNC(op_807b_0), 0, 32891 }, /* OR.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_807c_0), 0, 32892 }, /* OR.W #.W,Dn */ -{ CPUFUNC(op_8080_0), 0, 32896 }, /* OR.L Dn,Dn */ -{ CPUFUNC(op_8090_0), 0, 32912 }, /* OR.L (An),Dn */ -{ CPUFUNC(op_8098_0), 0, 32920 }, /* OR.L (An)+,Dn */ -{ CPUFUNC(op_80a0_0), 0, 32928 }, /* OR.L -(An),Dn */ -{ CPUFUNC(op_80a8_0), 0, 32936 }, /* OR.L (d16,An),Dn */ -{ CPUFUNC(op_80b0_0), 0, 32944 }, /* OR.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_80b8_0), 0, 32952 }, /* OR.L (xxx).W,Dn */ -{ CPUFUNC(op_80b9_0), 0, 32953 }, /* OR.L (xxx).L,Dn */ -{ CPUFUNC(op_80ba_0), 0, 32954 }, /* OR.L (d16,PC),Dn */ -{ CPUFUNC(op_80bb_0), 0, 32955 }, /* OR.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_80bc_0), 0, 32956 }, /* OR.L #.L,Dn */ -{ CPUFUNC(op_80c0_0), 0, 32960 }, /* DIVU.W Dn,Dn */ -{ CPUFUNC(op_80d0_0), 0, 32976 }, /* DIVU.W (An),Dn */ -{ CPUFUNC(op_80d8_0), 0, 32984 }, /* DIVU.W (An)+,Dn */ -{ CPUFUNC(op_80e0_0), 0, 32992 }, /* DIVU.W -(An),Dn */ -{ CPUFUNC(op_80e8_0), 0, 33000 }, /* DIVU.W (d16,An),Dn */ -{ CPUFUNC(op_80f0_0), 0, 33008 }, /* DIVU.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_80f8_0), 0, 33016 }, /* DIVU.W (xxx).W,Dn */ -{ CPUFUNC(op_80f9_0), 0, 33017 }, /* DIVU.W (xxx).L,Dn */ -{ CPUFUNC(op_80fa_0), 0, 33018 }, /* DIVU.W (d16,PC),Dn */ -{ CPUFUNC(op_80fb_0), 0, 33019 }, /* DIVU.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_80fc_0), 0, 33020 }, /* DIVU.W #.W,Dn */ -{ CPUFUNC(op_8100_0), 0, 33024 }, /* SBCD.B Dn,Dn */ -{ CPUFUNC(op_8108_0), 0, 33032 }, /* SBCD.B -(An),-(An) */ -{ CPUFUNC(op_8110_0), 0, 33040 }, /* OR.B Dn,(An) */ -{ CPUFUNC(op_8118_0), 0, 33048 }, /* OR.B Dn,(An)+ */ -{ CPUFUNC(op_8120_0), 0, 33056 }, /* OR.B Dn,-(An) */ -{ CPUFUNC(op_8128_0), 0, 33064 }, /* OR.B Dn,(d16,An) */ -{ CPUFUNC(op_8130_0), 0, 33072 }, /* OR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_8138_0), 0, 33080 }, /* OR.B Dn,(xxx).W */ -{ CPUFUNC(op_8139_0), 0, 33081 }, /* OR.B Dn,(xxx).L */ -{ CPUFUNC_FF(op_8140_0), 0, 33088 }, /* PACK.L Dn,Dn */ -{ CPUFUNC_FF(op_8148_0), 0, 33096 }, /* PACK.L -(An),-(An) */ -{ CPUFUNC(op_8150_0), 0, 33104 }, /* OR.W Dn,(An) */ -{ CPUFUNC(op_8158_0), 0, 33112 }, /* OR.W Dn,(An)+ */ -{ CPUFUNC(op_8160_0), 0, 33120 }, /* OR.W Dn,-(An) */ -{ CPUFUNC(op_8168_0), 0, 33128 }, /* OR.W Dn,(d16,An) */ -{ CPUFUNC(op_8170_0), 0, 33136 }, /* OR.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_8178_0), 0, 33144 }, /* OR.W Dn,(xxx).W */ -{ CPUFUNC(op_8179_0), 0, 33145 }, /* OR.W Dn,(xxx).L */ -{ CPUFUNC_FF(op_8180_0), 0, 33152 }, /* UNPK.L Dn,Dn */ -{ CPUFUNC_FF(op_8188_0), 0, 33160 }, /* UNPK.L -(An),-(An) */ -{ CPUFUNC(op_8190_0), 0, 33168 }, /* OR.L Dn,(An) */ -{ CPUFUNC(op_8198_0), 0, 33176 }, /* OR.L Dn,(An)+ */ -{ CPUFUNC(op_81a0_0), 0, 33184 }, /* OR.L Dn,-(An) */ -{ CPUFUNC(op_81a8_0), 0, 33192 }, /* OR.L Dn,(d16,An) */ -{ CPUFUNC(op_81b0_0), 0, 33200 }, /* OR.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_81b8_0), 0, 33208 }, /* OR.L Dn,(xxx).W */ -{ CPUFUNC(op_81b9_0), 0, 33209 }, /* OR.L Dn,(xxx).L */ -{ CPUFUNC(op_81c0_0), 0, 33216 }, /* DIVS.W Dn,Dn */ -{ CPUFUNC(op_81d0_0), 0, 33232 }, /* DIVS.W (An),Dn */ -{ CPUFUNC(op_81d8_0), 0, 33240 }, /* DIVS.W (An)+,Dn */ -{ CPUFUNC(op_81e0_0), 0, 33248 }, /* DIVS.W -(An),Dn */ -{ CPUFUNC(op_81e8_0), 0, 33256 }, /* DIVS.W (d16,An),Dn */ -{ CPUFUNC(op_81f0_0), 0, 33264 }, /* DIVS.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_81f8_0), 0, 33272 }, /* DIVS.W (xxx).W,Dn */ -{ CPUFUNC(op_81f9_0), 0, 33273 }, /* DIVS.W (xxx).L,Dn */ -{ CPUFUNC(op_81fa_0), 0, 33274 }, /* DIVS.W (d16,PC),Dn */ -{ CPUFUNC(op_81fb_0), 0, 33275 }, /* DIVS.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_81fc_0), 0, 33276 }, /* DIVS.W #.W,Dn */ -{ CPUFUNC(op_9000_0), 0, 36864 }, /* SUB.B Dn,Dn */ -{ CPUFUNC(op_9010_0), 0, 36880 }, /* SUB.B (An),Dn */ -{ CPUFUNC(op_9018_0), 0, 36888 }, /* SUB.B (An)+,Dn */ -{ CPUFUNC(op_9020_0), 0, 36896 }, /* SUB.B -(An),Dn */ -{ CPUFUNC(op_9028_0), 0, 36904 }, /* SUB.B (d16,An),Dn */ -{ CPUFUNC(op_9030_0), 0, 36912 }, /* SUB.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_9038_0), 0, 36920 }, /* SUB.B (xxx).W,Dn */ -{ CPUFUNC(op_9039_0), 0, 36921 }, /* SUB.B (xxx).L,Dn */ -{ CPUFUNC(op_903a_0), 0, 36922 }, /* SUB.B (d16,PC),Dn */ -{ CPUFUNC(op_903b_0), 0, 36923 }, /* SUB.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_903c_0), 0, 36924 }, /* SUB.B #.B,Dn */ -{ CPUFUNC(op_9040_0), 0, 36928 }, /* SUB.W Dn,Dn */ -{ CPUFUNC(op_9048_0), 0, 36936 }, /* SUB.W An,Dn */ -{ CPUFUNC(op_9050_0), 0, 36944 }, /* SUB.W (An),Dn */ -{ CPUFUNC(op_9058_0), 0, 36952 }, /* SUB.W (An)+,Dn */ -{ CPUFUNC(op_9060_0), 0, 36960 }, /* SUB.W -(An),Dn */ -{ CPUFUNC(op_9068_0), 0, 36968 }, /* SUB.W (d16,An),Dn */ -{ CPUFUNC(op_9070_0), 0, 36976 }, /* SUB.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_9078_0), 0, 36984 }, /* SUB.W (xxx).W,Dn */ -{ CPUFUNC(op_9079_0), 0, 36985 }, /* SUB.W (xxx).L,Dn */ -{ CPUFUNC(op_907a_0), 0, 36986 }, /* SUB.W (d16,PC),Dn */ -{ CPUFUNC(op_907b_0), 0, 36987 }, /* SUB.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_907c_0), 0, 36988 }, /* SUB.W #.W,Dn */ -{ CPUFUNC(op_9080_0), 0, 36992 }, /* SUB.L Dn,Dn */ -{ CPUFUNC(op_9088_0), 0, 37000 }, /* SUB.L An,Dn */ -{ CPUFUNC(op_9090_0), 0, 37008 }, /* SUB.L (An),Dn */ -{ CPUFUNC(op_9098_0), 0, 37016 }, /* SUB.L (An)+,Dn */ -{ CPUFUNC(op_90a0_0), 0, 37024 }, /* SUB.L -(An),Dn */ -{ CPUFUNC(op_90a8_0), 0, 37032 }, /* SUB.L (d16,An),Dn */ -{ CPUFUNC(op_90b0_0), 0, 37040 }, /* SUB.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_90b8_0), 0, 37048 }, /* SUB.L (xxx).W,Dn */ -{ CPUFUNC(op_90b9_0), 0, 37049 }, /* SUB.L (xxx).L,Dn */ -{ CPUFUNC(op_90ba_0), 0, 37050 }, /* SUB.L (d16,PC),Dn */ -{ CPUFUNC(op_90bb_0), 0, 37051 }, /* SUB.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_90bc_0), 0, 37052 }, /* SUB.L #.L,Dn */ -{ CPUFUNC_FF(op_90c0_0), 0, 37056 }, /* SUBA.W Dn,An */ -{ CPUFUNC_FF(op_90c8_0), 0, 37064 }, /* SUBA.W An,An */ -{ CPUFUNC_FF(op_90d0_0), 0, 37072 }, /* SUBA.W (An),An */ -{ CPUFUNC_FF(op_90d8_0), 0, 37080 }, /* SUBA.W (An)+,An */ -{ CPUFUNC_FF(op_90e0_0), 0, 37088 }, /* SUBA.W -(An),An */ -{ CPUFUNC_FF(op_90e8_0), 0, 37096 }, /* SUBA.W (d16,An),An */ -{ CPUFUNC_FF(op_90f0_0), 0, 37104 }, /* SUBA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_90f8_0), 0, 37112 }, /* SUBA.W (xxx).W,An */ -{ CPUFUNC_FF(op_90f9_0), 0, 37113 }, /* SUBA.W (xxx).L,An */ -{ CPUFUNC_FF(op_90fa_0), 0, 37114 }, /* SUBA.W (d16,PC),An */ -{ CPUFUNC_FF(op_90fb_0), 0, 37115 }, /* SUBA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_90fc_0), 0, 37116 }, /* SUBA.W #.W,An */ -{ CPUFUNC(op_9100_0), 0, 37120 }, /* SUBX.B Dn,Dn */ -{ CPUFUNC(op_9108_0), 0, 37128 }, /* SUBX.B -(An),-(An) */ -{ CPUFUNC(op_9110_0), 0, 37136 }, /* SUB.B Dn,(An) */ -{ CPUFUNC(op_9118_0), 0, 37144 }, /* SUB.B Dn,(An)+ */ -{ CPUFUNC(op_9120_0), 0, 37152 }, /* SUB.B Dn,-(An) */ -{ CPUFUNC(op_9128_0), 0, 37160 }, /* SUB.B Dn,(d16,An) */ -{ CPUFUNC(op_9130_0), 0, 37168 }, /* SUB.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_9138_0), 0, 37176 }, /* SUB.B Dn,(xxx).W */ -{ CPUFUNC(op_9139_0), 0, 37177 }, /* SUB.B Dn,(xxx).L */ -{ CPUFUNC(op_9140_0), 0, 37184 }, /* SUBX.W Dn,Dn */ -{ CPUFUNC(op_9148_0), 0, 37192 }, /* SUBX.W -(An),-(An) */ -{ CPUFUNC(op_9150_0), 0, 37200 }, /* SUB.W Dn,(An) */ -{ CPUFUNC(op_9158_0), 0, 37208 }, /* SUB.W Dn,(An)+ */ -{ CPUFUNC(op_9160_0), 0, 37216 }, /* SUB.W Dn,-(An) */ -{ CPUFUNC(op_9168_0), 0, 37224 }, /* SUB.W Dn,(d16,An) */ -{ CPUFUNC(op_9170_0), 0, 37232 }, /* SUB.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_9178_0), 0, 37240 }, /* SUB.W Dn,(xxx).W */ -{ CPUFUNC(op_9179_0), 0, 37241 }, /* SUB.W Dn,(xxx).L */ -{ CPUFUNC(op_9180_0), 0, 37248 }, /* SUBX.L Dn,Dn */ -{ CPUFUNC(op_9188_0), 0, 37256 }, /* SUBX.L -(An),-(An) */ -{ CPUFUNC(op_9190_0), 0, 37264 }, /* SUB.L Dn,(An) */ -{ CPUFUNC(op_9198_0), 0, 37272 }, /* SUB.L Dn,(An)+ */ -{ CPUFUNC(op_91a0_0), 0, 37280 }, /* SUB.L Dn,-(An) */ -{ CPUFUNC(op_91a8_0), 0, 37288 }, /* SUB.L Dn,(d16,An) */ -{ CPUFUNC(op_91b0_0), 0, 37296 }, /* SUB.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_91b8_0), 0, 37304 }, /* SUB.L Dn,(xxx).W */ -{ CPUFUNC(op_91b9_0), 0, 37305 }, /* SUB.L Dn,(xxx).L */ -{ CPUFUNC_FF(op_91c0_0), 0, 37312 }, /* SUBA.L Dn,An */ -{ CPUFUNC_FF(op_91c8_0), 0, 37320 }, /* SUBA.L An,An */ -{ CPUFUNC_FF(op_91d0_0), 0, 37328 }, /* SUBA.L (An),An */ -{ CPUFUNC_FF(op_91d8_0), 0, 37336 }, /* SUBA.L (An)+,An */ -{ CPUFUNC_FF(op_91e0_0), 0, 37344 }, /* SUBA.L -(An),An */ -{ CPUFUNC_FF(op_91e8_0), 0, 37352 }, /* SUBA.L (d16,An),An */ -{ CPUFUNC_FF(op_91f0_0), 0, 37360 }, /* SUBA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_91f8_0), 0, 37368 }, /* SUBA.L (xxx).W,An */ -{ CPUFUNC_FF(op_91f9_0), 0, 37369 }, /* SUBA.L (xxx).L,An */ -{ CPUFUNC_FF(op_91fa_0), 0, 37370 }, /* SUBA.L (d16,PC),An */ -{ CPUFUNC_FF(op_91fb_0), 0, 37371 }, /* SUBA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_91fc_0), 0, 37372 }, /* SUBA.L #.L,An */ -{ CPUFUNC(op_b000_0), 0, 45056 }, /* CMP.B Dn,Dn */ -{ CPUFUNC(op_b010_0), 0, 45072 }, /* CMP.B (An),Dn */ -{ CPUFUNC(op_b018_0), 0, 45080 }, /* CMP.B (An)+,Dn */ -{ CPUFUNC(op_b020_0), 0, 45088 }, /* CMP.B -(An),Dn */ -{ CPUFUNC(op_b028_0), 0, 45096 }, /* CMP.B (d16,An),Dn */ -{ CPUFUNC(op_b030_0), 0, 45104 }, /* CMP.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_b038_0), 0, 45112 }, /* CMP.B (xxx).W,Dn */ -{ CPUFUNC(op_b039_0), 0, 45113 }, /* CMP.B (xxx).L,Dn */ -{ CPUFUNC(op_b03a_0), 0, 45114 }, /* CMP.B (d16,PC),Dn */ -{ CPUFUNC(op_b03b_0), 0, 45115 }, /* CMP.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b03c_0), 0, 45116 }, /* CMP.B #.B,Dn */ -{ CPUFUNC(op_b040_0), 0, 45120 }, /* CMP.W Dn,Dn */ -{ CPUFUNC(op_b048_0), 0, 45128 }, /* CMP.W An,Dn */ -{ CPUFUNC(op_b050_0), 0, 45136 }, /* CMP.W (An),Dn */ -{ CPUFUNC(op_b058_0), 0, 45144 }, /* CMP.W (An)+,Dn */ -{ CPUFUNC(op_b060_0), 0, 45152 }, /* CMP.W -(An),Dn */ -{ CPUFUNC(op_b068_0), 0, 45160 }, /* CMP.W (d16,An),Dn */ -{ CPUFUNC(op_b070_0), 0, 45168 }, /* CMP.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_b078_0), 0, 45176 }, /* CMP.W (xxx).W,Dn */ -{ CPUFUNC(op_b079_0), 0, 45177 }, /* CMP.W (xxx).L,Dn */ -{ CPUFUNC(op_b07a_0), 0, 45178 }, /* CMP.W (d16,PC),Dn */ -{ CPUFUNC(op_b07b_0), 0, 45179 }, /* CMP.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b07c_0), 0, 45180 }, /* CMP.W #.W,Dn */ -{ CPUFUNC(op_b080_0), 0, 45184 }, /* CMP.L Dn,Dn */ -{ CPUFUNC(op_b088_0), 0, 45192 }, /* CMP.L An,Dn */ -{ CPUFUNC(op_b090_0), 0, 45200 }, /* CMP.L (An),Dn */ -{ CPUFUNC(op_b098_0), 0, 45208 }, /* CMP.L (An)+,Dn */ -{ CPUFUNC(op_b0a0_0), 0, 45216 }, /* CMP.L -(An),Dn */ -{ CPUFUNC(op_b0a8_0), 0, 45224 }, /* CMP.L (d16,An),Dn */ -{ CPUFUNC(op_b0b0_0), 0, 45232 }, /* CMP.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_b0b8_0), 0, 45240 }, /* CMP.L (xxx).W,Dn */ -{ CPUFUNC(op_b0b9_0), 0, 45241 }, /* CMP.L (xxx).L,Dn */ -{ CPUFUNC(op_b0ba_0), 0, 45242 }, /* CMP.L (d16,PC),Dn */ -{ CPUFUNC(op_b0bb_0), 0, 45243 }, /* CMP.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b0bc_0), 0, 45244 }, /* CMP.L #.L,Dn */ -{ CPUFUNC(op_b0c0_0), 0, 45248 }, /* CMPA.W Dn,An */ -{ CPUFUNC(op_b0c8_0), 0, 45256 }, /* CMPA.W An,An */ -{ CPUFUNC(op_b0d0_0), 0, 45264 }, /* CMPA.W (An),An */ -{ CPUFUNC(op_b0d8_0), 0, 45272 }, /* CMPA.W (An)+,An */ -{ CPUFUNC(op_b0e0_0), 0, 45280 }, /* CMPA.W -(An),An */ -{ CPUFUNC(op_b0e8_0), 0, 45288 }, /* CMPA.W (d16,An),An */ -{ CPUFUNC(op_b0f0_0), 0, 45296 }, /* CMPA.W (d8,An,Xn),An */ -{ CPUFUNC(op_b0f8_0), 0, 45304 }, /* CMPA.W (xxx).W,An */ -{ CPUFUNC(op_b0f9_0), 0, 45305 }, /* CMPA.W (xxx).L,An */ -{ CPUFUNC(op_b0fa_0), 0, 45306 }, /* CMPA.W (d16,PC),An */ -{ CPUFUNC(op_b0fb_0), 0, 45307 }, /* CMPA.W (d8,PC,Xn),An */ -{ CPUFUNC(op_b0fc_0), 0, 45308 }, /* CMPA.W #.W,An */ -{ CPUFUNC(op_b100_0), 0, 45312 }, /* EOR.B Dn,Dn */ -{ CPUFUNC(op_b108_0), 0, 45320 }, /* CMPM.B (An)+,(An)+ */ -{ CPUFUNC(op_b110_0), 0, 45328 }, /* EOR.B Dn,(An) */ -{ CPUFUNC(op_b118_0), 0, 45336 }, /* EOR.B Dn,(An)+ */ -{ CPUFUNC(op_b120_0), 0, 45344 }, /* EOR.B Dn,-(An) */ -{ CPUFUNC(op_b128_0), 0, 45352 }, /* EOR.B Dn,(d16,An) */ -{ CPUFUNC(op_b130_0), 0, 45360 }, /* EOR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b138_0), 0, 45368 }, /* EOR.B Dn,(xxx).W */ -{ CPUFUNC(op_b139_0), 0, 45369 }, /* EOR.B Dn,(xxx).L */ -{ CPUFUNC(op_b140_0), 0, 45376 }, /* EOR.W Dn,Dn */ -{ CPUFUNC(op_b148_0), 0, 45384 }, /* CMPM.W (An)+,(An)+ */ -{ CPUFUNC(op_b150_0), 0, 45392 }, /* EOR.W Dn,(An) */ -{ CPUFUNC(op_b158_0), 0, 45400 }, /* EOR.W Dn,(An)+ */ -{ CPUFUNC(op_b160_0), 0, 45408 }, /* EOR.W Dn,-(An) */ -{ CPUFUNC(op_b168_0), 0, 45416 }, /* EOR.W Dn,(d16,An) */ -{ CPUFUNC(op_b170_0), 0, 45424 }, /* EOR.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b178_0), 0, 45432 }, /* EOR.W Dn,(xxx).W */ -{ CPUFUNC(op_b179_0), 0, 45433 }, /* EOR.W Dn,(xxx).L */ -{ CPUFUNC(op_b180_0), 0, 45440 }, /* EOR.L Dn,Dn */ -{ CPUFUNC(op_b188_0), 0, 45448 }, /* CMPM.L (An)+,(An)+ */ -{ CPUFUNC(op_b190_0), 0, 45456 }, /* EOR.L Dn,(An) */ -{ CPUFUNC(op_b198_0), 0, 45464 }, /* EOR.L Dn,(An)+ */ -{ CPUFUNC(op_b1a0_0), 0, 45472 }, /* EOR.L Dn,-(An) */ -{ CPUFUNC(op_b1a8_0), 0, 45480 }, /* EOR.L Dn,(d16,An) */ -{ CPUFUNC(op_b1b0_0), 0, 45488 }, /* EOR.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b1b8_0), 0, 45496 }, /* EOR.L Dn,(xxx).W */ -{ CPUFUNC(op_b1b9_0), 0, 45497 }, /* EOR.L Dn,(xxx).L */ -{ CPUFUNC(op_b1c0_0), 0, 45504 }, /* CMPA.L Dn,An */ -{ CPUFUNC(op_b1c8_0), 0, 45512 }, /* CMPA.L An,An */ -{ CPUFUNC(op_b1d0_0), 0, 45520 }, /* CMPA.L (An),An */ -{ CPUFUNC(op_b1d8_0), 0, 45528 }, /* CMPA.L (An)+,An */ -{ CPUFUNC(op_b1e0_0), 0, 45536 }, /* CMPA.L -(An),An */ -{ CPUFUNC(op_b1e8_0), 0, 45544 }, /* CMPA.L (d16,An),An */ -{ CPUFUNC(op_b1f0_0), 0, 45552 }, /* CMPA.L (d8,An,Xn),An */ -{ CPUFUNC(op_b1f8_0), 0, 45560 }, /* CMPA.L (xxx).W,An */ -{ CPUFUNC(op_b1f9_0), 0, 45561 }, /* CMPA.L (xxx).L,An */ -{ CPUFUNC(op_b1fa_0), 0, 45562 }, /* CMPA.L (d16,PC),An */ -{ CPUFUNC(op_b1fb_0), 0, 45563 }, /* CMPA.L (d8,PC,Xn),An */ -{ CPUFUNC(op_b1fc_0), 0, 45564 }, /* CMPA.L #.L,An */ -{ CPUFUNC(op_c000_0), 0, 49152 }, /* AND.B Dn,Dn */ -{ CPUFUNC(op_c010_0), 0, 49168 }, /* AND.B (An),Dn */ -{ CPUFUNC(op_c018_0), 0, 49176 }, /* AND.B (An)+,Dn */ -{ CPUFUNC(op_c020_0), 0, 49184 }, /* AND.B -(An),Dn */ -{ CPUFUNC(op_c028_0), 0, 49192 }, /* AND.B (d16,An),Dn */ -{ CPUFUNC(op_c030_0), 0, 49200 }, /* AND.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_c038_0), 0, 49208 }, /* AND.B (xxx).W,Dn */ -{ CPUFUNC(op_c039_0), 0, 49209 }, /* AND.B (xxx).L,Dn */ -{ CPUFUNC(op_c03a_0), 0, 49210 }, /* AND.B (d16,PC),Dn */ -{ CPUFUNC(op_c03b_0), 0, 49211 }, /* AND.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c03c_0), 0, 49212 }, /* AND.B #.B,Dn */ -{ CPUFUNC(op_c040_0), 0, 49216 }, /* AND.W Dn,Dn */ -{ CPUFUNC(op_c050_0), 0, 49232 }, /* AND.W (An),Dn */ -{ CPUFUNC(op_c058_0), 0, 49240 }, /* AND.W (An)+,Dn */ -{ CPUFUNC(op_c060_0), 0, 49248 }, /* AND.W -(An),Dn */ -{ CPUFUNC(op_c068_0), 0, 49256 }, /* AND.W (d16,An),Dn */ -{ CPUFUNC(op_c070_0), 0, 49264 }, /* AND.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c078_0), 0, 49272 }, /* AND.W (xxx).W,Dn */ -{ CPUFUNC(op_c079_0), 0, 49273 }, /* AND.W (xxx).L,Dn */ -{ CPUFUNC(op_c07a_0), 0, 49274 }, /* AND.W (d16,PC),Dn */ -{ CPUFUNC(op_c07b_0), 0, 49275 }, /* AND.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c07c_0), 0, 49276 }, /* AND.W #.W,Dn */ -{ CPUFUNC(op_c080_0), 0, 49280 }, /* AND.L Dn,Dn */ -{ CPUFUNC(op_c090_0), 0, 49296 }, /* AND.L (An),Dn */ -{ CPUFUNC(op_c098_0), 0, 49304 }, /* AND.L (An)+,Dn */ -{ CPUFUNC(op_c0a0_0), 0, 49312 }, /* AND.L -(An),Dn */ -{ CPUFUNC(op_c0a8_0), 0, 49320 }, /* AND.L (d16,An),Dn */ -{ CPUFUNC(op_c0b0_0), 0, 49328 }, /* AND.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_c0b8_0), 0, 49336 }, /* AND.L (xxx).W,Dn */ -{ CPUFUNC(op_c0b9_0), 0, 49337 }, /* AND.L (xxx).L,Dn */ -{ CPUFUNC(op_c0ba_0), 0, 49338 }, /* AND.L (d16,PC),Dn */ -{ CPUFUNC(op_c0bb_0), 0, 49339 }, /* AND.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c0bc_0), 0, 49340 }, /* AND.L #.L,Dn */ -{ CPUFUNC(op_c0c0_0), 0, 49344 }, /* MULU.W Dn,Dn */ -{ CPUFUNC(op_c0d0_0), 0, 49360 }, /* MULU.W (An),Dn */ -{ CPUFUNC(op_c0d8_0), 0, 49368 }, /* MULU.W (An)+,Dn */ -{ CPUFUNC(op_c0e0_0), 0, 49376 }, /* MULU.W -(An),Dn */ -{ CPUFUNC(op_c0e8_0), 0, 49384 }, /* MULU.W (d16,An),Dn */ -{ CPUFUNC(op_c0f0_0), 0, 49392 }, /* MULU.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c0f8_0), 0, 49400 }, /* MULU.W (xxx).W,Dn */ -{ CPUFUNC(op_c0f9_0), 0, 49401 }, /* MULU.W (xxx).L,Dn */ -{ CPUFUNC(op_c0fa_0), 0, 49402 }, /* MULU.W (d16,PC),Dn */ -{ CPUFUNC(op_c0fb_0), 0, 49403 }, /* MULU.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c0fc_0), 0, 49404 }, /* MULU.W #.W,Dn */ -{ CPUFUNC(op_c100_0), 0, 49408 }, /* ABCD.B Dn,Dn */ -{ CPUFUNC(op_c108_0), 0, 49416 }, /* ABCD.B -(An),-(An) */ -{ CPUFUNC(op_c110_0), 0, 49424 }, /* AND.B Dn,(An) */ -{ CPUFUNC(op_c118_0), 0, 49432 }, /* AND.B Dn,(An)+ */ -{ CPUFUNC(op_c120_0), 0, 49440 }, /* AND.B Dn,-(An) */ -{ CPUFUNC(op_c128_0), 0, 49448 }, /* AND.B Dn,(d16,An) */ -{ CPUFUNC(op_c130_0), 0, 49456 }, /* AND.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c138_0), 0, 49464 }, /* AND.B Dn,(xxx).W */ -{ CPUFUNC(op_c139_0), 0, 49465 }, /* AND.B Dn,(xxx).L */ -{ CPUFUNC_FF(op_c140_0), 0, 49472 }, /* EXG.L Dn,Dn */ -{ CPUFUNC_FF(op_c148_0), 0, 49480 }, /* EXG.L An,An */ -{ CPUFUNC(op_c150_0), 0, 49488 }, /* AND.W Dn,(An) */ -{ CPUFUNC(op_c158_0), 0, 49496 }, /* AND.W Dn,(An)+ */ -{ CPUFUNC(op_c160_0), 0, 49504 }, /* AND.W Dn,-(An) */ -{ CPUFUNC(op_c168_0), 0, 49512 }, /* AND.W Dn,(d16,An) */ -{ CPUFUNC(op_c170_0), 0, 49520 }, /* AND.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c178_0), 0, 49528 }, /* AND.W Dn,(xxx).W */ -{ CPUFUNC(op_c179_0), 0, 49529 }, /* AND.W Dn,(xxx).L */ -{ CPUFUNC_FF(op_c188_0), 0, 49544 }, /* EXG.L Dn,An */ -{ CPUFUNC(op_c190_0), 0, 49552 }, /* AND.L Dn,(An) */ -{ CPUFUNC(op_c198_0), 0, 49560 }, /* AND.L Dn,(An)+ */ -{ CPUFUNC(op_c1a0_0), 0, 49568 }, /* AND.L Dn,-(An) */ -{ CPUFUNC(op_c1a8_0), 0, 49576 }, /* AND.L Dn,(d16,An) */ -{ CPUFUNC(op_c1b0_0), 0, 49584 }, /* AND.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c1b8_0), 0, 49592 }, /* AND.L Dn,(xxx).W */ -{ CPUFUNC(op_c1b9_0), 0, 49593 }, /* AND.L Dn,(xxx).L */ -{ CPUFUNC(op_c1c0_0), 0, 49600 }, /* MULS.W Dn,Dn */ -{ CPUFUNC(op_c1d0_0), 0, 49616 }, /* MULS.W (An),Dn */ -{ CPUFUNC(op_c1d8_0), 0, 49624 }, /* MULS.W (An)+,Dn */ -{ CPUFUNC(op_c1e0_0), 0, 49632 }, /* MULS.W -(An),Dn */ -{ CPUFUNC(op_c1e8_0), 0, 49640 }, /* MULS.W (d16,An),Dn */ -{ CPUFUNC(op_c1f0_0), 0, 49648 }, /* MULS.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c1f8_0), 0, 49656 }, /* MULS.W (xxx).W,Dn */ -{ CPUFUNC(op_c1f9_0), 0, 49657 }, /* MULS.W (xxx).L,Dn */ -{ CPUFUNC(op_c1fa_0), 0, 49658 }, /* MULS.W (d16,PC),Dn */ -{ CPUFUNC(op_c1fb_0), 0, 49659 }, /* MULS.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c1fc_0), 0, 49660 }, /* MULS.W #.W,Dn */ -{ CPUFUNC(op_d000_0), 0, 53248 }, /* ADD.B Dn,Dn */ -{ CPUFUNC(op_d010_0), 0, 53264 }, /* ADD.B (An),Dn */ -{ CPUFUNC(op_d018_0), 0, 53272 }, /* ADD.B (An)+,Dn */ -{ CPUFUNC(op_d020_0), 0, 53280 }, /* ADD.B -(An),Dn */ -{ CPUFUNC(op_d028_0), 0, 53288 }, /* ADD.B (d16,An),Dn */ -{ CPUFUNC(op_d030_0), 0, 53296 }, /* ADD.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_d038_0), 0, 53304 }, /* ADD.B (xxx).W,Dn */ -{ CPUFUNC(op_d039_0), 0, 53305 }, /* ADD.B (xxx).L,Dn */ -{ CPUFUNC(op_d03a_0), 0, 53306 }, /* ADD.B (d16,PC),Dn */ -{ CPUFUNC(op_d03b_0), 0, 53307 }, /* ADD.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d03c_0), 0, 53308 }, /* ADD.B #.B,Dn */ -{ CPUFUNC(op_d040_0), 0, 53312 }, /* ADD.W Dn,Dn */ -{ CPUFUNC(op_d048_0), 0, 53320 }, /* ADD.W An,Dn */ -{ CPUFUNC(op_d050_0), 0, 53328 }, /* ADD.W (An),Dn */ -{ CPUFUNC(op_d058_0), 0, 53336 }, /* ADD.W (An)+,Dn */ -{ CPUFUNC(op_d060_0), 0, 53344 }, /* ADD.W -(An),Dn */ -{ CPUFUNC(op_d068_0), 0, 53352 }, /* ADD.W (d16,An),Dn */ -{ CPUFUNC(op_d070_0), 0, 53360 }, /* ADD.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_d078_0), 0, 53368 }, /* ADD.W (xxx).W,Dn */ -{ CPUFUNC(op_d079_0), 0, 53369 }, /* ADD.W (xxx).L,Dn */ -{ CPUFUNC(op_d07a_0), 0, 53370 }, /* ADD.W (d16,PC),Dn */ -{ CPUFUNC(op_d07b_0), 0, 53371 }, /* ADD.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d07c_0), 0, 53372 }, /* ADD.W #.W,Dn */ -{ CPUFUNC(op_d080_0), 0, 53376 }, /* ADD.L Dn,Dn */ -{ CPUFUNC(op_d088_0), 0, 53384 }, /* ADD.L An,Dn */ -{ CPUFUNC(op_d090_0), 0, 53392 }, /* ADD.L (An),Dn */ -{ CPUFUNC(op_d098_0), 0, 53400 }, /* ADD.L (An)+,Dn */ -{ CPUFUNC(op_d0a0_0), 0, 53408 }, /* ADD.L -(An),Dn */ -{ CPUFUNC(op_d0a8_0), 0, 53416 }, /* ADD.L (d16,An),Dn */ -{ CPUFUNC(op_d0b0_0), 0, 53424 }, /* ADD.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_d0b8_0), 0, 53432 }, /* ADD.L (xxx).W,Dn */ -{ CPUFUNC(op_d0b9_0), 0, 53433 }, /* ADD.L (xxx).L,Dn */ -{ CPUFUNC(op_d0ba_0), 0, 53434 }, /* ADD.L (d16,PC),Dn */ -{ CPUFUNC(op_d0bb_0), 0, 53435 }, /* ADD.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d0bc_0), 0, 53436 }, /* ADD.L #.L,Dn */ -{ CPUFUNC_FF(op_d0c0_0), 0, 53440 }, /* ADDA.W Dn,An */ -{ CPUFUNC_FF(op_d0c8_0), 0, 53448 }, /* ADDA.W An,An */ -{ CPUFUNC_FF(op_d0d0_0), 0, 53456 }, /* ADDA.W (An),An */ -{ CPUFUNC_FF(op_d0d8_0), 0, 53464 }, /* ADDA.W (An)+,An */ -{ CPUFUNC_FF(op_d0e0_0), 0, 53472 }, /* ADDA.W -(An),An */ -{ CPUFUNC_FF(op_d0e8_0), 0, 53480 }, /* ADDA.W (d16,An),An */ -{ CPUFUNC_FF(op_d0f0_0), 0, 53488 }, /* ADDA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_d0f8_0), 0, 53496 }, /* ADDA.W (xxx).W,An */ -{ CPUFUNC_FF(op_d0f9_0), 0, 53497 }, /* ADDA.W (xxx).L,An */ -{ CPUFUNC_FF(op_d0fa_0), 0, 53498 }, /* ADDA.W (d16,PC),An */ -{ CPUFUNC_FF(op_d0fb_0), 0, 53499 }, /* ADDA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_d0fc_0), 0, 53500 }, /* ADDA.W #.W,An */ -{ CPUFUNC(op_d100_0), 0, 53504 }, /* ADDX.B Dn,Dn */ -{ CPUFUNC(op_d108_0), 0, 53512 }, /* ADDX.B -(An),-(An) */ -{ CPUFUNC(op_d110_0), 0, 53520 }, /* ADD.B Dn,(An) */ -{ CPUFUNC(op_d118_0), 0, 53528 }, /* ADD.B Dn,(An)+ */ -{ CPUFUNC(op_d120_0), 0, 53536 }, /* ADD.B Dn,-(An) */ -{ CPUFUNC(op_d128_0), 0, 53544 }, /* ADD.B Dn,(d16,An) */ -{ CPUFUNC(op_d130_0), 0, 53552 }, /* ADD.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d138_0), 0, 53560 }, /* ADD.B Dn,(xxx).W */ -{ CPUFUNC(op_d139_0), 0, 53561 }, /* ADD.B Dn,(xxx).L */ -{ CPUFUNC(op_d140_0), 0, 53568 }, /* ADDX.W Dn,Dn */ -{ CPUFUNC(op_d148_0), 0, 53576 }, /* ADDX.W -(An),-(An) */ -{ CPUFUNC(op_d150_0), 0, 53584 }, /* ADD.W Dn,(An) */ -{ CPUFUNC(op_d158_0), 0, 53592 }, /* ADD.W Dn,(An)+ */ -{ CPUFUNC(op_d160_0), 0, 53600 }, /* ADD.W Dn,-(An) */ -{ CPUFUNC(op_d168_0), 0, 53608 }, /* ADD.W Dn,(d16,An) */ -{ CPUFUNC(op_d170_0), 0, 53616 }, /* ADD.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d178_0), 0, 53624 }, /* ADD.W Dn,(xxx).W */ -{ CPUFUNC(op_d179_0), 0, 53625 }, /* ADD.W Dn,(xxx).L */ -{ CPUFUNC(op_d180_0), 0, 53632 }, /* ADDX.L Dn,Dn */ -{ CPUFUNC(op_d188_0), 0, 53640 }, /* ADDX.L -(An),-(An) */ -{ CPUFUNC(op_d190_0), 0, 53648 }, /* ADD.L Dn,(An) */ -{ CPUFUNC(op_d198_0), 0, 53656 }, /* ADD.L Dn,(An)+ */ -{ CPUFUNC(op_d1a0_0), 0, 53664 }, /* ADD.L Dn,-(An) */ -{ CPUFUNC(op_d1a8_0), 0, 53672 }, /* ADD.L Dn,(d16,An) */ -{ CPUFUNC(op_d1b0_0), 0, 53680 }, /* ADD.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d1b8_0), 0, 53688 }, /* ADD.L Dn,(xxx).W */ -{ CPUFUNC(op_d1b9_0), 0, 53689 }, /* ADD.L Dn,(xxx).L */ -{ CPUFUNC_FF(op_d1c0_0), 0, 53696 }, /* ADDA.L Dn,An */ -{ CPUFUNC_FF(op_d1c8_0), 0, 53704 }, /* ADDA.L An,An */ -{ CPUFUNC_FF(op_d1d0_0), 0, 53712 }, /* ADDA.L (An),An */ -{ CPUFUNC_FF(op_d1d8_0), 0, 53720 }, /* ADDA.L (An)+,An */ -{ CPUFUNC_FF(op_d1e0_0), 0, 53728 }, /* ADDA.L -(An),An */ -{ CPUFUNC_FF(op_d1e8_0), 0, 53736 }, /* ADDA.L (d16,An),An */ -{ CPUFUNC_FF(op_d1f0_0), 0, 53744 }, /* ADDA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_d1f8_0), 0, 53752 }, /* ADDA.L (xxx).W,An */ -{ CPUFUNC_FF(op_d1f9_0), 0, 53753 }, /* ADDA.L (xxx).L,An */ -{ CPUFUNC_FF(op_d1fa_0), 0, 53754 }, /* ADDA.L (d16,PC),An */ -{ CPUFUNC_FF(op_d1fb_0), 0, 53755 }, /* ADDA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_d1fc_0), 0, 53756 }, /* ADDA.L #.L,An */ -{ CPUFUNC(op_e000_0), 0, 57344 }, /* ASR.B #,Dn */ -{ CPUFUNC(op_e008_0), 0, 57352 }, /* LSR.B #,Dn */ -{ CPUFUNC(op_e010_0), 0, 57360 }, /* ROXR.B #,Dn */ -{ CPUFUNC(op_e018_0), 0, 57368 }, /* ROR.B #,Dn */ -{ CPUFUNC(op_e020_0), 0, 57376 }, /* ASR.B Dn,Dn */ -{ CPUFUNC(op_e028_0), 0, 57384 }, /* LSR.B Dn,Dn */ -{ CPUFUNC(op_e030_0), 0, 57392 }, /* ROXR.B Dn,Dn */ -{ CPUFUNC(op_e038_0), 0, 57400 }, /* ROR.B Dn,Dn */ -{ CPUFUNC(op_e040_0), 0, 57408 }, /* ASR.W #,Dn */ -{ CPUFUNC(op_e048_0), 0, 57416 }, /* LSR.W #,Dn */ -{ CPUFUNC(op_e050_0), 0, 57424 }, /* ROXR.W #,Dn */ -{ CPUFUNC(op_e058_0), 0, 57432 }, /* ROR.W #,Dn */ -{ CPUFUNC(op_e060_0), 0, 57440 }, /* ASR.W Dn,Dn */ -{ CPUFUNC(op_e068_0), 0, 57448 }, /* LSR.W Dn,Dn */ -{ CPUFUNC(op_e070_0), 0, 57456 }, /* ROXR.W Dn,Dn */ -{ CPUFUNC(op_e078_0), 0, 57464 }, /* ROR.W Dn,Dn */ -{ CPUFUNC(op_e080_0), 0, 57472 }, /* ASR.L #,Dn */ -{ CPUFUNC(op_e088_0), 0, 57480 }, /* LSR.L #,Dn */ -{ CPUFUNC(op_e090_0), 0, 57488 }, /* ROXR.L #,Dn */ -{ CPUFUNC(op_e098_0), 0, 57496 }, /* ROR.L #,Dn */ -{ CPUFUNC(op_e0a0_0), 0, 57504 }, /* ASR.L Dn,Dn */ -{ CPUFUNC(op_e0a8_0), 0, 57512 }, /* LSR.L Dn,Dn */ -{ CPUFUNC(op_e0b0_0), 0, 57520 }, /* ROXR.L Dn,Dn */ -{ CPUFUNC(op_e0b8_0), 0, 57528 }, /* ROR.L Dn,Dn */ -{ CPUFUNC(op_e0d0_0), 0, 57552 }, /* ASRW.W (An) */ -{ CPUFUNC(op_e0d8_0), 0, 57560 }, /* ASRW.W (An)+ */ -{ CPUFUNC(op_e0e0_0), 0, 57568 }, /* ASRW.W -(An) */ -{ CPUFUNC(op_e0e8_0), 0, 57576 }, /* ASRW.W (d16,An) */ -{ CPUFUNC(op_e0f0_0), 0, 57584 }, /* ASRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e0f8_0), 0, 57592 }, /* ASRW.W (xxx).W */ -{ CPUFUNC(op_e0f9_0), 0, 57593 }, /* ASRW.W (xxx).L */ -{ CPUFUNC(op_e100_0), 0, 57600 }, /* ASL.B #,Dn */ -{ CPUFUNC(op_e108_0), 0, 57608 }, /* LSL.B #,Dn */ -{ CPUFUNC(op_e110_0), 0, 57616 }, /* ROXL.B #,Dn */ -{ CPUFUNC(op_e118_0), 0, 57624 }, /* ROL.B #,Dn */ -{ CPUFUNC(op_e120_0), 0, 57632 }, /* ASL.B Dn,Dn */ -{ CPUFUNC(op_e128_0), 0, 57640 }, /* LSL.B Dn,Dn */ -{ CPUFUNC(op_e130_0), 0, 57648 }, /* ROXL.B Dn,Dn */ -{ CPUFUNC(op_e138_0), 0, 57656 }, /* ROL.B Dn,Dn */ -{ CPUFUNC(op_e140_0), 0, 57664 }, /* ASL.W #,Dn */ -{ CPUFUNC(op_e148_0), 0, 57672 }, /* LSL.W #,Dn */ -{ CPUFUNC(op_e150_0), 0, 57680 }, /* ROXL.W #,Dn */ -{ CPUFUNC(op_e158_0), 0, 57688 }, /* ROL.W #,Dn */ -{ CPUFUNC(op_e160_0), 0, 57696 }, /* ASL.W Dn,Dn */ -{ CPUFUNC(op_e168_0), 0, 57704 }, /* LSL.W Dn,Dn */ -{ CPUFUNC(op_e170_0), 0, 57712 }, /* ROXL.W Dn,Dn */ -{ CPUFUNC(op_e178_0), 0, 57720 }, /* ROL.W Dn,Dn */ -{ CPUFUNC(op_e180_0), 0, 57728 }, /* ASL.L #,Dn */ -{ CPUFUNC(op_e188_0), 0, 57736 }, /* LSL.L #,Dn */ -{ CPUFUNC(op_e190_0), 0, 57744 }, /* ROXL.L #,Dn */ -{ CPUFUNC(op_e198_0), 0, 57752 }, /* ROL.L #,Dn */ -{ CPUFUNC(op_e1a0_0), 0, 57760 }, /* ASL.L Dn,Dn */ -{ CPUFUNC(op_e1a8_0), 0, 57768 }, /* LSL.L Dn,Dn */ -{ CPUFUNC(op_e1b0_0), 0, 57776 }, /* ROXL.L Dn,Dn */ -{ CPUFUNC(op_e1b8_0), 0, 57784 }, /* ROL.L Dn,Dn */ -{ CPUFUNC(op_e1d0_0), 0, 57808 }, /* ASLW.W (An) */ -{ CPUFUNC(op_e1d8_0), 0, 57816 }, /* ASLW.W (An)+ */ -{ CPUFUNC(op_e1e0_0), 0, 57824 }, /* ASLW.W -(An) */ -{ CPUFUNC(op_e1e8_0), 0, 57832 }, /* ASLW.W (d16,An) */ -{ CPUFUNC(op_e1f0_0), 0, 57840 }, /* ASLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e1f8_0), 0, 57848 }, /* ASLW.W (xxx).W */ -{ CPUFUNC(op_e1f9_0), 0, 57849 }, /* ASLW.W (xxx).L */ -{ CPUFUNC(op_e2d0_0), 0, 58064 }, /* LSRW.W (An) */ -{ CPUFUNC(op_e2d8_0), 0, 58072 }, /* LSRW.W (An)+ */ -{ CPUFUNC(op_e2e0_0), 0, 58080 }, /* LSRW.W -(An) */ -{ CPUFUNC(op_e2e8_0), 0, 58088 }, /* LSRW.W (d16,An) */ -{ CPUFUNC(op_e2f0_0), 0, 58096 }, /* LSRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e2f8_0), 0, 58104 }, /* LSRW.W (xxx).W */ -{ CPUFUNC(op_e2f9_0), 0, 58105 }, /* LSRW.W (xxx).L */ -{ CPUFUNC(op_e3d0_0), 0, 58320 }, /* LSLW.W (An) */ -{ CPUFUNC(op_e3d8_0), 0, 58328 }, /* LSLW.W (An)+ */ -{ CPUFUNC(op_e3e0_0), 0, 58336 }, /* LSLW.W -(An) */ -{ CPUFUNC(op_e3e8_0), 0, 58344 }, /* LSLW.W (d16,An) */ -{ CPUFUNC(op_e3f0_0), 0, 58352 }, /* LSLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e3f8_0), 0, 58360 }, /* LSLW.W (xxx).W */ -{ CPUFUNC(op_e3f9_0), 0, 58361 }, /* LSLW.W (xxx).L */ -{ CPUFUNC(op_e4d0_0), 0, 58576 }, /* ROXRW.W (An) */ -{ CPUFUNC(op_e4d8_0), 0, 58584 }, /* ROXRW.W (An)+ */ -{ CPUFUNC(op_e4e0_0), 0, 58592 }, /* ROXRW.W -(An) */ -{ CPUFUNC(op_e4e8_0), 0, 58600 }, /* ROXRW.W (d16,An) */ -{ CPUFUNC(op_e4f0_0), 0, 58608 }, /* ROXRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e4f8_0), 0, 58616 }, /* ROXRW.W (xxx).W */ -{ CPUFUNC(op_e4f9_0), 0, 58617 }, /* ROXRW.W (xxx).L */ -{ CPUFUNC(op_e5d0_0), 0, 58832 }, /* ROXLW.W (An) */ -{ CPUFUNC(op_e5d8_0), 0, 58840 }, /* ROXLW.W (An)+ */ -{ CPUFUNC(op_e5e0_0), 0, 58848 }, /* ROXLW.W -(An) */ -{ CPUFUNC(op_e5e8_0), 0, 58856 }, /* ROXLW.W (d16,An) */ -{ CPUFUNC(op_e5f0_0), 0, 58864 }, /* ROXLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e5f8_0), 0, 58872 }, /* ROXLW.W (xxx).W */ -{ CPUFUNC(op_e5f9_0), 0, 58873 }, /* ROXLW.W (xxx).L */ -{ CPUFUNC(op_e6d0_0), 0, 59088 }, /* RORW.W (An) */ -{ CPUFUNC(op_e6d8_0), 0, 59096 }, /* RORW.W (An)+ */ -{ CPUFUNC(op_e6e0_0), 0, 59104 }, /* RORW.W -(An) */ -{ CPUFUNC(op_e6e8_0), 0, 59112 }, /* RORW.W (d16,An) */ -{ CPUFUNC(op_e6f0_0), 0, 59120 }, /* RORW.W (d8,An,Xn) */ -{ CPUFUNC(op_e6f8_0), 0, 59128 }, /* RORW.W (xxx).W */ -{ CPUFUNC(op_e6f9_0), 0, 59129 }, /* RORW.W (xxx).L */ -{ CPUFUNC(op_e7d0_0), 0, 59344 }, /* ROLW.W (An) */ -{ CPUFUNC(op_e7d8_0), 0, 59352 }, /* ROLW.W (An)+ */ -{ CPUFUNC(op_e7e0_0), 0, 59360 }, /* ROLW.W -(An) */ -{ CPUFUNC(op_e7e8_0), 0, 59368 }, /* ROLW.W (d16,An) */ -{ CPUFUNC(op_e7f0_0), 0, 59376 }, /* ROLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e7f8_0), 0, 59384 }, /* ROLW.W (xxx).W */ -{ CPUFUNC(op_e7f9_0), 0, 59385 }, /* ROLW.W (xxx).L */ -{ CPUFUNC(op_e8c0_0), 0, 59584 }, /* BFTST.L #.W,Dn */ -{ CPUFUNC(op_e8d0_0), 0, 59600 }, /* BFTST.L #.W,(An) */ -{ CPUFUNC(op_e8e8_0), 0, 59624 }, /* BFTST.L #.W,(d16,An) */ -{ CPUFUNC(op_e8f0_0), 0, 59632 }, /* BFTST.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_e8f8_0), 0, 59640 }, /* BFTST.L #.W,(xxx).W */ -{ CPUFUNC(op_e8f9_0), 0, 59641 }, /* BFTST.L #.W,(xxx).L */ -{ CPUFUNC(op_e8fa_0), 0, 59642 }, /* BFTST.L #.W,(d16,PC) */ -{ CPUFUNC(op_e8fb_0), 0, 59643 }, /* BFTST.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_e9c0_0), 0, 59840 }, /* BFEXTU.L #.W,Dn */ -{ CPUFUNC(op_e9d0_0), 0, 59856 }, /* BFEXTU.L #.W,(An) */ -{ CPUFUNC(op_e9e8_0), 0, 59880 }, /* BFEXTU.L #.W,(d16,An) */ -{ CPUFUNC(op_e9f0_0), 0, 59888 }, /* BFEXTU.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_e9f8_0), 0, 59896 }, /* BFEXTU.L #.W,(xxx).W */ -{ CPUFUNC(op_e9f9_0), 0, 59897 }, /* BFEXTU.L #.W,(xxx).L */ -{ CPUFUNC(op_e9fa_0), 0, 59898 }, /* BFEXTU.L #.W,(d16,PC) */ -{ CPUFUNC(op_e9fb_0), 0, 59899 }, /* BFEXTU.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_eac0_0), 0, 60096 }, /* BFCHG.L #.W,Dn */ -{ CPUFUNC(op_ead0_0), 0, 60112 }, /* BFCHG.L #.W,(An) */ -{ CPUFUNC(op_eae8_0), 0, 60136 }, /* BFCHG.L #.W,(d16,An) */ -{ CPUFUNC(op_eaf0_0), 0, 60144 }, /* BFCHG.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_eaf8_0), 0, 60152 }, /* BFCHG.L #.W,(xxx).W */ -{ CPUFUNC(op_eaf9_0), 0, 60153 }, /* BFCHG.L #.W,(xxx).L */ -{ CPUFUNC(op_ebc0_0), 0, 60352 }, /* BFEXTS.L #.W,Dn */ -{ CPUFUNC(op_ebd0_0), 0, 60368 }, /* BFEXTS.L #.W,(An) */ -{ CPUFUNC(op_ebe8_0), 0, 60392 }, /* BFEXTS.L #.W,(d16,An) */ -{ CPUFUNC(op_ebf0_0), 0, 60400 }, /* BFEXTS.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_ebf8_0), 0, 60408 }, /* BFEXTS.L #.W,(xxx).W */ -{ CPUFUNC(op_ebf9_0), 0, 60409 }, /* BFEXTS.L #.W,(xxx).L */ -{ CPUFUNC(op_ebfa_0), 0, 60410 }, /* BFEXTS.L #.W,(d16,PC) */ -{ CPUFUNC(op_ebfb_0), 0, 60411 }, /* BFEXTS.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_ecc0_0), 0, 60608 }, /* BFCLR.L #.W,Dn */ -{ CPUFUNC(op_ecd0_0), 0, 60624 }, /* BFCLR.L #.W,(An) */ -{ CPUFUNC(op_ece8_0), 0, 60648 }, /* BFCLR.L #.W,(d16,An) */ -{ CPUFUNC(op_ecf0_0), 0, 60656 }, /* BFCLR.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_ecf8_0), 0, 60664 }, /* BFCLR.L #.W,(xxx).W */ -{ CPUFUNC(op_ecf9_0), 0, 60665 }, /* BFCLR.L #.W,(xxx).L */ -{ CPUFUNC(op_edc0_0), 0, 60864 }, /* BFFFO.L #.W,Dn */ -{ CPUFUNC(op_edd0_0), 0, 60880 }, /* BFFFO.L #.W,(An) */ -{ CPUFUNC(op_ede8_0), 0, 60904 }, /* BFFFO.L #.W,(d16,An) */ -{ CPUFUNC(op_edf0_0), 0, 60912 }, /* BFFFO.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_edf8_0), 0, 60920 }, /* BFFFO.L #.W,(xxx).W */ -{ CPUFUNC(op_edf9_0), 0, 60921 }, /* BFFFO.L #.W,(xxx).L */ -{ CPUFUNC(op_edfa_0), 0, 60922 }, /* BFFFO.L #.W,(d16,PC) */ -{ CPUFUNC(op_edfb_0), 0, 60923 }, /* BFFFO.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_eec0_0), 0, 61120 }, /* BFSET.L #.W,Dn */ -{ CPUFUNC(op_eed0_0), 0, 61136 }, /* BFSET.L #.W,(An) */ -{ CPUFUNC(op_eee8_0), 0, 61160 }, /* BFSET.L #.W,(d16,An) */ -{ CPUFUNC(op_eef0_0), 0, 61168 }, /* BFSET.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_eef8_0), 0, 61176 }, /* BFSET.L #.W,(xxx).W */ -{ CPUFUNC(op_eef9_0), 0, 61177 }, /* BFSET.L #.W,(xxx).L */ -{ CPUFUNC(op_efc0_0), 0, 61376 }, /* BFINS.L #.W,Dn */ -{ CPUFUNC(op_efd0_0), 0, 61392 }, /* BFINS.L #.W,(An) */ -{ CPUFUNC(op_efe8_0), 0, 61416 }, /* BFINS.L #.W,(d16,An) */ -{ CPUFUNC(op_eff0_0), 0, 61424 }, /* BFINS.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_eff8_0), 0, 61432 }, /* BFINS.L #.W,(xxx).W */ -{ CPUFUNC(op_eff9_0), 0, 61433 }, /* BFINS.L #.W,(xxx).L */ -{ CPUFUNC_FF(op_f200_0), 0, 61952 }, /* FPP.L #.W,Dn */ -{ CPUFUNC_FF(op_f208_0), 0, 61960 }, /* FPP.L #.W,An */ -{ CPUFUNC_FF(op_f210_0), 0, 61968 }, /* FPP.L #.W,(An) */ -{ CPUFUNC_FF(op_f218_0), 0, 61976 }, /* FPP.L #.W,(An)+ */ -{ CPUFUNC_FF(op_f220_0), 0, 61984 }, /* FPP.L #.W,-(An) */ -{ CPUFUNC_FF(op_f228_0), 0, 61992 }, /* FPP.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_f230_0), 0, 62000 }, /* FPP.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_f238_0), 0, 62008 }, /* FPP.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_f239_0), 0, 62009 }, /* FPP.L #.W,(xxx).L */ -{ CPUFUNC_FF(op_f23a_0), 0, 62010 }, /* FPP.L #.W,(d16,PC) */ -{ CPUFUNC_FF(op_f23b_0), 0, 62011 }, /* FPP.L #.W,(d8,PC,Xn) */ -{ CPUFUNC_FF(op_f23c_0), 0, 62012 }, /* FPP.L #.W,#.L */ -{ CPUFUNC_FF(op_f240_0), 0, 62016 }, /* FScc.L #.W,Dn */ -{ CPUFUNC_FF(op_f248_0), 0, 62024 }, /* FDBcc.L #.W,Dn */ -{ CPUFUNC_FF(op_f250_0), 0, 62032 }, /* FScc.L #.W,(An) */ -{ CPUFUNC_FF(op_f258_0), 0, 62040 }, /* FScc.L #.W,(An)+ */ -{ CPUFUNC_FF(op_f260_0), 0, 62048 }, /* FScc.L #.W,-(An) */ -{ CPUFUNC_FF(op_f268_0), 0, 62056 }, /* FScc.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_f270_0), 0, 62064 }, /* FScc.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_f278_0), 0, 62072 }, /* FScc.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_f279_0), 0, 62073 }, /* FScc.L #.W,(xxx).L */ -{ CPUFUNC_FF(op_f27a_0), 0, 62074 }, /* FTRAPcc.L #.W */ -{ CPUFUNC_FF(op_f27b_0), 0, 62075 }, /* FTRAPcc.L #.L */ -{ CPUFUNC_FF(op_f27c_0), 0, 62076 }, /* FTRAPcc.L */ -{ CPUFUNC_FF(op_f280_0), 0, 62080 }, /* FBcc.L #,#.W */ -{ CPUFUNC_FF(op_f2c0_0), 0, 62144 }, /* FBcc.L #,#.L */ -{ CPUFUNC_FF(op_f310_0), 0, 62224 }, /* FSAVE.L (An) */ -{ CPUFUNC_FF(op_f320_0), 0, 62240 }, /* FSAVE.L -(An) */ -{ CPUFUNC_FF(op_f328_0), 0, 62248 }, /* FSAVE.L (d16,An) */ -{ CPUFUNC_FF(op_f330_0), 0, 62256 }, /* FSAVE.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_f338_0), 0, 62264 }, /* FSAVE.L (xxx).W */ -{ CPUFUNC_FF(op_f339_0), 0, 62265 }, /* FSAVE.L (xxx).L */ -{ CPUFUNC_FF(op_f350_0), 0, 62288 }, /* FRESTORE.L (An) */ -{ CPUFUNC_FF(op_f358_0), 0, 62296 }, /* FRESTORE.L (An)+ */ -{ CPUFUNC_FF(op_f368_0), 0, 62312 }, /* FRESTORE.L (d16,An) */ -{ CPUFUNC_FF(op_f370_0), 0, 62320 }, /* FRESTORE.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_f378_0), 0, 62328 }, /* FRESTORE.L (xxx).W */ -{ CPUFUNC_FF(op_f379_0), 0, 62329 }, /* FRESTORE.L (xxx).L */ -{ CPUFUNC_FF(op_f37a_0), 0, 62330 }, /* FRESTORE.L (d16,PC) */ -{ CPUFUNC_FF(op_f37b_0), 0, 62331 }, /* FRESTORE.L (d8,PC,Xn) */ -{ CPUFUNC_FF(op_f408_0), 0, 62472 }, /* CINVL.L #,An */ -{ CPUFUNC_FF(op_f410_0), 0, 62480 }, /* CINVP.L #,An */ -{ CPUFUNC_FF(op_f418_0), 0, 62488 }, /* CINVA.L # */ -{ CPUFUNC_FF(op_f419_0), 0, 62489 }, /* CINVA.L # */ -{ CPUFUNC_FF(op_f41a_0), 0, 62490 }, /* CINVA.L # */ -{ CPUFUNC_FF(op_f41b_0), 0, 62491 }, /* CINVA.L # */ -{ CPUFUNC_FF(op_f41c_0), 0, 62492 }, /* CINVA.L # */ -{ CPUFUNC_FF(op_f41d_0), 0, 62493 }, /* CINVA.L # */ -{ CPUFUNC_FF(op_f41e_0), 0, 62494 }, /* CINVA.L # */ -{ CPUFUNC_FF(op_f41f_0), 0, 62495 }, /* CINVA.L # */ -{ CPUFUNC_FF(op_f428_0), 0, 62504 }, /* CPUSHL.L #,An */ -{ CPUFUNC_FF(op_f430_0), 0, 62512 }, /* CPUSHP.L #,An */ -{ CPUFUNC_FF(op_f438_0), 0, 62520 }, /* CPUSHA.L # */ -{ CPUFUNC_FF(op_f439_0), 0, 62521 }, /* CPUSHA.L # */ -{ CPUFUNC_FF(op_f43a_0), 0, 62522 }, /* CPUSHA.L # */ -{ CPUFUNC_FF(op_f43b_0), 0, 62523 }, /* CPUSHA.L # */ -{ CPUFUNC_FF(op_f43c_0), 0, 62524 }, /* CPUSHA.L # */ -{ CPUFUNC_FF(op_f43d_0), 0, 62525 }, /* CPUSHA.L # */ -{ CPUFUNC_FF(op_f43e_0), 0, 62526 }, /* CPUSHA.L # */ -{ CPUFUNC_FF(op_f43f_0), 0, 62527 }, /* CPUSHA.L # */ -{ CPUFUNC_FF(op_f500_0), 0, 62720 }, /* MMUOP.L #,Dn */ -{ CPUFUNC_FF(op_f600_0), 0, 62976 }, /* MOVE16.L (An)+,(xxx).L */ -{ CPUFUNC_FF(op_f608_0), 0, 62984 }, /* MOVE16.L (xxx).L,(An)+ */ -{ CPUFUNC_FF(op_f610_0), 0, 62992 }, /* MOVE16.L (An),(xxx).L */ -{ CPUFUNC_FF(op_f618_0), 0, 63000 }, /* MOVE16.L (xxx).L,(An) */ -{ CPUFUNC_FF(op_f620_0), 0, 63008 }, /* MOVE16.L (An)+,(An)+ */ -{ 0, 0, 0 }}; -struct cputbl CPUFUNC(op_smalltbl_1)[] = { -{ CPUFUNC(op_0_0), 0, 0 }, /* OR.B #.B,Dn */ -{ CPUFUNC(op_10_0), 0, 16 }, /* OR.B #.B,(An) */ -{ CPUFUNC(op_18_0), 0, 24 }, /* OR.B #.B,(An)+ */ -{ CPUFUNC(op_20_0), 0, 32 }, /* OR.B #.B,-(An) */ -{ CPUFUNC(op_28_0), 0, 40 }, /* OR.B #.B,(d16,An) */ -{ CPUFUNC(op_30_0), 0, 48 }, /* OR.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_38_0), 0, 56 }, /* OR.B #.B,(xxx).W */ -{ CPUFUNC(op_39_0), 0, 57 }, /* OR.B #.B,(xxx).L */ -{ CPUFUNC(op_3c_0), 0, 60 }, /* ORSR.B #.W */ -{ CPUFUNC(op_40_0), 0, 64 }, /* OR.W #.W,Dn */ -{ CPUFUNC(op_50_0), 0, 80 }, /* OR.W #.W,(An) */ -{ CPUFUNC(op_58_0), 0, 88 }, /* OR.W #.W,(An)+ */ -{ CPUFUNC(op_60_0), 0, 96 }, /* OR.W #.W,-(An) */ -{ CPUFUNC(op_68_0), 0, 104 }, /* OR.W #.W,(d16,An) */ -{ CPUFUNC(op_70_0), 0, 112 }, /* OR.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_78_0), 0, 120 }, /* OR.W #.W,(xxx).W */ -{ CPUFUNC(op_79_0), 0, 121 }, /* OR.W #.W,(xxx).L */ -{ CPUFUNC(op_7c_0), 0, 124 }, /* ORSR.W #.W */ -{ CPUFUNC(op_80_0), 0, 128 }, /* OR.L #.L,Dn */ -{ CPUFUNC(op_90_0), 0, 144 }, /* OR.L #.L,(An) */ -{ CPUFUNC(op_98_0), 0, 152 }, /* OR.L #.L,(An)+ */ -{ CPUFUNC(op_a0_0), 0, 160 }, /* OR.L #.L,-(An) */ -{ CPUFUNC(op_a8_0), 0, 168 }, /* OR.L #.L,(d16,An) */ -{ CPUFUNC(op_b0_0), 0, 176 }, /* OR.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_b8_0), 0, 184 }, /* OR.L #.L,(xxx).W */ -{ CPUFUNC(op_b9_0), 0, 185 }, /* OR.L #.L,(xxx).L */ -{ CPUFUNC(op_d0_0), 0, 208 }, /* CHK2.B #.W,(An) */ -{ CPUFUNC(op_e8_0), 0, 232 }, /* CHK2.B #.W,(d16,An) */ -{ CPUFUNC(op_f0_0), 0, 240 }, /* CHK2.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_f8_0), 0, 248 }, /* CHK2.B #.W,(xxx).W */ -{ CPUFUNC(op_f9_0), 0, 249 }, /* CHK2.B #.W,(xxx).L */ -{ CPUFUNC(op_fa_0), 0, 250 }, /* CHK2.B #.W,(d16,PC) */ -{ CPUFUNC(op_fb_0), 0, 251 }, /* CHK2.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_100_0), 0, 256 }, /* BTST.L Dn,Dn */ -{ CPUFUNC_FF(op_108_0), 0, 264 }, /* MVPMR.W (d16,An),Dn */ -{ CPUFUNC(op_110_0), 0, 272 }, /* BTST.B Dn,(An) */ -{ CPUFUNC(op_118_0), 0, 280 }, /* BTST.B Dn,(An)+ */ -{ CPUFUNC(op_120_0), 0, 288 }, /* BTST.B Dn,-(An) */ -{ CPUFUNC(op_128_0), 0, 296 }, /* BTST.B Dn,(d16,An) */ -{ CPUFUNC(op_130_0), 0, 304 }, /* BTST.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_138_0), 0, 312 }, /* BTST.B Dn,(xxx).W */ -{ CPUFUNC(op_139_0), 0, 313 }, /* BTST.B Dn,(xxx).L */ -{ CPUFUNC(op_13a_0), 0, 314 }, /* BTST.B Dn,(d16,PC) */ -{ CPUFUNC(op_13b_0), 0, 315 }, /* BTST.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_13c_0), 0, 316 }, /* BTST.B Dn,#.B */ -{ CPUFUNC(op_140_0), 0, 320 }, /* BCHG.L Dn,Dn */ -{ CPUFUNC_FF(op_148_0), 0, 328 }, /* MVPMR.L (d16,An),Dn */ -{ CPUFUNC(op_150_0), 0, 336 }, /* BCHG.B Dn,(An) */ -{ CPUFUNC(op_158_0), 0, 344 }, /* BCHG.B Dn,(An)+ */ -{ CPUFUNC(op_160_0), 0, 352 }, /* BCHG.B Dn,-(An) */ -{ CPUFUNC(op_168_0), 0, 360 }, /* BCHG.B Dn,(d16,An) */ -{ CPUFUNC(op_170_0), 0, 368 }, /* BCHG.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_178_0), 0, 376 }, /* BCHG.B Dn,(xxx).W */ -{ CPUFUNC(op_179_0), 0, 377 }, /* BCHG.B Dn,(xxx).L */ -{ CPUFUNC(op_17a_0), 0, 378 }, /* BCHG.B Dn,(d16,PC) */ -{ CPUFUNC(op_17b_0), 0, 379 }, /* BCHG.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_180_0), 0, 384 }, /* BCLR.L Dn,Dn */ -{ CPUFUNC_FF(op_188_0), 0, 392 }, /* MVPRM.W Dn,(d16,An) */ -{ CPUFUNC(op_190_0), 0, 400 }, /* BCLR.B Dn,(An) */ -{ CPUFUNC(op_198_0), 0, 408 }, /* BCLR.B Dn,(An)+ */ -{ CPUFUNC(op_1a0_0), 0, 416 }, /* BCLR.B Dn,-(An) */ -{ CPUFUNC(op_1a8_0), 0, 424 }, /* BCLR.B Dn,(d16,An) */ -{ CPUFUNC(op_1b0_0), 0, 432 }, /* BCLR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1b8_0), 0, 440 }, /* BCLR.B Dn,(xxx).W */ -{ CPUFUNC(op_1b9_0), 0, 441 }, /* BCLR.B Dn,(xxx).L */ -{ CPUFUNC(op_1ba_0), 0, 442 }, /* BCLR.B Dn,(d16,PC) */ -{ CPUFUNC(op_1bb_0), 0, 443 }, /* BCLR.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_1c0_0), 0, 448 }, /* BSET.L Dn,Dn */ -{ CPUFUNC_FF(op_1c8_0), 0, 456 }, /* MVPRM.L Dn,(d16,An) */ -{ CPUFUNC(op_1d0_0), 0, 464 }, /* BSET.B Dn,(An) */ -{ CPUFUNC(op_1d8_0), 0, 472 }, /* BSET.B Dn,(An)+ */ -{ CPUFUNC(op_1e0_0), 0, 480 }, /* BSET.B Dn,-(An) */ -{ CPUFUNC(op_1e8_0), 0, 488 }, /* BSET.B Dn,(d16,An) */ -{ CPUFUNC(op_1f0_0), 0, 496 }, /* BSET.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1f8_0), 0, 504 }, /* BSET.B Dn,(xxx).W */ -{ CPUFUNC(op_1f9_0), 0, 505 }, /* BSET.B Dn,(xxx).L */ -{ CPUFUNC(op_1fa_0), 0, 506 }, /* BSET.B Dn,(d16,PC) */ -{ CPUFUNC(op_1fb_0), 0, 507 }, /* BSET.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_200_0), 0, 512 }, /* AND.B #.B,Dn */ -{ CPUFUNC(op_210_0), 0, 528 }, /* AND.B #.B,(An) */ -{ CPUFUNC(op_218_0), 0, 536 }, /* AND.B #.B,(An)+ */ -{ CPUFUNC(op_220_0), 0, 544 }, /* AND.B #.B,-(An) */ -{ CPUFUNC(op_228_0), 0, 552 }, /* AND.B #.B,(d16,An) */ -{ CPUFUNC(op_230_0), 0, 560 }, /* AND.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_238_0), 0, 568 }, /* AND.B #.B,(xxx).W */ -{ CPUFUNC(op_239_0), 0, 569 }, /* AND.B #.B,(xxx).L */ -{ CPUFUNC(op_23c_0), 0, 572 }, /* ANDSR.B #.W */ -{ CPUFUNC(op_240_0), 0, 576 }, /* AND.W #.W,Dn */ -{ CPUFUNC(op_250_0), 0, 592 }, /* AND.W #.W,(An) */ -{ CPUFUNC(op_258_0), 0, 600 }, /* AND.W #.W,(An)+ */ -{ CPUFUNC(op_260_0), 0, 608 }, /* AND.W #.W,-(An) */ -{ CPUFUNC(op_268_0), 0, 616 }, /* AND.W #.W,(d16,An) */ -{ CPUFUNC(op_270_0), 0, 624 }, /* AND.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_278_0), 0, 632 }, /* AND.W #.W,(xxx).W */ -{ CPUFUNC(op_279_0), 0, 633 }, /* AND.W #.W,(xxx).L */ -{ CPUFUNC(op_27c_0), 0, 636 }, /* ANDSR.W #.W */ -{ CPUFUNC(op_280_0), 0, 640 }, /* AND.L #.L,Dn */ -{ CPUFUNC(op_290_0), 0, 656 }, /* AND.L #.L,(An) */ -{ CPUFUNC(op_298_0), 0, 664 }, /* AND.L #.L,(An)+ */ -{ CPUFUNC(op_2a0_0), 0, 672 }, /* AND.L #.L,-(An) */ -{ CPUFUNC(op_2a8_0), 0, 680 }, /* AND.L #.L,(d16,An) */ -{ CPUFUNC(op_2b0_0), 0, 688 }, /* AND.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_2b8_0), 0, 696 }, /* AND.L #.L,(xxx).W */ -{ CPUFUNC(op_2b9_0), 0, 697 }, /* AND.L #.L,(xxx).L */ -{ CPUFUNC(op_2d0_0), 0, 720 }, /* CHK2.W #.W,(An) */ -{ CPUFUNC(op_2e8_0), 0, 744 }, /* CHK2.W #.W,(d16,An) */ -{ CPUFUNC(op_2f0_0), 0, 752 }, /* CHK2.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_2f8_0), 0, 760 }, /* CHK2.W #.W,(xxx).W */ -{ CPUFUNC(op_2f9_0), 0, 761 }, /* CHK2.W #.W,(xxx).L */ -{ CPUFUNC(op_2fa_0), 0, 762 }, /* CHK2.W #.W,(d16,PC) */ -{ CPUFUNC(op_2fb_0), 0, 763 }, /* CHK2.W #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_400_0), 0, 1024 }, /* SUB.B #.B,Dn */ -{ CPUFUNC(op_410_0), 0, 1040 }, /* SUB.B #.B,(An) */ -{ CPUFUNC(op_418_0), 0, 1048 }, /* SUB.B #.B,(An)+ */ -{ CPUFUNC(op_420_0), 0, 1056 }, /* SUB.B #.B,-(An) */ -{ CPUFUNC(op_428_0), 0, 1064 }, /* SUB.B #.B,(d16,An) */ -{ CPUFUNC(op_430_0), 0, 1072 }, /* SUB.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_438_0), 0, 1080 }, /* SUB.B #.B,(xxx).W */ -{ CPUFUNC(op_439_0), 0, 1081 }, /* SUB.B #.B,(xxx).L */ -{ CPUFUNC(op_440_0), 0, 1088 }, /* SUB.W #.W,Dn */ -{ CPUFUNC(op_450_0), 0, 1104 }, /* SUB.W #.W,(An) */ -{ CPUFUNC(op_458_0), 0, 1112 }, /* SUB.W #.W,(An)+ */ -{ CPUFUNC(op_460_0), 0, 1120 }, /* SUB.W #.W,-(An) */ -{ CPUFUNC(op_468_0), 0, 1128 }, /* SUB.W #.W,(d16,An) */ -{ CPUFUNC(op_470_0), 0, 1136 }, /* SUB.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_478_0), 0, 1144 }, /* SUB.W #.W,(xxx).W */ -{ CPUFUNC(op_479_0), 0, 1145 }, /* SUB.W #.W,(xxx).L */ -{ CPUFUNC(op_480_0), 0, 1152 }, /* SUB.L #.L,Dn */ -{ CPUFUNC(op_490_0), 0, 1168 }, /* SUB.L #.L,(An) */ -{ CPUFUNC(op_498_0), 0, 1176 }, /* SUB.L #.L,(An)+ */ -{ CPUFUNC(op_4a0_0), 0, 1184 }, /* SUB.L #.L,-(An) */ -{ CPUFUNC(op_4a8_0), 0, 1192 }, /* SUB.L #.L,(d16,An) */ -{ CPUFUNC(op_4b0_0), 0, 1200 }, /* SUB.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_4b8_0), 0, 1208 }, /* SUB.L #.L,(xxx).W */ -{ CPUFUNC(op_4b9_0), 0, 1209 }, /* SUB.L #.L,(xxx).L */ -{ CPUFUNC(op_4d0_0), 0, 1232 }, /* CHK2.L #.W,(An) */ -{ CPUFUNC(op_4e8_0), 0, 1256 }, /* CHK2.L #.W,(d16,An) */ -{ CPUFUNC(op_4f0_0), 0, 1264 }, /* CHK2.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_4f8_0), 0, 1272 }, /* CHK2.L #.W,(xxx).W */ -{ CPUFUNC(op_4f9_0), 0, 1273 }, /* CHK2.L #.W,(xxx).L */ -{ CPUFUNC(op_4fa_0), 0, 1274 }, /* CHK2.L #.W,(d16,PC) */ -{ CPUFUNC(op_4fb_0), 0, 1275 }, /* CHK2.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_600_0), 0, 1536 }, /* ADD.B #.B,Dn */ -{ CPUFUNC(op_610_0), 0, 1552 }, /* ADD.B #.B,(An) */ -{ CPUFUNC(op_618_0), 0, 1560 }, /* ADD.B #.B,(An)+ */ -{ CPUFUNC(op_620_0), 0, 1568 }, /* ADD.B #.B,-(An) */ -{ CPUFUNC(op_628_0), 0, 1576 }, /* ADD.B #.B,(d16,An) */ -{ CPUFUNC(op_630_0), 0, 1584 }, /* ADD.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_638_0), 0, 1592 }, /* ADD.B #.B,(xxx).W */ -{ CPUFUNC(op_639_0), 0, 1593 }, /* ADD.B #.B,(xxx).L */ -{ CPUFUNC(op_640_0), 0, 1600 }, /* ADD.W #.W,Dn */ -{ CPUFUNC(op_650_0), 0, 1616 }, /* ADD.W #.W,(An) */ -{ CPUFUNC(op_658_0), 0, 1624 }, /* ADD.W #.W,(An)+ */ -{ CPUFUNC(op_660_0), 0, 1632 }, /* ADD.W #.W,-(An) */ -{ CPUFUNC(op_668_0), 0, 1640 }, /* ADD.W #.W,(d16,An) */ -{ CPUFUNC(op_670_0), 0, 1648 }, /* ADD.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_678_0), 0, 1656 }, /* ADD.W #.W,(xxx).W */ -{ CPUFUNC(op_679_0), 0, 1657 }, /* ADD.W #.W,(xxx).L */ -{ CPUFUNC(op_680_0), 0, 1664 }, /* ADD.L #.L,Dn */ -{ CPUFUNC(op_690_0), 0, 1680 }, /* ADD.L #.L,(An) */ -{ CPUFUNC(op_698_0), 0, 1688 }, /* ADD.L #.L,(An)+ */ -{ CPUFUNC(op_6a0_0), 0, 1696 }, /* ADD.L #.L,-(An) */ -{ CPUFUNC(op_6a8_0), 0, 1704 }, /* ADD.L #.L,(d16,An) */ -{ CPUFUNC(op_6b0_0), 0, 1712 }, /* ADD.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_6b8_0), 0, 1720 }, /* ADD.L #.L,(xxx).W */ -{ CPUFUNC(op_6b9_0), 0, 1721 }, /* ADD.L #.L,(xxx).L */ -{ CPUFUNC(op_6c0_0), 0, 1728 }, /* RTM.L Dn */ -{ CPUFUNC(op_6c8_0), 0, 1736 }, /* RTM.L An */ -{ CPUFUNC_FF(op_6d0_0), 0, 1744 }, /* CALLM.L (An) */ -{ CPUFUNC_FF(op_6e8_0), 0, 1768 }, /* CALLM.L (d16,An) */ -{ CPUFUNC_FF(op_6f0_0), 0, 1776 }, /* CALLM.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_6f8_0), 0, 1784 }, /* CALLM.L (xxx).W */ -{ CPUFUNC_FF(op_6f9_0), 0, 1785 }, /* CALLM.L (xxx).L */ -{ CPUFUNC_FF(op_6fa_0), 0, 1786 }, /* CALLM.L (d16,PC) */ -{ CPUFUNC_FF(op_6fb_0), 0, 1787 }, /* CALLM.L (d8,PC,Xn) */ -{ CPUFUNC(op_800_0), 0, 2048 }, /* BTST.L #.W,Dn */ -{ CPUFUNC(op_810_0), 0, 2064 }, /* BTST.B #.W,(An) */ -{ CPUFUNC(op_818_0), 0, 2072 }, /* BTST.B #.W,(An)+ */ -{ CPUFUNC(op_820_0), 0, 2080 }, /* BTST.B #.W,-(An) */ -{ CPUFUNC(op_828_0), 0, 2088 }, /* BTST.B #.W,(d16,An) */ -{ CPUFUNC(op_830_0), 0, 2096 }, /* BTST.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_838_0), 0, 2104 }, /* BTST.B #.W,(xxx).W */ -{ CPUFUNC(op_839_0), 0, 2105 }, /* BTST.B #.W,(xxx).L */ -{ CPUFUNC(op_83a_0), 0, 2106 }, /* BTST.B #.W,(d16,PC) */ -{ CPUFUNC(op_83b_0), 0, 2107 }, /* BTST.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_83c_0), 0, 2108 }, /* BTST.B #.W,#.B */ -{ CPUFUNC(op_840_0), 0, 2112 }, /* BCHG.L #.W,Dn */ -{ CPUFUNC(op_850_0), 0, 2128 }, /* BCHG.B #.W,(An) */ -{ CPUFUNC(op_858_0), 0, 2136 }, /* BCHG.B #.W,(An)+ */ -{ CPUFUNC(op_860_0), 0, 2144 }, /* BCHG.B #.W,-(An) */ -{ CPUFUNC(op_868_0), 0, 2152 }, /* BCHG.B #.W,(d16,An) */ -{ CPUFUNC(op_870_0), 0, 2160 }, /* BCHG.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_878_0), 0, 2168 }, /* BCHG.B #.W,(xxx).W */ -{ CPUFUNC(op_879_0), 0, 2169 }, /* BCHG.B #.W,(xxx).L */ -{ CPUFUNC(op_87a_0), 0, 2170 }, /* BCHG.B #.W,(d16,PC) */ -{ CPUFUNC(op_87b_0), 0, 2171 }, /* BCHG.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_880_0), 0, 2176 }, /* BCLR.L #.W,Dn */ -{ CPUFUNC(op_890_0), 0, 2192 }, /* BCLR.B #.W,(An) */ -{ CPUFUNC(op_898_0), 0, 2200 }, /* BCLR.B #.W,(An)+ */ -{ CPUFUNC(op_8a0_0), 0, 2208 }, /* BCLR.B #.W,-(An) */ -{ CPUFUNC(op_8a8_0), 0, 2216 }, /* BCLR.B #.W,(d16,An) */ -{ CPUFUNC(op_8b0_0), 0, 2224 }, /* BCLR.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_8b8_0), 0, 2232 }, /* BCLR.B #.W,(xxx).W */ -{ CPUFUNC(op_8b9_0), 0, 2233 }, /* BCLR.B #.W,(xxx).L */ -{ CPUFUNC(op_8ba_0), 0, 2234 }, /* BCLR.B #.W,(d16,PC) */ -{ CPUFUNC(op_8bb_0), 0, 2235 }, /* BCLR.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_8c0_0), 0, 2240 }, /* BSET.L #.W,Dn */ -{ CPUFUNC(op_8d0_0), 0, 2256 }, /* BSET.B #.W,(An) */ -{ CPUFUNC(op_8d8_0), 0, 2264 }, /* BSET.B #.W,(An)+ */ -{ CPUFUNC(op_8e0_0), 0, 2272 }, /* BSET.B #.W,-(An) */ -{ CPUFUNC(op_8e8_0), 0, 2280 }, /* BSET.B #.W,(d16,An) */ -{ CPUFUNC(op_8f0_0), 0, 2288 }, /* BSET.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_8f8_0), 0, 2296 }, /* BSET.B #.W,(xxx).W */ -{ CPUFUNC(op_8f9_0), 0, 2297 }, /* BSET.B #.W,(xxx).L */ -{ CPUFUNC(op_8fa_0), 0, 2298 }, /* BSET.B #.W,(d16,PC) */ -{ CPUFUNC(op_8fb_0), 0, 2299 }, /* BSET.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_a00_0), 0, 2560 }, /* EOR.B #.B,Dn */ -{ CPUFUNC(op_a10_0), 0, 2576 }, /* EOR.B #.B,(An) */ -{ CPUFUNC(op_a18_0), 0, 2584 }, /* EOR.B #.B,(An)+ */ -{ CPUFUNC(op_a20_0), 0, 2592 }, /* EOR.B #.B,-(An) */ -{ CPUFUNC(op_a28_0), 0, 2600 }, /* EOR.B #.B,(d16,An) */ -{ CPUFUNC(op_a30_0), 0, 2608 }, /* EOR.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_a38_0), 0, 2616 }, /* EOR.B #.B,(xxx).W */ -{ CPUFUNC(op_a39_0), 0, 2617 }, /* EOR.B #.B,(xxx).L */ -{ CPUFUNC(op_a3c_0), 0, 2620 }, /* EORSR.B #.W */ -{ CPUFUNC(op_a40_0), 0, 2624 }, /* EOR.W #.W,Dn */ -{ CPUFUNC(op_a50_0), 0, 2640 }, /* EOR.W #.W,(An) */ -{ CPUFUNC(op_a58_0), 0, 2648 }, /* EOR.W #.W,(An)+ */ -{ CPUFUNC(op_a60_0), 0, 2656 }, /* EOR.W #.W,-(An) */ -{ CPUFUNC(op_a68_0), 0, 2664 }, /* EOR.W #.W,(d16,An) */ -{ CPUFUNC(op_a70_0), 0, 2672 }, /* EOR.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_a78_0), 0, 2680 }, /* EOR.W #.W,(xxx).W */ -{ CPUFUNC(op_a79_0), 0, 2681 }, /* EOR.W #.W,(xxx).L */ -{ CPUFUNC(op_a7c_0), 0, 2684 }, /* EORSR.W #.W */ -{ CPUFUNC(op_a80_0), 0, 2688 }, /* EOR.L #.L,Dn */ -{ CPUFUNC(op_a90_0), 0, 2704 }, /* EOR.L #.L,(An) */ -{ CPUFUNC(op_a98_0), 0, 2712 }, /* EOR.L #.L,(An)+ */ -{ CPUFUNC(op_aa0_0), 0, 2720 }, /* EOR.L #.L,-(An) */ -{ CPUFUNC(op_aa8_0), 0, 2728 }, /* EOR.L #.L,(d16,An) */ -{ CPUFUNC(op_ab0_0), 0, 2736 }, /* EOR.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_ab8_0), 0, 2744 }, /* EOR.L #.L,(xxx).W */ -{ CPUFUNC(op_ab9_0), 0, 2745 }, /* EOR.L #.L,(xxx).L */ -{ CPUFUNC(op_ad0_0), 0, 2768 }, /* CAS.B #.W,(An) */ -{ CPUFUNC(op_ad8_0), 0, 2776 }, /* CAS.B #.W,(An)+ */ -{ CPUFUNC(op_ae0_0), 0, 2784 }, /* CAS.B #.W,-(An) */ -{ CPUFUNC(op_ae8_0), 0, 2792 }, /* CAS.B #.W,(d16,An) */ -{ CPUFUNC(op_af0_0), 0, 2800 }, /* CAS.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_af8_0), 0, 2808 }, /* CAS.B #.W,(xxx).W */ -{ CPUFUNC(op_af9_0), 0, 2809 }, /* CAS.B #.W,(xxx).L */ -{ CPUFUNC(op_c00_0), 0, 3072 }, /* CMP.B #.B,Dn */ -{ CPUFUNC(op_c10_0), 0, 3088 }, /* CMP.B #.B,(An) */ -{ CPUFUNC(op_c18_0), 0, 3096 }, /* CMP.B #.B,(An)+ */ -{ CPUFUNC(op_c20_0), 0, 3104 }, /* CMP.B #.B,-(An) */ -{ CPUFUNC(op_c28_0), 0, 3112 }, /* CMP.B #.B,(d16,An) */ -{ CPUFUNC(op_c30_0), 0, 3120 }, /* CMP.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_c38_0), 0, 3128 }, /* CMP.B #.B,(xxx).W */ -{ CPUFUNC(op_c39_0), 0, 3129 }, /* CMP.B #.B,(xxx).L */ -{ CPUFUNC(op_c3a_0), 0, 3130 }, /* CMP.B #.B,(d16,PC) */ -{ CPUFUNC(op_c3b_0), 0, 3131 }, /* CMP.B #.B,(d8,PC,Xn) */ -{ CPUFUNC(op_c40_0), 0, 3136 }, /* CMP.W #.W,Dn */ -{ CPUFUNC(op_c50_0), 0, 3152 }, /* CMP.W #.W,(An) */ -{ CPUFUNC(op_c58_0), 0, 3160 }, /* CMP.W #.W,(An)+ */ -{ CPUFUNC(op_c60_0), 0, 3168 }, /* CMP.W #.W,-(An) */ -{ CPUFUNC(op_c68_0), 0, 3176 }, /* CMP.W #.W,(d16,An) */ -{ CPUFUNC(op_c70_0), 0, 3184 }, /* CMP.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_c78_0), 0, 3192 }, /* CMP.W #.W,(xxx).W */ -{ CPUFUNC(op_c79_0), 0, 3193 }, /* CMP.W #.W,(xxx).L */ -{ CPUFUNC(op_c7a_0), 0, 3194 }, /* CMP.W #.W,(d16,PC) */ -{ CPUFUNC(op_c7b_0), 0, 3195 }, /* CMP.W #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_c80_0), 0, 3200 }, /* CMP.L #.L,Dn */ -{ CPUFUNC(op_c90_0), 0, 3216 }, /* CMP.L #.L,(An) */ -{ CPUFUNC(op_c98_0), 0, 3224 }, /* CMP.L #.L,(An)+ */ -{ CPUFUNC(op_ca0_0), 0, 3232 }, /* CMP.L #.L,-(An) */ -{ CPUFUNC(op_ca8_0), 0, 3240 }, /* CMP.L #.L,(d16,An) */ -{ CPUFUNC(op_cb0_0), 0, 3248 }, /* CMP.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_cb8_0), 0, 3256 }, /* CMP.L #.L,(xxx).W */ -{ CPUFUNC(op_cb9_0), 0, 3257 }, /* CMP.L #.L,(xxx).L */ -{ CPUFUNC(op_cba_0), 0, 3258 }, /* CMP.L #.L,(d16,PC) */ -{ CPUFUNC(op_cbb_0), 0, 3259 }, /* CMP.L #.L,(d8,PC,Xn) */ -{ CPUFUNC(op_cd0_0), 0, 3280 }, /* CAS.W #.W,(An) */ -{ CPUFUNC(op_cd8_0), 0, 3288 }, /* CAS.W #.W,(An)+ */ -{ CPUFUNC(op_ce0_0), 0, 3296 }, /* CAS.W #.W,-(An) */ -{ CPUFUNC(op_ce8_0), 0, 3304 }, /* CAS.W #.W,(d16,An) */ -{ CPUFUNC(op_cf0_0), 0, 3312 }, /* CAS.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_cf8_0), 0, 3320 }, /* CAS.W #.W,(xxx).W */ -{ CPUFUNC(op_cf9_0), 0, 3321 }, /* CAS.W #.W,(xxx).L */ -{ CPUFUNC(op_cfc_0), 0, 3324 }, /* CAS2.W #.L */ -{ CPUFUNC_FF(op_e10_0), 0, 3600 }, /* MOVES.B #.W,(An) */ -{ CPUFUNC_FF(op_e18_0), 0, 3608 }, /* MOVES.B #.W,(An)+ */ -{ CPUFUNC_FF(op_e20_0), 0, 3616 }, /* MOVES.B #.W,-(An) */ -{ CPUFUNC_FF(op_e28_0), 0, 3624 }, /* MOVES.B #.W,(d16,An) */ -{ CPUFUNC_FF(op_e30_0), 0, 3632 }, /* MOVES.B #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_e38_0), 0, 3640 }, /* MOVES.B #.W,(xxx).W */ -{ CPUFUNC_FF(op_e39_0), 0, 3641 }, /* MOVES.B #.W,(xxx).L */ -{ CPUFUNC_FF(op_e50_0), 0, 3664 }, /* MOVES.W #.W,(An) */ -{ CPUFUNC_FF(op_e58_0), 0, 3672 }, /* MOVES.W #.W,(An)+ */ -{ CPUFUNC_FF(op_e60_0), 0, 3680 }, /* MOVES.W #.W,-(An) */ -{ CPUFUNC_FF(op_e68_0), 0, 3688 }, /* MOVES.W #.W,(d16,An) */ -{ CPUFUNC_FF(op_e70_0), 0, 3696 }, /* MOVES.W #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_e78_0), 0, 3704 }, /* MOVES.W #.W,(xxx).W */ -{ CPUFUNC_FF(op_e79_0), 0, 3705 }, /* MOVES.W #.W,(xxx).L */ -{ CPUFUNC_FF(op_e90_0), 0, 3728 }, /* MOVES.L #.W,(An) */ -{ CPUFUNC_FF(op_e98_0), 0, 3736 }, /* MOVES.L #.W,(An)+ */ -{ CPUFUNC_FF(op_ea0_0), 0, 3744 }, /* MOVES.L #.W,-(An) */ -{ CPUFUNC_FF(op_ea8_0), 0, 3752 }, /* MOVES.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_eb0_0), 0, 3760 }, /* MOVES.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_eb8_0), 0, 3768 }, /* MOVES.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_eb9_0), 0, 3769 }, /* MOVES.L #.W,(xxx).L */ -{ CPUFUNC(op_ed0_0), 0, 3792 }, /* CAS.L #.W,(An) */ -{ CPUFUNC(op_ed8_0), 0, 3800 }, /* CAS.L #.W,(An)+ */ -{ CPUFUNC(op_ee0_0), 0, 3808 }, /* CAS.L #.W,-(An) */ -{ CPUFUNC(op_ee8_0), 0, 3816 }, /* CAS.L #.W,(d16,An) */ -{ CPUFUNC(op_ef0_0), 0, 3824 }, /* CAS.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_ef8_0), 0, 3832 }, /* CAS.L #.W,(xxx).W */ -{ CPUFUNC(op_ef9_0), 0, 3833 }, /* CAS.L #.W,(xxx).L */ -{ CPUFUNC(op_efc_0), 0, 3836 }, /* CAS2.L #.L */ -{ CPUFUNC(op_1000_0), 0, 4096 }, /* MOVE.B Dn,Dn */ -{ CPUFUNC(op_1010_0), 0, 4112 }, /* MOVE.B (An),Dn */ -{ CPUFUNC(op_1018_0), 0, 4120 }, /* MOVE.B (An)+,Dn */ -{ CPUFUNC(op_1020_0), 0, 4128 }, /* MOVE.B -(An),Dn */ -{ CPUFUNC(op_1028_0), 0, 4136 }, /* MOVE.B (d16,An),Dn */ -{ CPUFUNC(op_1030_0), 0, 4144 }, /* MOVE.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_1038_0), 0, 4152 }, /* MOVE.B (xxx).W,Dn */ -{ CPUFUNC(op_1039_0), 0, 4153 }, /* MOVE.B (xxx).L,Dn */ -{ CPUFUNC(op_103a_0), 0, 4154 }, /* MOVE.B (d16,PC),Dn */ -{ CPUFUNC(op_103b_0), 0, 4155 }, /* MOVE.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_103c_0), 0, 4156 }, /* MOVE.B #.B,Dn */ -{ CPUFUNC(op_1080_0), 0, 4224 }, /* MOVE.B Dn,(An) */ -{ CPUFUNC(op_1090_0), 0, 4240 }, /* MOVE.B (An),(An) */ -{ CPUFUNC(op_1098_0), 0, 4248 }, /* MOVE.B (An)+,(An) */ -{ CPUFUNC(op_10a0_0), 0, 4256 }, /* MOVE.B -(An),(An) */ -{ CPUFUNC(op_10a8_0), 0, 4264 }, /* MOVE.B (d16,An),(An) */ -{ CPUFUNC(op_10b0_0), 0, 4272 }, /* MOVE.B (d8,An,Xn),(An) */ -{ CPUFUNC(op_10b8_0), 0, 4280 }, /* MOVE.B (xxx).W,(An) */ -{ CPUFUNC(op_10b9_0), 0, 4281 }, /* MOVE.B (xxx).L,(An) */ -{ CPUFUNC(op_10ba_0), 0, 4282 }, /* MOVE.B (d16,PC),(An) */ -{ CPUFUNC(op_10bb_0), 0, 4283 }, /* MOVE.B (d8,PC,Xn),(An) */ -{ CPUFUNC(op_10bc_0), 0, 4284 }, /* MOVE.B #.B,(An) */ -{ CPUFUNC(op_10c0_0), 0, 4288 }, /* MOVE.B Dn,(An)+ */ -{ CPUFUNC(op_10d0_0), 0, 4304 }, /* MOVE.B (An),(An)+ */ -{ CPUFUNC(op_10d8_0), 0, 4312 }, /* MOVE.B (An)+,(An)+ */ -{ CPUFUNC(op_10e0_0), 0, 4320 }, /* MOVE.B -(An),(An)+ */ -{ CPUFUNC(op_10e8_0), 0, 4328 }, /* MOVE.B (d16,An),(An)+ */ -{ CPUFUNC(op_10f0_0), 0, 4336 }, /* MOVE.B (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_10f8_0), 0, 4344 }, /* MOVE.B (xxx).W,(An)+ */ -{ CPUFUNC(op_10f9_0), 0, 4345 }, /* MOVE.B (xxx).L,(An)+ */ -{ CPUFUNC(op_10fa_0), 0, 4346 }, /* MOVE.B (d16,PC),(An)+ */ -{ CPUFUNC(op_10fb_0), 0, 4347 }, /* MOVE.B (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_10fc_0), 0, 4348 }, /* MOVE.B #.B,(An)+ */ -{ CPUFUNC(op_1100_0), 0, 4352 }, /* MOVE.B Dn,-(An) */ -{ CPUFUNC(op_1110_0), 0, 4368 }, /* MOVE.B (An),-(An) */ -{ CPUFUNC(op_1118_0), 0, 4376 }, /* MOVE.B (An)+,-(An) */ -{ CPUFUNC(op_1120_0), 0, 4384 }, /* MOVE.B -(An),-(An) */ -{ CPUFUNC(op_1128_0), 0, 4392 }, /* MOVE.B (d16,An),-(An) */ -{ CPUFUNC(op_1130_0), 0, 4400 }, /* MOVE.B (d8,An,Xn),-(An) */ -{ CPUFUNC(op_1138_0), 0, 4408 }, /* MOVE.B (xxx).W,-(An) */ -{ CPUFUNC(op_1139_0), 0, 4409 }, /* MOVE.B (xxx).L,-(An) */ -{ CPUFUNC(op_113a_0), 0, 4410 }, /* MOVE.B (d16,PC),-(An) */ -{ CPUFUNC(op_113b_0), 0, 4411 }, /* MOVE.B (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_113c_0), 0, 4412 }, /* MOVE.B #.B,-(An) */ -{ CPUFUNC(op_1140_0), 0, 4416 }, /* MOVE.B Dn,(d16,An) */ -{ CPUFUNC(op_1150_0), 0, 4432 }, /* MOVE.B (An),(d16,An) */ -{ CPUFUNC(op_1158_0), 0, 4440 }, /* MOVE.B (An)+,(d16,An) */ -{ CPUFUNC(op_1160_0), 0, 4448 }, /* MOVE.B -(An),(d16,An) */ -{ CPUFUNC(op_1168_0), 0, 4456 }, /* MOVE.B (d16,An),(d16,An) */ -{ CPUFUNC(op_1170_0), 0, 4464 }, /* MOVE.B (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_1178_0), 0, 4472 }, /* MOVE.B (xxx).W,(d16,An) */ -{ CPUFUNC(op_1179_0), 0, 4473 }, /* MOVE.B (xxx).L,(d16,An) */ -{ CPUFUNC(op_117a_0), 0, 4474 }, /* MOVE.B (d16,PC),(d16,An) */ -{ CPUFUNC(op_117b_0), 0, 4475 }, /* MOVE.B (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_117c_0), 0, 4476 }, /* MOVE.B #.B,(d16,An) */ -{ CPUFUNC(op_1180_0), 0, 4480 }, /* MOVE.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1190_0), 0, 4496 }, /* MOVE.B (An),(d8,An,Xn) */ -{ CPUFUNC(op_1198_0), 0, 4504 }, /* MOVE.B (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_11a0_0), 0, 4512 }, /* MOVE.B -(An),(d8,An,Xn) */ -{ CPUFUNC(op_11a8_0), 0, 4520 }, /* MOVE.B (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_11b0_0), 0, 4528 }, /* MOVE.B (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_11b8_0), 0, 4536 }, /* MOVE.B (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_11b9_0), 0, 4537 }, /* MOVE.B (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_11ba_0), 0, 4538 }, /* MOVE.B (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_11bb_0), 0, 4539 }, /* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_11bc_0), 0, 4540 }, /* MOVE.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_11c0_0), 0, 4544 }, /* MOVE.B Dn,(xxx).W */ -{ CPUFUNC(op_11d0_0), 0, 4560 }, /* MOVE.B (An),(xxx).W */ -{ CPUFUNC(op_11d8_0), 0, 4568 }, /* MOVE.B (An)+,(xxx).W */ -{ CPUFUNC(op_11e0_0), 0, 4576 }, /* MOVE.B -(An),(xxx).W */ -{ CPUFUNC(op_11e8_0), 0, 4584 }, /* MOVE.B (d16,An),(xxx).W */ -{ CPUFUNC(op_11f0_0), 0, 4592 }, /* MOVE.B (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_11f8_0), 0, 4600 }, /* MOVE.B (xxx).W,(xxx).W */ -{ CPUFUNC(op_11f9_0), 0, 4601 }, /* MOVE.B (xxx).L,(xxx).W */ -{ CPUFUNC(op_11fa_0), 0, 4602 }, /* MOVE.B (d16,PC),(xxx).W */ -{ CPUFUNC(op_11fb_0), 0, 4603 }, /* MOVE.B (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_11fc_0), 0, 4604 }, /* MOVE.B #.B,(xxx).W */ -{ CPUFUNC(op_13c0_0), 0, 5056 }, /* MOVE.B Dn,(xxx).L */ -{ CPUFUNC(op_13d0_0), 0, 5072 }, /* MOVE.B (An),(xxx).L */ -{ CPUFUNC(op_13d8_0), 0, 5080 }, /* MOVE.B (An)+,(xxx).L */ -{ CPUFUNC(op_13e0_0), 0, 5088 }, /* MOVE.B -(An),(xxx).L */ -{ CPUFUNC(op_13e8_0), 0, 5096 }, /* MOVE.B (d16,An),(xxx).L */ -{ CPUFUNC(op_13f0_0), 0, 5104 }, /* MOVE.B (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_13f8_0), 0, 5112 }, /* MOVE.B (xxx).W,(xxx).L */ -{ CPUFUNC(op_13f9_0), 0, 5113 }, /* MOVE.B (xxx).L,(xxx).L */ -{ CPUFUNC(op_13fa_0), 0, 5114 }, /* MOVE.B (d16,PC),(xxx).L */ -{ CPUFUNC(op_13fb_0), 0, 5115 }, /* MOVE.B (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_13fc_0), 0, 5116 }, /* MOVE.B #.B,(xxx).L */ -{ CPUFUNC(op_2000_0), 0, 8192 }, /* MOVE.L Dn,Dn */ -{ CPUFUNC(op_2008_0), 0, 8200 }, /* MOVE.L An,Dn */ -{ CPUFUNC(op_2010_0), 0, 8208 }, /* MOVE.L (An),Dn */ -{ CPUFUNC(op_2018_0), 0, 8216 }, /* MOVE.L (An)+,Dn */ -{ CPUFUNC(op_2020_0), 0, 8224 }, /* MOVE.L -(An),Dn */ -{ CPUFUNC(op_2028_0), 0, 8232 }, /* MOVE.L (d16,An),Dn */ -{ CPUFUNC(op_2030_0), 0, 8240 }, /* MOVE.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_2038_0), 0, 8248 }, /* MOVE.L (xxx).W,Dn */ -{ CPUFUNC(op_2039_0), 0, 8249 }, /* MOVE.L (xxx).L,Dn */ -{ CPUFUNC(op_203a_0), 0, 8250 }, /* MOVE.L (d16,PC),Dn */ -{ CPUFUNC(op_203b_0), 0, 8251 }, /* MOVE.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_203c_0), 0, 8252 }, /* MOVE.L #.L,Dn */ -{ CPUFUNC_FF(op_2040_0), 0, 8256 }, /* MOVEA.L Dn,An */ -{ CPUFUNC_FF(op_2048_0), 0, 8264 }, /* MOVEA.L An,An */ -{ CPUFUNC_FF(op_2050_0), 0, 8272 }, /* MOVEA.L (An),An */ -{ CPUFUNC_FF(op_2058_0), 0, 8280 }, /* MOVEA.L (An)+,An */ -{ CPUFUNC_FF(op_2060_0), 0, 8288 }, /* MOVEA.L -(An),An */ -{ CPUFUNC_FF(op_2068_0), 0, 8296 }, /* MOVEA.L (d16,An),An */ -{ CPUFUNC_FF(op_2070_0), 0, 8304 }, /* MOVEA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_2078_0), 0, 8312 }, /* MOVEA.L (xxx).W,An */ -{ CPUFUNC_FF(op_2079_0), 0, 8313 }, /* MOVEA.L (xxx).L,An */ -{ CPUFUNC_FF(op_207a_0), 0, 8314 }, /* MOVEA.L (d16,PC),An */ -{ CPUFUNC_FF(op_207b_0), 0, 8315 }, /* MOVEA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_207c_0), 0, 8316 }, /* MOVEA.L #.L,An */ -{ CPUFUNC(op_2080_0), 0, 8320 }, /* MOVE.L Dn,(An) */ -{ CPUFUNC(op_2088_0), 0, 8328 }, /* MOVE.L An,(An) */ -{ CPUFUNC(op_2090_0), 0, 8336 }, /* MOVE.L (An),(An) */ -{ CPUFUNC(op_2098_0), 0, 8344 }, /* MOVE.L (An)+,(An) */ -{ CPUFUNC(op_20a0_0), 0, 8352 }, /* MOVE.L -(An),(An) */ -{ CPUFUNC(op_20a8_0), 0, 8360 }, /* MOVE.L (d16,An),(An) */ -{ CPUFUNC(op_20b0_0), 0, 8368 }, /* MOVE.L (d8,An,Xn),(An) */ -{ CPUFUNC(op_20b8_0), 0, 8376 }, /* MOVE.L (xxx).W,(An) */ -{ CPUFUNC(op_20b9_0), 0, 8377 }, /* MOVE.L (xxx).L,(An) */ -{ CPUFUNC(op_20ba_0), 0, 8378 }, /* MOVE.L (d16,PC),(An) */ -{ CPUFUNC(op_20bb_0), 0, 8379 }, /* MOVE.L (d8,PC,Xn),(An) */ -{ CPUFUNC(op_20bc_0), 0, 8380 }, /* MOVE.L #.L,(An) */ -{ CPUFUNC(op_20c0_0), 0, 8384 }, /* MOVE.L Dn,(An)+ */ -{ CPUFUNC(op_20c8_0), 0, 8392 }, /* MOVE.L An,(An)+ */ -{ CPUFUNC(op_20d0_0), 0, 8400 }, /* MOVE.L (An),(An)+ */ -{ CPUFUNC(op_20d8_0), 0, 8408 }, /* MOVE.L (An)+,(An)+ */ -{ CPUFUNC(op_20e0_0), 0, 8416 }, /* MOVE.L -(An),(An)+ */ -{ CPUFUNC(op_20e8_0), 0, 8424 }, /* MOVE.L (d16,An),(An)+ */ -{ CPUFUNC(op_20f0_0), 0, 8432 }, /* MOVE.L (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_20f8_0), 0, 8440 }, /* MOVE.L (xxx).W,(An)+ */ -{ CPUFUNC(op_20f9_0), 0, 8441 }, /* MOVE.L (xxx).L,(An)+ */ -{ CPUFUNC(op_20fa_0), 0, 8442 }, /* MOVE.L (d16,PC),(An)+ */ -{ CPUFUNC(op_20fb_0), 0, 8443 }, /* MOVE.L (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_20fc_0), 0, 8444 }, /* MOVE.L #.L,(An)+ */ -{ CPUFUNC(op_2100_0), 0, 8448 }, /* MOVE.L Dn,-(An) */ -{ CPUFUNC(op_2108_0), 0, 8456 }, /* MOVE.L An,-(An) */ -{ CPUFUNC(op_2110_0), 0, 8464 }, /* MOVE.L (An),-(An) */ -{ CPUFUNC(op_2118_0), 0, 8472 }, /* MOVE.L (An)+,-(An) */ -{ CPUFUNC(op_2120_0), 0, 8480 }, /* MOVE.L -(An),-(An) */ -{ CPUFUNC(op_2128_0), 0, 8488 }, /* MOVE.L (d16,An),-(An) */ -{ CPUFUNC(op_2130_0), 0, 8496 }, /* MOVE.L (d8,An,Xn),-(An) */ -{ CPUFUNC(op_2138_0), 0, 8504 }, /* MOVE.L (xxx).W,-(An) */ -{ CPUFUNC(op_2139_0), 0, 8505 }, /* MOVE.L (xxx).L,-(An) */ -{ CPUFUNC(op_213a_0), 0, 8506 }, /* MOVE.L (d16,PC),-(An) */ -{ CPUFUNC(op_213b_0), 0, 8507 }, /* MOVE.L (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_213c_0), 0, 8508 }, /* MOVE.L #.L,-(An) */ -{ CPUFUNC(op_2140_0), 0, 8512 }, /* MOVE.L Dn,(d16,An) */ -{ CPUFUNC(op_2148_0), 0, 8520 }, /* MOVE.L An,(d16,An) */ -{ CPUFUNC(op_2150_0), 0, 8528 }, /* MOVE.L (An),(d16,An) */ -{ CPUFUNC(op_2158_0), 0, 8536 }, /* MOVE.L (An)+,(d16,An) */ -{ CPUFUNC(op_2160_0), 0, 8544 }, /* MOVE.L -(An),(d16,An) */ -{ CPUFUNC(op_2168_0), 0, 8552 }, /* MOVE.L (d16,An),(d16,An) */ -{ CPUFUNC(op_2170_0), 0, 8560 }, /* MOVE.L (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_2178_0), 0, 8568 }, /* MOVE.L (xxx).W,(d16,An) */ -{ CPUFUNC(op_2179_0), 0, 8569 }, /* MOVE.L (xxx).L,(d16,An) */ -{ CPUFUNC(op_217a_0), 0, 8570 }, /* MOVE.L (d16,PC),(d16,An) */ -{ CPUFUNC(op_217b_0), 0, 8571 }, /* MOVE.L (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_217c_0), 0, 8572 }, /* MOVE.L #.L,(d16,An) */ -{ CPUFUNC(op_2180_0), 0, 8576 }, /* MOVE.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_2188_0), 0, 8584 }, /* MOVE.L An,(d8,An,Xn) */ -{ CPUFUNC(op_2190_0), 0, 8592 }, /* MOVE.L (An),(d8,An,Xn) */ -{ CPUFUNC(op_2198_0), 0, 8600 }, /* MOVE.L (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_21a0_0), 0, 8608 }, /* MOVE.L -(An),(d8,An,Xn) */ -{ CPUFUNC(op_21a8_0), 0, 8616 }, /* MOVE.L (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_21b0_0), 0, 8624 }, /* MOVE.L (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_21b8_0), 0, 8632 }, /* MOVE.L (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_21b9_0), 0, 8633 }, /* MOVE.L (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_21ba_0), 0, 8634 }, /* MOVE.L (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_21bb_0), 0, 8635 }, /* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_21bc_0), 0, 8636 }, /* MOVE.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_21c0_0), 0, 8640 }, /* MOVE.L Dn,(xxx).W */ -{ CPUFUNC(op_21c8_0), 0, 8648 }, /* MOVE.L An,(xxx).W */ -{ CPUFUNC(op_21d0_0), 0, 8656 }, /* MOVE.L (An),(xxx).W */ -{ CPUFUNC(op_21d8_0), 0, 8664 }, /* MOVE.L (An)+,(xxx).W */ -{ CPUFUNC(op_21e0_0), 0, 8672 }, /* MOVE.L -(An),(xxx).W */ -{ CPUFUNC(op_21e8_0), 0, 8680 }, /* MOVE.L (d16,An),(xxx).W */ -{ CPUFUNC(op_21f0_0), 0, 8688 }, /* MOVE.L (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_21f8_0), 0, 8696 }, /* MOVE.L (xxx).W,(xxx).W */ -{ CPUFUNC(op_21f9_0), 0, 8697 }, /* MOVE.L (xxx).L,(xxx).W */ -{ CPUFUNC(op_21fa_0), 0, 8698 }, /* MOVE.L (d16,PC),(xxx).W */ -{ CPUFUNC(op_21fb_0), 0, 8699 }, /* MOVE.L (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_21fc_0), 0, 8700 }, /* MOVE.L #.L,(xxx).W */ -{ CPUFUNC(op_23c0_0), 0, 9152 }, /* MOVE.L Dn,(xxx).L */ -{ CPUFUNC(op_23c8_0), 0, 9160 }, /* MOVE.L An,(xxx).L */ -{ CPUFUNC(op_23d0_0), 0, 9168 }, /* MOVE.L (An),(xxx).L */ -{ CPUFUNC(op_23d8_0), 0, 9176 }, /* MOVE.L (An)+,(xxx).L */ -{ CPUFUNC(op_23e0_0), 0, 9184 }, /* MOVE.L -(An),(xxx).L */ -{ CPUFUNC(op_23e8_0), 0, 9192 }, /* MOVE.L (d16,An),(xxx).L */ -{ CPUFUNC(op_23f0_0), 0, 9200 }, /* MOVE.L (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_23f8_0), 0, 9208 }, /* MOVE.L (xxx).W,(xxx).L */ -{ CPUFUNC(op_23f9_0), 0, 9209 }, /* MOVE.L (xxx).L,(xxx).L */ -{ CPUFUNC(op_23fa_0), 0, 9210 }, /* MOVE.L (d16,PC),(xxx).L */ -{ CPUFUNC(op_23fb_0), 0, 9211 }, /* MOVE.L (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_23fc_0), 0, 9212 }, /* MOVE.L #.L,(xxx).L */ -{ CPUFUNC(op_3000_0), 0, 12288 }, /* MOVE.W Dn,Dn */ -{ CPUFUNC(op_3008_0), 0, 12296 }, /* MOVE.W An,Dn */ -{ CPUFUNC(op_3010_0), 0, 12304 }, /* MOVE.W (An),Dn */ -{ CPUFUNC(op_3018_0), 0, 12312 }, /* MOVE.W (An)+,Dn */ -{ CPUFUNC(op_3020_0), 0, 12320 }, /* MOVE.W -(An),Dn */ -{ CPUFUNC(op_3028_0), 0, 12328 }, /* MOVE.W (d16,An),Dn */ -{ CPUFUNC(op_3030_0), 0, 12336 }, /* MOVE.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_3038_0), 0, 12344 }, /* MOVE.W (xxx).W,Dn */ -{ CPUFUNC(op_3039_0), 0, 12345 }, /* MOVE.W (xxx).L,Dn */ -{ CPUFUNC(op_303a_0), 0, 12346 }, /* MOVE.W (d16,PC),Dn */ -{ CPUFUNC(op_303b_0), 0, 12347 }, /* MOVE.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_303c_0), 0, 12348 }, /* MOVE.W #.W,Dn */ -{ CPUFUNC_FF(op_3040_0), 0, 12352 }, /* MOVEA.W Dn,An */ -{ CPUFUNC_FF(op_3048_0), 0, 12360 }, /* MOVEA.W An,An */ -{ CPUFUNC_FF(op_3050_0), 0, 12368 }, /* MOVEA.W (An),An */ -{ CPUFUNC_FF(op_3058_0), 0, 12376 }, /* MOVEA.W (An)+,An */ -{ CPUFUNC_FF(op_3060_0), 0, 12384 }, /* MOVEA.W -(An),An */ -{ CPUFUNC_FF(op_3068_0), 0, 12392 }, /* MOVEA.W (d16,An),An */ -{ CPUFUNC_FF(op_3070_0), 0, 12400 }, /* MOVEA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_3078_0), 0, 12408 }, /* MOVEA.W (xxx).W,An */ -{ CPUFUNC_FF(op_3079_0), 0, 12409 }, /* MOVEA.W (xxx).L,An */ -{ CPUFUNC_FF(op_307a_0), 0, 12410 }, /* MOVEA.W (d16,PC),An */ -{ CPUFUNC_FF(op_307b_0), 0, 12411 }, /* MOVEA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_307c_0), 0, 12412 }, /* MOVEA.W #.W,An */ -{ CPUFUNC(op_3080_0), 0, 12416 }, /* MOVE.W Dn,(An) */ -{ CPUFUNC(op_3088_0), 0, 12424 }, /* MOVE.W An,(An) */ -{ CPUFUNC(op_3090_0), 0, 12432 }, /* MOVE.W (An),(An) */ -{ CPUFUNC(op_3098_0), 0, 12440 }, /* MOVE.W (An)+,(An) */ -{ CPUFUNC(op_30a0_0), 0, 12448 }, /* MOVE.W -(An),(An) */ -{ CPUFUNC(op_30a8_0), 0, 12456 }, /* MOVE.W (d16,An),(An) */ -{ CPUFUNC(op_30b0_0), 0, 12464 }, /* MOVE.W (d8,An,Xn),(An) */ -{ CPUFUNC(op_30b8_0), 0, 12472 }, /* MOVE.W (xxx).W,(An) */ -{ CPUFUNC(op_30b9_0), 0, 12473 }, /* MOVE.W (xxx).L,(An) */ -{ CPUFUNC(op_30ba_0), 0, 12474 }, /* MOVE.W (d16,PC),(An) */ -{ CPUFUNC(op_30bb_0), 0, 12475 }, /* MOVE.W (d8,PC,Xn),(An) */ -{ CPUFUNC(op_30bc_0), 0, 12476 }, /* MOVE.W #.W,(An) */ -{ CPUFUNC(op_30c0_0), 0, 12480 }, /* MOVE.W Dn,(An)+ */ -{ CPUFUNC(op_30c8_0), 0, 12488 }, /* MOVE.W An,(An)+ */ -{ CPUFUNC(op_30d0_0), 0, 12496 }, /* MOVE.W (An),(An)+ */ -{ CPUFUNC(op_30d8_0), 0, 12504 }, /* MOVE.W (An)+,(An)+ */ -{ CPUFUNC(op_30e0_0), 0, 12512 }, /* MOVE.W -(An),(An)+ */ -{ CPUFUNC(op_30e8_0), 0, 12520 }, /* MOVE.W (d16,An),(An)+ */ -{ CPUFUNC(op_30f0_0), 0, 12528 }, /* MOVE.W (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_30f8_0), 0, 12536 }, /* MOVE.W (xxx).W,(An)+ */ -{ CPUFUNC(op_30f9_0), 0, 12537 }, /* MOVE.W (xxx).L,(An)+ */ -{ CPUFUNC(op_30fa_0), 0, 12538 }, /* MOVE.W (d16,PC),(An)+ */ -{ CPUFUNC(op_30fb_0), 0, 12539 }, /* MOVE.W (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_30fc_0), 0, 12540 }, /* MOVE.W #.W,(An)+ */ -{ CPUFUNC(op_3100_0), 0, 12544 }, /* MOVE.W Dn,-(An) */ -{ CPUFUNC(op_3108_0), 0, 12552 }, /* MOVE.W An,-(An) */ -{ CPUFUNC(op_3110_0), 0, 12560 }, /* MOVE.W (An),-(An) */ -{ CPUFUNC(op_3118_0), 0, 12568 }, /* MOVE.W (An)+,-(An) */ -{ CPUFUNC(op_3120_0), 0, 12576 }, /* MOVE.W -(An),-(An) */ -{ CPUFUNC(op_3128_0), 0, 12584 }, /* MOVE.W (d16,An),-(An) */ -{ CPUFUNC(op_3130_0), 0, 12592 }, /* MOVE.W (d8,An,Xn),-(An) */ -{ CPUFUNC(op_3138_0), 0, 12600 }, /* MOVE.W (xxx).W,-(An) */ -{ CPUFUNC(op_3139_0), 0, 12601 }, /* MOVE.W (xxx).L,-(An) */ -{ CPUFUNC(op_313a_0), 0, 12602 }, /* MOVE.W (d16,PC),-(An) */ -{ CPUFUNC(op_313b_0), 0, 12603 }, /* MOVE.W (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_313c_0), 0, 12604 }, /* MOVE.W #.W,-(An) */ -{ CPUFUNC(op_3140_0), 0, 12608 }, /* MOVE.W Dn,(d16,An) */ -{ CPUFUNC(op_3148_0), 0, 12616 }, /* MOVE.W An,(d16,An) */ -{ CPUFUNC(op_3150_0), 0, 12624 }, /* MOVE.W (An),(d16,An) */ -{ CPUFUNC(op_3158_0), 0, 12632 }, /* MOVE.W (An)+,(d16,An) */ -{ CPUFUNC(op_3160_0), 0, 12640 }, /* MOVE.W -(An),(d16,An) */ -{ CPUFUNC(op_3168_0), 0, 12648 }, /* MOVE.W (d16,An),(d16,An) */ -{ CPUFUNC(op_3170_0), 0, 12656 }, /* MOVE.W (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_3178_0), 0, 12664 }, /* MOVE.W (xxx).W,(d16,An) */ -{ CPUFUNC(op_3179_0), 0, 12665 }, /* MOVE.W (xxx).L,(d16,An) */ -{ CPUFUNC(op_317a_0), 0, 12666 }, /* MOVE.W (d16,PC),(d16,An) */ -{ CPUFUNC(op_317b_0), 0, 12667 }, /* MOVE.W (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_317c_0), 0, 12668 }, /* MOVE.W #.W,(d16,An) */ -{ CPUFUNC(op_3180_0), 0, 12672 }, /* MOVE.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_3188_0), 0, 12680 }, /* MOVE.W An,(d8,An,Xn) */ -{ CPUFUNC(op_3190_0), 0, 12688 }, /* MOVE.W (An),(d8,An,Xn) */ -{ CPUFUNC(op_3198_0), 0, 12696 }, /* MOVE.W (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_31a0_0), 0, 12704 }, /* MOVE.W -(An),(d8,An,Xn) */ -{ CPUFUNC(op_31a8_0), 0, 12712 }, /* MOVE.W (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_31b0_0), 0, 12720 }, /* MOVE.W (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_31b8_0), 0, 12728 }, /* MOVE.W (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_31b9_0), 0, 12729 }, /* MOVE.W (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_31ba_0), 0, 12730 }, /* MOVE.W (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_31bb_0), 0, 12731 }, /* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_31bc_0), 0, 12732 }, /* MOVE.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_31c0_0), 0, 12736 }, /* MOVE.W Dn,(xxx).W */ -{ CPUFUNC(op_31c8_0), 0, 12744 }, /* MOVE.W An,(xxx).W */ -{ CPUFUNC(op_31d0_0), 0, 12752 }, /* MOVE.W (An),(xxx).W */ -{ CPUFUNC(op_31d8_0), 0, 12760 }, /* MOVE.W (An)+,(xxx).W */ -{ CPUFUNC(op_31e0_0), 0, 12768 }, /* MOVE.W -(An),(xxx).W */ -{ CPUFUNC(op_31e8_0), 0, 12776 }, /* MOVE.W (d16,An),(xxx).W */ -{ CPUFUNC(op_31f0_0), 0, 12784 }, /* MOVE.W (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_31f8_0), 0, 12792 }, /* MOVE.W (xxx).W,(xxx).W */ -{ CPUFUNC(op_31f9_0), 0, 12793 }, /* MOVE.W (xxx).L,(xxx).W */ -{ CPUFUNC(op_31fa_0), 0, 12794 }, /* MOVE.W (d16,PC),(xxx).W */ -{ CPUFUNC(op_31fb_0), 0, 12795 }, /* MOVE.W (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_31fc_0), 0, 12796 }, /* MOVE.W #.W,(xxx).W */ -{ CPUFUNC(op_33c0_0), 0, 13248 }, /* MOVE.W Dn,(xxx).L */ -{ CPUFUNC(op_33c8_0), 0, 13256 }, /* MOVE.W An,(xxx).L */ -{ CPUFUNC(op_33d0_0), 0, 13264 }, /* MOVE.W (An),(xxx).L */ -{ CPUFUNC(op_33d8_0), 0, 13272 }, /* MOVE.W (An)+,(xxx).L */ -{ CPUFUNC(op_33e0_0), 0, 13280 }, /* MOVE.W -(An),(xxx).L */ -{ CPUFUNC(op_33e8_0), 0, 13288 }, /* MOVE.W (d16,An),(xxx).L */ -{ CPUFUNC(op_33f0_0), 0, 13296 }, /* MOVE.W (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_33f8_0), 0, 13304 }, /* MOVE.W (xxx).W,(xxx).L */ -{ CPUFUNC(op_33f9_0), 0, 13305 }, /* MOVE.W (xxx).L,(xxx).L */ -{ CPUFUNC(op_33fa_0), 0, 13306 }, /* MOVE.W (d16,PC),(xxx).L */ -{ CPUFUNC(op_33fb_0), 0, 13307 }, /* MOVE.W (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_33fc_0), 0, 13308 }, /* MOVE.W #.W,(xxx).L */ -{ CPUFUNC(op_4000_0), 0, 16384 }, /* NEGX.B Dn */ -{ CPUFUNC(op_4010_0), 0, 16400 }, /* NEGX.B (An) */ -{ CPUFUNC(op_4018_0), 0, 16408 }, /* NEGX.B (An)+ */ -{ CPUFUNC(op_4020_0), 0, 16416 }, /* NEGX.B -(An) */ -{ CPUFUNC(op_4028_0), 0, 16424 }, /* NEGX.B (d16,An) */ -{ CPUFUNC(op_4030_0), 0, 16432 }, /* NEGX.B (d8,An,Xn) */ -{ CPUFUNC(op_4038_0), 0, 16440 }, /* NEGX.B (xxx).W */ -{ CPUFUNC(op_4039_0), 0, 16441 }, /* NEGX.B (xxx).L */ -{ CPUFUNC(op_4040_0), 0, 16448 }, /* NEGX.W Dn */ -{ CPUFUNC(op_4050_0), 0, 16464 }, /* NEGX.W (An) */ -{ CPUFUNC(op_4058_0), 0, 16472 }, /* NEGX.W (An)+ */ -{ CPUFUNC(op_4060_0), 0, 16480 }, /* NEGX.W -(An) */ -{ CPUFUNC(op_4068_0), 0, 16488 }, /* NEGX.W (d16,An) */ -{ CPUFUNC(op_4070_0), 0, 16496 }, /* NEGX.W (d8,An,Xn) */ -{ CPUFUNC(op_4078_0), 0, 16504 }, /* NEGX.W (xxx).W */ -{ CPUFUNC(op_4079_0), 0, 16505 }, /* NEGX.W (xxx).L */ -{ CPUFUNC(op_4080_0), 0, 16512 }, /* NEGX.L Dn */ -{ CPUFUNC(op_4090_0), 0, 16528 }, /* NEGX.L (An) */ -{ CPUFUNC(op_4098_0), 0, 16536 }, /* NEGX.L (An)+ */ -{ CPUFUNC(op_40a0_0), 0, 16544 }, /* NEGX.L -(An) */ -{ CPUFUNC(op_40a8_0), 0, 16552 }, /* NEGX.L (d16,An) */ -{ CPUFUNC(op_40b0_0), 0, 16560 }, /* NEGX.L (d8,An,Xn) */ -{ CPUFUNC(op_40b8_0), 0, 16568 }, /* NEGX.L (xxx).W */ -{ CPUFUNC(op_40b9_0), 0, 16569 }, /* NEGX.L (xxx).L */ -{ CPUFUNC_FF(op_40c0_0), 0, 16576 }, /* MVSR2.W Dn */ -{ CPUFUNC_FF(op_40d0_0), 0, 16592 }, /* MVSR2.W (An) */ -{ CPUFUNC_FF(op_40d8_0), 0, 16600 }, /* MVSR2.W (An)+ */ -{ CPUFUNC_FF(op_40e0_0), 0, 16608 }, /* MVSR2.W -(An) */ -{ CPUFUNC_FF(op_40e8_0), 0, 16616 }, /* MVSR2.W (d16,An) */ -{ CPUFUNC_FF(op_40f0_0), 0, 16624 }, /* MVSR2.W (d8,An,Xn) */ -{ CPUFUNC_FF(op_40f8_0), 0, 16632 }, /* MVSR2.W (xxx).W */ -{ CPUFUNC_FF(op_40f9_0), 0, 16633 }, /* MVSR2.W (xxx).L */ -{ CPUFUNC(op_4100_0), 0, 16640 }, /* CHK.L Dn,Dn */ -{ CPUFUNC(op_4110_0), 0, 16656 }, /* CHK.L (An),Dn */ -{ CPUFUNC(op_4118_0), 0, 16664 }, /* CHK.L (An)+,Dn */ -{ CPUFUNC(op_4120_0), 0, 16672 }, /* CHK.L -(An),Dn */ -{ CPUFUNC(op_4128_0), 0, 16680 }, /* CHK.L (d16,An),Dn */ -{ CPUFUNC(op_4130_0), 0, 16688 }, /* CHK.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_4138_0), 0, 16696 }, /* CHK.L (xxx).W,Dn */ -{ CPUFUNC(op_4139_0), 0, 16697 }, /* CHK.L (xxx).L,Dn */ -{ CPUFUNC(op_413a_0), 0, 16698 }, /* CHK.L (d16,PC),Dn */ -{ CPUFUNC(op_413b_0), 0, 16699 }, /* CHK.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_413c_0), 0, 16700 }, /* CHK.L #.L,Dn */ -{ CPUFUNC(op_4180_0), 0, 16768 }, /* CHK.W Dn,Dn */ -{ CPUFUNC(op_4190_0), 0, 16784 }, /* CHK.W (An),Dn */ -{ CPUFUNC(op_4198_0), 0, 16792 }, /* CHK.W (An)+,Dn */ -{ CPUFUNC(op_41a0_0), 0, 16800 }, /* CHK.W -(An),Dn */ -{ CPUFUNC(op_41a8_0), 0, 16808 }, /* CHK.W (d16,An),Dn */ -{ CPUFUNC(op_41b0_0), 0, 16816 }, /* CHK.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_41b8_0), 0, 16824 }, /* CHK.W (xxx).W,Dn */ -{ CPUFUNC(op_41b9_0), 0, 16825 }, /* CHK.W (xxx).L,Dn */ -{ CPUFUNC(op_41ba_0), 0, 16826 }, /* CHK.W (d16,PC),Dn */ -{ CPUFUNC(op_41bb_0), 0, 16827 }, /* CHK.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_41bc_0), 0, 16828 }, /* CHK.W #.W,Dn */ -{ CPUFUNC_FF(op_41d0_0), 0, 16848 }, /* LEA.L (An),An */ -{ CPUFUNC_FF(op_41e8_0), 0, 16872 }, /* LEA.L (d16,An),An */ -{ CPUFUNC_FF(op_41f0_0), 0, 16880 }, /* LEA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_41f8_0), 0, 16888 }, /* LEA.L (xxx).W,An */ -{ CPUFUNC_FF(op_41f9_0), 0, 16889 }, /* LEA.L (xxx).L,An */ -{ CPUFUNC_FF(op_41fa_0), 0, 16890 }, /* LEA.L (d16,PC),An */ -{ CPUFUNC_FF(op_41fb_0), 0, 16891 }, /* LEA.L (d8,PC,Xn),An */ -{ CPUFUNC(op_4200_0), 0, 16896 }, /* CLR.B Dn */ -{ CPUFUNC(op_4210_0), 0, 16912 }, /* CLR.B (An) */ -{ CPUFUNC(op_4218_0), 0, 16920 }, /* CLR.B (An)+ */ -{ CPUFUNC(op_4220_0), 0, 16928 }, /* CLR.B -(An) */ -{ CPUFUNC(op_4228_0), 0, 16936 }, /* CLR.B (d16,An) */ -{ CPUFUNC(op_4230_0), 0, 16944 }, /* CLR.B (d8,An,Xn) */ -{ CPUFUNC(op_4238_0), 0, 16952 }, /* CLR.B (xxx).W */ -{ CPUFUNC(op_4239_0), 0, 16953 }, /* CLR.B (xxx).L */ -{ CPUFUNC(op_4240_0), 0, 16960 }, /* CLR.W Dn */ -{ CPUFUNC(op_4250_0), 0, 16976 }, /* CLR.W (An) */ -{ CPUFUNC(op_4258_0), 0, 16984 }, /* CLR.W (An)+ */ -{ CPUFUNC(op_4260_0), 0, 16992 }, /* CLR.W -(An) */ -{ CPUFUNC(op_4268_0), 0, 17000 }, /* CLR.W (d16,An) */ -{ CPUFUNC(op_4270_0), 0, 17008 }, /* CLR.W (d8,An,Xn) */ -{ CPUFUNC(op_4278_0), 0, 17016 }, /* CLR.W (xxx).W */ -{ CPUFUNC(op_4279_0), 0, 17017 }, /* CLR.W (xxx).L */ -{ CPUFUNC(op_4280_0), 0, 17024 }, /* CLR.L Dn */ -{ CPUFUNC(op_4290_0), 0, 17040 }, /* CLR.L (An) */ -{ CPUFUNC(op_4298_0), 0, 17048 }, /* CLR.L (An)+ */ -{ CPUFUNC(op_42a0_0), 0, 17056 }, /* CLR.L -(An) */ -{ CPUFUNC(op_42a8_0), 0, 17064 }, /* CLR.L (d16,An) */ -{ CPUFUNC(op_42b0_0), 0, 17072 }, /* CLR.L (d8,An,Xn) */ -{ CPUFUNC(op_42b8_0), 0, 17080 }, /* CLR.L (xxx).W */ -{ CPUFUNC(op_42b9_0), 0, 17081 }, /* CLR.L (xxx).L */ -{ CPUFUNC_FF(op_42c0_0), 0, 17088 }, /* MVSR2.B Dn */ -{ CPUFUNC_FF(op_42d0_0), 0, 17104 }, /* MVSR2.B (An) */ -{ CPUFUNC_FF(op_42d8_0), 0, 17112 }, /* MVSR2.B (An)+ */ -{ CPUFUNC_FF(op_42e0_0), 0, 17120 }, /* MVSR2.B -(An) */ -{ CPUFUNC_FF(op_42e8_0), 0, 17128 }, /* MVSR2.B (d16,An) */ -{ CPUFUNC_FF(op_42f0_0), 0, 17136 }, /* MVSR2.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_42f8_0), 0, 17144 }, /* MVSR2.B (xxx).W */ -{ CPUFUNC_FF(op_42f9_0), 0, 17145 }, /* MVSR2.B (xxx).L */ -{ CPUFUNC(op_4400_0), 0, 17408 }, /* NEG.B Dn */ -{ CPUFUNC(op_4410_0), 0, 17424 }, /* NEG.B (An) */ -{ CPUFUNC(op_4418_0), 0, 17432 }, /* NEG.B (An)+ */ -{ CPUFUNC(op_4420_0), 0, 17440 }, /* NEG.B -(An) */ -{ CPUFUNC(op_4428_0), 0, 17448 }, /* NEG.B (d16,An) */ -{ CPUFUNC(op_4430_0), 0, 17456 }, /* NEG.B (d8,An,Xn) */ -{ CPUFUNC(op_4438_0), 0, 17464 }, /* NEG.B (xxx).W */ -{ CPUFUNC(op_4439_0), 0, 17465 }, /* NEG.B (xxx).L */ -{ CPUFUNC(op_4440_0), 0, 17472 }, /* NEG.W Dn */ -{ CPUFUNC(op_4450_0), 0, 17488 }, /* NEG.W (An) */ -{ CPUFUNC(op_4458_0), 0, 17496 }, /* NEG.W (An)+ */ -{ CPUFUNC(op_4460_0), 0, 17504 }, /* NEG.W -(An) */ -{ CPUFUNC(op_4468_0), 0, 17512 }, /* NEG.W (d16,An) */ -{ CPUFUNC(op_4470_0), 0, 17520 }, /* NEG.W (d8,An,Xn) */ -{ CPUFUNC(op_4478_0), 0, 17528 }, /* NEG.W (xxx).W */ -{ CPUFUNC(op_4479_0), 0, 17529 }, /* NEG.W (xxx).L */ -{ CPUFUNC(op_4480_0), 0, 17536 }, /* NEG.L Dn */ -{ CPUFUNC(op_4490_0), 0, 17552 }, /* NEG.L (An) */ -{ CPUFUNC(op_4498_0), 0, 17560 }, /* NEG.L (An)+ */ -{ CPUFUNC(op_44a0_0), 0, 17568 }, /* NEG.L -(An) */ -{ CPUFUNC(op_44a8_0), 0, 17576 }, /* NEG.L (d16,An) */ -{ CPUFUNC(op_44b0_0), 0, 17584 }, /* NEG.L (d8,An,Xn) */ -{ CPUFUNC(op_44b8_0), 0, 17592 }, /* NEG.L (xxx).W */ -{ CPUFUNC(op_44b9_0), 0, 17593 }, /* NEG.L (xxx).L */ -{ CPUFUNC(op_44c0_0), 0, 17600 }, /* MV2SR.B Dn */ -{ CPUFUNC(op_44d0_0), 0, 17616 }, /* MV2SR.B (An) */ -{ CPUFUNC(op_44d8_0), 0, 17624 }, /* MV2SR.B (An)+ */ -{ CPUFUNC(op_44e0_0), 0, 17632 }, /* MV2SR.B -(An) */ -{ CPUFUNC(op_44e8_0), 0, 17640 }, /* MV2SR.B (d16,An) */ -{ CPUFUNC(op_44f0_0), 0, 17648 }, /* MV2SR.B (d8,An,Xn) */ -{ CPUFUNC(op_44f8_0), 0, 17656 }, /* MV2SR.B (xxx).W */ -{ CPUFUNC(op_44f9_0), 0, 17657 }, /* MV2SR.B (xxx).L */ -{ CPUFUNC(op_44fa_0), 0, 17658 }, /* MV2SR.B (d16,PC) */ -{ CPUFUNC(op_44fb_0), 0, 17659 }, /* MV2SR.B (d8,PC,Xn) */ -{ CPUFUNC(op_44fc_0), 0, 17660 }, /* MV2SR.B #.B */ -{ CPUFUNC(op_4600_0), 0, 17920 }, /* NOT.B Dn */ -{ CPUFUNC(op_4610_0), 0, 17936 }, /* NOT.B (An) */ -{ CPUFUNC(op_4618_0), 0, 17944 }, /* NOT.B (An)+ */ -{ CPUFUNC(op_4620_0), 0, 17952 }, /* NOT.B -(An) */ -{ CPUFUNC(op_4628_0), 0, 17960 }, /* NOT.B (d16,An) */ -{ CPUFUNC(op_4630_0), 0, 17968 }, /* NOT.B (d8,An,Xn) */ -{ CPUFUNC(op_4638_0), 0, 17976 }, /* NOT.B (xxx).W */ -{ CPUFUNC(op_4639_0), 0, 17977 }, /* NOT.B (xxx).L */ -{ CPUFUNC(op_4640_0), 0, 17984 }, /* NOT.W Dn */ -{ CPUFUNC(op_4650_0), 0, 18000 }, /* NOT.W (An) */ -{ CPUFUNC(op_4658_0), 0, 18008 }, /* NOT.W (An)+ */ -{ CPUFUNC(op_4660_0), 0, 18016 }, /* NOT.W -(An) */ -{ CPUFUNC(op_4668_0), 0, 18024 }, /* NOT.W (d16,An) */ -{ CPUFUNC(op_4670_0), 0, 18032 }, /* NOT.W (d8,An,Xn) */ -{ CPUFUNC(op_4678_0), 0, 18040 }, /* NOT.W (xxx).W */ -{ CPUFUNC(op_4679_0), 0, 18041 }, /* NOT.W (xxx).L */ -{ CPUFUNC(op_4680_0), 0, 18048 }, /* NOT.L Dn */ -{ CPUFUNC(op_4690_0), 0, 18064 }, /* NOT.L (An) */ -{ CPUFUNC(op_4698_0), 0, 18072 }, /* NOT.L (An)+ */ -{ CPUFUNC(op_46a0_0), 0, 18080 }, /* NOT.L -(An) */ -{ CPUFUNC(op_46a8_0), 0, 18088 }, /* NOT.L (d16,An) */ -{ CPUFUNC(op_46b0_0), 0, 18096 }, /* NOT.L (d8,An,Xn) */ -{ CPUFUNC(op_46b8_0), 0, 18104 }, /* NOT.L (xxx).W */ -{ CPUFUNC(op_46b9_0), 0, 18105 }, /* NOT.L (xxx).L */ -{ CPUFUNC(op_46c0_0), 0, 18112 }, /* MV2SR.W Dn */ -{ CPUFUNC(op_46d0_0), 0, 18128 }, /* MV2SR.W (An) */ -{ CPUFUNC(op_46d8_0), 0, 18136 }, /* MV2SR.W (An)+ */ -{ CPUFUNC(op_46e0_0), 0, 18144 }, /* MV2SR.W -(An) */ -{ CPUFUNC(op_46e8_0), 0, 18152 }, /* MV2SR.W (d16,An) */ -{ CPUFUNC(op_46f0_0), 0, 18160 }, /* MV2SR.W (d8,An,Xn) */ -{ CPUFUNC(op_46f8_0), 0, 18168 }, /* MV2SR.W (xxx).W */ -{ CPUFUNC(op_46f9_0), 0, 18169 }, /* MV2SR.W (xxx).L */ -{ CPUFUNC(op_46fa_0), 0, 18170 }, /* MV2SR.W (d16,PC) */ -{ CPUFUNC(op_46fb_0), 0, 18171 }, /* MV2SR.W (d8,PC,Xn) */ -{ CPUFUNC(op_46fc_0), 0, 18172 }, /* MV2SR.W #.W */ -{ CPUFUNC(op_4800_1), 0, 18432 }, /* NBCD.B Dn */ -{ CPUFUNC_FF(op_4808_0), 0, 18440 }, /* LINK.L An,#.L */ -{ CPUFUNC(op_4810_1), 0, 18448 }, /* NBCD.B (An) */ -{ CPUFUNC(op_4818_1), 0, 18456 }, /* NBCD.B (An)+ */ -{ CPUFUNC(op_4820_1), 0, 18464 }, /* NBCD.B -(An) */ -{ CPUFUNC(op_4828_1), 0, 18472 }, /* NBCD.B (d16,An) */ -{ CPUFUNC(op_4830_1), 0, 18480 }, /* NBCD.B (d8,An,Xn) */ -{ CPUFUNC(op_4838_1), 0, 18488 }, /* NBCD.B (xxx).W */ -{ CPUFUNC(op_4839_1), 0, 18489 }, /* NBCD.B (xxx).L */ -{ CPUFUNC(op_4840_0), 0, 18496 }, /* SWAP.W Dn */ -{ CPUFUNC_FF(op_4848_0), 0, 18504 }, /* BKPT.L # */ -{ CPUFUNC_FF(op_4850_0), 0, 18512 }, /* PEA.L (An) */ -{ CPUFUNC_FF(op_4868_0), 0, 18536 }, /* PEA.L (d16,An) */ -{ CPUFUNC_FF(op_4870_0), 0, 18544 }, /* PEA.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4878_0), 0, 18552 }, /* PEA.L (xxx).W */ -{ CPUFUNC_FF(op_4879_0), 0, 18553 }, /* PEA.L (xxx).L */ -{ CPUFUNC_FF(op_487a_0), 0, 18554 }, /* PEA.L (d16,PC) */ -{ CPUFUNC_FF(op_487b_0), 0, 18555 }, /* PEA.L (d8,PC,Xn) */ -{ CPUFUNC(op_4880_0), 0, 18560 }, /* EXT.W Dn */ -{ CPUFUNC_FF(op_4890_0), 0, 18576 }, /* MVMLE.W #.W,(An) */ -{ CPUFUNC_FF(op_48a0_0), 0, 18592 }, /* MVMLE.W #.W,-(An) */ -{ CPUFUNC_FF(op_48a8_0), 0, 18600 }, /* MVMLE.W #.W,(d16,An) */ -{ CPUFUNC_FF(op_48b0_0), 0, 18608 }, /* MVMLE.W #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_48b8_0), 0, 18616 }, /* MVMLE.W #.W,(xxx).W */ -{ CPUFUNC_FF(op_48b9_0), 0, 18617 }, /* MVMLE.W #.W,(xxx).L */ -{ CPUFUNC(op_48c0_0), 0, 18624 }, /* EXT.L Dn */ -{ CPUFUNC_FF(op_48d0_0), 0, 18640 }, /* MVMLE.L #.W,(An) */ -{ CPUFUNC_FF(op_48e0_0), 0, 18656 }, /* MVMLE.L #.W,-(An) */ -{ CPUFUNC_FF(op_48e8_0), 0, 18664 }, /* MVMLE.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_48f0_0), 0, 18672 }, /* MVMLE.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_48f8_0), 0, 18680 }, /* MVMLE.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_48f9_0), 0, 18681 }, /* MVMLE.L #.W,(xxx).L */ -{ CPUFUNC(op_49c0_0), 0, 18880 }, /* EXT.B Dn */ -{ CPUFUNC(op_4a00_0), 0, 18944 }, /* TST.B Dn */ -{ CPUFUNC(op_4a10_0), 0, 18960 }, /* TST.B (An) */ -{ CPUFUNC(op_4a18_0), 0, 18968 }, /* TST.B (An)+ */ -{ CPUFUNC(op_4a20_0), 0, 18976 }, /* TST.B -(An) */ -{ CPUFUNC(op_4a28_0), 0, 18984 }, /* TST.B (d16,An) */ -{ CPUFUNC(op_4a30_0), 0, 18992 }, /* TST.B (d8,An,Xn) */ -{ CPUFUNC(op_4a38_0), 0, 19000 }, /* TST.B (xxx).W */ -{ CPUFUNC(op_4a39_0), 0, 19001 }, /* TST.B (xxx).L */ -{ CPUFUNC(op_4a3a_0), 0, 19002 }, /* TST.B (d16,PC) */ -{ CPUFUNC(op_4a3b_0), 0, 19003 }, /* TST.B (d8,PC,Xn) */ -{ CPUFUNC(op_4a3c_0), 0, 19004 }, /* TST.B #.B */ -{ CPUFUNC(op_4a40_0), 0, 19008 }, /* TST.W Dn */ -{ CPUFUNC(op_4a48_0), 0, 19016 }, /* TST.W An */ -{ CPUFUNC(op_4a50_0), 0, 19024 }, /* TST.W (An) */ -{ CPUFUNC(op_4a58_0), 0, 19032 }, /* TST.W (An)+ */ -{ CPUFUNC(op_4a60_0), 0, 19040 }, /* TST.W -(An) */ -{ CPUFUNC(op_4a68_0), 0, 19048 }, /* TST.W (d16,An) */ -{ CPUFUNC(op_4a70_0), 0, 19056 }, /* TST.W (d8,An,Xn) */ -{ CPUFUNC(op_4a78_0), 0, 19064 }, /* TST.W (xxx).W */ -{ CPUFUNC(op_4a79_0), 0, 19065 }, /* TST.W (xxx).L */ -{ CPUFUNC(op_4a7a_0), 0, 19066 }, /* TST.W (d16,PC) */ -{ CPUFUNC(op_4a7b_0), 0, 19067 }, /* TST.W (d8,PC,Xn) */ -{ CPUFUNC(op_4a7c_0), 0, 19068 }, /* TST.W #.W */ -{ CPUFUNC(op_4a80_0), 0, 19072 }, /* TST.L Dn */ -{ CPUFUNC(op_4a88_0), 0, 19080 }, /* TST.L An */ -{ CPUFUNC(op_4a90_0), 0, 19088 }, /* TST.L (An) */ -{ CPUFUNC(op_4a98_0), 0, 19096 }, /* TST.L (An)+ */ -{ CPUFUNC(op_4aa0_0), 0, 19104 }, /* TST.L -(An) */ -{ CPUFUNC(op_4aa8_0), 0, 19112 }, /* TST.L (d16,An) */ -{ CPUFUNC(op_4ab0_0), 0, 19120 }, /* TST.L (d8,An,Xn) */ -{ CPUFUNC(op_4ab8_0), 0, 19128 }, /* TST.L (xxx).W */ -{ CPUFUNC(op_4ab9_0), 0, 19129 }, /* TST.L (xxx).L */ -{ CPUFUNC(op_4aba_0), 0, 19130 }, /* TST.L (d16,PC) */ -{ CPUFUNC(op_4abb_0), 0, 19131 }, /* TST.L (d8,PC,Xn) */ -{ CPUFUNC(op_4abc_0), 0, 19132 }, /* TST.L #.L */ -{ CPUFUNC(op_4ac0_0), 0, 19136 }, /* TAS.B Dn */ -{ CPUFUNC(op_4ad0_0), 0, 19152 }, /* TAS.B (An) */ -{ CPUFUNC(op_4ad8_0), 0, 19160 }, /* TAS.B (An)+ */ -{ CPUFUNC(op_4ae0_0), 0, 19168 }, /* TAS.B -(An) */ -{ CPUFUNC(op_4ae8_0), 0, 19176 }, /* TAS.B (d16,An) */ -{ CPUFUNC(op_4af0_0), 0, 19184 }, /* TAS.B (d8,An,Xn) */ -{ CPUFUNC(op_4af8_0), 0, 19192 }, /* TAS.B (xxx).W */ -{ CPUFUNC(op_4af9_0), 0, 19193 }, /* TAS.B (xxx).L */ -{ CPUFUNC(op_4c00_0), 0, 19456 }, /* MULL.L #.W,Dn */ -{ CPUFUNC(op_4c10_0), 0, 19472 }, /* MULL.L #.W,(An) */ -{ CPUFUNC(op_4c18_0), 0, 19480 }, /* MULL.L #.W,(An)+ */ -{ CPUFUNC(op_4c20_0), 0, 19488 }, /* MULL.L #.W,-(An) */ -{ CPUFUNC(op_4c28_0), 0, 19496 }, /* MULL.L #.W,(d16,An) */ -{ CPUFUNC(op_4c30_0), 0, 19504 }, /* MULL.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_4c38_0), 0, 19512 }, /* MULL.L #.W,(xxx).W */ -{ CPUFUNC(op_4c39_0), 0, 19513 }, /* MULL.L #.W,(xxx).L */ -{ CPUFUNC(op_4c3a_0), 0, 19514 }, /* MULL.L #.W,(d16,PC) */ -{ CPUFUNC(op_4c3b_0), 0, 19515 }, /* MULL.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_4c3c_0), 0, 19516 }, /* MULL.L #.W,#.L */ -{ CPUFUNC(op_4c40_0), 0, 19520 }, /* DIVL.L #.W,Dn */ -{ CPUFUNC(op_4c50_0), 0, 19536 }, /* DIVL.L #.W,(An) */ -{ CPUFUNC(op_4c58_0), 0, 19544 }, /* DIVL.L #.W,(An)+ */ -{ CPUFUNC(op_4c60_0), 0, 19552 }, /* DIVL.L #.W,-(An) */ -{ CPUFUNC(op_4c68_0), 0, 19560 }, /* DIVL.L #.W,(d16,An) */ -{ CPUFUNC(op_4c70_0), 0, 19568 }, /* DIVL.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_4c78_0), 0, 19576 }, /* DIVL.L #.W,(xxx).W */ -{ CPUFUNC(op_4c79_0), 0, 19577 }, /* DIVL.L #.W,(xxx).L */ -{ CPUFUNC(op_4c7a_0), 0, 19578 }, /* DIVL.L #.W,(d16,PC) */ -{ CPUFUNC(op_4c7b_0), 0, 19579 }, /* DIVL.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_4c7c_0), 0, 19580 }, /* DIVL.L #.W,#.L */ -{ CPUFUNC_FF(op_4c90_0), 0, 19600 }, /* MVMEL.W #.W,(An) */ -{ CPUFUNC_FF(op_4c98_0), 0, 19608 }, /* MVMEL.W #.W,(An)+ */ -{ CPUFUNC_FF(op_4ca8_0), 0, 19624 }, /* MVMEL.W #.W,(d16,An) */ -{ CPUFUNC_FF(op_4cb0_0), 0, 19632 }, /* MVMEL.W #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_4cb8_0), 0, 19640 }, /* MVMEL.W #.W,(xxx).W */ -{ CPUFUNC_FF(op_4cb9_0), 0, 19641 }, /* MVMEL.W #.W,(xxx).L */ -{ CPUFUNC_FF(op_4cba_0), 0, 19642 }, /* MVMEL.W #.W,(d16,PC) */ -{ CPUFUNC_FF(op_4cbb_0), 0, 19643 }, /* MVMEL.W #.W,(d8,PC,Xn) */ -{ CPUFUNC_FF(op_4cd0_0), 0, 19664 }, /* MVMEL.L #.W,(An) */ -{ CPUFUNC_FF(op_4cd8_0), 0, 19672 }, /* MVMEL.L #.W,(An)+ */ -{ CPUFUNC_FF(op_4ce8_0), 0, 19688 }, /* MVMEL.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_4cf0_0), 0, 19696 }, /* MVMEL.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_4cf8_0), 0, 19704 }, /* MVMEL.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_4cf9_0), 0, 19705 }, /* MVMEL.L #.W,(xxx).L */ -{ CPUFUNC_FF(op_4cfa_0), 0, 19706 }, /* MVMEL.L #.W,(d16,PC) */ -{ CPUFUNC_FF(op_4cfb_0), 0, 19707 }, /* MVMEL.L #.W,(d8,PC,Xn) */ -{ CPUFUNC_FF(op_4e40_0), 0, 20032 }, /* TRAP.L # */ -{ CPUFUNC_FF(op_4e50_0), 0, 20048 }, /* LINK.W An,#.W */ -{ CPUFUNC_FF(op_4e58_0), 0, 20056 }, /* UNLK.L An */ -{ CPUFUNC_FF(op_4e60_0), 0, 20064 }, /* MVR2USP.L An */ -{ CPUFUNC_FF(op_4e68_0), 0, 20072 }, /* MVUSP2R.L An */ -{ CPUFUNC_FF(op_4e70_0), 0, 20080 }, /* RESET.L */ -{ CPUFUNC_FF(op_4e71_0), 0, 20081 }, /* NOP.L */ -{ CPUFUNC(op_4e72_0), 0, 20082 }, /* STOP.L #.W */ -{ CPUFUNC(op_4e73_0), 0, 20083 }, /* RTE.L */ -{ CPUFUNC_FF(op_4e74_0), 0, 20084 }, /* RTD.L #.W */ -{ CPUFUNC_FF(op_4e75_0), 0, 20085 }, /* RTS.L */ -{ CPUFUNC_FF(op_4e76_0), 0, 20086 }, /* TRAPV.L */ -{ CPUFUNC(op_4e77_0), 0, 20087 }, /* RTR.L */ -{ CPUFUNC_FF(op_4e7a_0), 0, 20090 }, /* MOVEC2.L #.W */ -{ CPUFUNC_FF(op_4e7b_0), 0, 20091 }, /* MOVE2C.L #.W */ -{ CPUFUNC_FF(op_4e90_0), 0, 20112 }, /* JSR.L (An) */ -{ CPUFUNC_FF(op_4ea8_0), 0, 20136 }, /* JSR.L (d16,An) */ -{ CPUFUNC_FF(op_4eb0_0), 0, 20144 }, /* JSR.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4eb8_0), 0, 20152 }, /* JSR.L (xxx).W */ -{ CPUFUNC_FF(op_4eb9_0), 0, 20153 }, /* JSR.L (xxx).L */ -{ CPUFUNC_FF(op_4eba_0), 0, 20154 }, /* JSR.L (d16,PC) */ -{ CPUFUNC_FF(op_4ebb_0), 0, 20155 }, /* JSR.L (d8,PC,Xn) */ -{ CPUFUNC_FF(op_4ed0_0), 0, 20176 }, /* JMP.L (An) */ -{ CPUFUNC_FF(op_4ee8_0), 0, 20200 }, /* JMP.L (d16,An) */ -{ CPUFUNC_FF(op_4ef0_0), 0, 20208 }, /* JMP.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4ef8_0), 0, 20216 }, /* JMP.L (xxx).W */ -{ CPUFUNC_FF(op_4ef9_0), 0, 20217 }, /* JMP.L (xxx).L */ -{ CPUFUNC_FF(op_4efa_0), 0, 20218 }, /* JMP.L (d16,PC) */ -{ CPUFUNC_FF(op_4efb_0), 0, 20219 }, /* JMP.L (d8,PC,Xn) */ -{ CPUFUNC(op_5000_0), 0, 20480 }, /* ADD.B #,Dn */ -{ CPUFUNC(op_5010_0), 0, 20496 }, /* ADD.B #,(An) */ -{ CPUFUNC(op_5018_0), 0, 20504 }, /* ADD.B #,(An)+ */ -{ CPUFUNC(op_5020_0), 0, 20512 }, /* ADD.B #,-(An) */ -{ CPUFUNC(op_5028_0), 0, 20520 }, /* ADD.B #,(d16,An) */ -{ CPUFUNC(op_5030_0), 0, 20528 }, /* ADD.B #,(d8,An,Xn) */ -{ CPUFUNC(op_5038_0), 0, 20536 }, /* ADD.B #,(xxx).W */ -{ CPUFUNC(op_5039_0), 0, 20537 }, /* ADD.B #,(xxx).L */ -{ CPUFUNC(op_5040_0), 0, 20544 }, /* ADD.W #,Dn */ -{ CPUFUNC_FF(op_5048_0), 0, 20552 }, /* ADDA.W #,An */ -{ CPUFUNC(op_5050_0), 0, 20560 }, /* ADD.W #,(An) */ -{ CPUFUNC(op_5058_0), 0, 20568 }, /* ADD.W #,(An)+ */ -{ CPUFUNC(op_5060_0), 0, 20576 }, /* ADD.W #,-(An) */ -{ CPUFUNC(op_5068_0), 0, 20584 }, /* ADD.W #,(d16,An) */ -{ CPUFUNC(op_5070_0), 0, 20592 }, /* ADD.W #,(d8,An,Xn) */ -{ CPUFUNC(op_5078_0), 0, 20600 }, /* ADD.W #,(xxx).W */ -{ CPUFUNC(op_5079_0), 0, 20601 }, /* ADD.W #,(xxx).L */ -{ CPUFUNC(op_5080_0), 0, 20608 }, /* ADD.L #,Dn */ -{ CPUFUNC_FF(op_5088_0), 0, 20616 }, /* ADDA.L #,An */ -{ CPUFUNC(op_5090_0), 0, 20624 }, /* ADD.L #,(An) */ -{ CPUFUNC(op_5098_0), 0, 20632 }, /* ADD.L #,(An)+ */ -{ CPUFUNC(op_50a0_0), 0, 20640 }, /* ADD.L #,-(An) */ -{ CPUFUNC(op_50a8_0), 0, 20648 }, /* ADD.L #,(d16,An) */ -{ CPUFUNC(op_50b0_0), 0, 20656 }, /* ADD.L #,(d8,An,Xn) */ -{ CPUFUNC(op_50b8_0), 0, 20664 }, /* ADD.L #,(xxx).W */ -{ CPUFUNC(op_50b9_0), 0, 20665 }, /* ADD.L #,(xxx).L */ -{ CPUFUNC_FF(op_50c0_0), 0, 20672 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_50c8_0), 0, 20680 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_50d0_0), 0, 20688 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_50d8_0), 0, 20696 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_50e0_0), 0, 20704 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_50e8_0), 0, 20712 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_50f0_0), 0, 20720 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_50f8_0), 0, 20728 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_50f9_0), 0, 20729 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_50fa_0), 0, 20730 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_50fb_0), 0, 20731 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_50fc_0), 0, 20732 }, /* TRAPcc.L */ -{ CPUFUNC(op_5100_0), 0, 20736 }, /* SUB.B #,Dn */ -{ CPUFUNC(op_5110_0), 0, 20752 }, /* SUB.B #,(An) */ -{ CPUFUNC(op_5118_0), 0, 20760 }, /* SUB.B #,(An)+ */ -{ CPUFUNC(op_5120_0), 0, 20768 }, /* SUB.B #,-(An) */ -{ CPUFUNC(op_5128_0), 0, 20776 }, /* SUB.B #,(d16,An) */ -{ CPUFUNC(op_5130_0), 0, 20784 }, /* SUB.B #,(d8,An,Xn) */ -{ CPUFUNC(op_5138_0), 0, 20792 }, /* SUB.B #,(xxx).W */ -{ CPUFUNC(op_5139_0), 0, 20793 }, /* SUB.B #,(xxx).L */ -{ CPUFUNC(op_5140_0), 0, 20800 }, /* SUB.W #,Dn */ -{ CPUFUNC_FF(op_5148_0), 0, 20808 }, /* SUBA.W #,An */ -{ CPUFUNC(op_5150_0), 0, 20816 }, /* SUB.W #,(An) */ -{ CPUFUNC(op_5158_0), 0, 20824 }, /* SUB.W #,(An)+ */ -{ CPUFUNC(op_5160_0), 0, 20832 }, /* SUB.W #,-(An) */ -{ CPUFUNC(op_5168_0), 0, 20840 }, /* SUB.W #,(d16,An) */ -{ CPUFUNC(op_5170_0), 0, 20848 }, /* SUB.W #,(d8,An,Xn) */ -{ CPUFUNC(op_5178_0), 0, 20856 }, /* SUB.W #,(xxx).W */ -{ CPUFUNC(op_5179_0), 0, 20857 }, /* SUB.W #,(xxx).L */ -{ CPUFUNC(op_5180_0), 0, 20864 }, /* SUB.L #,Dn */ -{ CPUFUNC_FF(op_5188_0), 0, 20872 }, /* SUBA.L #,An */ -{ CPUFUNC(op_5190_0), 0, 20880 }, /* SUB.L #,(An) */ -{ CPUFUNC(op_5198_0), 0, 20888 }, /* SUB.L #,(An)+ */ -{ CPUFUNC(op_51a0_0), 0, 20896 }, /* SUB.L #,-(An) */ -{ CPUFUNC(op_51a8_0), 0, 20904 }, /* SUB.L #,(d16,An) */ -{ CPUFUNC(op_51b0_0), 0, 20912 }, /* SUB.L #,(d8,An,Xn) */ -{ CPUFUNC(op_51b8_0), 0, 20920 }, /* SUB.L #,(xxx).W */ -{ CPUFUNC(op_51b9_0), 0, 20921 }, /* SUB.L #,(xxx).L */ -{ CPUFUNC_FF(op_51c0_0), 0, 20928 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_51c8_0), 0, 20936 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_51d0_0), 0, 20944 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_51d8_0), 0, 20952 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_51e0_0), 0, 20960 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_51e8_0), 0, 20968 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_51f0_0), 0, 20976 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_51f8_0), 0, 20984 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_51f9_0), 0, 20985 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_51fa_0), 0, 20986 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_51fb_0), 0, 20987 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_51fc_0), 0, 20988 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_52c0_0), 0, 21184 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_52c8_0), 0, 21192 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_52d0_0), 0, 21200 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_52d8_0), 0, 21208 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_52e0_0), 0, 21216 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_52e8_0), 0, 21224 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_52f0_0), 0, 21232 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_52f8_0), 0, 21240 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_52f9_0), 0, 21241 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_52fa_0), 0, 21242 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_52fb_0), 0, 21243 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_52fc_0), 0, 21244 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_53c0_0), 0, 21440 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_53c8_0), 0, 21448 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_53d0_0), 0, 21456 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_53d8_0), 0, 21464 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_53e0_0), 0, 21472 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_53e8_0), 0, 21480 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_53f0_0), 0, 21488 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_53f8_0), 0, 21496 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_53f9_0), 0, 21497 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_53fa_0), 0, 21498 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_53fb_0), 0, 21499 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_53fc_0), 0, 21500 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_54c0_0), 0, 21696 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_54c8_0), 0, 21704 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_54d0_0), 0, 21712 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_54d8_0), 0, 21720 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_54e0_0), 0, 21728 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_54e8_0), 0, 21736 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_54f0_0), 0, 21744 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_54f8_0), 0, 21752 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_54f9_0), 0, 21753 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_54fa_0), 0, 21754 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_54fb_0), 0, 21755 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_54fc_0), 0, 21756 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_55c0_0), 0, 21952 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_55c8_0), 0, 21960 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_55d0_0), 0, 21968 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_55d8_0), 0, 21976 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_55e0_0), 0, 21984 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_55e8_0), 0, 21992 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_55f0_0), 0, 22000 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_55f8_0), 0, 22008 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_55f9_0), 0, 22009 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_55fa_0), 0, 22010 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_55fb_0), 0, 22011 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_55fc_0), 0, 22012 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_56c0_0), 0, 22208 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_56c8_0), 0, 22216 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_56d0_0), 0, 22224 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_56d8_0), 0, 22232 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_56e0_0), 0, 22240 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_56e8_0), 0, 22248 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_56f0_0), 0, 22256 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_56f8_0), 0, 22264 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_56f9_0), 0, 22265 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_56fa_0), 0, 22266 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_56fb_0), 0, 22267 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_56fc_0), 0, 22268 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_57c0_0), 0, 22464 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_57c8_0), 0, 22472 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_57d0_0), 0, 22480 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_57d8_0), 0, 22488 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_57e0_0), 0, 22496 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_57e8_0), 0, 22504 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_57f0_0), 0, 22512 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_57f8_0), 0, 22520 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_57f9_0), 0, 22521 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_57fa_0), 0, 22522 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_57fb_0), 0, 22523 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_57fc_0), 0, 22524 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_58c0_0), 0, 22720 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_58c8_0), 0, 22728 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_58d0_0), 0, 22736 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_58d8_0), 0, 22744 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_58e0_0), 0, 22752 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_58e8_0), 0, 22760 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_58f0_0), 0, 22768 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_58f8_0), 0, 22776 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_58f9_0), 0, 22777 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_58fa_0), 0, 22778 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_58fb_0), 0, 22779 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_58fc_0), 0, 22780 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_59c0_0), 0, 22976 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_59c8_0), 0, 22984 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_59d0_0), 0, 22992 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_59d8_0), 0, 23000 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_59e0_0), 0, 23008 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_59e8_0), 0, 23016 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_59f0_0), 0, 23024 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_59f8_0), 0, 23032 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_59f9_0), 0, 23033 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_59fa_0), 0, 23034 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_59fb_0), 0, 23035 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_59fc_0), 0, 23036 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5ac0_0), 0, 23232 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5ac8_0), 0, 23240 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5ad0_0), 0, 23248 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5ad8_0), 0, 23256 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ae0_0), 0, 23264 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ae8_0), 0, 23272 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5af0_0), 0, 23280 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5af8_0), 0, 23288 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5af9_0), 0, 23289 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5afa_0), 0, 23290 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5afb_0), 0, 23291 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5afc_0), 0, 23292 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5bc0_0), 0, 23488 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5bc8_0), 0, 23496 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5bd0_0), 0, 23504 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5bd8_0), 0, 23512 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5be0_0), 0, 23520 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5be8_0), 0, 23528 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5bf0_0), 0, 23536 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5bf8_0), 0, 23544 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5bf9_0), 0, 23545 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5bfa_0), 0, 23546 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5bfb_0), 0, 23547 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5bfc_0), 0, 23548 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5cc0_0), 0, 23744 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5cc8_0), 0, 23752 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5cd0_0), 0, 23760 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5cd8_0), 0, 23768 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ce0_0), 0, 23776 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ce8_0), 0, 23784 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5cf0_0), 0, 23792 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5cf8_0), 0, 23800 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5cf9_0), 0, 23801 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5cfa_0), 0, 23802 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5cfb_0), 0, 23803 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5cfc_0), 0, 23804 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5dc0_0), 0, 24000 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5dc8_0), 0, 24008 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5dd0_0), 0, 24016 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5dd8_0), 0, 24024 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5de0_0), 0, 24032 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5de8_0), 0, 24040 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5df0_0), 0, 24048 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5df8_0), 0, 24056 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5df9_0), 0, 24057 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5dfa_0), 0, 24058 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5dfb_0), 0, 24059 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5dfc_0), 0, 24060 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5ec0_0), 0, 24256 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5ec8_0), 0, 24264 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5ed0_0), 0, 24272 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5ed8_0), 0, 24280 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ee0_0), 0, 24288 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ee8_0), 0, 24296 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5ef0_0), 0, 24304 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5ef8_0), 0, 24312 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5ef9_0), 0, 24313 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5efa_0), 0, 24314 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5efb_0), 0, 24315 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5efc_0), 0, 24316 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5fc0_0), 0, 24512 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5fc8_0), 0, 24520 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5fd0_0), 0, 24528 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5fd8_0), 0, 24536 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5fe0_0), 0, 24544 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5fe8_0), 0, 24552 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5ff0_0), 0, 24560 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5ff8_0), 0, 24568 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5ff9_0), 0, 24569 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5ffa_0), 0, 24570 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5ffb_0), 0, 24571 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5ffc_0), 0, 24572 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_6000_0), 0, 24576 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6001_0), 0, 24577 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_60ff_0), 0, 24831 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6100_0), 0, 24832 }, /* BSR.W #.W */ -{ CPUFUNC_FF(op_6101_0), 0, 24833 }, /* BSR.B # */ -{ CPUFUNC_FF(op_61ff_0), 0, 25087 }, /* BSR.L #.L */ -{ CPUFUNC_FF(op_6200_0), 0, 25088 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6201_0), 0, 25089 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_62ff_0), 0, 25343 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6300_0), 0, 25344 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6301_0), 0, 25345 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_63ff_0), 0, 25599 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6400_0), 0, 25600 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6401_0), 0, 25601 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_64ff_0), 0, 25855 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6500_0), 0, 25856 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6501_0), 0, 25857 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_65ff_0), 0, 26111 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6600_0), 0, 26112 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6601_0), 0, 26113 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_66ff_0), 0, 26367 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6700_0), 0, 26368 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6701_0), 0, 26369 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_67ff_0), 0, 26623 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6800_0), 0, 26624 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6801_0), 0, 26625 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_68ff_0), 0, 26879 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6900_0), 0, 26880 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6901_0), 0, 26881 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_69ff_0), 0, 27135 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6a00_0), 0, 27136 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6a01_0), 0, 27137 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6aff_0), 0, 27391 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6b00_0), 0, 27392 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6b01_0), 0, 27393 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6bff_0), 0, 27647 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6c00_0), 0, 27648 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6c01_0), 0, 27649 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6cff_0), 0, 27903 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6d00_0), 0, 27904 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6d01_0), 0, 27905 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6dff_0), 0, 28159 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6e00_0), 0, 28160 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6e01_0), 0, 28161 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6eff_0), 0, 28415 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6f00_0), 0, 28416 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6f01_0), 0, 28417 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6fff_0), 0, 28671 }, /* Bcc.L #.L */ -{ CPUFUNC(op_7000_0), 0, 28672 }, /* MOVE.L #,Dn */ -{ CPUFUNC_FF(op_7100_0), 0, 28928 }, /* EMULOP_RETURN.L */ -{ CPUFUNC_FF(op_7101_0), 0, 28929 }, /* EMULOP.L # */ -{ CPUFUNC(op_8000_0), 0, 32768 }, /* OR.B Dn,Dn */ -{ CPUFUNC(op_8010_0), 0, 32784 }, /* OR.B (An),Dn */ -{ CPUFUNC(op_8018_0), 0, 32792 }, /* OR.B (An)+,Dn */ -{ CPUFUNC(op_8020_0), 0, 32800 }, /* OR.B -(An),Dn */ -{ CPUFUNC(op_8028_0), 0, 32808 }, /* OR.B (d16,An),Dn */ -{ CPUFUNC(op_8030_0), 0, 32816 }, /* OR.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_8038_0), 0, 32824 }, /* OR.B (xxx).W,Dn */ -{ CPUFUNC(op_8039_0), 0, 32825 }, /* OR.B (xxx).L,Dn */ -{ CPUFUNC(op_803a_0), 0, 32826 }, /* OR.B (d16,PC),Dn */ -{ CPUFUNC(op_803b_0), 0, 32827 }, /* OR.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_803c_0), 0, 32828 }, /* OR.B #.B,Dn */ -{ CPUFUNC(op_8040_0), 0, 32832 }, /* OR.W Dn,Dn */ -{ CPUFUNC(op_8050_0), 0, 32848 }, /* OR.W (An),Dn */ -{ CPUFUNC(op_8058_0), 0, 32856 }, /* OR.W (An)+,Dn */ -{ CPUFUNC(op_8060_0), 0, 32864 }, /* OR.W -(An),Dn */ -{ CPUFUNC(op_8068_0), 0, 32872 }, /* OR.W (d16,An),Dn */ -{ CPUFUNC(op_8070_0), 0, 32880 }, /* OR.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_8078_0), 0, 32888 }, /* OR.W (xxx).W,Dn */ -{ CPUFUNC(op_8079_0), 0, 32889 }, /* OR.W (xxx).L,Dn */ -{ CPUFUNC(op_807a_0), 0, 32890 }, /* OR.W (d16,PC),Dn */ -{ CPUFUNC(op_807b_0), 0, 32891 }, /* OR.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_807c_0), 0, 32892 }, /* OR.W #.W,Dn */ -{ CPUFUNC(op_8080_0), 0, 32896 }, /* OR.L Dn,Dn */ -{ CPUFUNC(op_8090_0), 0, 32912 }, /* OR.L (An),Dn */ -{ CPUFUNC(op_8098_0), 0, 32920 }, /* OR.L (An)+,Dn */ -{ CPUFUNC(op_80a0_0), 0, 32928 }, /* OR.L -(An),Dn */ -{ CPUFUNC(op_80a8_0), 0, 32936 }, /* OR.L (d16,An),Dn */ -{ CPUFUNC(op_80b0_0), 0, 32944 }, /* OR.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_80b8_0), 0, 32952 }, /* OR.L (xxx).W,Dn */ -{ CPUFUNC(op_80b9_0), 0, 32953 }, /* OR.L (xxx).L,Dn */ -{ CPUFUNC(op_80ba_0), 0, 32954 }, /* OR.L (d16,PC),Dn */ -{ CPUFUNC(op_80bb_0), 0, 32955 }, /* OR.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_80bc_0), 0, 32956 }, /* OR.L #.L,Dn */ -{ CPUFUNC(op_80c0_0), 0, 32960 }, /* DIVU.W Dn,Dn */ -{ CPUFUNC(op_80d0_0), 0, 32976 }, /* DIVU.W (An),Dn */ -{ CPUFUNC(op_80d8_0), 0, 32984 }, /* DIVU.W (An)+,Dn */ -{ CPUFUNC(op_80e0_0), 0, 32992 }, /* DIVU.W -(An),Dn */ -{ CPUFUNC(op_80e8_0), 0, 33000 }, /* DIVU.W (d16,An),Dn */ -{ CPUFUNC(op_80f0_0), 0, 33008 }, /* DIVU.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_80f8_0), 0, 33016 }, /* DIVU.W (xxx).W,Dn */ -{ CPUFUNC(op_80f9_0), 0, 33017 }, /* DIVU.W (xxx).L,Dn */ -{ CPUFUNC(op_80fa_0), 0, 33018 }, /* DIVU.W (d16,PC),Dn */ -{ CPUFUNC(op_80fb_0), 0, 33019 }, /* DIVU.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_80fc_0), 0, 33020 }, /* DIVU.W #.W,Dn */ -{ CPUFUNC(op_8100_1), 0, 33024 }, /* SBCD.B Dn,Dn */ -{ CPUFUNC(op_8108_1), 0, 33032 }, /* SBCD.B -(An),-(An) */ -{ CPUFUNC(op_8110_0), 0, 33040 }, /* OR.B Dn,(An) */ -{ CPUFUNC(op_8118_0), 0, 33048 }, /* OR.B Dn,(An)+ */ -{ CPUFUNC(op_8120_0), 0, 33056 }, /* OR.B Dn,-(An) */ -{ CPUFUNC(op_8128_0), 0, 33064 }, /* OR.B Dn,(d16,An) */ -{ CPUFUNC(op_8130_0), 0, 33072 }, /* OR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_8138_0), 0, 33080 }, /* OR.B Dn,(xxx).W */ -{ CPUFUNC(op_8139_0), 0, 33081 }, /* OR.B Dn,(xxx).L */ -{ CPUFUNC_FF(op_8140_0), 0, 33088 }, /* PACK.L Dn,Dn */ -{ CPUFUNC_FF(op_8148_0), 0, 33096 }, /* PACK.L -(An),-(An) */ -{ CPUFUNC(op_8150_0), 0, 33104 }, /* OR.W Dn,(An) */ -{ CPUFUNC(op_8158_0), 0, 33112 }, /* OR.W Dn,(An)+ */ -{ CPUFUNC(op_8160_0), 0, 33120 }, /* OR.W Dn,-(An) */ -{ CPUFUNC(op_8168_0), 0, 33128 }, /* OR.W Dn,(d16,An) */ -{ CPUFUNC(op_8170_0), 0, 33136 }, /* OR.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_8178_0), 0, 33144 }, /* OR.W Dn,(xxx).W */ -{ CPUFUNC(op_8179_0), 0, 33145 }, /* OR.W Dn,(xxx).L */ -{ CPUFUNC_FF(op_8180_0), 0, 33152 }, /* UNPK.L Dn,Dn */ -{ CPUFUNC_FF(op_8188_0), 0, 33160 }, /* UNPK.L -(An),-(An) */ -{ CPUFUNC(op_8190_0), 0, 33168 }, /* OR.L Dn,(An) */ -{ CPUFUNC(op_8198_0), 0, 33176 }, /* OR.L Dn,(An)+ */ -{ CPUFUNC(op_81a0_0), 0, 33184 }, /* OR.L Dn,-(An) */ -{ CPUFUNC(op_81a8_0), 0, 33192 }, /* OR.L Dn,(d16,An) */ -{ CPUFUNC(op_81b0_0), 0, 33200 }, /* OR.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_81b8_0), 0, 33208 }, /* OR.L Dn,(xxx).W */ -{ CPUFUNC(op_81b9_0), 0, 33209 }, /* OR.L Dn,(xxx).L */ -{ CPUFUNC(op_81c0_0), 0, 33216 }, /* DIVS.W Dn,Dn */ -{ CPUFUNC(op_81d0_0), 0, 33232 }, /* DIVS.W (An),Dn */ -{ CPUFUNC(op_81d8_0), 0, 33240 }, /* DIVS.W (An)+,Dn */ -{ CPUFUNC(op_81e0_0), 0, 33248 }, /* DIVS.W -(An),Dn */ -{ CPUFUNC(op_81e8_0), 0, 33256 }, /* DIVS.W (d16,An),Dn */ -{ CPUFUNC(op_81f0_0), 0, 33264 }, /* DIVS.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_81f8_0), 0, 33272 }, /* DIVS.W (xxx).W,Dn */ -{ CPUFUNC(op_81f9_0), 0, 33273 }, /* DIVS.W (xxx).L,Dn */ -{ CPUFUNC(op_81fa_0), 0, 33274 }, /* DIVS.W (d16,PC),Dn */ -{ CPUFUNC(op_81fb_0), 0, 33275 }, /* DIVS.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_81fc_0), 0, 33276 }, /* DIVS.W #.W,Dn */ -{ CPUFUNC(op_9000_0), 0, 36864 }, /* SUB.B Dn,Dn */ -{ CPUFUNC(op_9010_0), 0, 36880 }, /* SUB.B (An),Dn */ -{ CPUFUNC(op_9018_0), 0, 36888 }, /* SUB.B (An)+,Dn */ -{ CPUFUNC(op_9020_0), 0, 36896 }, /* SUB.B -(An),Dn */ -{ CPUFUNC(op_9028_0), 0, 36904 }, /* SUB.B (d16,An),Dn */ -{ CPUFUNC(op_9030_0), 0, 36912 }, /* SUB.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_9038_0), 0, 36920 }, /* SUB.B (xxx).W,Dn */ -{ CPUFUNC(op_9039_0), 0, 36921 }, /* SUB.B (xxx).L,Dn */ -{ CPUFUNC(op_903a_0), 0, 36922 }, /* SUB.B (d16,PC),Dn */ -{ CPUFUNC(op_903b_0), 0, 36923 }, /* SUB.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_903c_0), 0, 36924 }, /* SUB.B #.B,Dn */ -{ CPUFUNC(op_9040_0), 0, 36928 }, /* SUB.W Dn,Dn */ -{ CPUFUNC(op_9048_0), 0, 36936 }, /* SUB.W An,Dn */ -{ CPUFUNC(op_9050_0), 0, 36944 }, /* SUB.W (An),Dn */ -{ CPUFUNC(op_9058_0), 0, 36952 }, /* SUB.W (An)+,Dn */ -{ CPUFUNC(op_9060_0), 0, 36960 }, /* SUB.W -(An),Dn */ -{ CPUFUNC(op_9068_0), 0, 36968 }, /* SUB.W (d16,An),Dn */ -{ CPUFUNC(op_9070_0), 0, 36976 }, /* SUB.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_9078_0), 0, 36984 }, /* SUB.W (xxx).W,Dn */ -{ CPUFUNC(op_9079_0), 0, 36985 }, /* SUB.W (xxx).L,Dn */ -{ CPUFUNC(op_907a_0), 0, 36986 }, /* SUB.W (d16,PC),Dn */ -{ CPUFUNC(op_907b_0), 0, 36987 }, /* SUB.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_907c_0), 0, 36988 }, /* SUB.W #.W,Dn */ -{ CPUFUNC(op_9080_0), 0, 36992 }, /* SUB.L Dn,Dn */ -{ CPUFUNC(op_9088_0), 0, 37000 }, /* SUB.L An,Dn */ -{ CPUFUNC(op_9090_0), 0, 37008 }, /* SUB.L (An),Dn */ -{ CPUFUNC(op_9098_0), 0, 37016 }, /* SUB.L (An)+,Dn */ -{ CPUFUNC(op_90a0_0), 0, 37024 }, /* SUB.L -(An),Dn */ -{ CPUFUNC(op_90a8_0), 0, 37032 }, /* SUB.L (d16,An),Dn */ -{ CPUFUNC(op_90b0_0), 0, 37040 }, /* SUB.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_90b8_0), 0, 37048 }, /* SUB.L (xxx).W,Dn */ -{ CPUFUNC(op_90b9_0), 0, 37049 }, /* SUB.L (xxx).L,Dn */ -{ CPUFUNC(op_90ba_0), 0, 37050 }, /* SUB.L (d16,PC),Dn */ -{ CPUFUNC(op_90bb_0), 0, 37051 }, /* SUB.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_90bc_0), 0, 37052 }, /* SUB.L #.L,Dn */ -{ CPUFUNC_FF(op_90c0_0), 0, 37056 }, /* SUBA.W Dn,An */ -{ CPUFUNC_FF(op_90c8_0), 0, 37064 }, /* SUBA.W An,An */ -{ CPUFUNC_FF(op_90d0_0), 0, 37072 }, /* SUBA.W (An),An */ -{ CPUFUNC_FF(op_90d8_0), 0, 37080 }, /* SUBA.W (An)+,An */ -{ CPUFUNC_FF(op_90e0_0), 0, 37088 }, /* SUBA.W -(An),An */ -{ CPUFUNC_FF(op_90e8_0), 0, 37096 }, /* SUBA.W (d16,An),An */ -{ CPUFUNC_FF(op_90f0_0), 0, 37104 }, /* SUBA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_90f8_0), 0, 37112 }, /* SUBA.W (xxx).W,An */ -{ CPUFUNC_FF(op_90f9_0), 0, 37113 }, /* SUBA.W (xxx).L,An */ -{ CPUFUNC_FF(op_90fa_0), 0, 37114 }, /* SUBA.W (d16,PC),An */ -{ CPUFUNC_FF(op_90fb_0), 0, 37115 }, /* SUBA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_90fc_0), 0, 37116 }, /* SUBA.W #.W,An */ -{ CPUFUNC(op_9100_0), 0, 37120 }, /* SUBX.B Dn,Dn */ -{ CPUFUNC(op_9108_0), 0, 37128 }, /* SUBX.B -(An),-(An) */ -{ CPUFUNC(op_9110_0), 0, 37136 }, /* SUB.B Dn,(An) */ -{ CPUFUNC(op_9118_0), 0, 37144 }, /* SUB.B Dn,(An)+ */ -{ CPUFUNC(op_9120_0), 0, 37152 }, /* SUB.B Dn,-(An) */ -{ CPUFUNC(op_9128_0), 0, 37160 }, /* SUB.B Dn,(d16,An) */ -{ CPUFUNC(op_9130_0), 0, 37168 }, /* SUB.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_9138_0), 0, 37176 }, /* SUB.B Dn,(xxx).W */ -{ CPUFUNC(op_9139_0), 0, 37177 }, /* SUB.B Dn,(xxx).L */ -{ CPUFUNC(op_9140_0), 0, 37184 }, /* SUBX.W Dn,Dn */ -{ CPUFUNC(op_9148_0), 0, 37192 }, /* SUBX.W -(An),-(An) */ -{ CPUFUNC(op_9150_0), 0, 37200 }, /* SUB.W Dn,(An) */ -{ CPUFUNC(op_9158_0), 0, 37208 }, /* SUB.W Dn,(An)+ */ -{ CPUFUNC(op_9160_0), 0, 37216 }, /* SUB.W Dn,-(An) */ -{ CPUFUNC(op_9168_0), 0, 37224 }, /* SUB.W Dn,(d16,An) */ -{ CPUFUNC(op_9170_0), 0, 37232 }, /* SUB.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_9178_0), 0, 37240 }, /* SUB.W Dn,(xxx).W */ -{ CPUFUNC(op_9179_0), 0, 37241 }, /* SUB.W Dn,(xxx).L */ -{ CPUFUNC(op_9180_0), 0, 37248 }, /* SUBX.L Dn,Dn */ -{ CPUFUNC(op_9188_0), 0, 37256 }, /* SUBX.L -(An),-(An) */ -{ CPUFUNC(op_9190_0), 0, 37264 }, /* SUB.L Dn,(An) */ -{ CPUFUNC(op_9198_0), 0, 37272 }, /* SUB.L Dn,(An)+ */ -{ CPUFUNC(op_91a0_0), 0, 37280 }, /* SUB.L Dn,-(An) */ -{ CPUFUNC(op_91a8_0), 0, 37288 }, /* SUB.L Dn,(d16,An) */ -{ CPUFUNC(op_91b0_0), 0, 37296 }, /* SUB.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_91b8_0), 0, 37304 }, /* SUB.L Dn,(xxx).W */ -{ CPUFUNC(op_91b9_0), 0, 37305 }, /* SUB.L Dn,(xxx).L */ -{ CPUFUNC_FF(op_91c0_0), 0, 37312 }, /* SUBA.L Dn,An */ -{ CPUFUNC_FF(op_91c8_0), 0, 37320 }, /* SUBA.L An,An */ -{ CPUFUNC_FF(op_91d0_0), 0, 37328 }, /* SUBA.L (An),An */ -{ CPUFUNC_FF(op_91d8_0), 0, 37336 }, /* SUBA.L (An)+,An */ -{ CPUFUNC_FF(op_91e0_0), 0, 37344 }, /* SUBA.L -(An),An */ -{ CPUFUNC_FF(op_91e8_0), 0, 37352 }, /* SUBA.L (d16,An),An */ -{ CPUFUNC_FF(op_91f0_0), 0, 37360 }, /* SUBA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_91f8_0), 0, 37368 }, /* SUBA.L (xxx).W,An */ -{ CPUFUNC_FF(op_91f9_0), 0, 37369 }, /* SUBA.L (xxx).L,An */ -{ CPUFUNC_FF(op_91fa_0), 0, 37370 }, /* SUBA.L (d16,PC),An */ -{ CPUFUNC_FF(op_91fb_0), 0, 37371 }, /* SUBA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_91fc_0), 0, 37372 }, /* SUBA.L #.L,An */ -{ CPUFUNC(op_b000_0), 0, 45056 }, /* CMP.B Dn,Dn */ -{ CPUFUNC(op_b010_0), 0, 45072 }, /* CMP.B (An),Dn */ -{ CPUFUNC(op_b018_0), 0, 45080 }, /* CMP.B (An)+,Dn */ -{ CPUFUNC(op_b020_0), 0, 45088 }, /* CMP.B -(An),Dn */ -{ CPUFUNC(op_b028_0), 0, 45096 }, /* CMP.B (d16,An),Dn */ -{ CPUFUNC(op_b030_0), 0, 45104 }, /* CMP.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_b038_0), 0, 45112 }, /* CMP.B (xxx).W,Dn */ -{ CPUFUNC(op_b039_0), 0, 45113 }, /* CMP.B (xxx).L,Dn */ -{ CPUFUNC(op_b03a_0), 0, 45114 }, /* CMP.B (d16,PC),Dn */ -{ CPUFUNC(op_b03b_0), 0, 45115 }, /* CMP.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b03c_0), 0, 45116 }, /* CMP.B #.B,Dn */ -{ CPUFUNC(op_b040_0), 0, 45120 }, /* CMP.W Dn,Dn */ -{ CPUFUNC(op_b048_0), 0, 45128 }, /* CMP.W An,Dn */ -{ CPUFUNC(op_b050_0), 0, 45136 }, /* CMP.W (An),Dn */ -{ CPUFUNC(op_b058_0), 0, 45144 }, /* CMP.W (An)+,Dn */ -{ CPUFUNC(op_b060_0), 0, 45152 }, /* CMP.W -(An),Dn */ -{ CPUFUNC(op_b068_0), 0, 45160 }, /* CMP.W (d16,An),Dn */ -{ CPUFUNC(op_b070_0), 0, 45168 }, /* CMP.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_b078_0), 0, 45176 }, /* CMP.W (xxx).W,Dn */ -{ CPUFUNC(op_b079_0), 0, 45177 }, /* CMP.W (xxx).L,Dn */ -{ CPUFUNC(op_b07a_0), 0, 45178 }, /* CMP.W (d16,PC),Dn */ -{ CPUFUNC(op_b07b_0), 0, 45179 }, /* CMP.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b07c_0), 0, 45180 }, /* CMP.W #.W,Dn */ -{ CPUFUNC(op_b080_0), 0, 45184 }, /* CMP.L Dn,Dn */ -{ CPUFUNC(op_b088_0), 0, 45192 }, /* CMP.L An,Dn */ -{ CPUFUNC(op_b090_0), 0, 45200 }, /* CMP.L (An),Dn */ -{ CPUFUNC(op_b098_0), 0, 45208 }, /* CMP.L (An)+,Dn */ -{ CPUFUNC(op_b0a0_0), 0, 45216 }, /* CMP.L -(An),Dn */ -{ CPUFUNC(op_b0a8_0), 0, 45224 }, /* CMP.L (d16,An),Dn */ -{ CPUFUNC(op_b0b0_0), 0, 45232 }, /* CMP.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_b0b8_0), 0, 45240 }, /* CMP.L (xxx).W,Dn */ -{ CPUFUNC(op_b0b9_0), 0, 45241 }, /* CMP.L (xxx).L,Dn */ -{ CPUFUNC(op_b0ba_0), 0, 45242 }, /* CMP.L (d16,PC),Dn */ -{ CPUFUNC(op_b0bb_0), 0, 45243 }, /* CMP.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b0bc_0), 0, 45244 }, /* CMP.L #.L,Dn */ -{ CPUFUNC(op_b0c0_0), 0, 45248 }, /* CMPA.W Dn,An */ -{ CPUFUNC(op_b0c8_0), 0, 45256 }, /* CMPA.W An,An */ -{ CPUFUNC(op_b0d0_0), 0, 45264 }, /* CMPA.W (An),An */ -{ CPUFUNC(op_b0d8_0), 0, 45272 }, /* CMPA.W (An)+,An */ -{ CPUFUNC(op_b0e0_0), 0, 45280 }, /* CMPA.W -(An),An */ -{ CPUFUNC(op_b0e8_0), 0, 45288 }, /* CMPA.W (d16,An),An */ -{ CPUFUNC(op_b0f0_0), 0, 45296 }, /* CMPA.W (d8,An,Xn),An */ -{ CPUFUNC(op_b0f8_0), 0, 45304 }, /* CMPA.W (xxx).W,An */ -{ CPUFUNC(op_b0f9_0), 0, 45305 }, /* CMPA.W (xxx).L,An */ -{ CPUFUNC(op_b0fa_0), 0, 45306 }, /* CMPA.W (d16,PC),An */ -{ CPUFUNC(op_b0fb_0), 0, 45307 }, /* CMPA.W (d8,PC,Xn),An */ -{ CPUFUNC(op_b0fc_0), 0, 45308 }, /* CMPA.W #.W,An */ -{ CPUFUNC(op_b100_0), 0, 45312 }, /* EOR.B Dn,Dn */ -{ CPUFUNC(op_b108_0), 0, 45320 }, /* CMPM.B (An)+,(An)+ */ -{ CPUFUNC(op_b110_0), 0, 45328 }, /* EOR.B Dn,(An) */ -{ CPUFUNC(op_b118_0), 0, 45336 }, /* EOR.B Dn,(An)+ */ -{ CPUFUNC(op_b120_0), 0, 45344 }, /* EOR.B Dn,-(An) */ -{ CPUFUNC(op_b128_0), 0, 45352 }, /* EOR.B Dn,(d16,An) */ -{ CPUFUNC(op_b130_0), 0, 45360 }, /* EOR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b138_0), 0, 45368 }, /* EOR.B Dn,(xxx).W */ -{ CPUFUNC(op_b139_0), 0, 45369 }, /* EOR.B Dn,(xxx).L */ -{ CPUFUNC(op_b140_0), 0, 45376 }, /* EOR.W Dn,Dn */ -{ CPUFUNC(op_b148_0), 0, 45384 }, /* CMPM.W (An)+,(An)+ */ -{ CPUFUNC(op_b150_0), 0, 45392 }, /* EOR.W Dn,(An) */ -{ CPUFUNC(op_b158_0), 0, 45400 }, /* EOR.W Dn,(An)+ */ -{ CPUFUNC(op_b160_0), 0, 45408 }, /* EOR.W Dn,-(An) */ -{ CPUFUNC(op_b168_0), 0, 45416 }, /* EOR.W Dn,(d16,An) */ -{ CPUFUNC(op_b170_0), 0, 45424 }, /* EOR.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b178_0), 0, 45432 }, /* EOR.W Dn,(xxx).W */ -{ CPUFUNC(op_b179_0), 0, 45433 }, /* EOR.W Dn,(xxx).L */ -{ CPUFUNC(op_b180_0), 0, 45440 }, /* EOR.L Dn,Dn */ -{ CPUFUNC(op_b188_0), 0, 45448 }, /* CMPM.L (An)+,(An)+ */ -{ CPUFUNC(op_b190_0), 0, 45456 }, /* EOR.L Dn,(An) */ -{ CPUFUNC(op_b198_0), 0, 45464 }, /* EOR.L Dn,(An)+ */ -{ CPUFUNC(op_b1a0_0), 0, 45472 }, /* EOR.L Dn,-(An) */ -{ CPUFUNC(op_b1a8_0), 0, 45480 }, /* EOR.L Dn,(d16,An) */ -{ CPUFUNC(op_b1b0_0), 0, 45488 }, /* EOR.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b1b8_0), 0, 45496 }, /* EOR.L Dn,(xxx).W */ -{ CPUFUNC(op_b1b9_0), 0, 45497 }, /* EOR.L Dn,(xxx).L */ -{ CPUFUNC(op_b1c0_0), 0, 45504 }, /* CMPA.L Dn,An */ -{ CPUFUNC(op_b1c8_0), 0, 45512 }, /* CMPA.L An,An */ -{ CPUFUNC(op_b1d0_0), 0, 45520 }, /* CMPA.L (An),An */ -{ CPUFUNC(op_b1d8_0), 0, 45528 }, /* CMPA.L (An)+,An */ -{ CPUFUNC(op_b1e0_0), 0, 45536 }, /* CMPA.L -(An),An */ -{ CPUFUNC(op_b1e8_0), 0, 45544 }, /* CMPA.L (d16,An),An */ -{ CPUFUNC(op_b1f0_0), 0, 45552 }, /* CMPA.L (d8,An,Xn),An */ -{ CPUFUNC(op_b1f8_0), 0, 45560 }, /* CMPA.L (xxx).W,An */ -{ CPUFUNC(op_b1f9_0), 0, 45561 }, /* CMPA.L (xxx).L,An */ -{ CPUFUNC(op_b1fa_0), 0, 45562 }, /* CMPA.L (d16,PC),An */ -{ CPUFUNC(op_b1fb_0), 0, 45563 }, /* CMPA.L (d8,PC,Xn),An */ -{ CPUFUNC(op_b1fc_0), 0, 45564 }, /* CMPA.L #.L,An */ -{ CPUFUNC(op_c000_0), 0, 49152 }, /* AND.B Dn,Dn */ -{ CPUFUNC(op_c010_0), 0, 49168 }, /* AND.B (An),Dn */ -{ CPUFUNC(op_c018_0), 0, 49176 }, /* AND.B (An)+,Dn */ -{ CPUFUNC(op_c020_0), 0, 49184 }, /* AND.B -(An),Dn */ -{ CPUFUNC(op_c028_0), 0, 49192 }, /* AND.B (d16,An),Dn */ -{ CPUFUNC(op_c030_0), 0, 49200 }, /* AND.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_c038_0), 0, 49208 }, /* AND.B (xxx).W,Dn */ -{ CPUFUNC(op_c039_0), 0, 49209 }, /* AND.B (xxx).L,Dn */ -{ CPUFUNC(op_c03a_0), 0, 49210 }, /* AND.B (d16,PC),Dn */ -{ CPUFUNC(op_c03b_0), 0, 49211 }, /* AND.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c03c_0), 0, 49212 }, /* AND.B #.B,Dn */ -{ CPUFUNC(op_c040_0), 0, 49216 }, /* AND.W Dn,Dn */ -{ CPUFUNC(op_c050_0), 0, 49232 }, /* AND.W (An),Dn */ -{ CPUFUNC(op_c058_0), 0, 49240 }, /* AND.W (An)+,Dn */ -{ CPUFUNC(op_c060_0), 0, 49248 }, /* AND.W -(An),Dn */ -{ CPUFUNC(op_c068_0), 0, 49256 }, /* AND.W (d16,An),Dn */ -{ CPUFUNC(op_c070_0), 0, 49264 }, /* AND.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c078_0), 0, 49272 }, /* AND.W (xxx).W,Dn */ -{ CPUFUNC(op_c079_0), 0, 49273 }, /* AND.W (xxx).L,Dn */ -{ CPUFUNC(op_c07a_0), 0, 49274 }, /* AND.W (d16,PC),Dn */ -{ CPUFUNC(op_c07b_0), 0, 49275 }, /* AND.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c07c_0), 0, 49276 }, /* AND.W #.W,Dn */ -{ CPUFUNC(op_c080_0), 0, 49280 }, /* AND.L Dn,Dn */ -{ CPUFUNC(op_c090_0), 0, 49296 }, /* AND.L (An),Dn */ -{ CPUFUNC(op_c098_0), 0, 49304 }, /* AND.L (An)+,Dn */ -{ CPUFUNC(op_c0a0_0), 0, 49312 }, /* AND.L -(An),Dn */ -{ CPUFUNC(op_c0a8_0), 0, 49320 }, /* AND.L (d16,An),Dn */ -{ CPUFUNC(op_c0b0_0), 0, 49328 }, /* AND.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_c0b8_0), 0, 49336 }, /* AND.L (xxx).W,Dn */ -{ CPUFUNC(op_c0b9_0), 0, 49337 }, /* AND.L (xxx).L,Dn */ -{ CPUFUNC(op_c0ba_0), 0, 49338 }, /* AND.L (d16,PC),Dn */ -{ CPUFUNC(op_c0bb_0), 0, 49339 }, /* AND.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c0bc_0), 0, 49340 }, /* AND.L #.L,Dn */ -{ CPUFUNC(op_c0c0_0), 0, 49344 }, /* MULU.W Dn,Dn */ -{ CPUFUNC(op_c0d0_0), 0, 49360 }, /* MULU.W (An),Dn */ -{ CPUFUNC(op_c0d8_0), 0, 49368 }, /* MULU.W (An)+,Dn */ -{ CPUFUNC(op_c0e0_0), 0, 49376 }, /* MULU.W -(An),Dn */ -{ CPUFUNC(op_c0e8_0), 0, 49384 }, /* MULU.W (d16,An),Dn */ -{ CPUFUNC(op_c0f0_0), 0, 49392 }, /* MULU.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c0f8_0), 0, 49400 }, /* MULU.W (xxx).W,Dn */ -{ CPUFUNC(op_c0f9_0), 0, 49401 }, /* MULU.W (xxx).L,Dn */ -{ CPUFUNC(op_c0fa_0), 0, 49402 }, /* MULU.W (d16,PC),Dn */ -{ CPUFUNC(op_c0fb_0), 0, 49403 }, /* MULU.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c0fc_0), 0, 49404 }, /* MULU.W #.W,Dn */ -{ CPUFUNC(op_c100_1), 0, 49408 }, /* ABCD.B Dn,Dn */ -{ CPUFUNC(op_c108_1), 0, 49416 }, /* ABCD.B -(An),-(An) */ -{ CPUFUNC(op_c110_0), 0, 49424 }, /* AND.B Dn,(An) */ -{ CPUFUNC(op_c118_0), 0, 49432 }, /* AND.B Dn,(An)+ */ -{ CPUFUNC(op_c120_0), 0, 49440 }, /* AND.B Dn,-(An) */ -{ CPUFUNC(op_c128_0), 0, 49448 }, /* AND.B Dn,(d16,An) */ -{ CPUFUNC(op_c130_0), 0, 49456 }, /* AND.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c138_0), 0, 49464 }, /* AND.B Dn,(xxx).W */ -{ CPUFUNC(op_c139_0), 0, 49465 }, /* AND.B Dn,(xxx).L */ -{ CPUFUNC_FF(op_c140_0), 0, 49472 }, /* EXG.L Dn,Dn */ -{ CPUFUNC_FF(op_c148_0), 0, 49480 }, /* EXG.L An,An */ -{ CPUFUNC(op_c150_0), 0, 49488 }, /* AND.W Dn,(An) */ -{ CPUFUNC(op_c158_0), 0, 49496 }, /* AND.W Dn,(An)+ */ -{ CPUFUNC(op_c160_0), 0, 49504 }, /* AND.W Dn,-(An) */ -{ CPUFUNC(op_c168_0), 0, 49512 }, /* AND.W Dn,(d16,An) */ -{ CPUFUNC(op_c170_0), 0, 49520 }, /* AND.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c178_0), 0, 49528 }, /* AND.W Dn,(xxx).W */ -{ CPUFUNC(op_c179_0), 0, 49529 }, /* AND.W Dn,(xxx).L */ -{ CPUFUNC_FF(op_c188_0), 0, 49544 }, /* EXG.L Dn,An */ -{ CPUFUNC(op_c190_0), 0, 49552 }, /* AND.L Dn,(An) */ -{ CPUFUNC(op_c198_0), 0, 49560 }, /* AND.L Dn,(An)+ */ -{ CPUFUNC(op_c1a0_0), 0, 49568 }, /* AND.L Dn,-(An) */ -{ CPUFUNC(op_c1a8_0), 0, 49576 }, /* AND.L Dn,(d16,An) */ -{ CPUFUNC(op_c1b0_0), 0, 49584 }, /* AND.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c1b8_0), 0, 49592 }, /* AND.L Dn,(xxx).W */ -{ CPUFUNC(op_c1b9_0), 0, 49593 }, /* AND.L Dn,(xxx).L */ -{ CPUFUNC(op_c1c0_0), 0, 49600 }, /* MULS.W Dn,Dn */ -{ CPUFUNC(op_c1d0_0), 0, 49616 }, /* MULS.W (An),Dn */ -{ CPUFUNC(op_c1d8_0), 0, 49624 }, /* MULS.W (An)+,Dn */ -{ CPUFUNC(op_c1e0_0), 0, 49632 }, /* MULS.W -(An),Dn */ -{ CPUFUNC(op_c1e8_0), 0, 49640 }, /* MULS.W (d16,An),Dn */ -{ CPUFUNC(op_c1f0_0), 0, 49648 }, /* MULS.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c1f8_0), 0, 49656 }, /* MULS.W (xxx).W,Dn */ -{ CPUFUNC(op_c1f9_0), 0, 49657 }, /* MULS.W (xxx).L,Dn */ -{ CPUFUNC(op_c1fa_0), 0, 49658 }, /* MULS.W (d16,PC),Dn */ -{ CPUFUNC(op_c1fb_0), 0, 49659 }, /* MULS.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c1fc_0), 0, 49660 }, /* MULS.W #.W,Dn */ -{ CPUFUNC(op_d000_0), 0, 53248 }, /* ADD.B Dn,Dn */ -{ CPUFUNC(op_d010_0), 0, 53264 }, /* ADD.B (An),Dn */ -{ CPUFUNC(op_d018_0), 0, 53272 }, /* ADD.B (An)+,Dn */ -{ CPUFUNC(op_d020_0), 0, 53280 }, /* ADD.B -(An),Dn */ -{ CPUFUNC(op_d028_0), 0, 53288 }, /* ADD.B (d16,An),Dn */ -{ CPUFUNC(op_d030_0), 0, 53296 }, /* ADD.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_d038_0), 0, 53304 }, /* ADD.B (xxx).W,Dn */ -{ CPUFUNC(op_d039_0), 0, 53305 }, /* ADD.B (xxx).L,Dn */ -{ CPUFUNC(op_d03a_0), 0, 53306 }, /* ADD.B (d16,PC),Dn */ -{ CPUFUNC(op_d03b_0), 0, 53307 }, /* ADD.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d03c_0), 0, 53308 }, /* ADD.B #.B,Dn */ -{ CPUFUNC(op_d040_0), 0, 53312 }, /* ADD.W Dn,Dn */ -{ CPUFUNC(op_d048_0), 0, 53320 }, /* ADD.W An,Dn */ -{ CPUFUNC(op_d050_0), 0, 53328 }, /* ADD.W (An),Dn */ -{ CPUFUNC(op_d058_0), 0, 53336 }, /* ADD.W (An)+,Dn */ -{ CPUFUNC(op_d060_0), 0, 53344 }, /* ADD.W -(An),Dn */ -{ CPUFUNC(op_d068_0), 0, 53352 }, /* ADD.W (d16,An),Dn */ -{ CPUFUNC(op_d070_0), 0, 53360 }, /* ADD.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_d078_0), 0, 53368 }, /* ADD.W (xxx).W,Dn */ -{ CPUFUNC(op_d079_0), 0, 53369 }, /* ADD.W (xxx).L,Dn */ -{ CPUFUNC(op_d07a_0), 0, 53370 }, /* ADD.W (d16,PC),Dn */ -{ CPUFUNC(op_d07b_0), 0, 53371 }, /* ADD.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d07c_0), 0, 53372 }, /* ADD.W #.W,Dn */ -{ CPUFUNC(op_d080_0), 0, 53376 }, /* ADD.L Dn,Dn */ -{ CPUFUNC(op_d088_0), 0, 53384 }, /* ADD.L An,Dn */ -{ CPUFUNC(op_d090_0), 0, 53392 }, /* ADD.L (An),Dn */ -{ CPUFUNC(op_d098_0), 0, 53400 }, /* ADD.L (An)+,Dn */ -{ CPUFUNC(op_d0a0_0), 0, 53408 }, /* ADD.L -(An),Dn */ -{ CPUFUNC(op_d0a8_0), 0, 53416 }, /* ADD.L (d16,An),Dn */ -{ CPUFUNC(op_d0b0_0), 0, 53424 }, /* ADD.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_d0b8_0), 0, 53432 }, /* ADD.L (xxx).W,Dn */ -{ CPUFUNC(op_d0b9_0), 0, 53433 }, /* ADD.L (xxx).L,Dn */ -{ CPUFUNC(op_d0ba_0), 0, 53434 }, /* ADD.L (d16,PC),Dn */ -{ CPUFUNC(op_d0bb_0), 0, 53435 }, /* ADD.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d0bc_0), 0, 53436 }, /* ADD.L #.L,Dn */ -{ CPUFUNC_FF(op_d0c0_0), 0, 53440 }, /* ADDA.W Dn,An */ -{ CPUFUNC_FF(op_d0c8_0), 0, 53448 }, /* ADDA.W An,An */ -{ CPUFUNC_FF(op_d0d0_0), 0, 53456 }, /* ADDA.W (An),An */ -{ CPUFUNC_FF(op_d0d8_0), 0, 53464 }, /* ADDA.W (An)+,An */ -{ CPUFUNC_FF(op_d0e0_0), 0, 53472 }, /* ADDA.W -(An),An */ -{ CPUFUNC_FF(op_d0e8_0), 0, 53480 }, /* ADDA.W (d16,An),An */ -{ CPUFUNC_FF(op_d0f0_0), 0, 53488 }, /* ADDA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_d0f8_0), 0, 53496 }, /* ADDA.W (xxx).W,An */ -{ CPUFUNC_FF(op_d0f9_0), 0, 53497 }, /* ADDA.W (xxx).L,An */ -{ CPUFUNC_FF(op_d0fa_0), 0, 53498 }, /* ADDA.W (d16,PC),An */ -{ CPUFUNC_FF(op_d0fb_0), 0, 53499 }, /* ADDA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_d0fc_0), 0, 53500 }, /* ADDA.W #.W,An */ -{ CPUFUNC(op_d100_0), 0, 53504 }, /* ADDX.B Dn,Dn */ -{ CPUFUNC(op_d108_0), 0, 53512 }, /* ADDX.B -(An),-(An) */ -{ CPUFUNC(op_d110_0), 0, 53520 }, /* ADD.B Dn,(An) */ -{ CPUFUNC(op_d118_0), 0, 53528 }, /* ADD.B Dn,(An)+ */ -{ CPUFUNC(op_d120_0), 0, 53536 }, /* ADD.B Dn,-(An) */ -{ CPUFUNC(op_d128_0), 0, 53544 }, /* ADD.B Dn,(d16,An) */ -{ CPUFUNC(op_d130_0), 0, 53552 }, /* ADD.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d138_0), 0, 53560 }, /* ADD.B Dn,(xxx).W */ -{ CPUFUNC(op_d139_0), 0, 53561 }, /* ADD.B Dn,(xxx).L */ -{ CPUFUNC(op_d140_0), 0, 53568 }, /* ADDX.W Dn,Dn */ -{ CPUFUNC(op_d148_0), 0, 53576 }, /* ADDX.W -(An),-(An) */ -{ CPUFUNC(op_d150_0), 0, 53584 }, /* ADD.W Dn,(An) */ -{ CPUFUNC(op_d158_0), 0, 53592 }, /* ADD.W Dn,(An)+ */ -{ CPUFUNC(op_d160_0), 0, 53600 }, /* ADD.W Dn,-(An) */ -{ CPUFUNC(op_d168_0), 0, 53608 }, /* ADD.W Dn,(d16,An) */ -{ CPUFUNC(op_d170_0), 0, 53616 }, /* ADD.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d178_0), 0, 53624 }, /* ADD.W Dn,(xxx).W */ -{ CPUFUNC(op_d179_0), 0, 53625 }, /* ADD.W Dn,(xxx).L */ -{ CPUFUNC(op_d180_0), 0, 53632 }, /* ADDX.L Dn,Dn */ -{ CPUFUNC(op_d188_0), 0, 53640 }, /* ADDX.L -(An),-(An) */ -{ CPUFUNC(op_d190_0), 0, 53648 }, /* ADD.L Dn,(An) */ -{ CPUFUNC(op_d198_0), 0, 53656 }, /* ADD.L Dn,(An)+ */ -{ CPUFUNC(op_d1a0_0), 0, 53664 }, /* ADD.L Dn,-(An) */ -{ CPUFUNC(op_d1a8_0), 0, 53672 }, /* ADD.L Dn,(d16,An) */ -{ CPUFUNC(op_d1b0_0), 0, 53680 }, /* ADD.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d1b8_0), 0, 53688 }, /* ADD.L Dn,(xxx).W */ -{ CPUFUNC(op_d1b9_0), 0, 53689 }, /* ADD.L Dn,(xxx).L */ -{ CPUFUNC_FF(op_d1c0_0), 0, 53696 }, /* ADDA.L Dn,An */ -{ CPUFUNC_FF(op_d1c8_0), 0, 53704 }, /* ADDA.L An,An */ -{ CPUFUNC_FF(op_d1d0_0), 0, 53712 }, /* ADDA.L (An),An */ -{ CPUFUNC_FF(op_d1d8_0), 0, 53720 }, /* ADDA.L (An)+,An */ -{ CPUFUNC_FF(op_d1e0_0), 0, 53728 }, /* ADDA.L -(An),An */ -{ CPUFUNC_FF(op_d1e8_0), 0, 53736 }, /* ADDA.L (d16,An),An */ -{ CPUFUNC_FF(op_d1f0_0), 0, 53744 }, /* ADDA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_d1f8_0), 0, 53752 }, /* ADDA.L (xxx).W,An */ -{ CPUFUNC_FF(op_d1f9_0), 0, 53753 }, /* ADDA.L (xxx).L,An */ -{ CPUFUNC_FF(op_d1fa_0), 0, 53754 }, /* ADDA.L (d16,PC),An */ -{ CPUFUNC_FF(op_d1fb_0), 0, 53755 }, /* ADDA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_d1fc_0), 0, 53756 }, /* ADDA.L #.L,An */ -{ CPUFUNC(op_e000_0), 0, 57344 }, /* ASR.B #,Dn */ -{ CPUFUNC(op_e008_0), 0, 57352 }, /* LSR.B #,Dn */ -{ CPUFUNC(op_e010_0), 0, 57360 }, /* ROXR.B #,Dn */ -{ CPUFUNC(op_e018_0), 0, 57368 }, /* ROR.B #,Dn */ -{ CPUFUNC(op_e020_0), 0, 57376 }, /* ASR.B Dn,Dn */ -{ CPUFUNC(op_e028_0), 0, 57384 }, /* LSR.B Dn,Dn */ -{ CPUFUNC(op_e030_0), 0, 57392 }, /* ROXR.B Dn,Dn */ -{ CPUFUNC(op_e038_0), 0, 57400 }, /* ROR.B Dn,Dn */ -{ CPUFUNC(op_e040_0), 0, 57408 }, /* ASR.W #,Dn */ -{ CPUFUNC(op_e048_0), 0, 57416 }, /* LSR.W #,Dn */ -{ CPUFUNC(op_e050_0), 0, 57424 }, /* ROXR.W #,Dn */ -{ CPUFUNC(op_e058_0), 0, 57432 }, /* ROR.W #,Dn */ -{ CPUFUNC(op_e060_0), 0, 57440 }, /* ASR.W Dn,Dn */ -{ CPUFUNC(op_e068_0), 0, 57448 }, /* LSR.W Dn,Dn */ -{ CPUFUNC(op_e070_0), 0, 57456 }, /* ROXR.W Dn,Dn */ -{ CPUFUNC(op_e078_0), 0, 57464 }, /* ROR.W Dn,Dn */ -{ CPUFUNC(op_e080_0), 0, 57472 }, /* ASR.L #,Dn */ -{ CPUFUNC(op_e088_0), 0, 57480 }, /* LSR.L #,Dn */ -{ CPUFUNC(op_e090_0), 0, 57488 }, /* ROXR.L #,Dn */ -{ CPUFUNC(op_e098_0), 0, 57496 }, /* ROR.L #,Dn */ -{ CPUFUNC(op_e0a0_0), 0, 57504 }, /* ASR.L Dn,Dn */ -{ CPUFUNC(op_e0a8_0), 0, 57512 }, /* LSR.L Dn,Dn */ -{ CPUFUNC(op_e0b0_0), 0, 57520 }, /* ROXR.L Dn,Dn */ -{ CPUFUNC(op_e0b8_0), 0, 57528 }, /* ROR.L Dn,Dn */ -{ CPUFUNC(op_e0d0_0), 0, 57552 }, /* ASRW.W (An) */ -{ CPUFUNC(op_e0d8_0), 0, 57560 }, /* ASRW.W (An)+ */ -{ CPUFUNC(op_e0e0_0), 0, 57568 }, /* ASRW.W -(An) */ -{ CPUFUNC(op_e0e8_0), 0, 57576 }, /* ASRW.W (d16,An) */ -{ CPUFUNC(op_e0f0_0), 0, 57584 }, /* ASRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e0f8_0), 0, 57592 }, /* ASRW.W (xxx).W */ -{ CPUFUNC(op_e0f9_0), 0, 57593 }, /* ASRW.W (xxx).L */ -{ CPUFUNC(op_e100_0), 0, 57600 }, /* ASL.B #,Dn */ -{ CPUFUNC(op_e108_0), 0, 57608 }, /* LSL.B #,Dn */ -{ CPUFUNC(op_e110_0), 0, 57616 }, /* ROXL.B #,Dn */ -{ CPUFUNC(op_e118_0), 0, 57624 }, /* ROL.B #,Dn */ -{ CPUFUNC(op_e120_0), 0, 57632 }, /* ASL.B Dn,Dn */ -{ CPUFUNC(op_e128_0), 0, 57640 }, /* LSL.B Dn,Dn */ -{ CPUFUNC(op_e130_0), 0, 57648 }, /* ROXL.B Dn,Dn */ -{ CPUFUNC(op_e138_0), 0, 57656 }, /* ROL.B Dn,Dn */ -{ CPUFUNC(op_e140_0), 0, 57664 }, /* ASL.W #,Dn */ -{ CPUFUNC(op_e148_0), 0, 57672 }, /* LSL.W #,Dn */ -{ CPUFUNC(op_e150_0), 0, 57680 }, /* ROXL.W #,Dn */ -{ CPUFUNC(op_e158_0), 0, 57688 }, /* ROL.W #,Dn */ -{ CPUFUNC(op_e160_0), 0, 57696 }, /* ASL.W Dn,Dn */ -{ CPUFUNC(op_e168_0), 0, 57704 }, /* LSL.W Dn,Dn */ -{ CPUFUNC(op_e170_0), 0, 57712 }, /* ROXL.W Dn,Dn */ -{ CPUFUNC(op_e178_0), 0, 57720 }, /* ROL.W Dn,Dn */ -{ CPUFUNC(op_e180_0), 0, 57728 }, /* ASL.L #,Dn */ -{ CPUFUNC(op_e188_0), 0, 57736 }, /* LSL.L #,Dn */ -{ CPUFUNC(op_e190_0), 0, 57744 }, /* ROXL.L #,Dn */ -{ CPUFUNC(op_e198_0), 0, 57752 }, /* ROL.L #,Dn */ -{ CPUFUNC(op_e1a0_0), 0, 57760 }, /* ASL.L Dn,Dn */ -{ CPUFUNC(op_e1a8_0), 0, 57768 }, /* LSL.L Dn,Dn */ -{ CPUFUNC(op_e1b0_0), 0, 57776 }, /* ROXL.L Dn,Dn */ -{ CPUFUNC(op_e1b8_0), 0, 57784 }, /* ROL.L Dn,Dn */ -{ CPUFUNC(op_e1d0_0), 0, 57808 }, /* ASLW.W (An) */ -{ CPUFUNC(op_e1d8_0), 0, 57816 }, /* ASLW.W (An)+ */ -{ CPUFUNC(op_e1e0_0), 0, 57824 }, /* ASLW.W -(An) */ -{ CPUFUNC(op_e1e8_0), 0, 57832 }, /* ASLW.W (d16,An) */ -{ CPUFUNC(op_e1f0_0), 0, 57840 }, /* ASLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e1f8_0), 0, 57848 }, /* ASLW.W (xxx).W */ -{ CPUFUNC(op_e1f9_0), 0, 57849 }, /* ASLW.W (xxx).L */ -{ CPUFUNC(op_e2d0_0), 0, 58064 }, /* LSRW.W (An) */ -{ CPUFUNC(op_e2d8_0), 0, 58072 }, /* LSRW.W (An)+ */ -{ CPUFUNC(op_e2e0_0), 0, 58080 }, /* LSRW.W -(An) */ -{ CPUFUNC(op_e2e8_0), 0, 58088 }, /* LSRW.W (d16,An) */ -{ CPUFUNC(op_e2f0_0), 0, 58096 }, /* LSRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e2f8_0), 0, 58104 }, /* LSRW.W (xxx).W */ -{ CPUFUNC(op_e2f9_0), 0, 58105 }, /* LSRW.W (xxx).L */ -{ CPUFUNC(op_e3d0_0), 0, 58320 }, /* LSLW.W (An) */ -{ CPUFUNC(op_e3d8_0), 0, 58328 }, /* LSLW.W (An)+ */ -{ CPUFUNC(op_e3e0_0), 0, 58336 }, /* LSLW.W -(An) */ -{ CPUFUNC(op_e3e8_0), 0, 58344 }, /* LSLW.W (d16,An) */ -{ CPUFUNC(op_e3f0_0), 0, 58352 }, /* LSLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e3f8_0), 0, 58360 }, /* LSLW.W (xxx).W */ -{ CPUFUNC(op_e3f9_0), 0, 58361 }, /* LSLW.W (xxx).L */ -{ CPUFUNC(op_e4d0_0), 0, 58576 }, /* ROXRW.W (An) */ -{ CPUFUNC(op_e4d8_0), 0, 58584 }, /* ROXRW.W (An)+ */ -{ CPUFUNC(op_e4e0_0), 0, 58592 }, /* ROXRW.W -(An) */ -{ CPUFUNC(op_e4e8_0), 0, 58600 }, /* ROXRW.W (d16,An) */ -{ CPUFUNC(op_e4f0_0), 0, 58608 }, /* ROXRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e4f8_0), 0, 58616 }, /* ROXRW.W (xxx).W */ -{ CPUFUNC(op_e4f9_0), 0, 58617 }, /* ROXRW.W (xxx).L */ -{ CPUFUNC(op_e5d0_0), 0, 58832 }, /* ROXLW.W (An) */ -{ CPUFUNC(op_e5d8_0), 0, 58840 }, /* ROXLW.W (An)+ */ -{ CPUFUNC(op_e5e0_0), 0, 58848 }, /* ROXLW.W -(An) */ -{ CPUFUNC(op_e5e8_0), 0, 58856 }, /* ROXLW.W (d16,An) */ -{ CPUFUNC(op_e5f0_0), 0, 58864 }, /* ROXLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e5f8_0), 0, 58872 }, /* ROXLW.W (xxx).W */ -{ CPUFUNC(op_e5f9_0), 0, 58873 }, /* ROXLW.W (xxx).L */ -{ CPUFUNC(op_e6d0_0), 0, 59088 }, /* RORW.W (An) */ -{ CPUFUNC(op_e6d8_0), 0, 59096 }, /* RORW.W (An)+ */ -{ CPUFUNC(op_e6e0_0), 0, 59104 }, /* RORW.W -(An) */ -{ CPUFUNC(op_e6e8_0), 0, 59112 }, /* RORW.W (d16,An) */ -{ CPUFUNC(op_e6f0_0), 0, 59120 }, /* RORW.W (d8,An,Xn) */ -{ CPUFUNC(op_e6f8_0), 0, 59128 }, /* RORW.W (xxx).W */ -{ CPUFUNC(op_e6f9_0), 0, 59129 }, /* RORW.W (xxx).L */ -{ CPUFUNC(op_e7d0_0), 0, 59344 }, /* ROLW.W (An) */ -{ CPUFUNC(op_e7d8_0), 0, 59352 }, /* ROLW.W (An)+ */ -{ CPUFUNC(op_e7e0_0), 0, 59360 }, /* ROLW.W -(An) */ -{ CPUFUNC(op_e7e8_0), 0, 59368 }, /* ROLW.W (d16,An) */ -{ CPUFUNC(op_e7f0_0), 0, 59376 }, /* ROLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e7f8_0), 0, 59384 }, /* ROLW.W (xxx).W */ -{ CPUFUNC(op_e7f9_0), 0, 59385 }, /* ROLW.W (xxx).L */ -{ CPUFUNC(op_e8c0_0), 0, 59584 }, /* BFTST.L #.W,Dn */ -{ CPUFUNC(op_e8d0_0), 0, 59600 }, /* BFTST.L #.W,(An) */ -{ CPUFUNC(op_e8e8_0), 0, 59624 }, /* BFTST.L #.W,(d16,An) */ -{ CPUFUNC(op_e8f0_0), 0, 59632 }, /* BFTST.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_e8f8_0), 0, 59640 }, /* BFTST.L #.W,(xxx).W */ -{ CPUFUNC(op_e8f9_0), 0, 59641 }, /* BFTST.L #.W,(xxx).L */ -{ CPUFUNC(op_e8fa_0), 0, 59642 }, /* BFTST.L #.W,(d16,PC) */ -{ CPUFUNC(op_e8fb_0), 0, 59643 }, /* BFTST.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_e9c0_0), 0, 59840 }, /* BFEXTU.L #.W,Dn */ -{ CPUFUNC(op_e9d0_0), 0, 59856 }, /* BFEXTU.L #.W,(An) */ -{ CPUFUNC(op_e9e8_0), 0, 59880 }, /* BFEXTU.L #.W,(d16,An) */ -{ CPUFUNC(op_e9f0_0), 0, 59888 }, /* BFEXTU.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_e9f8_0), 0, 59896 }, /* BFEXTU.L #.W,(xxx).W */ -{ CPUFUNC(op_e9f9_0), 0, 59897 }, /* BFEXTU.L #.W,(xxx).L */ -{ CPUFUNC(op_e9fa_0), 0, 59898 }, /* BFEXTU.L #.W,(d16,PC) */ -{ CPUFUNC(op_e9fb_0), 0, 59899 }, /* BFEXTU.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_eac0_0), 0, 60096 }, /* BFCHG.L #.W,Dn */ -{ CPUFUNC(op_ead0_0), 0, 60112 }, /* BFCHG.L #.W,(An) */ -{ CPUFUNC(op_eae8_0), 0, 60136 }, /* BFCHG.L #.W,(d16,An) */ -{ CPUFUNC(op_eaf0_0), 0, 60144 }, /* BFCHG.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_eaf8_0), 0, 60152 }, /* BFCHG.L #.W,(xxx).W */ -{ CPUFUNC(op_eaf9_0), 0, 60153 }, /* BFCHG.L #.W,(xxx).L */ -{ CPUFUNC(op_ebc0_0), 0, 60352 }, /* BFEXTS.L #.W,Dn */ -{ CPUFUNC(op_ebd0_0), 0, 60368 }, /* BFEXTS.L #.W,(An) */ -{ CPUFUNC(op_ebe8_0), 0, 60392 }, /* BFEXTS.L #.W,(d16,An) */ -{ CPUFUNC(op_ebf0_0), 0, 60400 }, /* BFEXTS.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_ebf8_0), 0, 60408 }, /* BFEXTS.L #.W,(xxx).W */ -{ CPUFUNC(op_ebf9_0), 0, 60409 }, /* BFEXTS.L #.W,(xxx).L */ -{ CPUFUNC(op_ebfa_0), 0, 60410 }, /* BFEXTS.L #.W,(d16,PC) */ -{ CPUFUNC(op_ebfb_0), 0, 60411 }, /* BFEXTS.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_ecc0_0), 0, 60608 }, /* BFCLR.L #.W,Dn */ -{ CPUFUNC(op_ecd0_0), 0, 60624 }, /* BFCLR.L #.W,(An) */ -{ CPUFUNC(op_ece8_0), 0, 60648 }, /* BFCLR.L #.W,(d16,An) */ -{ CPUFUNC(op_ecf0_0), 0, 60656 }, /* BFCLR.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_ecf8_0), 0, 60664 }, /* BFCLR.L #.W,(xxx).W */ -{ CPUFUNC(op_ecf9_0), 0, 60665 }, /* BFCLR.L #.W,(xxx).L */ -{ CPUFUNC(op_edc0_0), 0, 60864 }, /* BFFFO.L #.W,Dn */ -{ CPUFUNC(op_edd0_0), 0, 60880 }, /* BFFFO.L #.W,(An) */ -{ CPUFUNC(op_ede8_0), 0, 60904 }, /* BFFFO.L #.W,(d16,An) */ -{ CPUFUNC(op_edf0_0), 0, 60912 }, /* BFFFO.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_edf8_0), 0, 60920 }, /* BFFFO.L #.W,(xxx).W */ -{ CPUFUNC(op_edf9_0), 0, 60921 }, /* BFFFO.L #.W,(xxx).L */ -{ CPUFUNC(op_edfa_0), 0, 60922 }, /* BFFFO.L #.W,(d16,PC) */ -{ CPUFUNC(op_edfb_0), 0, 60923 }, /* BFFFO.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_eec0_0), 0, 61120 }, /* BFSET.L #.W,Dn */ -{ CPUFUNC(op_eed0_0), 0, 61136 }, /* BFSET.L #.W,(An) */ -{ CPUFUNC(op_eee8_0), 0, 61160 }, /* BFSET.L #.W,(d16,An) */ -{ CPUFUNC(op_eef0_0), 0, 61168 }, /* BFSET.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_eef8_0), 0, 61176 }, /* BFSET.L #.W,(xxx).W */ -{ CPUFUNC(op_eef9_0), 0, 61177 }, /* BFSET.L #.W,(xxx).L */ -{ CPUFUNC(op_efc0_0), 0, 61376 }, /* BFINS.L #.W,Dn */ -{ CPUFUNC(op_efd0_0), 0, 61392 }, /* BFINS.L #.W,(An) */ -{ CPUFUNC(op_efe8_0), 0, 61416 }, /* BFINS.L #.W,(d16,An) */ -{ CPUFUNC(op_eff0_0), 0, 61424 }, /* BFINS.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_eff8_0), 0, 61432 }, /* BFINS.L #.W,(xxx).W */ -{ CPUFUNC(op_eff9_0), 0, 61433 }, /* BFINS.L #.W,(xxx).L */ -{ CPUFUNC_FF(op_f200_0), 0, 61952 }, /* FPP.L #.W,Dn */ -{ CPUFUNC_FF(op_f208_0), 0, 61960 }, /* FPP.L #.W,An */ -{ CPUFUNC_FF(op_f210_0), 0, 61968 }, /* FPP.L #.W,(An) */ -{ CPUFUNC_FF(op_f218_0), 0, 61976 }, /* FPP.L #.W,(An)+ */ -{ CPUFUNC_FF(op_f220_0), 0, 61984 }, /* FPP.L #.W,-(An) */ -{ CPUFUNC_FF(op_f228_0), 0, 61992 }, /* FPP.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_f230_0), 0, 62000 }, /* FPP.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_f238_0), 0, 62008 }, /* FPP.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_f239_0), 0, 62009 }, /* FPP.L #.W,(xxx).L */ -{ CPUFUNC_FF(op_f23a_0), 0, 62010 }, /* FPP.L #.W,(d16,PC) */ -{ CPUFUNC_FF(op_f23b_0), 0, 62011 }, /* FPP.L #.W,(d8,PC,Xn) */ -{ CPUFUNC_FF(op_f23c_0), 0, 62012 }, /* FPP.L #.W,#.L */ -{ CPUFUNC_FF(op_f240_0), 0, 62016 }, /* FScc.L #.W,Dn */ -{ CPUFUNC_FF(op_f248_0), 0, 62024 }, /* FDBcc.L #.W,Dn */ -{ CPUFUNC_FF(op_f250_0), 0, 62032 }, /* FScc.L #.W,(An) */ -{ CPUFUNC_FF(op_f258_0), 0, 62040 }, /* FScc.L #.W,(An)+ */ -{ CPUFUNC_FF(op_f260_0), 0, 62048 }, /* FScc.L #.W,-(An) */ -{ CPUFUNC_FF(op_f268_0), 0, 62056 }, /* FScc.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_f270_0), 0, 62064 }, /* FScc.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_f278_0), 0, 62072 }, /* FScc.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_f279_0), 0, 62073 }, /* FScc.L #.W,(xxx).L */ -{ CPUFUNC_FF(op_f27a_0), 0, 62074 }, /* FTRAPcc.L #.W */ -{ CPUFUNC_FF(op_f27b_0), 0, 62075 }, /* FTRAPcc.L #.L */ -{ CPUFUNC_FF(op_f27c_0), 0, 62076 }, /* FTRAPcc.L */ -{ CPUFUNC_FF(op_f280_0), 0, 62080 }, /* FBcc.L #,#.W */ -{ CPUFUNC_FF(op_f2c0_0), 0, 62144 }, /* FBcc.L #,#.L */ -{ CPUFUNC_FF(op_f310_0), 0, 62224 }, /* FSAVE.L (An) */ -{ CPUFUNC_FF(op_f320_0), 0, 62240 }, /* FSAVE.L -(An) */ -{ CPUFUNC_FF(op_f328_0), 0, 62248 }, /* FSAVE.L (d16,An) */ -{ CPUFUNC_FF(op_f330_0), 0, 62256 }, /* FSAVE.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_f338_0), 0, 62264 }, /* FSAVE.L (xxx).W */ -{ CPUFUNC_FF(op_f339_0), 0, 62265 }, /* FSAVE.L (xxx).L */ -{ CPUFUNC_FF(op_f350_0), 0, 62288 }, /* FRESTORE.L (An) */ -{ CPUFUNC_FF(op_f358_0), 0, 62296 }, /* FRESTORE.L (An)+ */ -{ CPUFUNC_FF(op_f368_0), 0, 62312 }, /* FRESTORE.L (d16,An) */ -{ CPUFUNC_FF(op_f370_0), 0, 62320 }, /* FRESTORE.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_f378_0), 0, 62328 }, /* FRESTORE.L (xxx).W */ -{ CPUFUNC_FF(op_f379_0), 0, 62329 }, /* FRESTORE.L (xxx).L */ -{ CPUFUNC_FF(op_f37a_0), 0, 62330 }, /* FRESTORE.L (d16,PC) */ -{ CPUFUNC_FF(op_f37b_0), 0, 62331 }, /* FRESTORE.L (d8,PC,Xn) */ -{ 0, 0, 0 }}; -struct cputbl CPUFUNC(op_smalltbl_2)[] = { -{ CPUFUNC(op_0_0), 0, 0 }, /* OR.B #.B,Dn */ -{ CPUFUNC(op_10_0), 0, 16 }, /* OR.B #.B,(An) */ -{ CPUFUNC(op_18_0), 0, 24 }, /* OR.B #.B,(An)+ */ -{ CPUFUNC(op_20_0), 0, 32 }, /* OR.B #.B,-(An) */ -{ CPUFUNC(op_28_0), 0, 40 }, /* OR.B #.B,(d16,An) */ -{ CPUFUNC(op_30_0), 0, 48 }, /* OR.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_38_0), 0, 56 }, /* OR.B #.B,(xxx).W */ -{ CPUFUNC(op_39_0), 0, 57 }, /* OR.B #.B,(xxx).L */ -{ CPUFUNC(op_3c_0), 0, 60 }, /* ORSR.B #.W */ -{ CPUFUNC(op_40_0), 0, 64 }, /* OR.W #.W,Dn */ -{ CPUFUNC(op_50_0), 0, 80 }, /* OR.W #.W,(An) */ -{ CPUFUNC(op_58_0), 0, 88 }, /* OR.W #.W,(An)+ */ -{ CPUFUNC(op_60_0), 0, 96 }, /* OR.W #.W,-(An) */ -{ CPUFUNC(op_68_0), 0, 104 }, /* OR.W #.W,(d16,An) */ -{ CPUFUNC(op_70_0), 0, 112 }, /* OR.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_78_0), 0, 120 }, /* OR.W #.W,(xxx).W */ -{ CPUFUNC(op_79_0), 0, 121 }, /* OR.W #.W,(xxx).L */ -{ CPUFUNC(op_7c_0), 0, 124 }, /* ORSR.W #.W */ -{ CPUFUNC(op_80_0), 0, 128 }, /* OR.L #.L,Dn */ -{ CPUFUNC(op_90_0), 0, 144 }, /* OR.L #.L,(An) */ -{ CPUFUNC(op_98_0), 0, 152 }, /* OR.L #.L,(An)+ */ -{ CPUFUNC(op_a0_0), 0, 160 }, /* OR.L #.L,-(An) */ -{ CPUFUNC(op_a8_0), 0, 168 }, /* OR.L #.L,(d16,An) */ -{ CPUFUNC(op_b0_0), 0, 176 }, /* OR.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_b8_0), 0, 184 }, /* OR.L #.L,(xxx).W */ -{ CPUFUNC(op_b9_0), 0, 185 }, /* OR.L #.L,(xxx).L */ -{ CPUFUNC(op_d0_0), 0, 208 }, /* CHK2.B #.W,(An) */ -{ CPUFUNC(op_e8_0), 0, 232 }, /* CHK2.B #.W,(d16,An) */ -{ CPUFUNC(op_f0_0), 0, 240 }, /* CHK2.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_f8_0), 0, 248 }, /* CHK2.B #.W,(xxx).W */ -{ CPUFUNC(op_f9_0), 0, 249 }, /* CHK2.B #.W,(xxx).L */ -{ CPUFUNC(op_fa_0), 0, 250 }, /* CHK2.B #.W,(d16,PC) */ -{ CPUFUNC(op_fb_0), 0, 251 }, /* CHK2.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_100_0), 0, 256 }, /* BTST.L Dn,Dn */ -{ CPUFUNC_FF(op_108_0), 0, 264 }, /* MVPMR.W (d16,An),Dn */ -{ CPUFUNC(op_110_0), 0, 272 }, /* BTST.B Dn,(An) */ -{ CPUFUNC(op_118_0), 0, 280 }, /* BTST.B Dn,(An)+ */ -{ CPUFUNC(op_120_0), 0, 288 }, /* BTST.B Dn,-(An) */ -{ CPUFUNC(op_128_0), 0, 296 }, /* BTST.B Dn,(d16,An) */ -{ CPUFUNC(op_130_0), 0, 304 }, /* BTST.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_138_0), 0, 312 }, /* BTST.B Dn,(xxx).W */ -{ CPUFUNC(op_139_0), 0, 313 }, /* BTST.B Dn,(xxx).L */ -{ CPUFUNC(op_13a_0), 0, 314 }, /* BTST.B Dn,(d16,PC) */ -{ CPUFUNC(op_13b_0), 0, 315 }, /* BTST.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_13c_0), 0, 316 }, /* BTST.B Dn,#.B */ -{ CPUFUNC(op_140_0), 0, 320 }, /* BCHG.L Dn,Dn */ -{ CPUFUNC_FF(op_148_0), 0, 328 }, /* MVPMR.L (d16,An),Dn */ -{ CPUFUNC(op_150_0), 0, 336 }, /* BCHG.B Dn,(An) */ -{ CPUFUNC(op_158_0), 0, 344 }, /* BCHG.B Dn,(An)+ */ -{ CPUFUNC(op_160_0), 0, 352 }, /* BCHG.B Dn,-(An) */ -{ CPUFUNC(op_168_0), 0, 360 }, /* BCHG.B Dn,(d16,An) */ -{ CPUFUNC(op_170_0), 0, 368 }, /* BCHG.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_178_0), 0, 376 }, /* BCHG.B Dn,(xxx).W */ -{ CPUFUNC(op_179_0), 0, 377 }, /* BCHG.B Dn,(xxx).L */ -{ CPUFUNC(op_17a_0), 0, 378 }, /* BCHG.B Dn,(d16,PC) */ -{ CPUFUNC(op_17b_0), 0, 379 }, /* BCHG.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_180_0), 0, 384 }, /* BCLR.L Dn,Dn */ -{ CPUFUNC_FF(op_188_0), 0, 392 }, /* MVPRM.W Dn,(d16,An) */ -{ CPUFUNC(op_190_0), 0, 400 }, /* BCLR.B Dn,(An) */ -{ CPUFUNC(op_198_0), 0, 408 }, /* BCLR.B Dn,(An)+ */ -{ CPUFUNC(op_1a0_0), 0, 416 }, /* BCLR.B Dn,-(An) */ -{ CPUFUNC(op_1a8_0), 0, 424 }, /* BCLR.B Dn,(d16,An) */ -{ CPUFUNC(op_1b0_0), 0, 432 }, /* BCLR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1b8_0), 0, 440 }, /* BCLR.B Dn,(xxx).W */ -{ CPUFUNC(op_1b9_0), 0, 441 }, /* BCLR.B Dn,(xxx).L */ -{ CPUFUNC(op_1ba_0), 0, 442 }, /* BCLR.B Dn,(d16,PC) */ -{ CPUFUNC(op_1bb_0), 0, 443 }, /* BCLR.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_1c0_0), 0, 448 }, /* BSET.L Dn,Dn */ -{ CPUFUNC_FF(op_1c8_0), 0, 456 }, /* MVPRM.L Dn,(d16,An) */ -{ CPUFUNC(op_1d0_0), 0, 464 }, /* BSET.B Dn,(An) */ -{ CPUFUNC(op_1d8_0), 0, 472 }, /* BSET.B Dn,(An)+ */ -{ CPUFUNC(op_1e0_0), 0, 480 }, /* BSET.B Dn,-(An) */ -{ CPUFUNC(op_1e8_0), 0, 488 }, /* BSET.B Dn,(d16,An) */ -{ CPUFUNC(op_1f0_0), 0, 496 }, /* BSET.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1f8_0), 0, 504 }, /* BSET.B Dn,(xxx).W */ -{ CPUFUNC(op_1f9_0), 0, 505 }, /* BSET.B Dn,(xxx).L */ -{ CPUFUNC(op_1fa_0), 0, 506 }, /* BSET.B Dn,(d16,PC) */ -{ CPUFUNC(op_1fb_0), 0, 507 }, /* BSET.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_200_0), 0, 512 }, /* AND.B #.B,Dn */ -{ CPUFUNC(op_210_0), 0, 528 }, /* AND.B #.B,(An) */ -{ CPUFUNC(op_218_0), 0, 536 }, /* AND.B #.B,(An)+ */ -{ CPUFUNC(op_220_0), 0, 544 }, /* AND.B #.B,-(An) */ -{ CPUFUNC(op_228_0), 0, 552 }, /* AND.B #.B,(d16,An) */ -{ CPUFUNC(op_230_0), 0, 560 }, /* AND.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_238_0), 0, 568 }, /* AND.B #.B,(xxx).W */ -{ CPUFUNC(op_239_0), 0, 569 }, /* AND.B #.B,(xxx).L */ -{ CPUFUNC(op_23c_0), 0, 572 }, /* ANDSR.B #.W */ -{ CPUFUNC(op_240_0), 0, 576 }, /* AND.W #.W,Dn */ -{ CPUFUNC(op_250_0), 0, 592 }, /* AND.W #.W,(An) */ -{ CPUFUNC(op_258_0), 0, 600 }, /* AND.W #.W,(An)+ */ -{ CPUFUNC(op_260_0), 0, 608 }, /* AND.W #.W,-(An) */ -{ CPUFUNC(op_268_0), 0, 616 }, /* AND.W #.W,(d16,An) */ -{ CPUFUNC(op_270_0), 0, 624 }, /* AND.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_278_0), 0, 632 }, /* AND.W #.W,(xxx).W */ -{ CPUFUNC(op_279_0), 0, 633 }, /* AND.W #.W,(xxx).L */ -{ CPUFUNC(op_27c_0), 0, 636 }, /* ANDSR.W #.W */ -{ CPUFUNC(op_280_0), 0, 640 }, /* AND.L #.L,Dn */ -{ CPUFUNC(op_290_0), 0, 656 }, /* AND.L #.L,(An) */ -{ CPUFUNC(op_298_0), 0, 664 }, /* AND.L #.L,(An)+ */ -{ CPUFUNC(op_2a0_0), 0, 672 }, /* AND.L #.L,-(An) */ -{ CPUFUNC(op_2a8_0), 0, 680 }, /* AND.L #.L,(d16,An) */ -{ CPUFUNC(op_2b0_0), 0, 688 }, /* AND.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_2b8_0), 0, 696 }, /* AND.L #.L,(xxx).W */ -{ CPUFUNC(op_2b9_0), 0, 697 }, /* AND.L #.L,(xxx).L */ -{ CPUFUNC(op_2d0_0), 0, 720 }, /* CHK2.W #.W,(An) */ -{ CPUFUNC(op_2e8_0), 0, 744 }, /* CHK2.W #.W,(d16,An) */ -{ CPUFUNC(op_2f0_0), 0, 752 }, /* CHK2.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_2f8_0), 0, 760 }, /* CHK2.W #.W,(xxx).W */ -{ CPUFUNC(op_2f9_0), 0, 761 }, /* CHK2.W #.W,(xxx).L */ -{ CPUFUNC(op_2fa_0), 0, 762 }, /* CHK2.W #.W,(d16,PC) */ -{ CPUFUNC(op_2fb_0), 0, 763 }, /* CHK2.W #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_400_0), 0, 1024 }, /* SUB.B #.B,Dn */ -{ CPUFUNC(op_410_0), 0, 1040 }, /* SUB.B #.B,(An) */ -{ CPUFUNC(op_418_0), 0, 1048 }, /* SUB.B #.B,(An)+ */ -{ CPUFUNC(op_420_0), 0, 1056 }, /* SUB.B #.B,-(An) */ -{ CPUFUNC(op_428_0), 0, 1064 }, /* SUB.B #.B,(d16,An) */ -{ CPUFUNC(op_430_0), 0, 1072 }, /* SUB.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_438_0), 0, 1080 }, /* SUB.B #.B,(xxx).W */ -{ CPUFUNC(op_439_0), 0, 1081 }, /* SUB.B #.B,(xxx).L */ -{ CPUFUNC(op_440_0), 0, 1088 }, /* SUB.W #.W,Dn */ -{ CPUFUNC(op_450_0), 0, 1104 }, /* SUB.W #.W,(An) */ -{ CPUFUNC(op_458_0), 0, 1112 }, /* SUB.W #.W,(An)+ */ -{ CPUFUNC(op_460_0), 0, 1120 }, /* SUB.W #.W,-(An) */ -{ CPUFUNC(op_468_0), 0, 1128 }, /* SUB.W #.W,(d16,An) */ -{ CPUFUNC(op_470_0), 0, 1136 }, /* SUB.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_478_0), 0, 1144 }, /* SUB.W #.W,(xxx).W */ -{ CPUFUNC(op_479_0), 0, 1145 }, /* SUB.W #.W,(xxx).L */ -{ CPUFUNC(op_480_0), 0, 1152 }, /* SUB.L #.L,Dn */ -{ CPUFUNC(op_490_0), 0, 1168 }, /* SUB.L #.L,(An) */ -{ CPUFUNC(op_498_0), 0, 1176 }, /* SUB.L #.L,(An)+ */ -{ CPUFUNC(op_4a0_0), 0, 1184 }, /* SUB.L #.L,-(An) */ -{ CPUFUNC(op_4a8_0), 0, 1192 }, /* SUB.L #.L,(d16,An) */ -{ CPUFUNC(op_4b0_0), 0, 1200 }, /* SUB.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_4b8_0), 0, 1208 }, /* SUB.L #.L,(xxx).W */ -{ CPUFUNC(op_4b9_0), 0, 1209 }, /* SUB.L #.L,(xxx).L */ -{ CPUFUNC(op_4d0_0), 0, 1232 }, /* CHK2.L #.W,(An) */ -{ CPUFUNC(op_4e8_0), 0, 1256 }, /* CHK2.L #.W,(d16,An) */ -{ CPUFUNC(op_4f0_0), 0, 1264 }, /* CHK2.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_4f8_0), 0, 1272 }, /* CHK2.L #.W,(xxx).W */ -{ CPUFUNC(op_4f9_0), 0, 1273 }, /* CHK2.L #.W,(xxx).L */ -{ CPUFUNC(op_4fa_0), 0, 1274 }, /* CHK2.L #.W,(d16,PC) */ -{ CPUFUNC(op_4fb_0), 0, 1275 }, /* CHK2.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_600_0), 0, 1536 }, /* ADD.B #.B,Dn */ -{ CPUFUNC(op_610_0), 0, 1552 }, /* ADD.B #.B,(An) */ -{ CPUFUNC(op_618_0), 0, 1560 }, /* ADD.B #.B,(An)+ */ -{ CPUFUNC(op_620_0), 0, 1568 }, /* ADD.B #.B,-(An) */ -{ CPUFUNC(op_628_0), 0, 1576 }, /* ADD.B #.B,(d16,An) */ -{ CPUFUNC(op_630_0), 0, 1584 }, /* ADD.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_638_0), 0, 1592 }, /* ADD.B #.B,(xxx).W */ -{ CPUFUNC(op_639_0), 0, 1593 }, /* ADD.B #.B,(xxx).L */ -{ CPUFUNC(op_640_0), 0, 1600 }, /* ADD.W #.W,Dn */ -{ CPUFUNC(op_650_0), 0, 1616 }, /* ADD.W #.W,(An) */ -{ CPUFUNC(op_658_0), 0, 1624 }, /* ADD.W #.W,(An)+ */ -{ CPUFUNC(op_660_0), 0, 1632 }, /* ADD.W #.W,-(An) */ -{ CPUFUNC(op_668_0), 0, 1640 }, /* ADD.W #.W,(d16,An) */ -{ CPUFUNC(op_670_0), 0, 1648 }, /* ADD.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_678_0), 0, 1656 }, /* ADD.W #.W,(xxx).W */ -{ CPUFUNC(op_679_0), 0, 1657 }, /* ADD.W #.W,(xxx).L */ -{ CPUFUNC(op_680_0), 0, 1664 }, /* ADD.L #.L,Dn */ -{ CPUFUNC(op_690_0), 0, 1680 }, /* ADD.L #.L,(An) */ -{ CPUFUNC(op_698_0), 0, 1688 }, /* ADD.L #.L,(An)+ */ -{ CPUFUNC(op_6a0_0), 0, 1696 }, /* ADD.L #.L,-(An) */ -{ CPUFUNC(op_6a8_0), 0, 1704 }, /* ADD.L #.L,(d16,An) */ -{ CPUFUNC(op_6b0_0), 0, 1712 }, /* ADD.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_6b8_0), 0, 1720 }, /* ADD.L #.L,(xxx).W */ -{ CPUFUNC(op_6b9_0), 0, 1721 }, /* ADD.L #.L,(xxx).L */ -{ CPUFUNC(op_6c0_0), 0, 1728 }, /* RTM.L Dn */ -{ CPUFUNC(op_6c8_0), 0, 1736 }, /* RTM.L An */ -{ CPUFUNC_FF(op_6d0_0), 0, 1744 }, /* CALLM.L (An) */ -{ CPUFUNC_FF(op_6e8_0), 0, 1768 }, /* CALLM.L (d16,An) */ -{ CPUFUNC_FF(op_6f0_0), 0, 1776 }, /* CALLM.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_6f8_0), 0, 1784 }, /* CALLM.L (xxx).W */ -{ CPUFUNC_FF(op_6f9_0), 0, 1785 }, /* CALLM.L (xxx).L */ -{ CPUFUNC_FF(op_6fa_0), 0, 1786 }, /* CALLM.L (d16,PC) */ -{ CPUFUNC_FF(op_6fb_0), 0, 1787 }, /* CALLM.L (d8,PC,Xn) */ -{ CPUFUNC(op_800_0), 0, 2048 }, /* BTST.L #.W,Dn */ -{ CPUFUNC(op_810_0), 0, 2064 }, /* BTST.B #.W,(An) */ -{ CPUFUNC(op_818_0), 0, 2072 }, /* BTST.B #.W,(An)+ */ -{ CPUFUNC(op_820_0), 0, 2080 }, /* BTST.B #.W,-(An) */ -{ CPUFUNC(op_828_0), 0, 2088 }, /* BTST.B #.W,(d16,An) */ -{ CPUFUNC(op_830_0), 0, 2096 }, /* BTST.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_838_0), 0, 2104 }, /* BTST.B #.W,(xxx).W */ -{ CPUFUNC(op_839_0), 0, 2105 }, /* BTST.B #.W,(xxx).L */ -{ CPUFUNC(op_83a_0), 0, 2106 }, /* BTST.B #.W,(d16,PC) */ -{ CPUFUNC(op_83b_0), 0, 2107 }, /* BTST.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_83c_0), 0, 2108 }, /* BTST.B #.W,#.B */ -{ CPUFUNC(op_840_0), 0, 2112 }, /* BCHG.L #.W,Dn */ -{ CPUFUNC(op_850_0), 0, 2128 }, /* BCHG.B #.W,(An) */ -{ CPUFUNC(op_858_0), 0, 2136 }, /* BCHG.B #.W,(An)+ */ -{ CPUFUNC(op_860_0), 0, 2144 }, /* BCHG.B #.W,-(An) */ -{ CPUFUNC(op_868_0), 0, 2152 }, /* BCHG.B #.W,(d16,An) */ -{ CPUFUNC(op_870_0), 0, 2160 }, /* BCHG.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_878_0), 0, 2168 }, /* BCHG.B #.W,(xxx).W */ -{ CPUFUNC(op_879_0), 0, 2169 }, /* BCHG.B #.W,(xxx).L */ -{ CPUFUNC(op_87a_0), 0, 2170 }, /* BCHG.B #.W,(d16,PC) */ -{ CPUFUNC(op_87b_0), 0, 2171 }, /* BCHG.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_880_0), 0, 2176 }, /* BCLR.L #.W,Dn */ -{ CPUFUNC(op_890_0), 0, 2192 }, /* BCLR.B #.W,(An) */ -{ CPUFUNC(op_898_0), 0, 2200 }, /* BCLR.B #.W,(An)+ */ -{ CPUFUNC(op_8a0_0), 0, 2208 }, /* BCLR.B #.W,-(An) */ -{ CPUFUNC(op_8a8_0), 0, 2216 }, /* BCLR.B #.W,(d16,An) */ -{ CPUFUNC(op_8b0_0), 0, 2224 }, /* BCLR.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_8b8_0), 0, 2232 }, /* BCLR.B #.W,(xxx).W */ -{ CPUFUNC(op_8b9_0), 0, 2233 }, /* BCLR.B #.W,(xxx).L */ -{ CPUFUNC(op_8ba_0), 0, 2234 }, /* BCLR.B #.W,(d16,PC) */ -{ CPUFUNC(op_8bb_0), 0, 2235 }, /* BCLR.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_8c0_0), 0, 2240 }, /* BSET.L #.W,Dn */ -{ CPUFUNC(op_8d0_0), 0, 2256 }, /* BSET.B #.W,(An) */ -{ CPUFUNC(op_8d8_0), 0, 2264 }, /* BSET.B #.W,(An)+ */ -{ CPUFUNC(op_8e0_0), 0, 2272 }, /* BSET.B #.W,-(An) */ -{ CPUFUNC(op_8e8_0), 0, 2280 }, /* BSET.B #.W,(d16,An) */ -{ CPUFUNC(op_8f0_0), 0, 2288 }, /* BSET.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_8f8_0), 0, 2296 }, /* BSET.B #.W,(xxx).W */ -{ CPUFUNC(op_8f9_0), 0, 2297 }, /* BSET.B #.W,(xxx).L */ -{ CPUFUNC(op_8fa_0), 0, 2298 }, /* BSET.B #.W,(d16,PC) */ -{ CPUFUNC(op_8fb_0), 0, 2299 }, /* BSET.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_a00_0), 0, 2560 }, /* EOR.B #.B,Dn */ -{ CPUFUNC(op_a10_0), 0, 2576 }, /* EOR.B #.B,(An) */ -{ CPUFUNC(op_a18_0), 0, 2584 }, /* EOR.B #.B,(An)+ */ -{ CPUFUNC(op_a20_0), 0, 2592 }, /* EOR.B #.B,-(An) */ -{ CPUFUNC(op_a28_0), 0, 2600 }, /* EOR.B #.B,(d16,An) */ -{ CPUFUNC(op_a30_0), 0, 2608 }, /* EOR.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_a38_0), 0, 2616 }, /* EOR.B #.B,(xxx).W */ -{ CPUFUNC(op_a39_0), 0, 2617 }, /* EOR.B #.B,(xxx).L */ -{ CPUFUNC(op_a3c_0), 0, 2620 }, /* EORSR.B #.W */ -{ CPUFUNC(op_a40_0), 0, 2624 }, /* EOR.W #.W,Dn */ -{ CPUFUNC(op_a50_0), 0, 2640 }, /* EOR.W #.W,(An) */ -{ CPUFUNC(op_a58_0), 0, 2648 }, /* EOR.W #.W,(An)+ */ -{ CPUFUNC(op_a60_0), 0, 2656 }, /* EOR.W #.W,-(An) */ -{ CPUFUNC(op_a68_0), 0, 2664 }, /* EOR.W #.W,(d16,An) */ -{ CPUFUNC(op_a70_0), 0, 2672 }, /* EOR.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_a78_0), 0, 2680 }, /* EOR.W #.W,(xxx).W */ -{ CPUFUNC(op_a79_0), 0, 2681 }, /* EOR.W #.W,(xxx).L */ -{ CPUFUNC(op_a7c_0), 0, 2684 }, /* EORSR.W #.W */ -{ CPUFUNC(op_a80_0), 0, 2688 }, /* EOR.L #.L,Dn */ -{ CPUFUNC(op_a90_0), 0, 2704 }, /* EOR.L #.L,(An) */ -{ CPUFUNC(op_a98_0), 0, 2712 }, /* EOR.L #.L,(An)+ */ -{ CPUFUNC(op_aa0_0), 0, 2720 }, /* EOR.L #.L,-(An) */ -{ CPUFUNC(op_aa8_0), 0, 2728 }, /* EOR.L #.L,(d16,An) */ -{ CPUFUNC(op_ab0_0), 0, 2736 }, /* EOR.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_ab8_0), 0, 2744 }, /* EOR.L #.L,(xxx).W */ -{ CPUFUNC(op_ab9_0), 0, 2745 }, /* EOR.L #.L,(xxx).L */ -{ CPUFUNC(op_ad0_0), 0, 2768 }, /* CAS.B #.W,(An) */ -{ CPUFUNC(op_ad8_0), 0, 2776 }, /* CAS.B #.W,(An)+ */ -{ CPUFUNC(op_ae0_0), 0, 2784 }, /* CAS.B #.W,-(An) */ -{ CPUFUNC(op_ae8_0), 0, 2792 }, /* CAS.B #.W,(d16,An) */ -{ CPUFUNC(op_af0_0), 0, 2800 }, /* CAS.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_af8_0), 0, 2808 }, /* CAS.B #.W,(xxx).W */ -{ CPUFUNC(op_af9_0), 0, 2809 }, /* CAS.B #.W,(xxx).L */ -{ CPUFUNC(op_c00_0), 0, 3072 }, /* CMP.B #.B,Dn */ -{ CPUFUNC(op_c10_0), 0, 3088 }, /* CMP.B #.B,(An) */ -{ CPUFUNC(op_c18_0), 0, 3096 }, /* CMP.B #.B,(An)+ */ -{ CPUFUNC(op_c20_0), 0, 3104 }, /* CMP.B #.B,-(An) */ -{ CPUFUNC(op_c28_0), 0, 3112 }, /* CMP.B #.B,(d16,An) */ -{ CPUFUNC(op_c30_0), 0, 3120 }, /* CMP.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_c38_0), 0, 3128 }, /* CMP.B #.B,(xxx).W */ -{ CPUFUNC(op_c39_0), 0, 3129 }, /* CMP.B #.B,(xxx).L */ -{ CPUFUNC(op_c3a_0), 0, 3130 }, /* CMP.B #.B,(d16,PC) */ -{ CPUFUNC(op_c3b_0), 0, 3131 }, /* CMP.B #.B,(d8,PC,Xn) */ -{ CPUFUNC(op_c40_0), 0, 3136 }, /* CMP.W #.W,Dn */ -{ CPUFUNC(op_c50_0), 0, 3152 }, /* CMP.W #.W,(An) */ -{ CPUFUNC(op_c58_0), 0, 3160 }, /* CMP.W #.W,(An)+ */ -{ CPUFUNC(op_c60_0), 0, 3168 }, /* CMP.W #.W,-(An) */ -{ CPUFUNC(op_c68_0), 0, 3176 }, /* CMP.W #.W,(d16,An) */ -{ CPUFUNC(op_c70_0), 0, 3184 }, /* CMP.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_c78_0), 0, 3192 }, /* CMP.W #.W,(xxx).W */ -{ CPUFUNC(op_c79_0), 0, 3193 }, /* CMP.W #.W,(xxx).L */ -{ CPUFUNC(op_c7a_0), 0, 3194 }, /* CMP.W #.W,(d16,PC) */ -{ CPUFUNC(op_c7b_0), 0, 3195 }, /* CMP.W #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_c80_0), 0, 3200 }, /* CMP.L #.L,Dn */ -{ CPUFUNC(op_c90_0), 0, 3216 }, /* CMP.L #.L,(An) */ -{ CPUFUNC(op_c98_0), 0, 3224 }, /* CMP.L #.L,(An)+ */ -{ CPUFUNC(op_ca0_0), 0, 3232 }, /* CMP.L #.L,-(An) */ -{ CPUFUNC(op_ca8_0), 0, 3240 }, /* CMP.L #.L,(d16,An) */ -{ CPUFUNC(op_cb0_0), 0, 3248 }, /* CMP.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_cb8_0), 0, 3256 }, /* CMP.L #.L,(xxx).W */ -{ CPUFUNC(op_cb9_0), 0, 3257 }, /* CMP.L #.L,(xxx).L */ -{ CPUFUNC(op_cba_0), 0, 3258 }, /* CMP.L #.L,(d16,PC) */ -{ CPUFUNC(op_cbb_0), 0, 3259 }, /* CMP.L #.L,(d8,PC,Xn) */ -{ CPUFUNC(op_cd0_0), 0, 3280 }, /* CAS.W #.W,(An) */ -{ CPUFUNC(op_cd8_0), 0, 3288 }, /* CAS.W #.W,(An)+ */ -{ CPUFUNC(op_ce0_0), 0, 3296 }, /* CAS.W #.W,-(An) */ -{ CPUFUNC(op_ce8_0), 0, 3304 }, /* CAS.W #.W,(d16,An) */ -{ CPUFUNC(op_cf0_0), 0, 3312 }, /* CAS.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_cf8_0), 0, 3320 }, /* CAS.W #.W,(xxx).W */ -{ CPUFUNC(op_cf9_0), 0, 3321 }, /* CAS.W #.W,(xxx).L */ -{ CPUFUNC(op_cfc_0), 0, 3324 }, /* CAS2.W #.L */ -{ CPUFUNC_FF(op_e10_0), 0, 3600 }, /* MOVES.B #.W,(An) */ -{ CPUFUNC_FF(op_e18_0), 0, 3608 }, /* MOVES.B #.W,(An)+ */ -{ CPUFUNC_FF(op_e20_0), 0, 3616 }, /* MOVES.B #.W,-(An) */ -{ CPUFUNC_FF(op_e28_0), 0, 3624 }, /* MOVES.B #.W,(d16,An) */ -{ CPUFUNC_FF(op_e30_0), 0, 3632 }, /* MOVES.B #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_e38_0), 0, 3640 }, /* MOVES.B #.W,(xxx).W */ -{ CPUFUNC_FF(op_e39_0), 0, 3641 }, /* MOVES.B #.W,(xxx).L */ -{ CPUFUNC_FF(op_e50_0), 0, 3664 }, /* MOVES.W #.W,(An) */ -{ CPUFUNC_FF(op_e58_0), 0, 3672 }, /* MOVES.W #.W,(An)+ */ -{ CPUFUNC_FF(op_e60_0), 0, 3680 }, /* MOVES.W #.W,-(An) */ -{ CPUFUNC_FF(op_e68_0), 0, 3688 }, /* MOVES.W #.W,(d16,An) */ -{ CPUFUNC_FF(op_e70_0), 0, 3696 }, /* MOVES.W #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_e78_0), 0, 3704 }, /* MOVES.W #.W,(xxx).W */ -{ CPUFUNC_FF(op_e79_0), 0, 3705 }, /* MOVES.W #.W,(xxx).L */ -{ CPUFUNC_FF(op_e90_0), 0, 3728 }, /* MOVES.L #.W,(An) */ -{ CPUFUNC_FF(op_e98_0), 0, 3736 }, /* MOVES.L #.W,(An)+ */ -{ CPUFUNC_FF(op_ea0_0), 0, 3744 }, /* MOVES.L #.W,-(An) */ -{ CPUFUNC_FF(op_ea8_0), 0, 3752 }, /* MOVES.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_eb0_0), 0, 3760 }, /* MOVES.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_eb8_0), 0, 3768 }, /* MOVES.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_eb9_0), 0, 3769 }, /* MOVES.L #.W,(xxx).L */ -{ CPUFUNC(op_ed0_0), 0, 3792 }, /* CAS.L #.W,(An) */ -{ CPUFUNC(op_ed8_0), 0, 3800 }, /* CAS.L #.W,(An)+ */ -{ CPUFUNC(op_ee0_0), 0, 3808 }, /* CAS.L #.W,-(An) */ -{ CPUFUNC(op_ee8_0), 0, 3816 }, /* CAS.L #.W,(d16,An) */ -{ CPUFUNC(op_ef0_0), 0, 3824 }, /* CAS.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_ef8_0), 0, 3832 }, /* CAS.L #.W,(xxx).W */ -{ CPUFUNC(op_ef9_0), 0, 3833 }, /* CAS.L #.W,(xxx).L */ -{ CPUFUNC(op_efc_0), 0, 3836 }, /* CAS2.L #.L */ -{ CPUFUNC(op_1000_0), 0, 4096 }, /* MOVE.B Dn,Dn */ -{ CPUFUNC(op_1010_0), 0, 4112 }, /* MOVE.B (An),Dn */ -{ CPUFUNC(op_1018_0), 0, 4120 }, /* MOVE.B (An)+,Dn */ -{ CPUFUNC(op_1020_0), 0, 4128 }, /* MOVE.B -(An),Dn */ -{ CPUFUNC(op_1028_0), 0, 4136 }, /* MOVE.B (d16,An),Dn */ -{ CPUFUNC(op_1030_0), 0, 4144 }, /* MOVE.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_1038_0), 0, 4152 }, /* MOVE.B (xxx).W,Dn */ -{ CPUFUNC(op_1039_0), 0, 4153 }, /* MOVE.B (xxx).L,Dn */ -{ CPUFUNC(op_103a_0), 0, 4154 }, /* MOVE.B (d16,PC),Dn */ -{ CPUFUNC(op_103b_0), 0, 4155 }, /* MOVE.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_103c_0), 0, 4156 }, /* MOVE.B #.B,Dn */ -{ CPUFUNC(op_1080_0), 0, 4224 }, /* MOVE.B Dn,(An) */ -{ CPUFUNC(op_1090_0), 0, 4240 }, /* MOVE.B (An),(An) */ -{ CPUFUNC(op_1098_0), 0, 4248 }, /* MOVE.B (An)+,(An) */ -{ CPUFUNC(op_10a0_0), 0, 4256 }, /* MOVE.B -(An),(An) */ -{ CPUFUNC(op_10a8_0), 0, 4264 }, /* MOVE.B (d16,An),(An) */ -{ CPUFUNC(op_10b0_0), 0, 4272 }, /* MOVE.B (d8,An,Xn),(An) */ -{ CPUFUNC(op_10b8_0), 0, 4280 }, /* MOVE.B (xxx).W,(An) */ -{ CPUFUNC(op_10b9_0), 0, 4281 }, /* MOVE.B (xxx).L,(An) */ -{ CPUFUNC(op_10ba_0), 0, 4282 }, /* MOVE.B (d16,PC),(An) */ -{ CPUFUNC(op_10bb_0), 0, 4283 }, /* MOVE.B (d8,PC,Xn),(An) */ -{ CPUFUNC(op_10bc_0), 0, 4284 }, /* MOVE.B #.B,(An) */ -{ CPUFUNC(op_10c0_0), 0, 4288 }, /* MOVE.B Dn,(An)+ */ -{ CPUFUNC(op_10d0_0), 0, 4304 }, /* MOVE.B (An),(An)+ */ -{ CPUFUNC(op_10d8_0), 0, 4312 }, /* MOVE.B (An)+,(An)+ */ -{ CPUFUNC(op_10e0_0), 0, 4320 }, /* MOVE.B -(An),(An)+ */ -{ CPUFUNC(op_10e8_0), 0, 4328 }, /* MOVE.B (d16,An),(An)+ */ -{ CPUFUNC(op_10f0_0), 0, 4336 }, /* MOVE.B (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_10f8_0), 0, 4344 }, /* MOVE.B (xxx).W,(An)+ */ -{ CPUFUNC(op_10f9_0), 0, 4345 }, /* MOVE.B (xxx).L,(An)+ */ -{ CPUFUNC(op_10fa_0), 0, 4346 }, /* MOVE.B (d16,PC),(An)+ */ -{ CPUFUNC(op_10fb_0), 0, 4347 }, /* MOVE.B (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_10fc_0), 0, 4348 }, /* MOVE.B #.B,(An)+ */ -{ CPUFUNC(op_1100_0), 0, 4352 }, /* MOVE.B Dn,-(An) */ -{ CPUFUNC(op_1110_0), 0, 4368 }, /* MOVE.B (An),-(An) */ -{ CPUFUNC(op_1118_0), 0, 4376 }, /* MOVE.B (An)+,-(An) */ -{ CPUFUNC(op_1120_0), 0, 4384 }, /* MOVE.B -(An),-(An) */ -{ CPUFUNC(op_1128_0), 0, 4392 }, /* MOVE.B (d16,An),-(An) */ -{ CPUFUNC(op_1130_0), 0, 4400 }, /* MOVE.B (d8,An,Xn),-(An) */ -{ CPUFUNC(op_1138_0), 0, 4408 }, /* MOVE.B (xxx).W,-(An) */ -{ CPUFUNC(op_1139_0), 0, 4409 }, /* MOVE.B (xxx).L,-(An) */ -{ CPUFUNC(op_113a_0), 0, 4410 }, /* MOVE.B (d16,PC),-(An) */ -{ CPUFUNC(op_113b_0), 0, 4411 }, /* MOVE.B (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_113c_0), 0, 4412 }, /* MOVE.B #.B,-(An) */ -{ CPUFUNC(op_1140_0), 0, 4416 }, /* MOVE.B Dn,(d16,An) */ -{ CPUFUNC(op_1150_0), 0, 4432 }, /* MOVE.B (An),(d16,An) */ -{ CPUFUNC(op_1158_0), 0, 4440 }, /* MOVE.B (An)+,(d16,An) */ -{ CPUFUNC(op_1160_0), 0, 4448 }, /* MOVE.B -(An),(d16,An) */ -{ CPUFUNC(op_1168_0), 0, 4456 }, /* MOVE.B (d16,An),(d16,An) */ -{ CPUFUNC(op_1170_0), 0, 4464 }, /* MOVE.B (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_1178_0), 0, 4472 }, /* MOVE.B (xxx).W,(d16,An) */ -{ CPUFUNC(op_1179_0), 0, 4473 }, /* MOVE.B (xxx).L,(d16,An) */ -{ CPUFUNC(op_117a_0), 0, 4474 }, /* MOVE.B (d16,PC),(d16,An) */ -{ CPUFUNC(op_117b_0), 0, 4475 }, /* MOVE.B (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_117c_0), 0, 4476 }, /* MOVE.B #.B,(d16,An) */ -{ CPUFUNC(op_1180_0), 0, 4480 }, /* MOVE.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1190_0), 0, 4496 }, /* MOVE.B (An),(d8,An,Xn) */ -{ CPUFUNC(op_1198_0), 0, 4504 }, /* MOVE.B (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_11a0_0), 0, 4512 }, /* MOVE.B -(An),(d8,An,Xn) */ -{ CPUFUNC(op_11a8_0), 0, 4520 }, /* MOVE.B (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_11b0_0), 0, 4528 }, /* MOVE.B (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_11b8_0), 0, 4536 }, /* MOVE.B (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_11b9_0), 0, 4537 }, /* MOVE.B (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_11ba_0), 0, 4538 }, /* MOVE.B (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_11bb_0), 0, 4539 }, /* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_11bc_0), 0, 4540 }, /* MOVE.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_11c0_0), 0, 4544 }, /* MOVE.B Dn,(xxx).W */ -{ CPUFUNC(op_11d0_0), 0, 4560 }, /* MOVE.B (An),(xxx).W */ -{ CPUFUNC(op_11d8_0), 0, 4568 }, /* MOVE.B (An)+,(xxx).W */ -{ CPUFUNC(op_11e0_0), 0, 4576 }, /* MOVE.B -(An),(xxx).W */ -{ CPUFUNC(op_11e8_0), 0, 4584 }, /* MOVE.B (d16,An),(xxx).W */ -{ CPUFUNC(op_11f0_0), 0, 4592 }, /* MOVE.B (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_11f8_0), 0, 4600 }, /* MOVE.B (xxx).W,(xxx).W */ -{ CPUFUNC(op_11f9_0), 0, 4601 }, /* MOVE.B (xxx).L,(xxx).W */ -{ CPUFUNC(op_11fa_0), 0, 4602 }, /* MOVE.B (d16,PC),(xxx).W */ -{ CPUFUNC(op_11fb_0), 0, 4603 }, /* MOVE.B (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_11fc_0), 0, 4604 }, /* MOVE.B #.B,(xxx).W */ -{ CPUFUNC(op_13c0_0), 0, 5056 }, /* MOVE.B Dn,(xxx).L */ -{ CPUFUNC(op_13d0_0), 0, 5072 }, /* MOVE.B (An),(xxx).L */ -{ CPUFUNC(op_13d8_0), 0, 5080 }, /* MOVE.B (An)+,(xxx).L */ -{ CPUFUNC(op_13e0_0), 0, 5088 }, /* MOVE.B -(An),(xxx).L */ -{ CPUFUNC(op_13e8_0), 0, 5096 }, /* MOVE.B (d16,An),(xxx).L */ -{ CPUFUNC(op_13f0_0), 0, 5104 }, /* MOVE.B (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_13f8_0), 0, 5112 }, /* MOVE.B (xxx).W,(xxx).L */ -{ CPUFUNC(op_13f9_0), 0, 5113 }, /* MOVE.B (xxx).L,(xxx).L */ -{ CPUFUNC(op_13fa_0), 0, 5114 }, /* MOVE.B (d16,PC),(xxx).L */ -{ CPUFUNC(op_13fb_0), 0, 5115 }, /* MOVE.B (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_13fc_0), 0, 5116 }, /* MOVE.B #.B,(xxx).L */ -{ CPUFUNC(op_2000_0), 0, 8192 }, /* MOVE.L Dn,Dn */ -{ CPUFUNC(op_2008_0), 0, 8200 }, /* MOVE.L An,Dn */ -{ CPUFUNC(op_2010_0), 0, 8208 }, /* MOVE.L (An),Dn */ -{ CPUFUNC(op_2018_0), 0, 8216 }, /* MOVE.L (An)+,Dn */ -{ CPUFUNC(op_2020_0), 0, 8224 }, /* MOVE.L -(An),Dn */ -{ CPUFUNC(op_2028_0), 0, 8232 }, /* MOVE.L (d16,An),Dn */ -{ CPUFUNC(op_2030_0), 0, 8240 }, /* MOVE.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_2038_0), 0, 8248 }, /* MOVE.L (xxx).W,Dn */ -{ CPUFUNC(op_2039_0), 0, 8249 }, /* MOVE.L (xxx).L,Dn */ -{ CPUFUNC(op_203a_0), 0, 8250 }, /* MOVE.L (d16,PC),Dn */ -{ CPUFUNC(op_203b_0), 0, 8251 }, /* MOVE.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_203c_0), 0, 8252 }, /* MOVE.L #.L,Dn */ -{ CPUFUNC_FF(op_2040_0), 0, 8256 }, /* MOVEA.L Dn,An */ -{ CPUFUNC_FF(op_2048_0), 0, 8264 }, /* MOVEA.L An,An */ -{ CPUFUNC_FF(op_2050_0), 0, 8272 }, /* MOVEA.L (An),An */ -{ CPUFUNC_FF(op_2058_0), 0, 8280 }, /* MOVEA.L (An)+,An */ -{ CPUFUNC_FF(op_2060_0), 0, 8288 }, /* MOVEA.L -(An),An */ -{ CPUFUNC_FF(op_2068_0), 0, 8296 }, /* MOVEA.L (d16,An),An */ -{ CPUFUNC_FF(op_2070_0), 0, 8304 }, /* MOVEA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_2078_0), 0, 8312 }, /* MOVEA.L (xxx).W,An */ -{ CPUFUNC_FF(op_2079_0), 0, 8313 }, /* MOVEA.L (xxx).L,An */ -{ CPUFUNC_FF(op_207a_0), 0, 8314 }, /* MOVEA.L (d16,PC),An */ -{ CPUFUNC_FF(op_207b_0), 0, 8315 }, /* MOVEA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_207c_0), 0, 8316 }, /* MOVEA.L #.L,An */ -{ CPUFUNC(op_2080_0), 0, 8320 }, /* MOVE.L Dn,(An) */ -{ CPUFUNC(op_2088_0), 0, 8328 }, /* MOVE.L An,(An) */ -{ CPUFUNC(op_2090_0), 0, 8336 }, /* MOVE.L (An),(An) */ -{ CPUFUNC(op_2098_0), 0, 8344 }, /* MOVE.L (An)+,(An) */ -{ CPUFUNC(op_20a0_0), 0, 8352 }, /* MOVE.L -(An),(An) */ -{ CPUFUNC(op_20a8_0), 0, 8360 }, /* MOVE.L (d16,An),(An) */ -{ CPUFUNC(op_20b0_0), 0, 8368 }, /* MOVE.L (d8,An,Xn),(An) */ -{ CPUFUNC(op_20b8_0), 0, 8376 }, /* MOVE.L (xxx).W,(An) */ -{ CPUFUNC(op_20b9_0), 0, 8377 }, /* MOVE.L (xxx).L,(An) */ -{ CPUFUNC(op_20ba_0), 0, 8378 }, /* MOVE.L (d16,PC),(An) */ -{ CPUFUNC(op_20bb_0), 0, 8379 }, /* MOVE.L (d8,PC,Xn),(An) */ -{ CPUFUNC(op_20bc_0), 0, 8380 }, /* MOVE.L #.L,(An) */ -{ CPUFUNC(op_20c0_0), 0, 8384 }, /* MOVE.L Dn,(An)+ */ -{ CPUFUNC(op_20c8_0), 0, 8392 }, /* MOVE.L An,(An)+ */ -{ CPUFUNC(op_20d0_0), 0, 8400 }, /* MOVE.L (An),(An)+ */ -{ CPUFUNC(op_20d8_0), 0, 8408 }, /* MOVE.L (An)+,(An)+ */ -{ CPUFUNC(op_20e0_0), 0, 8416 }, /* MOVE.L -(An),(An)+ */ -{ CPUFUNC(op_20e8_0), 0, 8424 }, /* MOVE.L (d16,An),(An)+ */ -{ CPUFUNC(op_20f0_0), 0, 8432 }, /* MOVE.L (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_20f8_0), 0, 8440 }, /* MOVE.L (xxx).W,(An)+ */ -{ CPUFUNC(op_20f9_0), 0, 8441 }, /* MOVE.L (xxx).L,(An)+ */ -{ CPUFUNC(op_20fa_0), 0, 8442 }, /* MOVE.L (d16,PC),(An)+ */ -{ CPUFUNC(op_20fb_0), 0, 8443 }, /* MOVE.L (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_20fc_0), 0, 8444 }, /* MOVE.L #.L,(An)+ */ -{ CPUFUNC(op_2100_0), 0, 8448 }, /* MOVE.L Dn,-(An) */ -{ CPUFUNC(op_2108_0), 0, 8456 }, /* MOVE.L An,-(An) */ -{ CPUFUNC(op_2110_0), 0, 8464 }, /* MOVE.L (An),-(An) */ -{ CPUFUNC(op_2118_0), 0, 8472 }, /* MOVE.L (An)+,-(An) */ -{ CPUFUNC(op_2120_0), 0, 8480 }, /* MOVE.L -(An),-(An) */ -{ CPUFUNC(op_2128_0), 0, 8488 }, /* MOVE.L (d16,An),-(An) */ -{ CPUFUNC(op_2130_0), 0, 8496 }, /* MOVE.L (d8,An,Xn),-(An) */ -{ CPUFUNC(op_2138_0), 0, 8504 }, /* MOVE.L (xxx).W,-(An) */ -{ CPUFUNC(op_2139_0), 0, 8505 }, /* MOVE.L (xxx).L,-(An) */ -{ CPUFUNC(op_213a_0), 0, 8506 }, /* MOVE.L (d16,PC),-(An) */ -{ CPUFUNC(op_213b_0), 0, 8507 }, /* MOVE.L (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_213c_0), 0, 8508 }, /* MOVE.L #.L,-(An) */ -{ CPUFUNC(op_2140_0), 0, 8512 }, /* MOVE.L Dn,(d16,An) */ -{ CPUFUNC(op_2148_0), 0, 8520 }, /* MOVE.L An,(d16,An) */ -{ CPUFUNC(op_2150_0), 0, 8528 }, /* MOVE.L (An),(d16,An) */ -{ CPUFUNC(op_2158_0), 0, 8536 }, /* MOVE.L (An)+,(d16,An) */ -{ CPUFUNC(op_2160_0), 0, 8544 }, /* MOVE.L -(An),(d16,An) */ -{ CPUFUNC(op_2168_0), 0, 8552 }, /* MOVE.L (d16,An),(d16,An) */ -{ CPUFUNC(op_2170_0), 0, 8560 }, /* MOVE.L (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_2178_0), 0, 8568 }, /* MOVE.L (xxx).W,(d16,An) */ -{ CPUFUNC(op_2179_0), 0, 8569 }, /* MOVE.L (xxx).L,(d16,An) */ -{ CPUFUNC(op_217a_0), 0, 8570 }, /* MOVE.L (d16,PC),(d16,An) */ -{ CPUFUNC(op_217b_0), 0, 8571 }, /* MOVE.L (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_217c_0), 0, 8572 }, /* MOVE.L #.L,(d16,An) */ -{ CPUFUNC(op_2180_0), 0, 8576 }, /* MOVE.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_2188_0), 0, 8584 }, /* MOVE.L An,(d8,An,Xn) */ -{ CPUFUNC(op_2190_0), 0, 8592 }, /* MOVE.L (An),(d8,An,Xn) */ -{ CPUFUNC(op_2198_0), 0, 8600 }, /* MOVE.L (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_21a0_0), 0, 8608 }, /* MOVE.L -(An),(d8,An,Xn) */ -{ CPUFUNC(op_21a8_0), 0, 8616 }, /* MOVE.L (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_21b0_0), 0, 8624 }, /* MOVE.L (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_21b8_0), 0, 8632 }, /* MOVE.L (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_21b9_0), 0, 8633 }, /* MOVE.L (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_21ba_0), 0, 8634 }, /* MOVE.L (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_21bb_0), 0, 8635 }, /* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_21bc_0), 0, 8636 }, /* MOVE.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_21c0_0), 0, 8640 }, /* MOVE.L Dn,(xxx).W */ -{ CPUFUNC(op_21c8_0), 0, 8648 }, /* MOVE.L An,(xxx).W */ -{ CPUFUNC(op_21d0_0), 0, 8656 }, /* MOVE.L (An),(xxx).W */ -{ CPUFUNC(op_21d8_0), 0, 8664 }, /* MOVE.L (An)+,(xxx).W */ -{ CPUFUNC(op_21e0_0), 0, 8672 }, /* MOVE.L -(An),(xxx).W */ -{ CPUFUNC(op_21e8_0), 0, 8680 }, /* MOVE.L (d16,An),(xxx).W */ -{ CPUFUNC(op_21f0_0), 0, 8688 }, /* MOVE.L (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_21f8_0), 0, 8696 }, /* MOVE.L (xxx).W,(xxx).W */ -{ CPUFUNC(op_21f9_0), 0, 8697 }, /* MOVE.L (xxx).L,(xxx).W */ -{ CPUFUNC(op_21fa_0), 0, 8698 }, /* MOVE.L (d16,PC),(xxx).W */ -{ CPUFUNC(op_21fb_0), 0, 8699 }, /* MOVE.L (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_21fc_0), 0, 8700 }, /* MOVE.L #.L,(xxx).W */ -{ CPUFUNC(op_23c0_0), 0, 9152 }, /* MOVE.L Dn,(xxx).L */ -{ CPUFUNC(op_23c8_0), 0, 9160 }, /* MOVE.L An,(xxx).L */ -{ CPUFUNC(op_23d0_0), 0, 9168 }, /* MOVE.L (An),(xxx).L */ -{ CPUFUNC(op_23d8_0), 0, 9176 }, /* MOVE.L (An)+,(xxx).L */ -{ CPUFUNC(op_23e0_0), 0, 9184 }, /* MOVE.L -(An),(xxx).L */ -{ CPUFUNC(op_23e8_0), 0, 9192 }, /* MOVE.L (d16,An),(xxx).L */ -{ CPUFUNC(op_23f0_0), 0, 9200 }, /* MOVE.L (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_23f8_0), 0, 9208 }, /* MOVE.L (xxx).W,(xxx).L */ -{ CPUFUNC(op_23f9_0), 0, 9209 }, /* MOVE.L (xxx).L,(xxx).L */ -{ CPUFUNC(op_23fa_0), 0, 9210 }, /* MOVE.L (d16,PC),(xxx).L */ -{ CPUFUNC(op_23fb_0), 0, 9211 }, /* MOVE.L (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_23fc_0), 0, 9212 }, /* MOVE.L #.L,(xxx).L */ -{ CPUFUNC(op_3000_0), 0, 12288 }, /* MOVE.W Dn,Dn */ -{ CPUFUNC(op_3008_0), 0, 12296 }, /* MOVE.W An,Dn */ -{ CPUFUNC(op_3010_0), 0, 12304 }, /* MOVE.W (An),Dn */ -{ CPUFUNC(op_3018_0), 0, 12312 }, /* MOVE.W (An)+,Dn */ -{ CPUFUNC(op_3020_0), 0, 12320 }, /* MOVE.W -(An),Dn */ -{ CPUFUNC(op_3028_0), 0, 12328 }, /* MOVE.W (d16,An),Dn */ -{ CPUFUNC(op_3030_0), 0, 12336 }, /* MOVE.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_3038_0), 0, 12344 }, /* MOVE.W (xxx).W,Dn */ -{ CPUFUNC(op_3039_0), 0, 12345 }, /* MOVE.W (xxx).L,Dn */ -{ CPUFUNC(op_303a_0), 0, 12346 }, /* MOVE.W (d16,PC),Dn */ -{ CPUFUNC(op_303b_0), 0, 12347 }, /* MOVE.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_303c_0), 0, 12348 }, /* MOVE.W #.W,Dn */ -{ CPUFUNC_FF(op_3040_0), 0, 12352 }, /* MOVEA.W Dn,An */ -{ CPUFUNC_FF(op_3048_0), 0, 12360 }, /* MOVEA.W An,An */ -{ CPUFUNC_FF(op_3050_0), 0, 12368 }, /* MOVEA.W (An),An */ -{ CPUFUNC_FF(op_3058_0), 0, 12376 }, /* MOVEA.W (An)+,An */ -{ CPUFUNC_FF(op_3060_0), 0, 12384 }, /* MOVEA.W -(An),An */ -{ CPUFUNC_FF(op_3068_0), 0, 12392 }, /* MOVEA.W (d16,An),An */ -{ CPUFUNC_FF(op_3070_0), 0, 12400 }, /* MOVEA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_3078_0), 0, 12408 }, /* MOVEA.W (xxx).W,An */ -{ CPUFUNC_FF(op_3079_0), 0, 12409 }, /* MOVEA.W (xxx).L,An */ -{ CPUFUNC_FF(op_307a_0), 0, 12410 }, /* MOVEA.W (d16,PC),An */ -{ CPUFUNC_FF(op_307b_0), 0, 12411 }, /* MOVEA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_307c_0), 0, 12412 }, /* MOVEA.W #.W,An */ -{ CPUFUNC(op_3080_0), 0, 12416 }, /* MOVE.W Dn,(An) */ -{ CPUFUNC(op_3088_0), 0, 12424 }, /* MOVE.W An,(An) */ -{ CPUFUNC(op_3090_0), 0, 12432 }, /* MOVE.W (An),(An) */ -{ CPUFUNC(op_3098_0), 0, 12440 }, /* MOVE.W (An)+,(An) */ -{ CPUFUNC(op_30a0_0), 0, 12448 }, /* MOVE.W -(An),(An) */ -{ CPUFUNC(op_30a8_0), 0, 12456 }, /* MOVE.W (d16,An),(An) */ -{ CPUFUNC(op_30b0_0), 0, 12464 }, /* MOVE.W (d8,An,Xn),(An) */ -{ CPUFUNC(op_30b8_0), 0, 12472 }, /* MOVE.W (xxx).W,(An) */ -{ CPUFUNC(op_30b9_0), 0, 12473 }, /* MOVE.W (xxx).L,(An) */ -{ CPUFUNC(op_30ba_0), 0, 12474 }, /* MOVE.W (d16,PC),(An) */ -{ CPUFUNC(op_30bb_0), 0, 12475 }, /* MOVE.W (d8,PC,Xn),(An) */ -{ CPUFUNC(op_30bc_0), 0, 12476 }, /* MOVE.W #.W,(An) */ -{ CPUFUNC(op_30c0_0), 0, 12480 }, /* MOVE.W Dn,(An)+ */ -{ CPUFUNC(op_30c8_0), 0, 12488 }, /* MOVE.W An,(An)+ */ -{ CPUFUNC(op_30d0_0), 0, 12496 }, /* MOVE.W (An),(An)+ */ -{ CPUFUNC(op_30d8_0), 0, 12504 }, /* MOVE.W (An)+,(An)+ */ -{ CPUFUNC(op_30e0_0), 0, 12512 }, /* MOVE.W -(An),(An)+ */ -{ CPUFUNC(op_30e8_0), 0, 12520 }, /* MOVE.W (d16,An),(An)+ */ -{ CPUFUNC(op_30f0_0), 0, 12528 }, /* MOVE.W (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_30f8_0), 0, 12536 }, /* MOVE.W (xxx).W,(An)+ */ -{ CPUFUNC(op_30f9_0), 0, 12537 }, /* MOVE.W (xxx).L,(An)+ */ -{ CPUFUNC(op_30fa_0), 0, 12538 }, /* MOVE.W (d16,PC),(An)+ */ -{ CPUFUNC(op_30fb_0), 0, 12539 }, /* MOVE.W (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_30fc_0), 0, 12540 }, /* MOVE.W #.W,(An)+ */ -{ CPUFUNC(op_3100_0), 0, 12544 }, /* MOVE.W Dn,-(An) */ -{ CPUFUNC(op_3108_0), 0, 12552 }, /* MOVE.W An,-(An) */ -{ CPUFUNC(op_3110_0), 0, 12560 }, /* MOVE.W (An),-(An) */ -{ CPUFUNC(op_3118_0), 0, 12568 }, /* MOVE.W (An)+,-(An) */ -{ CPUFUNC(op_3120_0), 0, 12576 }, /* MOVE.W -(An),-(An) */ -{ CPUFUNC(op_3128_0), 0, 12584 }, /* MOVE.W (d16,An),-(An) */ -{ CPUFUNC(op_3130_0), 0, 12592 }, /* MOVE.W (d8,An,Xn),-(An) */ -{ CPUFUNC(op_3138_0), 0, 12600 }, /* MOVE.W (xxx).W,-(An) */ -{ CPUFUNC(op_3139_0), 0, 12601 }, /* MOVE.W (xxx).L,-(An) */ -{ CPUFUNC(op_313a_0), 0, 12602 }, /* MOVE.W (d16,PC),-(An) */ -{ CPUFUNC(op_313b_0), 0, 12603 }, /* MOVE.W (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_313c_0), 0, 12604 }, /* MOVE.W #.W,-(An) */ -{ CPUFUNC(op_3140_0), 0, 12608 }, /* MOVE.W Dn,(d16,An) */ -{ CPUFUNC(op_3148_0), 0, 12616 }, /* MOVE.W An,(d16,An) */ -{ CPUFUNC(op_3150_0), 0, 12624 }, /* MOVE.W (An),(d16,An) */ -{ CPUFUNC(op_3158_0), 0, 12632 }, /* MOVE.W (An)+,(d16,An) */ -{ CPUFUNC(op_3160_0), 0, 12640 }, /* MOVE.W -(An),(d16,An) */ -{ CPUFUNC(op_3168_0), 0, 12648 }, /* MOVE.W (d16,An),(d16,An) */ -{ CPUFUNC(op_3170_0), 0, 12656 }, /* MOVE.W (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_3178_0), 0, 12664 }, /* MOVE.W (xxx).W,(d16,An) */ -{ CPUFUNC(op_3179_0), 0, 12665 }, /* MOVE.W (xxx).L,(d16,An) */ -{ CPUFUNC(op_317a_0), 0, 12666 }, /* MOVE.W (d16,PC),(d16,An) */ -{ CPUFUNC(op_317b_0), 0, 12667 }, /* MOVE.W (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_317c_0), 0, 12668 }, /* MOVE.W #.W,(d16,An) */ -{ CPUFUNC(op_3180_0), 0, 12672 }, /* MOVE.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_3188_0), 0, 12680 }, /* MOVE.W An,(d8,An,Xn) */ -{ CPUFUNC(op_3190_0), 0, 12688 }, /* MOVE.W (An),(d8,An,Xn) */ -{ CPUFUNC(op_3198_0), 0, 12696 }, /* MOVE.W (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_31a0_0), 0, 12704 }, /* MOVE.W -(An),(d8,An,Xn) */ -{ CPUFUNC(op_31a8_0), 0, 12712 }, /* MOVE.W (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_31b0_0), 0, 12720 }, /* MOVE.W (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_31b8_0), 0, 12728 }, /* MOVE.W (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_31b9_0), 0, 12729 }, /* MOVE.W (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_31ba_0), 0, 12730 }, /* MOVE.W (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_31bb_0), 0, 12731 }, /* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_31bc_0), 0, 12732 }, /* MOVE.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_31c0_0), 0, 12736 }, /* MOVE.W Dn,(xxx).W */ -{ CPUFUNC(op_31c8_0), 0, 12744 }, /* MOVE.W An,(xxx).W */ -{ CPUFUNC(op_31d0_0), 0, 12752 }, /* MOVE.W (An),(xxx).W */ -{ CPUFUNC(op_31d8_0), 0, 12760 }, /* MOVE.W (An)+,(xxx).W */ -{ CPUFUNC(op_31e0_0), 0, 12768 }, /* MOVE.W -(An),(xxx).W */ -{ CPUFUNC(op_31e8_0), 0, 12776 }, /* MOVE.W (d16,An),(xxx).W */ -{ CPUFUNC(op_31f0_0), 0, 12784 }, /* MOVE.W (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_31f8_0), 0, 12792 }, /* MOVE.W (xxx).W,(xxx).W */ -{ CPUFUNC(op_31f9_0), 0, 12793 }, /* MOVE.W (xxx).L,(xxx).W */ -{ CPUFUNC(op_31fa_0), 0, 12794 }, /* MOVE.W (d16,PC),(xxx).W */ -{ CPUFUNC(op_31fb_0), 0, 12795 }, /* MOVE.W (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_31fc_0), 0, 12796 }, /* MOVE.W #.W,(xxx).W */ -{ CPUFUNC(op_33c0_0), 0, 13248 }, /* MOVE.W Dn,(xxx).L */ -{ CPUFUNC(op_33c8_0), 0, 13256 }, /* MOVE.W An,(xxx).L */ -{ CPUFUNC(op_33d0_0), 0, 13264 }, /* MOVE.W (An),(xxx).L */ -{ CPUFUNC(op_33d8_0), 0, 13272 }, /* MOVE.W (An)+,(xxx).L */ -{ CPUFUNC(op_33e0_0), 0, 13280 }, /* MOVE.W -(An),(xxx).L */ -{ CPUFUNC(op_33e8_0), 0, 13288 }, /* MOVE.W (d16,An),(xxx).L */ -{ CPUFUNC(op_33f0_0), 0, 13296 }, /* MOVE.W (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_33f8_0), 0, 13304 }, /* MOVE.W (xxx).W,(xxx).L */ -{ CPUFUNC(op_33f9_0), 0, 13305 }, /* MOVE.W (xxx).L,(xxx).L */ -{ CPUFUNC(op_33fa_0), 0, 13306 }, /* MOVE.W (d16,PC),(xxx).L */ -{ CPUFUNC(op_33fb_0), 0, 13307 }, /* MOVE.W (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_33fc_0), 0, 13308 }, /* MOVE.W #.W,(xxx).L */ -{ CPUFUNC(op_4000_0), 0, 16384 }, /* NEGX.B Dn */ -{ CPUFUNC(op_4010_0), 0, 16400 }, /* NEGX.B (An) */ -{ CPUFUNC(op_4018_0), 0, 16408 }, /* NEGX.B (An)+ */ -{ CPUFUNC(op_4020_0), 0, 16416 }, /* NEGX.B -(An) */ -{ CPUFUNC(op_4028_0), 0, 16424 }, /* NEGX.B (d16,An) */ -{ CPUFUNC(op_4030_0), 0, 16432 }, /* NEGX.B (d8,An,Xn) */ -{ CPUFUNC(op_4038_0), 0, 16440 }, /* NEGX.B (xxx).W */ -{ CPUFUNC(op_4039_0), 0, 16441 }, /* NEGX.B (xxx).L */ -{ CPUFUNC(op_4040_0), 0, 16448 }, /* NEGX.W Dn */ -{ CPUFUNC(op_4050_0), 0, 16464 }, /* NEGX.W (An) */ -{ CPUFUNC(op_4058_0), 0, 16472 }, /* NEGX.W (An)+ */ -{ CPUFUNC(op_4060_0), 0, 16480 }, /* NEGX.W -(An) */ -{ CPUFUNC(op_4068_0), 0, 16488 }, /* NEGX.W (d16,An) */ -{ CPUFUNC(op_4070_0), 0, 16496 }, /* NEGX.W (d8,An,Xn) */ -{ CPUFUNC(op_4078_0), 0, 16504 }, /* NEGX.W (xxx).W */ -{ CPUFUNC(op_4079_0), 0, 16505 }, /* NEGX.W (xxx).L */ -{ CPUFUNC(op_4080_0), 0, 16512 }, /* NEGX.L Dn */ -{ CPUFUNC(op_4090_0), 0, 16528 }, /* NEGX.L (An) */ -{ CPUFUNC(op_4098_0), 0, 16536 }, /* NEGX.L (An)+ */ -{ CPUFUNC(op_40a0_0), 0, 16544 }, /* NEGX.L -(An) */ -{ CPUFUNC(op_40a8_0), 0, 16552 }, /* NEGX.L (d16,An) */ -{ CPUFUNC(op_40b0_0), 0, 16560 }, /* NEGX.L (d8,An,Xn) */ -{ CPUFUNC(op_40b8_0), 0, 16568 }, /* NEGX.L (xxx).W */ -{ CPUFUNC(op_40b9_0), 0, 16569 }, /* NEGX.L (xxx).L */ -{ CPUFUNC_FF(op_40c0_0), 0, 16576 }, /* MVSR2.W Dn */ -{ CPUFUNC_FF(op_40d0_0), 0, 16592 }, /* MVSR2.W (An) */ -{ CPUFUNC_FF(op_40d8_0), 0, 16600 }, /* MVSR2.W (An)+ */ -{ CPUFUNC_FF(op_40e0_0), 0, 16608 }, /* MVSR2.W -(An) */ -{ CPUFUNC_FF(op_40e8_0), 0, 16616 }, /* MVSR2.W (d16,An) */ -{ CPUFUNC_FF(op_40f0_0), 0, 16624 }, /* MVSR2.W (d8,An,Xn) */ -{ CPUFUNC_FF(op_40f8_0), 0, 16632 }, /* MVSR2.W (xxx).W */ -{ CPUFUNC_FF(op_40f9_0), 0, 16633 }, /* MVSR2.W (xxx).L */ -{ CPUFUNC(op_4100_0), 0, 16640 }, /* CHK.L Dn,Dn */ -{ CPUFUNC(op_4110_0), 0, 16656 }, /* CHK.L (An),Dn */ -{ CPUFUNC(op_4118_0), 0, 16664 }, /* CHK.L (An)+,Dn */ -{ CPUFUNC(op_4120_0), 0, 16672 }, /* CHK.L -(An),Dn */ -{ CPUFUNC(op_4128_0), 0, 16680 }, /* CHK.L (d16,An),Dn */ -{ CPUFUNC(op_4130_0), 0, 16688 }, /* CHK.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_4138_0), 0, 16696 }, /* CHK.L (xxx).W,Dn */ -{ CPUFUNC(op_4139_0), 0, 16697 }, /* CHK.L (xxx).L,Dn */ -{ CPUFUNC(op_413a_0), 0, 16698 }, /* CHK.L (d16,PC),Dn */ -{ CPUFUNC(op_413b_0), 0, 16699 }, /* CHK.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_413c_0), 0, 16700 }, /* CHK.L #.L,Dn */ -{ CPUFUNC(op_4180_0), 0, 16768 }, /* CHK.W Dn,Dn */ -{ CPUFUNC(op_4190_0), 0, 16784 }, /* CHK.W (An),Dn */ -{ CPUFUNC(op_4198_0), 0, 16792 }, /* CHK.W (An)+,Dn */ -{ CPUFUNC(op_41a0_0), 0, 16800 }, /* CHK.W -(An),Dn */ -{ CPUFUNC(op_41a8_0), 0, 16808 }, /* CHK.W (d16,An),Dn */ -{ CPUFUNC(op_41b0_0), 0, 16816 }, /* CHK.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_41b8_0), 0, 16824 }, /* CHK.W (xxx).W,Dn */ -{ CPUFUNC(op_41b9_0), 0, 16825 }, /* CHK.W (xxx).L,Dn */ -{ CPUFUNC(op_41ba_0), 0, 16826 }, /* CHK.W (d16,PC),Dn */ -{ CPUFUNC(op_41bb_0), 0, 16827 }, /* CHK.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_41bc_0), 0, 16828 }, /* CHK.W #.W,Dn */ -{ CPUFUNC_FF(op_41d0_0), 0, 16848 }, /* LEA.L (An),An */ -{ CPUFUNC_FF(op_41e8_0), 0, 16872 }, /* LEA.L (d16,An),An */ -{ CPUFUNC_FF(op_41f0_0), 0, 16880 }, /* LEA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_41f8_0), 0, 16888 }, /* LEA.L (xxx).W,An */ -{ CPUFUNC_FF(op_41f9_0), 0, 16889 }, /* LEA.L (xxx).L,An */ -{ CPUFUNC_FF(op_41fa_0), 0, 16890 }, /* LEA.L (d16,PC),An */ -{ CPUFUNC_FF(op_41fb_0), 0, 16891 }, /* LEA.L (d8,PC,Xn),An */ -{ CPUFUNC(op_4200_0), 0, 16896 }, /* CLR.B Dn */ -{ CPUFUNC(op_4210_0), 0, 16912 }, /* CLR.B (An) */ -{ CPUFUNC(op_4218_0), 0, 16920 }, /* CLR.B (An)+ */ -{ CPUFUNC(op_4220_0), 0, 16928 }, /* CLR.B -(An) */ -{ CPUFUNC(op_4228_0), 0, 16936 }, /* CLR.B (d16,An) */ -{ CPUFUNC(op_4230_0), 0, 16944 }, /* CLR.B (d8,An,Xn) */ -{ CPUFUNC(op_4238_0), 0, 16952 }, /* CLR.B (xxx).W */ -{ CPUFUNC(op_4239_0), 0, 16953 }, /* CLR.B (xxx).L */ -{ CPUFUNC(op_4240_0), 0, 16960 }, /* CLR.W Dn */ -{ CPUFUNC(op_4250_0), 0, 16976 }, /* CLR.W (An) */ -{ CPUFUNC(op_4258_0), 0, 16984 }, /* CLR.W (An)+ */ -{ CPUFUNC(op_4260_0), 0, 16992 }, /* CLR.W -(An) */ -{ CPUFUNC(op_4268_0), 0, 17000 }, /* CLR.W (d16,An) */ -{ CPUFUNC(op_4270_0), 0, 17008 }, /* CLR.W (d8,An,Xn) */ -{ CPUFUNC(op_4278_0), 0, 17016 }, /* CLR.W (xxx).W */ -{ CPUFUNC(op_4279_0), 0, 17017 }, /* CLR.W (xxx).L */ -{ CPUFUNC(op_4280_0), 0, 17024 }, /* CLR.L Dn */ -{ CPUFUNC(op_4290_0), 0, 17040 }, /* CLR.L (An) */ -{ CPUFUNC(op_4298_0), 0, 17048 }, /* CLR.L (An)+ */ -{ CPUFUNC(op_42a0_0), 0, 17056 }, /* CLR.L -(An) */ -{ CPUFUNC(op_42a8_0), 0, 17064 }, /* CLR.L (d16,An) */ -{ CPUFUNC(op_42b0_0), 0, 17072 }, /* CLR.L (d8,An,Xn) */ -{ CPUFUNC(op_42b8_0), 0, 17080 }, /* CLR.L (xxx).W */ -{ CPUFUNC(op_42b9_0), 0, 17081 }, /* CLR.L (xxx).L */ -{ CPUFUNC_FF(op_42c0_0), 0, 17088 }, /* MVSR2.B Dn */ -{ CPUFUNC_FF(op_42d0_0), 0, 17104 }, /* MVSR2.B (An) */ -{ CPUFUNC_FF(op_42d8_0), 0, 17112 }, /* MVSR2.B (An)+ */ -{ CPUFUNC_FF(op_42e0_0), 0, 17120 }, /* MVSR2.B -(An) */ -{ CPUFUNC_FF(op_42e8_0), 0, 17128 }, /* MVSR2.B (d16,An) */ -{ CPUFUNC_FF(op_42f0_0), 0, 17136 }, /* MVSR2.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_42f8_0), 0, 17144 }, /* MVSR2.B (xxx).W */ -{ CPUFUNC_FF(op_42f9_0), 0, 17145 }, /* MVSR2.B (xxx).L */ -{ CPUFUNC(op_4400_0), 0, 17408 }, /* NEG.B Dn */ -{ CPUFUNC(op_4410_0), 0, 17424 }, /* NEG.B (An) */ -{ CPUFUNC(op_4418_0), 0, 17432 }, /* NEG.B (An)+ */ -{ CPUFUNC(op_4420_0), 0, 17440 }, /* NEG.B -(An) */ -{ CPUFUNC(op_4428_0), 0, 17448 }, /* NEG.B (d16,An) */ -{ CPUFUNC(op_4430_0), 0, 17456 }, /* NEG.B (d8,An,Xn) */ -{ CPUFUNC(op_4438_0), 0, 17464 }, /* NEG.B (xxx).W */ -{ CPUFUNC(op_4439_0), 0, 17465 }, /* NEG.B (xxx).L */ -{ CPUFUNC(op_4440_0), 0, 17472 }, /* NEG.W Dn */ -{ CPUFUNC(op_4450_0), 0, 17488 }, /* NEG.W (An) */ -{ CPUFUNC(op_4458_0), 0, 17496 }, /* NEG.W (An)+ */ -{ CPUFUNC(op_4460_0), 0, 17504 }, /* NEG.W -(An) */ -{ CPUFUNC(op_4468_0), 0, 17512 }, /* NEG.W (d16,An) */ -{ CPUFUNC(op_4470_0), 0, 17520 }, /* NEG.W (d8,An,Xn) */ -{ CPUFUNC(op_4478_0), 0, 17528 }, /* NEG.W (xxx).W */ -{ CPUFUNC(op_4479_0), 0, 17529 }, /* NEG.W (xxx).L */ -{ CPUFUNC(op_4480_0), 0, 17536 }, /* NEG.L Dn */ -{ CPUFUNC(op_4490_0), 0, 17552 }, /* NEG.L (An) */ -{ CPUFUNC(op_4498_0), 0, 17560 }, /* NEG.L (An)+ */ -{ CPUFUNC(op_44a0_0), 0, 17568 }, /* NEG.L -(An) */ -{ CPUFUNC(op_44a8_0), 0, 17576 }, /* NEG.L (d16,An) */ -{ CPUFUNC(op_44b0_0), 0, 17584 }, /* NEG.L (d8,An,Xn) */ -{ CPUFUNC(op_44b8_0), 0, 17592 }, /* NEG.L (xxx).W */ -{ CPUFUNC(op_44b9_0), 0, 17593 }, /* NEG.L (xxx).L */ -{ CPUFUNC(op_44c0_0), 0, 17600 }, /* MV2SR.B Dn */ -{ CPUFUNC(op_44d0_0), 0, 17616 }, /* MV2SR.B (An) */ -{ CPUFUNC(op_44d8_0), 0, 17624 }, /* MV2SR.B (An)+ */ -{ CPUFUNC(op_44e0_0), 0, 17632 }, /* MV2SR.B -(An) */ -{ CPUFUNC(op_44e8_0), 0, 17640 }, /* MV2SR.B (d16,An) */ -{ CPUFUNC(op_44f0_0), 0, 17648 }, /* MV2SR.B (d8,An,Xn) */ -{ CPUFUNC(op_44f8_0), 0, 17656 }, /* MV2SR.B (xxx).W */ -{ CPUFUNC(op_44f9_0), 0, 17657 }, /* MV2SR.B (xxx).L */ -{ CPUFUNC(op_44fa_0), 0, 17658 }, /* MV2SR.B (d16,PC) */ -{ CPUFUNC(op_44fb_0), 0, 17659 }, /* MV2SR.B (d8,PC,Xn) */ -{ CPUFUNC(op_44fc_0), 0, 17660 }, /* MV2SR.B #.B */ -{ CPUFUNC(op_4600_0), 0, 17920 }, /* NOT.B Dn */ -{ CPUFUNC(op_4610_0), 0, 17936 }, /* NOT.B (An) */ -{ CPUFUNC(op_4618_0), 0, 17944 }, /* NOT.B (An)+ */ -{ CPUFUNC(op_4620_0), 0, 17952 }, /* NOT.B -(An) */ -{ CPUFUNC(op_4628_0), 0, 17960 }, /* NOT.B (d16,An) */ -{ CPUFUNC(op_4630_0), 0, 17968 }, /* NOT.B (d8,An,Xn) */ -{ CPUFUNC(op_4638_0), 0, 17976 }, /* NOT.B (xxx).W */ -{ CPUFUNC(op_4639_0), 0, 17977 }, /* NOT.B (xxx).L */ -{ CPUFUNC(op_4640_0), 0, 17984 }, /* NOT.W Dn */ -{ CPUFUNC(op_4650_0), 0, 18000 }, /* NOT.W (An) */ -{ CPUFUNC(op_4658_0), 0, 18008 }, /* NOT.W (An)+ */ -{ CPUFUNC(op_4660_0), 0, 18016 }, /* NOT.W -(An) */ -{ CPUFUNC(op_4668_0), 0, 18024 }, /* NOT.W (d16,An) */ -{ CPUFUNC(op_4670_0), 0, 18032 }, /* NOT.W (d8,An,Xn) */ -{ CPUFUNC(op_4678_0), 0, 18040 }, /* NOT.W (xxx).W */ -{ CPUFUNC(op_4679_0), 0, 18041 }, /* NOT.W (xxx).L */ -{ CPUFUNC(op_4680_0), 0, 18048 }, /* NOT.L Dn */ -{ CPUFUNC(op_4690_0), 0, 18064 }, /* NOT.L (An) */ -{ CPUFUNC(op_4698_0), 0, 18072 }, /* NOT.L (An)+ */ -{ CPUFUNC(op_46a0_0), 0, 18080 }, /* NOT.L -(An) */ -{ CPUFUNC(op_46a8_0), 0, 18088 }, /* NOT.L (d16,An) */ -{ CPUFUNC(op_46b0_0), 0, 18096 }, /* NOT.L (d8,An,Xn) */ -{ CPUFUNC(op_46b8_0), 0, 18104 }, /* NOT.L (xxx).W */ -{ CPUFUNC(op_46b9_0), 0, 18105 }, /* NOT.L (xxx).L */ -{ CPUFUNC(op_46c0_0), 0, 18112 }, /* MV2SR.W Dn */ -{ CPUFUNC(op_46d0_0), 0, 18128 }, /* MV2SR.W (An) */ -{ CPUFUNC(op_46d8_0), 0, 18136 }, /* MV2SR.W (An)+ */ -{ CPUFUNC(op_46e0_0), 0, 18144 }, /* MV2SR.W -(An) */ -{ CPUFUNC(op_46e8_0), 0, 18152 }, /* MV2SR.W (d16,An) */ -{ CPUFUNC(op_46f0_0), 0, 18160 }, /* MV2SR.W (d8,An,Xn) */ -{ CPUFUNC(op_46f8_0), 0, 18168 }, /* MV2SR.W (xxx).W */ -{ CPUFUNC(op_46f9_0), 0, 18169 }, /* MV2SR.W (xxx).L */ -{ CPUFUNC(op_46fa_0), 0, 18170 }, /* MV2SR.W (d16,PC) */ -{ CPUFUNC(op_46fb_0), 0, 18171 }, /* MV2SR.W (d8,PC,Xn) */ -{ CPUFUNC(op_46fc_0), 0, 18172 }, /* MV2SR.W #.W */ -{ CPUFUNC(op_4800_1), 0, 18432 }, /* NBCD.B Dn */ -{ CPUFUNC_FF(op_4808_0), 0, 18440 }, /* LINK.L An,#.L */ -{ CPUFUNC(op_4810_1), 0, 18448 }, /* NBCD.B (An) */ -{ CPUFUNC(op_4818_1), 0, 18456 }, /* NBCD.B (An)+ */ -{ CPUFUNC(op_4820_1), 0, 18464 }, /* NBCD.B -(An) */ -{ CPUFUNC(op_4828_1), 0, 18472 }, /* NBCD.B (d16,An) */ -{ CPUFUNC(op_4830_1), 0, 18480 }, /* NBCD.B (d8,An,Xn) */ -{ CPUFUNC(op_4838_1), 0, 18488 }, /* NBCD.B (xxx).W */ -{ CPUFUNC(op_4839_1), 0, 18489 }, /* NBCD.B (xxx).L */ -{ CPUFUNC(op_4840_0), 0, 18496 }, /* SWAP.W Dn */ -{ CPUFUNC_FF(op_4848_0), 0, 18504 }, /* BKPT.L # */ -{ CPUFUNC_FF(op_4850_0), 0, 18512 }, /* PEA.L (An) */ -{ CPUFUNC_FF(op_4868_0), 0, 18536 }, /* PEA.L (d16,An) */ -{ CPUFUNC_FF(op_4870_0), 0, 18544 }, /* PEA.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4878_0), 0, 18552 }, /* PEA.L (xxx).W */ -{ CPUFUNC_FF(op_4879_0), 0, 18553 }, /* PEA.L (xxx).L */ -{ CPUFUNC_FF(op_487a_0), 0, 18554 }, /* PEA.L (d16,PC) */ -{ CPUFUNC_FF(op_487b_0), 0, 18555 }, /* PEA.L (d8,PC,Xn) */ -{ CPUFUNC(op_4880_0), 0, 18560 }, /* EXT.W Dn */ -{ CPUFUNC_FF(op_4890_0), 0, 18576 }, /* MVMLE.W #.W,(An) */ -{ CPUFUNC_FF(op_48a0_0), 0, 18592 }, /* MVMLE.W #.W,-(An) */ -{ CPUFUNC_FF(op_48a8_0), 0, 18600 }, /* MVMLE.W #.W,(d16,An) */ -{ CPUFUNC_FF(op_48b0_0), 0, 18608 }, /* MVMLE.W #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_48b8_0), 0, 18616 }, /* MVMLE.W #.W,(xxx).W */ -{ CPUFUNC_FF(op_48b9_0), 0, 18617 }, /* MVMLE.W #.W,(xxx).L */ -{ CPUFUNC(op_48c0_0), 0, 18624 }, /* EXT.L Dn */ -{ CPUFUNC_FF(op_48d0_0), 0, 18640 }, /* MVMLE.L #.W,(An) */ -{ CPUFUNC_FF(op_48e0_0), 0, 18656 }, /* MVMLE.L #.W,-(An) */ -{ CPUFUNC_FF(op_48e8_0), 0, 18664 }, /* MVMLE.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_48f0_0), 0, 18672 }, /* MVMLE.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_48f8_0), 0, 18680 }, /* MVMLE.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_48f9_0), 0, 18681 }, /* MVMLE.L #.W,(xxx).L */ -{ CPUFUNC(op_49c0_0), 0, 18880 }, /* EXT.B Dn */ -{ CPUFUNC(op_4a00_0), 0, 18944 }, /* TST.B Dn */ -{ CPUFUNC(op_4a10_0), 0, 18960 }, /* TST.B (An) */ -{ CPUFUNC(op_4a18_0), 0, 18968 }, /* TST.B (An)+ */ -{ CPUFUNC(op_4a20_0), 0, 18976 }, /* TST.B -(An) */ -{ CPUFUNC(op_4a28_0), 0, 18984 }, /* TST.B (d16,An) */ -{ CPUFUNC(op_4a30_0), 0, 18992 }, /* TST.B (d8,An,Xn) */ -{ CPUFUNC(op_4a38_0), 0, 19000 }, /* TST.B (xxx).W */ -{ CPUFUNC(op_4a39_0), 0, 19001 }, /* TST.B (xxx).L */ -{ CPUFUNC(op_4a3a_0), 0, 19002 }, /* TST.B (d16,PC) */ -{ CPUFUNC(op_4a3b_0), 0, 19003 }, /* TST.B (d8,PC,Xn) */ -{ CPUFUNC(op_4a3c_0), 0, 19004 }, /* TST.B #.B */ -{ CPUFUNC(op_4a40_0), 0, 19008 }, /* TST.W Dn */ -{ CPUFUNC(op_4a48_0), 0, 19016 }, /* TST.W An */ -{ CPUFUNC(op_4a50_0), 0, 19024 }, /* TST.W (An) */ -{ CPUFUNC(op_4a58_0), 0, 19032 }, /* TST.W (An)+ */ -{ CPUFUNC(op_4a60_0), 0, 19040 }, /* TST.W -(An) */ -{ CPUFUNC(op_4a68_0), 0, 19048 }, /* TST.W (d16,An) */ -{ CPUFUNC(op_4a70_0), 0, 19056 }, /* TST.W (d8,An,Xn) */ -{ CPUFUNC(op_4a78_0), 0, 19064 }, /* TST.W (xxx).W */ -{ CPUFUNC(op_4a79_0), 0, 19065 }, /* TST.W (xxx).L */ -{ CPUFUNC(op_4a7a_0), 0, 19066 }, /* TST.W (d16,PC) */ -{ CPUFUNC(op_4a7b_0), 0, 19067 }, /* TST.W (d8,PC,Xn) */ -{ CPUFUNC(op_4a7c_0), 0, 19068 }, /* TST.W #.W */ -{ CPUFUNC(op_4a80_0), 0, 19072 }, /* TST.L Dn */ -{ CPUFUNC(op_4a88_0), 0, 19080 }, /* TST.L An */ -{ CPUFUNC(op_4a90_0), 0, 19088 }, /* TST.L (An) */ -{ CPUFUNC(op_4a98_0), 0, 19096 }, /* TST.L (An)+ */ -{ CPUFUNC(op_4aa0_0), 0, 19104 }, /* TST.L -(An) */ -{ CPUFUNC(op_4aa8_0), 0, 19112 }, /* TST.L (d16,An) */ -{ CPUFUNC(op_4ab0_0), 0, 19120 }, /* TST.L (d8,An,Xn) */ -{ CPUFUNC(op_4ab8_0), 0, 19128 }, /* TST.L (xxx).W */ -{ CPUFUNC(op_4ab9_0), 0, 19129 }, /* TST.L (xxx).L */ -{ CPUFUNC(op_4aba_0), 0, 19130 }, /* TST.L (d16,PC) */ -{ CPUFUNC(op_4abb_0), 0, 19131 }, /* TST.L (d8,PC,Xn) */ -{ CPUFUNC(op_4abc_0), 0, 19132 }, /* TST.L #.L */ -{ CPUFUNC(op_4ac0_0), 0, 19136 }, /* TAS.B Dn */ -{ CPUFUNC(op_4ad0_0), 0, 19152 }, /* TAS.B (An) */ -{ CPUFUNC(op_4ad8_0), 0, 19160 }, /* TAS.B (An)+ */ -{ CPUFUNC(op_4ae0_0), 0, 19168 }, /* TAS.B -(An) */ -{ CPUFUNC(op_4ae8_0), 0, 19176 }, /* TAS.B (d16,An) */ -{ CPUFUNC(op_4af0_0), 0, 19184 }, /* TAS.B (d8,An,Xn) */ -{ CPUFUNC(op_4af8_0), 0, 19192 }, /* TAS.B (xxx).W */ -{ CPUFUNC(op_4af9_0), 0, 19193 }, /* TAS.B (xxx).L */ -{ CPUFUNC(op_4c00_0), 0, 19456 }, /* MULL.L #.W,Dn */ -{ CPUFUNC(op_4c10_0), 0, 19472 }, /* MULL.L #.W,(An) */ -{ CPUFUNC(op_4c18_0), 0, 19480 }, /* MULL.L #.W,(An)+ */ -{ CPUFUNC(op_4c20_0), 0, 19488 }, /* MULL.L #.W,-(An) */ -{ CPUFUNC(op_4c28_0), 0, 19496 }, /* MULL.L #.W,(d16,An) */ -{ CPUFUNC(op_4c30_0), 0, 19504 }, /* MULL.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_4c38_0), 0, 19512 }, /* MULL.L #.W,(xxx).W */ -{ CPUFUNC(op_4c39_0), 0, 19513 }, /* MULL.L #.W,(xxx).L */ -{ CPUFUNC(op_4c3a_0), 0, 19514 }, /* MULL.L #.W,(d16,PC) */ -{ CPUFUNC(op_4c3b_0), 0, 19515 }, /* MULL.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_4c3c_0), 0, 19516 }, /* MULL.L #.W,#.L */ -{ CPUFUNC(op_4c40_0), 0, 19520 }, /* DIVL.L #.W,Dn */ -{ CPUFUNC(op_4c50_0), 0, 19536 }, /* DIVL.L #.W,(An) */ -{ CPUFUNC(op_4c58_0), 0, 19544 }, /* DIVL.L #.W,(An)+ */ -{ CPUFUNC(op_4c60_0), 0, 19552 }, /* DIVL.L #.W,-(An) */ -{ CPUFUNC(op_4c68_0), 0, 19560 }, /* DIVL.L #.W,(d16,An) */ -{ CPUFUNC(op_4c70_0), 0, 19568 }, /* DIVL.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_4c78_0), 0, 19576 }, /* DIVL.L #.W,(xxx).W */ -{ CPUFUNC(op_4c79_0), 0, 19577 }, /* DIVL.L #.W,(xxx).L */ -{ CPUFUNC(op_4c7a_0), 0, 19578 }, /* DIVL.L #.W,(d16,PC) */ -{ CPUFUNC(op_4c7b_0), 0, 19579 }, /* DIVL.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_4c7c_0), 0, 19580 }, /* DIVL.L #.W,#.L */ -{ CPUFUNC_FF(op_4c90_0), 0, 19600 }, /* MVMEL.W #.W,(An) */ -{ CPUFUNC_FF(op_4c98_0), 0, 19608 }, /* MVMEL.W #.W,(An)+ */ -{ CPUFUNC_FF(op_4ca8_0), 0, 19624 }, /* MVMEL.W #.W,(d16,An) */ -{ CPUFUNC_FF(op_4cb0_0), 0, 19632 }, /* MVMEL.W #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_4cb8_0), 0, 19640 }, /* MVMEL.W #.W,(xxx).W */ -{ CPUFUNC_FF(op_4cb9_0), 0, 19641 }, /* MVMEL.W #.W,(xxx).L */ -{ CPUFUNC_FF(op_4cba_0), 0, 19642 }, /* MVMEL.W #.W,(d16,PC) */ -{ CPUFUNC_FF(op_4cbb_0), 0, 19643 }, /* MVMEL.W #.W,(d8,PC,Xn) */ -{ CPUFUNC_FF(op_4cd0_0), 0, 19664 }, /* MVMEL.L #.W,(An) */ -{ CPUFUNC_FF(op_4cd8_0), 0, 19672 }, /* MVMEL.L #.W,(An)+ */ -{ CPUFUNC_FF(op_4ce8_0), 0, 19688 }, /* MVMEL.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_4cf0_0), 0, 19696 }, /* MVMEL.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_4cf8_0), 0, 19704 }, /* MVMEL.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_4cf9_0), 0, 19705 }, /* MVMEL.L #.W,(xxx).L */ -{ CPUFUNC_FF(op_4cfa_0), 0, 19706 }, /* MVMEL.L #.W,(d16,PC) */ -{ CPUFUNC_FF(op_4cfb_0), 0, 19707 }, /* MVMEL.L #.W,(d8,PC,Xn) */ -{ CPUFUNC_FF(op_4e40_0), 0, 20032 }, /* TRAP.L # */ -{ CPUFUNC_FF(op_4e50_0), 0, 20048 }, /* LINK.W An,#.W */ -{ CPUFUNC_FF(op_4e58_0), 0, 20056 }, /* UNLK.L An */ -{ CPUFUNC_FF(op_4e60_0), 0, 20064 }, /* MVR2USP.L An */ -{ CPUFUNC_FF(op_4e68_0), 0, 20072 }, /* MVUSP2R.L An */ -{ CPUFUNC_FF(op_4e70_0), 0, 20080 }, /* RESET.L */ -{ CPUFUNC_FF(op_4e71_0), 0, 20081 }, /* NOP.L */ -{ CPUFUNC(op_4e72_0), 0, 20082 }, /* STOP.L #.W */ -{ CPUFUNC(op_4e73_0), 0, 20083 }, /* RTE.L */ -{ CPUFUNC_FF(op_4e74_0), 0, 20084 }, /* RTD.L #.W */ -{ CPUFUNC_FF(op_4e75_0), 0, 20085 }, /* RTS.L */ -{ CPUFUNC_FF(op_4e76_0), 0, 20086 }, /* TRAPV.L */ -{ CPUFUNC(op_4e77_0), 0, 20087 }, /* RTR.L */ -{ CPUFUNC_FF(op_4e7a_0), 0, 20090 }, /* MOVEC2.L #.W */ -{ CPUFUNC_FF(op_4e7b_0), 0, 20091 }, /* MOVE2C.L #.W */ -{ CPUFUNC_FF(op_4e90_0), 0, 20112 }, /* JSR.L (An) */ -{ CPUFUNC_FF(op_4ea8_0), 0, 20136 }, /* JSR.L (d16,An) */ -{ CPUFUNC_FF(op_4eb0_0), 0, 20144 }, /* JSR.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4eb8_0), 0, 20152 }, /* JSR.L (xxx).W */ -{ CPUFUNC_FF(op_4eb9_0), 0, 20153 }, /* JSR.L (xxx).L */ -{ CPUFUNC_FF(op_4eba_0), 0, 20154 }, /* JSR.L (d16,PC) */ -{ CPUFUNC_FF(op_4ebb_0), 0, 20155 }, /* JSR.L (d8,PC,Xn) */ -{ CPUFUNC_FF(op_4ed0_0), 0, 20176 }, /* JMP.L (An) */ -{ CPUFUNC_FF(op_4ee8_0), 0, 20200 }, /* JMP.L (d16,An) */ -{ CPUFUNC_FF(op_4ef0_0), 0, 20208 }, /* JMP.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4ef8_0), 0, 20216 }, /* JMP.L (xxx).W */ -{ CPUFUNC_FF(op_4ef9_0), 0, 20217 }, /* JMP.L (xxx).L */ -{ CPUFUNC_FF(op_4efa_0), 0, 20218 }, /* JMP.L (d16,PC) */ -{ CPUFUNC_FF(op_4efb_0), 0, 20219 }, /* JMP.L (d8,PC,Xn) */ -{ CPUFUNC(op_5000_0), 0, 20480 }, /* ADD.B #,Dn */ -{ CPUFUNC(op_5010_0), 0, 20496 }, /* ADD.B #,(An) */ -{ CPUFUNC(op_5018_0), 0, 20504 }, /* ADD.B #,(An)+ */ -{ CPUFUNC(op_5020_0), 0, 20512 }, /* ADD.B #,-(An) */ -{ CPUFUNC(op_5028_0), 0, 20520 }, /* ADD.B #,(d16,An) */ -{ CPUFUNC(op_5030_0), 0, 20528 }, /* ADD.B #,(d8,An,Xn) */ -{ CPUFUNC(op_5038_0), 0, 20536 }, /* ADD.B #,(xxx).W */ -{ CPUFUNC(op_5039_0), 0, 20537 }, /* ADD.B #,(xxx).L */ -{ CPUFUNC(op_5040_0), 0, 20544 }, /* ADD.W #,Dn */ -{ CPUFUNC_FF(op_5048_0), 0, 20552 }, /* ADDA.W #,An */ -{ CPUFUNC(op_5050_0), 0, 20560 }, /* ADD.W #,(An) */ -{ CPUFUNC(op_5058_0), 0, 20568 }, /* ADD.W #,(An)+ */ -{ CPUFUNC(op_5060_0), 0, 20576 }, /* ADD.W #,-(An) */ -{ CPUFUNC(op_5068_0), 0, 20584 }, /* ADD.W #,(d16,An) */ -{ CPUFUNC(op_5070_0), 0, 20592 }, /* ADD.W #,(d8,An,Xn) */ -{ CPUFUNC(op_5078_0), 0, 20600 }, /* ADD.W #,(xxx).W */ -{ CPUFUNC(op_5079_0), 0, 20601 }, /* ADD.W #,(xxx).L */ -{ CPUFUNC(op_5080_0), 0, 20608 }, /* ADD.L #,Dn */ -{ CPUFUNC_FF(op_5088_0), 0, 20616 }, /* ADDA.L #,An */ -{ CPUFUNC(op_5090_0), 0, 20624 }, /* ADD.L #,(An) */ -{ CPUFUNC(op_5098_0), 0, 20632 }, /* ADD.L #,(An)+ */ -{ CPUFUNC(op_50a0_0), 0, 20640 }, /* ADD.L #,-(An) */ -{ CPUFUNC(op_50a8_0), 0, 20648 }, /* ADD.L #,(d16,An) */ -{ CPUFUNC(op_50b0_0), 0, 20656 }, /* ADD.L #,(d8,An,Xn) */ -{ CPUFUNC(op_50b8_0), 0, 20664 }, /* ADD.L #,(xxx).W */ -{ CPUFUNC(op_50b9_0), 0, 20665 }, /* ADD.L #,(xxx).L */ -{ CPUFUNC_FF(op_50c0_0), 0, 20672 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_50c8_0), 0, 20680 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_50d0_0), 0, 20688 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_50d8_0), 0, 20696 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_50e0_0), 0, 20704 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_50e8_0), 0, 20712 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_50f0_0), 0, 20720 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_50f8_0), 0, 20728 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_50f9_0), 0, 20729 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_50fa_0), 0, 20730 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_50fb_0), 0, 20731 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_50fc_0), 0, 20732 }, /* TRAPcc.L */ -{ CPUFUNC(op_5100_0), 0, 20736 }, /* SUB.B #,Dn */ -{ CPUFUNC(op_5110_0), 0, 20752 }, /* SUB.B #,(An) */ -{ CPUFUNC(op_5118_0), 0, 20760 }, /* SUB.B #,(An)+ */ -{ CPUFUNC(op_5120_0), 0, 20768 }, /* SUB.B #,-(An) */ -{ CPUFUNC(op_5128_0), 0, 20776 }, /* SUB.B #,(d16,An) */ -{ CPUFUNC(op_5130_0), 0, 20784 }, /* SUB.B #,(d8,An,Xn) */ -{ CPUFUNC(op_5138_0), 0, 20792 }, /* SUB.B #,(xxx).W */ -{ CPUFUNC(op_5139_0), 0, 20793 }, /* SUB.B #,(xxx).L */ -{ CPUFUNC(op_5140_0), 0, 20800 }, /* SUB.W #,Dn */ -{ CPUFUNC_FF(op_5148_0), 0, 20808 }, /* SUBA.W #,An */ -{ CPUFUNC(op_5150_0), 0, 20816 }, /* SUB.W #,(An) */ -{ CPUFUNC(op_5158_0), 0, 20824 }, /* SUB.W #,(An)+ */ -{ CPUFUNC(op_5160_0), 0, 20832 }, /* SUB.W #,-(An) */ -{ CPUFUNC(op_5168_0), 0, 20840 }, /* SUB.W #,(d16,An) */ -{ CPUFUNC(op_5170_0), 0, 20848 }, /* SUB.W #,(d8,An,Xn) */ -{ CPUFUNC(op_5178_0), 0, 20856 }, /* SUB.W #,(xxx).W */ -{ CPUFUNC(op_5179_0), 0, 20857 }, /* SUB.W #,(xxx).L */ -{ CPUFUNC(op_5180_0), 0, 20864 }, /* SUB.L #,Dn */ -{ CPUFUNC_FF(op_5188_0), 0, 20872 }, /* SUBA.L #,An */ -{ CPUFUNC(op_5190_0), 0, 20880 }, /* SUB.L #,(An) */ -{ CPUFUNC(op_5198_0), 0, 20888 }, /* SUB.L #,(An)+ */ -{ CPUFUNC(op_51a0_0), 0, 20896 }, /* SUB.L #,-(An) */ -{ CPUFUNC(op_51a8_0), 0, 20904 }, /* SUB.L #,(d16,An) */ -{ CPUFUNC(op_51b0_0), 0, 20912 }, /* SUB.L #,(d8,An,Xn) */ -{ CPUFUNC(op_51b8_0), 0, 20920 }, /* SUB.L #,(xxx).W */ -{ CPUFUNC(op_51b9_0), 0, 20921 }, /* SUB.L #,(xxx).L */ -{ CPUFUNC_FF(op_51c0_0), 0, 20928 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_51c8_0), 0, 20936 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_51d0_0), 0, 20944 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_51d8_0), 0, 20952 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_51e0_0), 0, 20960 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_51e8_0), 0, 20968 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_51f0_0), 0, 20976 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_51f8_0), 0, 20984 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_51f9_0), 0, 20985 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_51fa_0), 0, 20986 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_51fb_0), 0, 20987 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_51fc_0), 0, 20988 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_52c0_0), 0, 21184 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_52c8_0), 0, 21192 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_52d0_0), 0, 21200 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_52d8_0), 0, 21208 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_52e0_0), 0, 21216 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_52e8_0), 0, 21224 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_52f0_0), 0, 21232 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_52f8_0), 0, 21240 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_52f9_0), 0, 21241 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_52fa_0), 0, 21242 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_52fb_0), 0, 21243 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_52fc_0), 0, 21244 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_53c0_0), 0, 21440 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_53c8_0), 0, 21448 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_53d0_0), 0, 21456 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_53d8_0), 0, 21464 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_53e0_0), 0, 21472 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_53e8_0), 0, 21480 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_53f0_0), 0, 21488 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_53f8_0), 0, 21496 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_53f9_0), 0, 21497 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_53fa_0), 0, 21498 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_53fb_0), 0, 21499 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_53fc_0), 0, 21500 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_54c0_0), 0, 21696 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_54c8_0), 0, 21704 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_54d0_0), 0, 21712 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_54d8_0), 0, 21720 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_54e0_0), 0, 21728 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_54e8_0), 0, 21736 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_54f0_0), 0, 21744 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_54f8_0), 0, 21752 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_54f9_0), 0, 21753 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_54fa_0), 0, 21754 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_54fb_0), 0, 21755 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_54fc_0), 0, 21756 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_55c0_0), 0, 21952 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_55c8_0), 0, 21960 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_55d0_0), 0, 21968 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_55d8_0), 0, 21976 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_55e0_0), 0, 21984 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_55e8_0), 0, 21992 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_55f0_0), 0, 22000 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_55f8_0), 0, 22008 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_55f9_0), 0, 22009 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_55fa_0), 0, 22010 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_55fb_0), 0, 22011 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_55fc_0), 0, 22012 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_56c0_0), 0, 22208 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_56c8_0), 0, 22216 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_56d0_0), 0, 22224 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_56d8_0), 0, 22232 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_56e0_0), 0, 22240 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_56e8_0), 0, 22248 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_56f0_0), 0, 22256 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_56f8_0), 0, 22264 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_56f9_0), 0, 22265 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_56fa_0), 0, 22266 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_56fb_0), 0, 22267 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_56fc_0), 0, 22268 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_57c0_0), 0, 22464 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_57c8_0), 0, 22472 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_57d0_0), 0, 22480 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_57d8_0), 0, 22488 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_57e0_0), 0, 22496 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_57e8_0), 0, 22504 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_57f0_0), 0, 22512 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_57f8_0), 0, 22520 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_57f9_0), 0, 22521 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_57fa_0), 0, 22522 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_57fb_0), 0, 22523 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_57fc_0), 0, 22524 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_58c0_0), 0, 22720 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_58c8_0), 0, 22728 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_58d0_0), 0, 22736 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_58d8_0), 0, 22744 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_58e0_0), 0, 22752 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_58e8_0), 0, 22760 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_58f0_0), 0, 22768 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_58f8_0), 0, 22776 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_58f9_0), 0, 22777 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_58fa_0), 0, 22778 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_58fb_0), 0, 22779 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_58fc_0), 0, 22780 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_59c0_0), 0, 22976 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_59c8_0), 0, 22984 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_59d0_0), 0, 22992 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_59d8_0), 0, 23000 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_59e0_0), 0, 23008 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_59e8_0), 0, 23016 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_59f0_0), 0, 23024 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_59f8_0), 0, 23032 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_59f9_0), 0, 23033 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_59fa_0), 0, 23034 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_59fb_0), 0, 23035 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_59fc_0), 0, 23036 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5ac0_0), 0, 23232 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5ac8_0), 0, 23240 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5ad0_0), 0, 23248 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5ad8_0), 0, 23256 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ae0_0), 0, 23264 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ae8_0), 0, 23272 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5af0_0), 0, 23280 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5af8_0), 0, 23288 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5af9_0), 0, 23289 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5afa_0), 0, 23290 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5afb_0), 0, 23291 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5afc_0), 0, 23292 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5bc0_0), 0, 23488 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5bc8_0), 0, 23496 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5bd0_0), 0, 23504 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5bd8_0), 0, 23512 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5be0_0), 0, 23520 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5be8_0), 0, 23528 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5bf0_0), 0, 23536 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5bf8_0), 0, 23544 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5bf9_0), 0, 23545 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5bfa_0), 0, 23546 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5bfb_0), 0, 23547 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5bfc_0), 0, 23548 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5cc0_0), 0, 23744 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5cc8_0), 0, 23752 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5cd0_0), 0, 23760 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5cd8_0), 0, 23768 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ce0_0), 0, 23776 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ce8_0), 0, 23784 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5cf0_0), 0, 23792 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5cf8_0), 0, 23800 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5cf9_0), 0, 23801 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5cfa_0), 0, 23802 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5cfb_0), 0, 23803 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5cfc_0), 0, 23804 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5dc0_0), 0, 24000 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5dc8_0), 0, 24008 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5dd0_0), 0, 24016 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5dd8_0), 0, 24024 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5de0_0), 0, 24032 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5de8_0), 0, 24040 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5df0_0), 0, 24048 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5df8_0), 0, 24056 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5df9_0), 0, 24057 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5dfa_0), 0, 24058 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5dfb_0), 0, 24059 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5dfc_0), 0, 24060 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5ec0_0), 0, 24256 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5ec8_0), 0, 24264 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5ed0_0), 0, 24272 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5ed8_0), 0, 24280 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ee0_0), 0, 24288 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ee8_0), 0, 24296 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5ef0_0), 0, 24304 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5ef8_0), 0, 24312 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5ef9_0), 0, 24313 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5efa_0), 0, 24314 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5efb_0), 0, 24315 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5efc_0), 0, 24316 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_5fc0_0), 0, 24512 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5fc8_0), 0, 24520 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5fd0_0), 0, 24528 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5fd8_0), 0, 24536 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5fe0_0), 0, 24544 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5fe8_0), 0, 24552 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5ff0_0), 0, 24560 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5ff8_0), 0, 24568 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5ff9_0), 0, 24569 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5ffa_0), 0, 24570 }, /* TRAPcc.L #.W */ -{ CPUFUNC_FF(op_5ffb_0), 0, 24571 }, /* TRAPcc.L #.L */ -{ CPUFUNC_FF(op_5ffc_0), 0, 24572 }, /* TRAPcc.L */ -{ CPUFUNC_FF(op_6000_0), 0, 24576 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6001_0), 0, 24577 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_60ff_0), 0, 24831 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6100_0), 0, 24832 }, /* BSR.W #.W */ -{ CPUFUNC_FF(op_6101_0), 0, 24833 }, /* BSR.B # */ -{ CPUFUNC_FF(op_61ff_0), 0, 25087 }, /* BSR.L #.L */ -{ CPUFUNC_FF(op_6200_0), 0, 25088 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6201_0), 0, 25089 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_62ff_0), 0, 25343 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6300_0), 0, 25344 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6301_0), 0, 25345 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_63ff_0), 0, 25599 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6400_0), 0, 25600 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6401_0), 0, 25601 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_64ff_0), 0, 25855 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6500_0), 0, 25856 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6501_0), 0, 25857 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_65ff_0), 0, 26111 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6600_0), 0, 26112 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6601_0), 0, 26113 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_66ff_0), 0, 26367 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6700_0), 0, 26368 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6701_0), 0, 26369 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_67ff_0), 0, 26623 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6800_0), 0, 26624 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6801_0), 0, 26625 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_68ff_0), 0, 26879 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6900_0), 0, 26880 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6901_0), 0, 26881 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_69ff_0), 0, 27135 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6a00_0), 0, 27136 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6a01_0), 0, 27137 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6aff_0), 0, 27391 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6b00_0), 0, 27392 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6b01_0), 0, 27393 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6bff_0), 0, 27647 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6c00_0), 0, 27648 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6c01_0), 0, 27649 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6cff_0), 0, 27903 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6d00_0), 0, 27904 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6d01_0), 0, 27905 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6dff_0), 0, 28159 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6e00_0), 0, 28160 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6e01_0), 0, 28161 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6eff_0), 0, 28415 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6f00_0), 0, 28416 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6f01_0), 0, 28417 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6fff_0), 0, 28671 }, /* Bcc.L #.L */ -{ CPUFUNC(op_7000_0), 0, 28672 }, /* MOVE.L #,Dn */ -{ CPUFUNC_FF(op_7100_0), 0, 28928 }, /* EMULOP_RETURN.L */ -{ CPUFUNC_FF(op_7101_0), 0, 28929 }, /* EMULOP.L # */ -{ CPUFUNC(op_8000_0), 0, 32768 }, /* OR.B Dn,Dn */ -{ CPUFUNC(op_8010_0), 0, 32784 }, /* OR.B (An),Dn */ -{ CPUFUNC(op_8018_0), 0, 32792 }, /* OR.B (An)+,Dn */ -{ CPUFUNC(op_8020_0), 0, 32800 }, /* OR.B -(An),Dn */ -{ CPUFUNC(op_8028_0), 0, 32808 }, /* OR.B (d16,An),Dn */ -{ CPUFUNC(op_8030_0), 0, 32816 }, /* OR.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_8038_0), 0, 32824 }, /* OR.B (xxx).W,Dn */ -{ CPUFUNC(op_8039_0), 0, 32825 }, /* OR.B (xxx).L,Dn */ -{ CPUFUNC(op_803a_0), 0, 32826 }, /* OR.B (d16,PC),Dn */ -{ CPUFUNC(op_803b_0), 0, 32827 }, /* OR.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_803c_0), 0, 32828 }, /* OR.B #.B,Dn */ -{ CPUFUNC(op_8040_0), 0, 32832 }, /* OR.W Dn,Dn */ -{ CPUFUNC(op_8050_0), 0, 32848 }, /* OR.W (An),Dn */ -{ CPUFUNC(op_8058_0), 0, 32856 }, /* OR.W (An)+,Dn */ -{ CPUFUNC(op_8060_0), 0, 32864 }, /* OR.W -(An),Dn */ -{ CPUFUNC(op_8068_0), 0, 32872 }, /* OR.W (d16,An),Dn */ -{ CPUFUNC(op_8070_0), 0, 32880 }, /* OR.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_8078_0), 0, 32888 }, /* OR.W (xxx).W,Dn */ -{ CPUFUNC(op_8079_0), 0, 32889 }, /* OR.W (xxx).L,Dn */ -{ CPUFUNC(op_807a_0), 0, 32890 }, /* OR.W (d16,PC),Dn */ -{ CPUFUNC(op_807b_0), 0, 32891 }, /* OR.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_807c_0), 0, 32892 }, /* OR.W #.W,Dn */ -{ CPUFUNC(op_8080_0), 0, 32896 }, /* OR.L Dn,Dn */ -{ CPUFUNC(op_8090_0), 0, 32912 }, /* OR.L (An),Dn */ -{ CPUFUNC(op_8098_0), 0, 32920 }, /* OR.L (An)+,Dn */ -{ CPUFUNC(op_80a0_0), 0, 32928 }, /* OR.L -(An),Dn */ -{ CPUFUNC(op_80a8_0), 0, 32936 }, /* OR.L (d16,An),Dn */ -{ CPUFUNC(op_80b0_0), 0, 32944 }, /* OR.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_80b8_0), 0, 32952 }, /* OR.L (xxx).W,Dn */ -{ CPUFUNC(op_80b9_0), 0, 32953 }, /* OR.L (xxx).L,Dn */ -{ CPUFUNC(op_80ba_0), 0, 32954 }, /* OR.L (d16,PC),Dn */ -{ CPUFUNC(op_80bb_0), 0, 32955 }, /* OR.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_80bc_0), 0, 32956 }, /* OR.L #.L,Dn */ -{ CPUFUNC(op_80c0_0), 0, 32960 }, /* DIVU.W Dn,Dn */ -{ CPUFUNC(op_80d0_0), 0, 32976 }, /* DIVU.W (An),Dn */ -{ CPUFUNC(op_80d8_0), 0, 32984 }, /* DIVU.W (An)+,Dn */ -{ CPUFUNC(op_80e0_0), 0, 32992 }, /* DIVU.W -(An),Dn */ -{ CPUFUNC(op_80e8_0), 0, 33000 }, /* DIVU.W (d16,An),Dn */ -{ CPUFUNC(op_80f0_0), 0, 33008 }, /* DIVU.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_80f8_0), 0, 33016 }, /* DIVU.W (xxx).W,Dn */ -{ CPUFUNC(op_80f9_0), 0, 33017 }, /* DIVU.W (xxx).L,Dn */ -{ CPUFUNC(op_80fa_0), 0, 33018 }, /* DIVU.W (d16,PC),Dn */ -{ CPUFUNC(op_80fb_0), 0, 33019 }, /* DIVU.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_80fc_0), 0, 33020 }, /* DIVU.W #.W,Dn */ -{ CPUFUNC(op_8100_1), 0, 33024 }, /* SBCD.B Dn,Dn */ -{ CPUFUNC(op_8108_1), 0, 33032 }, /* SBCD.B -(An),-(An) */ -{ CPUFUNC(op_8110_0), 0, 33040 }, /* OR.B Dn,(An) */ -{ CPUFUNC(op_8118_0), 0, 33048 }, /* OR.B Dn,(An)+ */ -{ CPUFUNC(op_8120_0), 0, 33056 }, /* OR.B Dn,-(An) */ -{ CPUFUNC(op_8128_0), 0, 33064 }, /* OR.B Dn,(d16,An) */ -{ CPUFUNC(op_8130_0), 0, 33072 }, /* OR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_8138_0), 0, 33080 }, /* OR.B Dn,(xxx).W */ -{ CPUFUNC(op_8139_0), 0, 33081 }, /* OR.B Dn,(xxx).L */ -{ CPUFUNC_FF(op_8140_0), 0, 33088 }, /* PACK.L Dn,Dn */ -{ CPUFUNC_FF(op_8148_0), 0, 33096 }, /* PACK.L -(An),-(An) */ -{ CPUFUNC(op_8150_0), 0, 33104 }, /* OR.W Dn,(An) */ -{ CPUFUNC(op_8158_0), 0, 33112 }, /* OR.W Dn,(An)+ */ -{ CPUFUNC(op_8160_0), 0, 33120 }, /* OR.W Dn,-(An) */ -{ CPUFUNC(op_8168_0), 0, 33128 }, /* OR.W Dn,(d16,An) */ -{ CPUFUNC(op_8170_0), 0, 33136 }, /* OR.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_8178_0), 0, 33144 }, /* OR.W Dn,(xxx).W */ -{ CPUFUNC(op_8179_0), 0, 33145 }, /* OR.W Dn,(xxx).L */ -{ CPUFUNC_FF(op_8180_0), 0, 33152 }, /* UNPK.L Dn,Dn */ -{ CPUFUNC_FF(op_8188_0), 0, 33160 }, /* UNPK.L -(An),-(An) */ -{ CPUFUNC(op_8190_0), 0, 33168 }, /* OR.L Dn,(An) */ -{ CPUFUNC(op_8198_0), 0, 33176 }, /* OR.L Dn,(An)+ */ -{ CPUFUNC(op_81a0_0), 0, 33184 }, /* OR.L Dn,-(An) */ -{ CPUFUNC(op_81a8_0), 0, 33192 }, /* OR.L Dn,(d16,An) */ -{ CPUFUNC(op_81b0_0), 0, 33200 }, /* OR.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_81b8_0), 0, 33208 }, /* OR.L Dn,(xxx).W */ -{ CPUFUNC(op_81b9_0), 0, 33209 }, /* OR.L Dn,(xxx).L */ -{ CPUFUNC(op_81c0_0), 0, 33216 }, /* DIVS.W Dn,Dn */ -{ CPUFUNC(op_81d0_0), 0, 33232 }, /* DIVS.W (An),Dn */ -{ CPUFUNC(op_81d8_0), 0, 33240 }, /* DIVS.W (An)+,Dn */ -{ CPUFUNC(op_81e0_0), 0, 33248 }, /* DIVS.W -(An),Dn */ -{ CPUFUNC(op_81e8_0), 0, 33256 }, /* DIVS.W (d16,An),Dn */ -{ CPUFUNC(op_81f0_0), 0, 33264 }, /* DIVS.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_81f8_0), 0, 33272 }, /* DIVS.W (xxx).W,Dn */ -{ CPUFUNC(op_81f9_0), 0, 33273 }, /* DIVS.W (xxx).L,Dn */ -{ CPUFUNC(op_81fa_0), 0, 33274 }, /* DIVS.W (d16,PC),Dn */ -{ CPUFUNC(op_81fb_0), 0, 33275 }, /* DIVS.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_81fc_0), 0, 33276 }, /* DIVS.W #.W,Dn */ -{ CPUFUNC(op_9000_0), 0, 36864 }, /* SUB.B Dn,Dn */ -{ CPUFUNC(op_9010_0), 0, 36880 }, /* SUB.B (An),Dn */ -{ CPUFUNC(op_9018_0), 0, 36888 }, /* SUB.B (An)+,Dn */ -{ CPUFUNC(op_9020_0), 0, 36896 }, /* SUB.B -(An),Dn */ -{ CPUFUNC(op_9028_0), 0, 36904 }, /* SUB.B (d16,An),Dn */ -{ CPUFUNC(op_9030_0), 0, 36912 }, /* SUB.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_9038_0), 0, 36920 }, /* SUB.B (xxx).W,Dn */ -{ CPUFUNC(op_9039_0), 0, 36921 }, /* SUB.B (xxx).L,Dn */ -{ CPUFUNC(op_903a_0), 0, 36922 }, /* SUB.B (d16,PC),Dn */ -{ CPUFUNC(op_903b_0), 0, 36923 }, /* SUB.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_903c_0), 0, 36924 }, /* SUB.B #.B,Dn */ -{ CPUFUNC(op_9040_0), 0, 36928 }, /* SUB.W Dn,Dn */ -{ CPUFUNC(op_9048_0), 0, 36936 }, /* SUB.W An,Dn */ -{ CPUFUNC(op_9050_0), 0, 36944 }, /* SUB.W (An),Dn */ -{ CPUFUNC(op_9058_0), 0, 36952 }, /* SUB.W (An)+,Dn */ -{ CPUFUNC(op_9060_0), 0, 36960 }, /* SUB.W -(An),Dn */ -{ CPUFUNC(op_9068_0), 0, 36968 }, /* SUB.W (d16,An),Dn */ -{ CPUFUNC(op_9070_0), 0, 36976 }, /* SUB.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_9078_0), 0, 36984 }, /* SUB.W (xxx).W,Dn */ -{ CPUFUNC(op_9079_0), 0, 36985 }, /* SUB.W (xxx).L,Dn */ -{ CPUFUNC(op_907a_0), 0, 36986 }, /* SUB.W (d16,PC),Dn */ -{ CPUFUNC(op_907b_0), 0, 36987 }, /* SUB.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_907c_0), 0, 36988 }, /* SUB.W #.W,Dn */ -{ CPUFUNC(op_9080_0), 0, 36992 }, /* SUB.L Dn,Dn */ -{ CPUFUNC(op_9088_0), 0, 37000 }, /* SUB.L An,Dn */ -{ CPUFUNC(op_9090_0), 0, 37008 }, /* SUB.L (An),Dn */ -{ CPUFUNC(op_9098_0), 0, 37016 }, /* SUB.L (An)+,Dn */ -{ CPUFUNC(op_90a0_0), 0, 37024 }, /* SUB.L -(An),Dn */ -{ CPUFUNC(op_90a8_0), 0, 37032 }, /* SUB.L (d16,An),Dn */ -{ CPUFUNC(op_90b0_0), 0, 37040 }, /* SUB.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_90b8_0), 0, 37048 }, /* SUB.L (xxx).W,Dn */ -{ CPUFUNC(op_90b9_0), 0, 37049 }, /* SUB.L (xxx).L,Dn */ -{ CPUFUNC(op_90ba_0), 0, 37050 }, /* SUB.L (d16,PC),Dn */ -{ CPUFUNC(op_90bb_0), 0, 37051 }, /* SUB.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_90bc_0), 0, 37052 }, /* SUB.L #.L,Dn */ -{ CPUFUNC_FF(op_90c0_0), 0, 37056 }, /* SUBA.W Dn,An */ -{ CPUFUNC_FF(op_90c8_0), 0, 37064 }, /* SUBA.W An,An */ -{ CPUFUNC_FF(op_90d0_0), 0, 37072 }, /* SUBA.W (An),An */ -{ CPUFUNC_FF(op_90d8_0), 0, 37080 }, /* SUBA.W (An)+,An */ -{ CPUFUNC_FF(op_90e0_0), 0, 37088 }, /* SUBA.W -(An),An */ -{ CPUFUNC_FF(op_90e8_0), 0, 37096 }, /* SUBA.W (d16,An),An */ -{ CPUFUNC_FF(op_90f0_0), 0, 37104 }, /* SUBA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_90f8_0), 0, 37112 }, /* SUBA.W (xxx).W,An */ -{ CPUFUNC_FF(op_90f9_0), 0, 37113 }, /* SUBA.W (xxx).L,An */ -{ CPUFUNC_FF(op_90fa_0), 0, 37114 }, /* SUBA.W (d16,PC),An */ -{ CPUFUNC_FF(op_90fb_0), 0, 37115 }, /* SUBA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_90fc_0), 0, 37116 }, /* SUBA.W #.W,An */ -{ CPUFUNC(op_9100_0), 0, 37120 }, /* SUBX.B Dn,Dn */ -{ CPUFUNC(op_9108_0), 0, 37128 }, /* SUBX.B -(An),-(An) */ -{ CPUFUNC(op_9110_0), 0, 37136 }, /* SUB.B Dn,(An) */ -{ CPUFUNC(op_9118_0), 0, 37144 }, /* SUB.B Dn,(An)+ */ -{ CPUFUNC(op_9120_0), 0, 37152 }, /* SUB.B Dn,-(An) */ -{ CPUFUNC(op_9128_0), 0, 37160 }, /* SUB.B Dn,(d16,An) */ -{ CPUFUNC(op_9130_0), 0, 37168 }, /* SUB.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_9138_0), 0, 37176 }, /* SUB.B Dn,(xxx).W */ -{ CPUFUNC(op_9139_0), 0, 37177 }, /* SUB.B Dn,(xxx).L */ -{ CPUFUNC(op_9140_0), 0, 37184 }, /* SUBX.W Dn,Dn */ -{ CPUFUNC(op_9148_0), 0, 37192 }, /* SUBX.W -(An),-(An) */ -{ CPUFUNC(op_9150_0), 0, 37200 }, /* SUB.W Dn,(An) */ -{ CPUFUNC(op_9158_0), 0, 37208 }, /* SUB.W Dn,(An)+ */ -{ CPUFUNC(op_9160_0), 0, 37216 }, /* SUB.W Dn,-(An) */ -{ CPUFUNC(op_9168_0), 0, 37224 }, /* SUB.W Dn,(d16,An) */ -{ CPUFUNC(op_9170_0), 0, 37232 }, /* SUB.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_9178_0), 0, 37240 }, /* SUB.W Dn,(xxx).W */ -{ CPUFUNC(op_9179_0), 0, 37241 }, /* SUB.W Dn,(xxx).L */ -{ CPUFUNC(op_9180_0), 0, 37248 }, /* SUBX.L Dn,Dn */ -{ CPUFUNC(op_9188_0), 0, 37256 }, /* SUBX.L -(An),-(An) */ -{ CPUFUNC(op_9190_0), 0, 37264 }, /* SUB.L Dn,(An) */ -{ CPUFUNC(op_9198_0), 0, 37272 }, /* SUB.L Dn,(An)+ */ -{ CPUFUNC(op_91a0_0), 0, 37280 }, /* SUB.L Dn,-(An) */ -{ CPUFUNC(op_91a8_0), 0, 37288 }, /* SUB.L Dn,(d16,An) */ -{ CPUFUNC(op_91b0_0), 0, 37296 }, /* SUB.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_91b8_0), 0, 37304 }, /* SUB.L Dn,(xxx).W */ -{ CPUFUNC(op_91b9_0), 0, 37305 }, /* SUB.L Dn,(xxx).L */ -{ CPUFUNC_FF(op_91c0_0), 0, 37312 }, /* SUBA.L Dn,An */ -{ CPUFUNC_FF(op_91c8_0), 0, 37320 }, /* SUBA.L An,An */ -{ CPUFUNC_FF(op_91d0_0), 0, 37328 }, /* SUBA.L (An),An */ -{ CPUFUNC_FF(op_91d8_0), 0, 37336 }, /* SUBA.L (An)+,An */ -{ CPUFUNC_FF(op_91e0_0), 0, 37344 }, /* SUBA.L -(An),An */ -{ CPUFUNC_FF(op_91e8_0), 0, 37352 }, /* SUBA.L (d16,An),An */ -{ CPUFUNC_FF(op_91f0_0), 0, 37360 }, /* SUBA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_91f8_0), 0, 37368 }, /* SUBA.L (xxx).W,An */ -{ CPUFUNC_FF(op_91f9_0), 0, 37369 }, /* SUBA.L (xxx).L,An */ -{ CPUFUNC_FF(op_91fa_0), 0, 37370 }, /* SUBA.L (d16,PC),An */ -{ CPUFUNC_FF(op_91fb_0), 0, 37371 }, /* SUBA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_91fc_0), 0, 37372 }, /* SUBA.L #.L,An */ -{ CPUFUNC(op_b000_0), 0, 45056 }, /* CMP.B Dn,Dn */ -{ CPUFUNC(op_b010_0), 0, 45072 }, /* CMP.B (An),Dn */ -{ CPUFUNC(op_b018_0), 0, 45080 }, /* CMP.B (An)+,Dn */ -{ CPUFUNC(op_b020_0), 0, 45088 }, /* CMP.B -(An),Dn */ -{ CPUFUNC(op_b028_0), 0, 45096 }, /* CMP.B (d16,An),Dn */ -{ CPUFUNC(op_b030_0), 0, 45104 }, /* CMP.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_b038_0), 0, 45112 }, /* CMP.B (xxx).W,Dn */ -{ CPUFUNC(op_b039_0), 0, 45113 }, /* CMP.B (xxx).L,Dn */ -{ CPUFUNC(op_b03a_0), 0, 45114 }, /* CMP.B (d16,PC),Dn */ -{ CPUFUNC(op_b03b_0), 0, 45115 }, /* CMP.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b03c_0), 0, 45116 }, /* CMP.B #.B,Dn */ -{ CPUFUNC(op_b040_0), 0, 45120 }, /* CMP.W Dn,Dn */ -{ CPUFUNC(op_b048_0), 0, 45128 }, /* CMP.W An,Dn */ -{ CPUFUNC(op_b050_0), 0, 45136 }, /* CMP.W (An),Dn */ -{ CPUFUNC(op_b058_0), 0, 45144 }, /* CMP.W (An)+,Dn */ -{ CPUFUNC(op_b060_0), 0, 45152 }, /* CMP.W -(An),Dn */ -{ CPUFUNC(op_b068_0), 0, 45160 }, /* CMP.W (d16,An),Dn */ -{ CPUFUNC(op_b070_0), 0, 45168 }, /* CMP.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_b078_0), 0, 45176 }, /* CMP.W (xxx).W,Dn */ -{ CPUFUNC(op_b079_0), 0, 45177 }, /* CMP.W (xxx).L,Dn */ -{ CPUFUNC(op_b07a_0), 0, 45178 }, /* CMP.W (d16,PC),Dn */ -{ CPUFUNC(op_b07b_0), 0, 45179 }, /* CMP.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b07c_0), 0, 45180 }, /* CMP.W #.W,Dn */ -{ CPUFUNC(op_b080_0), 0, 45184 }, /* CMP.L Dn,Dn */ -{ CPUFUNC(op_b088_0), 0, 45192 }, /* CMP.L An,Dn */ -{ CPUFUNC(op_b090_0), 0, 45200 }, /* CMP.L (An),Dn */ -{ CPUFUNC(op_b098_0), 0, 45208 }, /* CMP.L (An)+,Dn */ -{ CPUFUNC(op_b0a0_0), 0, 45216 }, /* CMP.L -(An),Dn */ -{ CPUFUNC(op_b0a8_0), 0, 45224 }, /* CMP.L (d16,An),Dn */ -{ CPUFUNC(op_b0b0_0), 0, 45232 }, /* CMP.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_b0b8_0), 0, 45240 }, /* CMP.L (xxx).W,Dn */ -{ CPUFUNC(op_b0b9_0), 0, 45241 }, /* CMP.L (xxx).L,Dn */ -{ CPUFUNC(op_b0ba_0), 0, 45242 }, /* CMP.L (d16,PC),Dn */ -{ CPUFUNC(op_b0bb_0), 0, 45243 }, /* CMP.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b0bc_0), 0, 45244 }, /* CMP.L #.L,Dn */ -{ CPUFUNC(op_b0c0_0), 0, 45248 }, /* CMPA.W Dn,An */ -{ CPUFUNC(op_b0c8_0), 0, 45256 }, /* CMPA.W An,An */ -{ CPUFUNC(op_b0d0_0), 0, 45264 }, /* CMPA.W (An),An */ -{ CPUFUNC(op_b0d8_0), 0, 45272 }, /* CMPA.W (An)+,An */ -{ CPUFUNC(op_b0e0_0), 0, 45280 }, /* CMPA.W -(An),An */ -{ CPUFUNC(op_b0e8_0), 0, 45288 }, /* CMPA.W (d16,An),An */ -{ CPUFUNC(op_b0f0_0), 0, 45296 }, /* CMPA.W (d8,An,Xn),An */ -{ CPUFUNC(op_b0f8_0), 0, 45304 }, /* CMPA.W (xxx).W,An */ -{ CPUFUNC(op_b0f9_0), 0, 45305 }, /* CMPA.W (xxx).L,An */ -{ CPUFUNC(op_b0fa_0), 0, 45306 }, /* CMPA.W (d16,PC),An */ -{ CPUFUNC(op_b0fb_0), 0, 45307 }, /* CMPA.W (d8,PC,Xn),An */ -{ CPUFUNC(op_b0fc_0), 0, 45308 }, /* CMPA.W #.W,An */ -{ CPUFUNC(op_b100_0), 0, 45312 }, /* EOR.B Dn,Dn */ -{ CPUFUNC(op_b108_0), 0, 45320 }, /* CMPM.B (An)+,(An)+ */ -{ CPUFUNC(op_b110_0), 0, 45328 }, /* EOR.B Dn,(An) */ -{ CPUFUNC(op_b118_0), 0, 45336 }, /* EOR.B Dn,(An)+ */ -{ CPUFUNC(op_b120_0), 0, 45344 }, /* EOR.B Dn,-(An) */ -{ CPUFUNC(op_b128_0), 0, 45352 }, /* EOR.B Dn,(d16,An) */ -{ CPUFUNC(op_b130_0), 0, 45360 }, /* EOR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b138_0), 0, 45368 }, /* EOR.B Dn,(xxx).W */ -{ CPUFUNC(op_b139_0), 0, 45369 }, /* EOR.B Dn,(xxx).L */ -{ CPUFUNC(op_b140_0), 0, 45376 }, /* EOR.W Dn,Dn */ -{ CPUFUNC(op_b148_0), 0, 45384 }, /* CMPM.W (An)+,(An)+ */ -{ CPUFUNC(op_b150_0), 0, 45392 }, /* EOR.W Dn,(An) */ -{ CPUFUNC(op_b158_0), 0, 45400 }, /* EOR.W Dn,(An)+ */ -{ CPUFUNC(op_b160_0), 0, 45408 }, /* EOR.W Dn,-(An) */ -{ CPUFUNC(op_b168_0), 0, 45416 }, /* EOR.W Dn,(d16,An) */ -{ CPUFUNC(op_b170_0), 0, 45424 }, /* EOR.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b178_0), 0, 45432 }, /* EOR.W Dn,(xxx).W */ -{ CPUFUNC(op_b179_0), 0, 45433 }, /* EOR.W Dn,(xxx).L */ -{ CPUFUNC(op_b180_0), 0, 45440 }, /* EOR.L Dn,Dn */ -{ CPUFUNC(op_b188_0), 0, 45448 }, /* CMPM.L (An)+,(An)+ */ -{ CPUFUNC(op_b190_0), 0, 45456 }, /* EOR.L Dn,(An) */ -{ CPUFUNC(op_b198_0), 0, 45464 }, /* EOR.L Dn,(An)+ */ -{ CPUFUNC(op_b1a0_0), 0, 45472 }, /* EOR.L Dn,-(An) */ -{ CPUFUNC(op_b1a8_0), 0, 45480 }, /* EOR.L Dn,(d16,An) */ -{ CPUFUNC(op_b1b0_0), 0, 45488 }, /* EOR.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b1b8_0), 0, 45496 }, /* EOR.L Dn,(xxx).W */ -{ CPUFUNC(op_b1b9_0), 0, 45497 }, /* EOR.L Dn,(xxx).L */ -{ CPUFUNC(op_b1c0_0), 0, 45504 }, /* CMPA.L Dn,An */ -{ CPUFUNC(op_b1c8_0), 0, 45512 }, /* CMPA.L An,An */ -{ CPUFUNC(op_b1d0_0), 0, 45520 }, /* CMPA.L (An),An */ -{ CPUFUNC(op_b1d8_0), 0, 45528 }, /* CMPA.L (An)+,An */ -{ CPUFUNC(op_b1e0_0), 0, 45536 }, /* CMPA.L -(An),An */ -{ CPUFUNC(op_b1e8_0), 0, 45544 }, /* CMPA.L (d16,An),An */ -{ CPUFUNC(op_b1f0_0), 0, 45552 }, /* CMPA.L (d8,An,Xn),An */ -{ CPUFUNC(op_b1f8_0), 0, 45560 }, /* CMPA.L (xxx).W,An */ -{ CPUFUNC(op_b1f9_0), 0, 45561 }, /* CMPA.L (xxx).L,An */ -{ CPUFUNC(op_b1fa_0), 0, 45562 }, /* CMPA.L (d16,PC),An */ -{ CPUFUNC(op_b1fb_0), 0, 45563 }, /* CMPA.L (d8,PC,Xn),An */ -{ CPUFUNC(op_b1fc_0), 0, 45564 }, /* CMPA.L #.L,An */ -{ CPUFUNC(op_c000_0), 0, 49152 }, /* AND.B Dn,Dn */ -{ CPUFUNC(op_c010_0), 0, 49168 }, /* AND.B (An),Dn */ -{ CPUFUNC(op_c018_0), 0, 49176 }, /* AND.B (An)+,Dn */ -{ CPUFUNC(op_c020_0), 0, 49184 }, /* AND.B -(An),Dn */ -{ CPUFUNC(op_c028_0), 0, 49192 }, /* AND.B (d16,An),Dn */ -{ CPUFUNC(op_c030_0), 0, 49200 }, /* AND.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_c038_0), 0, 49208 }, /* AND.B (xxx).W,Dn */ -{ CPUFUNC(op_c039_0), 0, 49209 }, /* AND.B (xxx).L,Dn */ -{ CPUFUNC(op_c03a_0), 0, 49210 }, /* AND.B (d16,PC),Dn */ -{ CPUFUNC(op_c03b_0), 0, 49211 }, /* AND.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c03c_0), 0, 49212 }, /* AND.B #.B,Dn */ -{ CPUFUNC(op_c040_0), 0, 49216 }, /* AND.W Dn,Dn */ -{ CPUFUNC(op_c050_0), 0, 49232 }, /* AND.W (An),Dn */ -{ CPUFUNC(op_c058_0), 0, 49240 }, /* AND.W (An)+,Dn */ -{ CPUFUNC(op_c060_0), 0, 49248 }, /* AND.W -(An),Dn */ -{ CPUFUNC(op_c068_0), 0, 49256 }, /* AND.W (d16,An),Dn */ -{ CPUFUNC(op_c070_0), 0, 49264 }, /* AND.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c078_0), 0, 49272 }, /* AND.W (xxx).W,Dn */ -{ CPUFUNC(op_c079_0), 0, 49273 }, /* AND.W (xxx).L,Dn */ -{ CPUFUNC(op_c07a_0), 0, 49274 }, /* AND.W (d16,PC),Dn */ -{ CPUFUNC(op_c07b_0), 0, 49275 }, /* AND.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c07c_0), 0, 49276 }, /* AND.W #.W,Dn */ -{ CPUFUNC(op_c080_0), 0, 49280 }, /* AND.L Dn,Dn */ -{ CPUFUNC(op_c090_0), 0, 49296 }, /* AND.L (An),Dn */ -{ CPUFUNC(op_c098_0), 0, 49304 }, /* AND.L (An)+,Dn */ -{ CPUFUNC(op_c0a0_0), 0, 49312 }, /* AND.L -(An),Dn */ -{ CPUFUNC(op_c0a8_0), 0, 49320 }, /* AND.L (d16,An),Dn */ -{ CPUFUNC(op_c0b0_0), 0, 49328 }, /* AND.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_c0b8_0), 0, 49336 }, /* AND.L (xxx).W,Dn */ -{ CPUFUNC(op_c0b9_0), 0, 49337 }, /* AND.L (xxx).L,Dn */ -{ CPUFUNC(op_c0ba_0), 0, 49338 }, /* AND.L (d16,PC),Dn */ -{ CPUFUNC(op_c0bb_0), 0, 49339 }, /* AND.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c0bc_0), 0, 49340 }, /* AND.L #.L,Dn */ -{ CPUFUNC(op_c0c0_0), 0, 49344 }, /* MULU.W Dn,Dn */ -{ CPUFUNC(op_c0d0_0), 0, 49360 }, /* MULU.W (An),Dn */ -{ CPUFUNC(op_c0d8_0), 0, 49368 }, /* MULU.W (An)+,Dn */ -{ CPUFUNC(op_c0e0_0), 0, 49376 }, /* MULU.W -(An),Dn */ -{ CPUFUNC(op_c0e8_0), 0, 49384 }, /* MULU.W (d16,An),Dn */ -{ CPUFUNC(op_c0f0_0), 0, 49392 }, /* MULU.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c0f8_0), 0, 49400 }, /* MULU.W (xxx).W,Dn */ -{ CPUFUNC(op_c0f9_0), 0, 49401 }, /* MULU.W (xxx).L,Dn */ -{ CPUFUNC(op_c0fa_0), 0, 49402 }, /* MULU.W (d16,PC),Dn */ -{ CPUFUNC(op_c0fb_0), 0, 49403 }, /* MULU.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c0fc_0), 0, 49404 }, /* MULU.W #.W,Dn */ -{ CPUFUNC(op_c100_1), 0, 49408 }, /* ABCD.B Dn,Dn */ -{ CPUFUNC(op_c108_1), 0, 49416 }, /* ABCD.B -(An),-(An) */ -{ CPUFUNC(op_c110_0), 0, 49424 }, /* AND.B Dn,(An) */ -{ CPUFUNC(op_c118_0), 0, 49432 }, /* AND.B Dn,(An)+ */ -{ CPUFUNC(op_c120_0), 0, 49440 }, /* AND.B Dn,-(An) */ -{ CPUFUNC(op_c128_0), 0, 49448 }, /* AND.B Dn,(d16,An) */ -{ CPUFUNC(op_c130_0), 0, 49456 }, /* AND.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c138_0), 0, 49464 }, /* AND.B Dn,(xxx).W */ -{ CPUFUNC(op_c139_0), 0, 49465 }, /* AND.B Dn,(xxx).L */ -{ CPUFUNC_FF(op_c140_0), 0, 49472 }, /* EXG.L Dn,Dn */ -{ CPUFUNC_FF(op_c148_0), 0, 49480 }, /* EXG.L An,An */ -{ CPUFUNC(op_c150_0), 0, 49488 }, /* AND.W Dn,(An) */ -{ CPUFUNC(op_c158_0), 0, 49496 }, /* AND.W Dn,(An)+ */ -{ CPUFUNC(op_c160_0), 0, 49504 }, /* AND.W Dn,-(An) */ -{ CPUFUNC(op_c168_0), 0, 49512 }, /* AND.W Dn,(d16,An) */ -{ CPUFUNC(op_c170_0), 0, 49520 }, /* AND.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c178_0), 0, 49528 }, /* AND.W Dn,(xxx).W */ -{ CPUFUNC(op_c179_0), 0, 49529 }, /* AND.W Dn,(xxx).L */ -{ CPUFUNC_FF(op_c188_0), 0, 49544 }, /* EXG.L Dn,An */ -{ CPUFUNC(op_c190_0), 0, 49552 }, /* AND.L Dn,(An) */ -{ CPUFUNC(op_c198_0), 0, 49560 }, /* AND.L Dn,(An)+ */ -{ CPUFUNC(op_c1a0_0), 0, 49568 }, /* AND.L Dn,-(An) */ -{ CPUFUNC(op_c1a8_0), 0, 49576 }, /* AND.L Dn,(d16,An) */ -{ CPUFUNC(op_c1b0_0), 0, 49584 }, /* AND.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c1b8_0), 0, 49592 }, /* AND.L Dn,(xxx).W */ -{ CPUFUNC(op_c1b9_0), 0, 49593 }, /* AND.L Dn,(xxx).L */ -{ CPUFUNC(op_c1c0_0), 0, 49600 }, /* MULS.W Dn,Dn */ -{ CPUFUNC(op_c1d0_0), 0, 49616 }, /* MULS.W (An),Dn */ -{ CPUFUNC(op_c1d8_0), 0, 49624 }, /* MULS.W (An)+,Dn */ -{ CPUFUNC(op_c1e0_0), 0, 49632 }, /* MULS.W -(An),Dn */ -{ CPUFUNC(op_c1e8_0), 0, 49640 }, /* MULS.W (d16,An),Dn */ -{ CPUFUNC(op_c1f0_0), 0, 49648 }, /* MULS.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c1f8_0), 0, 49656 }, /* MULS.W (xxx).W,Dn */ -{ CPUFUNC(op_c1f9_0), 0, 49657 }, /* MULS.W (xxx).L,Dn */ -{ CPUFUNC(op_c1fa_0), 0, 49658 }, /* MULS.W (d16,PC),Dn */ -{ CPUFUNC(op_c1fb_0), 0, 49659 }, /* MULS.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c1fc_0), 0, 49660 }, /* MULS.W #.W,Dn */ -{ CPUFUNC(op_d000_0), 0, 53248 }, /* ADD.B Dn,Dn */ -{ CPUFUNC(op_d010_0), 0, 53264 }, /* ADD.B (An),Dn */ -{ CPUFUNC(op_d018_0), 0, 53272 }, /* ADD.B (An)+,Dn */ -{ CPUFUNC(op_d020_0), 0, 53280 }, /* ADD.B -(An),Dn */ -{ CPUFUNC(op_d028_0), 0, 53288 }, /* ADD.B (d16,An),Dn */ -{ CPUFUNC(op_d030_0), 0, 53296 }, /* ADD.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_d038_0), 0, 53304 }, /* ADD.B (xxx).W,Dn */ -{ CPUFUNC(op_d039_0), 0, 53305 }, /* ADD.B (xxx).L,Dn */ -{ CPUFUNC(op_d03a_0), 0, 53306 }, /* ADD.B (d16,PC),Dn */ -{ CPUFUNC(op_d03b_0), 0, 53307 }, /* ADD.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d03c_0), 0, 53308 }, /* ADD.B #.B,Dn */ -{ CPUFUNC(op_d040_0), 0, 53312 }, /* ADD.W Dn,Dn */ -{ CPUFUNC(op_d048_0), 0, 53320 }, /* ADD.W An,Dn */ -{ CPUFUNC(op_d050_0), 0, 53328 }, /* ADD.W (An),Dn */ -{ CPUFUNC(op_d058_0), 0, 53336 }, /* ADD.W (An)+,Dn */ -{ CPUFUNC(op_d060_0), 0, 53344 }, /* ADD.W -(An),Dn */ -{ CPUFUNC(op_d068_0), 0, 53352 }, /* ADD.W (d16,An),Dn */ -{ CPUFUNC(op_d070_0), 0, 53360 }, /* ADD.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_d078_0), 0, 53368 }, /* ADD.W (xxx).W,Dn */ -{ CPUFUNC(op_d079_0), 0, 53369 }, /* ADD.W (xxx).L,Dn */ -{ CPUFUNC(op_d07a_0), 0, 53370 }, /* ADD.W (d16,PC),Dn */ -{ CPUFUNC(op_d07b_0), 0, 53371 }, /* ADD.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d07c_0), 0, 53372 }, /* ADD.W #.W,Dn */ -{ CPUFUNC(op_d080_0), 0, 53376 }, /* ADD.L Dn,Dn */ -{ CPUFUNC(op_d088_0), 0, 53384 }, /* ADD.L An,Dn */ -{ CPUFUNC(op_d090_0), 0, 53392 }, /* ADD.L (An),Dn */ -{ CPUFUNC(op_d098_0), 0, 53400 }, /* ADD.L (An)+,Dn */ -{ CPUFUNC(op_d0a0_0), 0, 53408 }, /* ADD.L -(An),Dn */ -{ CPUFUNC(op_d0a8_0), 0, 53416 }, /* ADD.L (d16,An),Dn */ -{ CPUFUNC(op_d0b0_0), 0, 53424 }, /* ADD.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_d0b8_0), 0, 53432 }, /* ADD.L (xxx).W,Dn */ -{ CPUFUNC(op_d0b9_0), 0, 53433 }, /* ADD.L (xxx).L,Dn */ -{ CPUFUNC(op_d0ba_0), 0, 53434 }, /* ADD.L (d16,PC),Dn */ -{ CPUFUNC(op_d0bb_0), 0, 53435 }, /* ADD.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d0bc_0), 0, 53436 }, /* ADD.L #.L,Dn */ -{ CPUFUNC_FF(op_d0c0_0), 0, 53440 }, /* ADDA.W Dn,An */ -{ CPUFUNC_FF(op_d0c8_0), 0, 53448 }, /* ADDA.W An,An */ -{ CPUFUNC_FF(op_d0d0_0), 0, 53456 }, /* ADDA.W (An),An */ -{ CPUFUNC_FF(op_d0d8_0), 0, 53464 }, /* ADDA.W (An)+,An */ -{ CPUFUNC_FF(op_d0e0_0), 0, 53472 }, /* ADDA.W -(An),An */ -{ CPUFUNC_FF(op_d0e8_0), 0, 53480 }, /* ADDA.W (d16,An),An */ -{ CPUFUNC_FF(op_d0f0_0), 0, 53488 }, /* ADDA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_d0f8_0), 0, 53496 }, /* ADDA.W (xxx).W,An */ -{ CPUFUNC_FF(op_d0f9_0), 0, 53497 }, /* ADDA.W (xxx).L,An */ -{ CPUFUNC_FF(op_d0fa_0), 0, 53498 }, /* ADDA.W (d16,PC),An */ -{ CPUFUNC_FF(op_d0fb_0), 0, 53499 }, /* ADDA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_d0fc_0), 0, 53500 }, /* ADDA.W #.W,An */ -{ CPUFUNC(op_d100_0), 0, 53504 }, /* ADDX.B Dn,Dn */ -{ CPUFUNC(op_d108_0), 0, 53512 }, /* ADDX.B -(An),-(An) */ -{ CPUFUNC(op_d110_0), 0, 53520 }, /* ADD.B Dn,(An) */ -{ CPUFUNC(op_d118_0), 0, 53528 }, /* ADD.B Dn,(An)+ */ -{ CPUFUNC(op_d120_0), 0, 53536 }, /* ADD.B Dn,-(An) */ -{ CPUFUNC(op_d128_0), 0, 53544 }, /* ADD.B Dn,(d16,An) */ -{ CPUFUNC(op_d130_0), 0, 53552 }, /* ADD.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d138_0), 0, 53560 }, /* ADD.B Dn,(xxx).W */ -{ CPUFUNC(op_d139_0), 0, 53561 }, /* ADD.B Dn,(xxx).L */ -{ CPUFUNC(op_d140_0), 0, 53568 }, /* ADDX.W Dn,Dn */ -{ CPUFUNC(op_d148_0), 0, 53576 }, /* ADDX.W -(An),-(An) */ -{ CPUFUNC(op_d150_0), 0, 53584 }, /* ADD.W Dn,(An) */ -{ CPUFUNC(op_d158_0), 0, 53592 }, /* ADD.W Dn,(An)+ */ -{ CPUFUNC(op_d160_0), 0, 53600 }, /* ADD.W Dn,-(An) */ -{ CPUFUNC(op_d168_0), 0, 53608 }, /* ADD.W Dn,(d16,An) */ -{ CPUFUNC(op_d170_0), 0, 53616 }, /* ADD.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d178_0), 0, 53624 }, /* ADD.W Dn,(xxx).W */ -{ CPUFUNC(op_d179_0), 0, 53625 }, /* ADD.W Dn,(xxx).L */ -{ CPUFUNC(op_d180_0), 0, 53632 }, /* ADDX.L Dn,Dn */ -{ CPUFUNC(op_d188_0), 0, 53640 }, /* ADDX.L -(An),-(An) */ -{ CPUFUNC(op_d190_0), 0, 53648 }, /* ADD.L Dn,(An) */ -{ CPUFUNC(op_d198_0), 0, 53656 }, /* ADD.L Dn,(An)+ */ -{ CPUFUNC(op_d1a0_0), 0, 53664 }, /* ADD.L Dn,-(An) */ -{ CPUFUNC(op_d1a8_0), 0, 53672 }, /* ADD.L Dn,(d16,An) */ -{ CPUFUNC(op_d1b0_0), 0, 53680 }, /* ADD.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d1b8_0), 0, 53688 }, /* ADD.L Dn,(xxx).W */ -{ CPUFUNC(op_d1b9_0), 0, 53689 }, /* ADD.L Dn,(xxx).L */ -{ CPUFUNC_FF(op_d1c0_0), 0, 53696 }, /* ADDA.L Dn,An */ -{ CPUFUNC_FF(op_d1c8_0), 0, 53704 }, /* ADDA.L An,An */ -{ CPUFUNC_FF(op_d1d0_0), 0, 53712 }, /* ADDA.L (An),An */ -{ CPUFUNC_FF(op_d1d8_0), 0, 53720 }, /* ADDA.L (An)+,An */ -{ CPUFUNC_FF(op_d1e0_0), 0, 53728 }, /* ADDA.L -(An),An */ -{ CPUFUNC_FF(op_d1e8_0), 0, 53736 }, /* ADDA.L (d16,An),An */ -{ CPUFUNC_FF(op_d1f0_0), 0, 53744 }, /* ADDA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_d1f8_0), 0, 53752 }, /* ADDA.L (xxx).W,An */ -{ CPUFUNC_FF(op_d1f9_0), 0, 53753 }, /* ADDA.L (xxx).L,An */ -{ CPUFUNC_FF(op_d1fa_0), 0, 53754 }, /* ADDA.L (d16,PC),An */ -{ CPUFUNC_FF(op_d1fb_0), 0, 53755 }, /* ADDA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_d1fc_0), 0, 53756 }, /* ADDA.L #.L,An */ -{ CPUFUNC(op_e000_0), 0, 57344 }, /* ASR.B #,Dn */ -{ CPUFUNC(op_e008_0), 0, 57352 }, /* LSR.B #,Dn */ -{ CPUFUNC(op_e010_0), 0, 57360 }, /* ROXR.B #,Dn */ -{ CPUFUNC(op_e018_0), 0, 57368 }, /* ROR.B #,Dn */ -{ CPUFUNC(op_e020_0), 0, 57376 }, /* ASR.B Dn,Dn */ -{ CPUFUNC(op_e028_0), 0, 57384 }, /* LSR.B Dn,Dn */ -{ CPUFUNC(op_e030_0), 0, 57392 }, /* ROXR.B Dn,Dn */ -{ CPUFUNC(op_e038_0), 0, 57400 }, /* ROR.B Dn,Dn */ -{ CPUFUNC(op_e040_0), 0, 57408 }, /* ASR.W #,Dn */ -{ CPUFUNC(op_e048_0), 0, 57416 }, /* LSR.W #,Dn */ -{ CPUFUNC(op_e050_0), 0, 57424 }, /* ROXR.W #,Dn */ -{ CPUFUNC(op_e058_0), 0, 57432 }, /* ROR.W #,Dn */ -{ CPUFUNC(op_e060_0), 0, 57440 }, /* ASR.W Dn,Dn */ -{ CPUFUNC(op_e068_0), 0, 57448 }, /* LSR.W Dn,Dn */ -{ CPUFUNC(op_e070_0), 0, 57456 }, /* ROXR.W Dn,Dn */ -{ CPUFUNC(op_e078_0), 0, 57464 }, /* ROR.W Dn,Dn */ -{ CPUFUNC(op_e080_0), 0, 57472 }, /* ASR.L #,Dn */ -{ CPUFUNC(op_e088_0), 0, 57480 }, /* LSR.L #,Dn */ -{ CPUFUNC(op_e090_0), 0, 57488 }, /* ROXR.L #,Dn */ -{ CPUFUNC(op_e098_0), 0, 57496 }, /* ROR.L #,Dn */ -{ CPUFUNC(op_e0a0_0), 0, 57504 }, /* ASR.L Dn,Dn */ -{ CPUFUNC(op_e0a8_0), 0, 57512 }, /* LSR.L Dn,Dn */ -{ CPUFUNC(op_e0b0_0), 0, 57520 }, /* ROXR.L Dn,Dn */ -{ CPUFUNC(op_e0b8_0), 0, 57528 }, /* ROR.L Dn,Dn */ -{ CPUFUNC(op_e0d0_0), 0, 57552 }, /* ASRW.W (An) */ -{ CPUFUNC(op_e0d8_0), 0, 57560 }, /* ASRW.W (An)+ */ -{ CPUFUNC(op_e0e0_0), 0, 57568 }, /* ASRW.W -(An) */ -{ CPUFUNC(op_e0e8_0), 0, 57576 }, /* ASRW.W (d16,An) */ -{ CPUFUNC(op_e0f0_0), 0, 57584 }, /* ASRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e0f8_0), 0, 57592 }, /* ASRW.W (xxx).W */ -{ CPUFUNC(op_e0f9_0), 0, 57593 }, /* ASRW.W (xxx).L */ -{ CPUFUNC(op_e100_0), 0, 57600 }, /* ASL.B #,Dn */ -{ CPUFUNC(op_e108_0), 0, 57608 }, /* LSL.B #,Dn */ -{ CPUFUNC(op_e110_0), 0, 57616 }, /* ROXL.B #,Dn */ -{ CPUFUNC(op_e118_0), 0, 57624 }, /* ROL.B #,Dn */ -{ CPUFUNC(op_e120_0), 0, 57632 }, /* ASL.B Dn,Dn */ -{ CPUFUNC(op_e128_0), 0, 57640 }, /* LSL.B Dn,Dn */ -{ CPUFUNC(op_e130_0), 0, 57648 }, /* ROXL.B Dn,Dn */ -{ CPUFUNC(op_e138_0), 0, 57656 }, /* ROL.B Dn,Dn */ -{ CPUFUNC(op_e140_0), 0, 57664 }, /* ASL.W #,Dn */ -{ CPUFUNC(op_e148_0), 0, 57672 }, /* LSL.W #,Dn */ -{ CPUFUNC(op_e150_0), 0, 57680 }, /* ROXL.W #,Dn */ -{ CPUFUNC(op_e158_0), 0, 57688 }, /* ROL.W #,Dn */ -{ CPUFUNC(op_e160_0), 0, 57696 }, /* ASL.W Dn,Dn */ -{ CPUFUNC(op_e168_0), 0, 57704 }, /* LSL.W Dn,Dn */ -{ CPUFUNC(op_e170_0), 0, 57712 }, /* ROXL.W Dn,Dn */ -{ CPUFUNC(op_e178_0), 0, 57720 }, /* ROL.W Dn,Dn */ -{ CPUFUNC(op_e180_0), 0, 57728 }, /* ASL.L #,Dn */ -{ CPUFUNC(op_e188_0), 0, 57736 }, /* LSL.L #,Dn */ -{ CPUFUNC(op_e190_0), 0, 57744 }, /* ROXL.L #,Dn */ -{ CPUFUNC(op_e198_0), 0, 57752 }, /* ROL.L #,Dn */ -{ CPUFUNC(op_e1a0_0), 0, 57760 }, /* ASL.L Dn,Dn */ -{ CPUFUNC(op_e1a8_0), 0, 57768 }, /* LSL.L Dn,Dn */ -{ CPUFUNC(op_e1b0_0), 0, 57776 }, /* ROXL.L Dn,Dn */ -{ CPUFUNC(op_e1b8_0), 0, 57784 }, /* ROL.L Dn,Dn */ -{ CPUFUNC(op_e1d0_0), 0, 57808 }, /* ASLW.W (An) */ -{ CPUFUNC(op_e1d8_0), 0, 57816 }, /* ASLW.W (An)+ */ -{ CPUFUNC(op_e1e0_0), 0, 57824 }, /* ASLW.W -(An) */ -{ CPUFUNC(op_e1e8_0), 0, 57832 }, /* ASLW.W (d16,An) */ -{ CPUFUNC(op_e1f0_0), 0, 57840 }, /* ASLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e1f8_0), 0, 57848 }, /* ASLW.W (xxx).W */ -{ CPUFUNC(op_e1f9_0), 0, 57849 }, /* ASLW.W (xxx).L */ -{ CPUFUNC(op_e2d0_0), 0, 58064 }, /* LSRW.W (An) */ -{ CPUFUNC(op_e2d8_0), 0, 58072 }, /* LSRW.W (An)+ */ -{ CPUFUNC(op_e2e0_0), 0, 58080 }, /* LSRW.W -(An) */ -{ CPUFUNC(op_e2e8_0), 0, 58088 }, /* LSRW.W (d16,An) */ -{ CPUFUNC(op_e2f0_0), 0, 58096 }, /* LSRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e2f8_0), 0, 58104 }, /* LSRW.W (xxx).W */ -{ CPUFUNC(op_e2f9_0), 0, 58105 }, /* LSRW.W (xxx).L */ -{ CPUFUNC(op_e3d0_0), 0, 58320 }, /* LSLW.W (An) */ -{ CPUFUNC(op_e3d8_0), 0, 58328 }, /* LSLW.W (An)+ */ -{ CPUFUNC(op_e3e0_0), 0, 58336 }, /* LSLW.W -(An) */ -{ CPUFUNC(op_e3e8_0), 0, 58344 }, /* LSLW.W (d16,An) */ -{ CPUFUNC(op_e3f0_0), 0, 58352 }, /* LSLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e3f8_0), 0, 58360 }, /* LSLW.W (xxx).W */ -{ CPUFUNC(op_e3f9_0), 0, 58361 }, /* LSLW.W (xxx).L */ -{ CPUFUNC(op_e4d0_0), 0, 58576 }, /* ROXRW.W (An) */ -{ CPUFUNC(op_e4d8_0), 0, 58584 }, /* ROXRW.W (An)+ */ -{ CPUFUNC(op_e4e0_0), 0, 58592 }, /* ROXRW.W -(An) */ -{ CPUFUNC(op_e4e8_0), 0, 58600 }, /* ROXRW.W (d16,An) */ -{ CPUFUNC(op_e4f0_0), 0, 58608 }, /* ROXRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e4f8_0), 0, 58616 }, /* ROXRW.W (xxx).W */ -{ CPUFUNC(op_e4f9_0), 0, 58617 }, /* ROXRW.W (xxx).L */ -{ CPUFUNC(op_e5d0_0), 0, 58832 }, /* ROXLW.W (An) */ -{ CPUFUNC(op_e5d8_0), 0, 58840 }, /* ROXLW.W (An)+ */ -{ CPUFUNC(op_e5e0_0), 0, 58848 }, /* ROXLW.W -(An) */ -{ CPUFUNC(op_e5e8_0), 0, 58856 }, /* ROXLW.W (d16,An) */ -{ CPUFUNC(op_e5f0_0), 0, 58864 }, /* ROXLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e5f8_0), 0, 58872 }, /* ROXLW.W (xxx).W */ -{ CPUFUNC(op_e5f9_0), 0, 58873 }, /* ROXLW.W (xxx).L */ -{ CPUFUNC(op_e6d0_0), 0, 59088 }, /* RORW.W (An) */ -{ CPUFUNC(op_e6d8_0), 0, 59096 }, /* RORW.W (An)+ */ -{ CPUFUNC(op_e6e0_0), 0, 59104 }, /* RORW.W -(An) */ -{ CPUFUNC(op_e6e8_0), 0, 59112 }, /* RORW.W (d16,An) */ -{ CPUFUNC(op_e6f0_0), 0, 59120 }, /* RORW.W (d8,An,Xn) */ -{ CPUFUNC(op_e6f8_0), 0, 59128 }, /* RORW.W (xxx).W */ -{ CPUFUNC(op_e6f9_0), 0, 59129 }, /* RORW.W (xxx).L */ -{ CPUFUNC(op_e7d0_0), 0, 59344 }, /* ROLW.W (An) */ -{ CPUFUNC(op_e7d8_0), 0, 59352 }, /* ROLW.W (An)+ */ -{ CPUFUNC(op_e7e0_0), 0, 59360 }, /* ROLW.W -(An) */ -{ CPUFUNC(op_e7e8_0), 0, 59368 }, /* ROLW.W (d16,An) */ -{ CPUFUNC(op_e7f0_0), 0, 59376 }, /* ROLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e7f8_0), 0, 59384 }, /* ROLW.W (xxx).W */ -{ CPUFUNC(op_e7f9_0), 0, 59385 }, /* ROLW.W (xxx).L */ -{ CPUFUNC(op_e8c0_0), 0, 59584 }, /* BFTST.L #.W,Dn */ -{ CPUFUNC(op_e8d0_0), 0, 59600 }, /* BFTST.L #.W,(An) */ -{ CPUFUNC(op_e8e8_0), 0, 59624 }, /* BFTST.L #.W,(d16,An) */ -{ CPUFUNC(op_e8f0_0), 0, 59632 }, /* BFTST.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_e8f8_0), 0, 59640 }, /* BFTST.L #.W,(xxx).W */ -{ CPUFUNC(op_e8f9_0), 0, 59641 }, /* BFTST.L #.W,(xxx).L */ -{ CPUFUNC(op_e8fa_0), 0, 59642 }, /* BFTST.L #.W,(d16,PC) */ -{ CPUFUNC(op_e8fb_0), 0, 59643 }, /* BFTST.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_e9c0_0), 0, 59840 }, /* BFEXTU.L #.W,Dn */ -{ CPUFUNC(op_e9d0_0), 0, 59856 }, /* BFEXTU.L #.W,(An) */ -{ CPUFUNC(op_e9e8_0), 0, 59880 }, /* BFEXTU.L #.W,(d16,An) */ -{ CPUFUNC(op_e9f0_0), 0, 59888 }, /* BFEXTU.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_e9f8_0), 0, 59896 }, /* BFEXTU.L #.W,(xxx).W */ -{ CPUFUNC(op_e9f9_0), 0, 59897 }, /* BFEXTU.L #.W,(xxx).L */ -{ CPUFUNC(op_e9fa_0), 0, 59898 }, /* BFEXTU.L #.W,(d16,PC) */ -{ CPUFUNC(op_e9fb_0), 0, 59899 }, /* BFEXTU.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_eac0_0), 0, 60096 }, /* BFCHG.L #.W,Dn */ -{ CPUFUNC(op_ead0_0), 0, 60112 }, /* BFCHG.L #.W,(An) */ -{ CPUFUNC(op_eae8_0), 0, 60136 }, /* BFCHG.L #.W,(d16,An) */ -{ CPUFUNC(op_eaf0_0), 0, 60144 }, /* BFCHG.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_eaf8_0), 0, 60152 }, /* BFCHG.L #.W,(xxx).W */ -{ CPUFUNC(op_eaf9_0), 0, 60153 }, /* BFCHG.L #.W,(xxx).L */ -{ CPUFUNC(op_ebc0_0), 0, 60352 }, /* BFEXTS.L #.W,Dn */ -{ CPUFUNC(op_ebd0_0), 0, 60368 }, /* BFEXTS.L #.W,(An) */ -{ CPUFUNC(op_ebe8_0), 0, 60392 }, /* BFEXTS.L #.W,(d16,An) */ -{ CPUFUNC(op_ebf0_0), 0, 60400 }, /* BFEXTS.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_ebf8_0), 0, 60408 }, /* BFEXTS.L #.W,(xxx).W */ -{ CPUFUNC(op_ebf9_0), 0, 60409 }, /* BFEXTS.L #.W,(xxx).L */ -{ CPUFUNC(op_ebfa_0), 0, 60410 }, /* BFEXTS.L #.W,(d16,PC) */ -{ CPUFUNC(op_ebfb_0), 0, 60411 }, /* BFEXTS.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_ecc0_0), 0, 60608 }, /* BFCLR.L #.W,Dn */ -{ CPUFUNC(op_ecd0_0), 0, 60624 }, /* BFCLR.L #.W,(An) */ -{ CPUFUNC(op_ece8_0), 0, 60648 }, /* BFCLR.L #.W,(d16,An) */ -{ CPUFUNC(op_ecf0_0), 0, 60656 }, /* BFCLR.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_ecf8_0), 0, 60664 }, /* BFCLR.L #.W,(xxx).W */ -{ CPUFUNC(op_ecf9_0), 0, 60665 }, /* BFCLR.L #.W,(xxx).L */ -{ CPUFUNC(op_edc0_0), 0, 60864 }, /* BFFFO.L #.W,Dn */ -{ CPUFUNC(op_edd0_0), 0, 60880 }, /* BFFFO.L #.W,(An) */ -{ CPUFUNC(op_ede8_0), 0, 60904 }, /* BFFFO.L #.W,(d16,An) */ -{ CPUFUNC(op_edf0_0), 0, 60912 }, /* BFFFO.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_edf8_0), 0, 60920 }, /* BFFFO.L #.W,(xxx).W */ -{ CPUFUNC(op_edf9_0), 0, 60921 }, /* BFFFO.L #.W,(xxx).L */ -{ CPUFUNC(op_edfa_0), 0, 60922 }, /* BFFFO.L #.W,(d16,PC) */ -{ CPUFUNC(op_edfb_0), 0, 60923 }, /* BFFFO.L #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_eec0_0), 0, 61120 }, /* BFSET.L #.W,Dn */ -{ CPUFUNC(op_eed0_0), 0, 61136 }, /* BFSET.L #.W,(An) */ -{ CPUFUNC(op_eee8_0), 0, 61160 }, /* BFSET.L #.W,(d16,An) */ -{ CPUFUNC(op_eef0_0), 0, 61168 }, /* BFSET.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_eef8_0), 0, 61176 }, /* BFSET.L #.W,(xxx).W */ -{ CPUFUNC(op_eef9_0), 0, 61177 }, /* BFSET.L #.W,(xxx).L */ -{ CPUFUNC(op_efc0_0), 0, 61376 }, /* BFINS.L #.W,Dn */ -{ CPUFUNC(op_efd0_0), 0, 61392 }, /* BFINS.L #.W,(An) */ -{ CPUFUNC(op_efe8_0), 0, 61416 }, /* BFINS.L #.W,(d16,An) */ -{ CPUFUNC(op_eff0_0), 0, 61424 }, /* BFINS.L #.W,(d8,An,Xn) */ -{ CPUFUNC(op_eff8_0), 0, 61432 }, /* BFINS.L #.W,(xxx).W */ -{ CPUFUNC(op_eff9_0), 0, 61433 }, /* BFINS.L #.W,(xxx).L */ -{ 0, 0, 0 }}; -struct cputbl CPUFUNC(op_smalltbl_3)[] = { -{ CPUFUNC(op_0_0), 0, 0 }, /* OR.B #.B,Dn */ -{ CPUFUNC(op_10_0), 0, 16 }, /* OR.B #.B,(An) */ -{ CPUFUNC(op_18_0), 0, 24 }, /* OR.B #.B,(An)+ */ -{ CPUFUNC(op_20_0), 0, 32 }, /* OR.B #.B,-(An) */ -{ CPUFUNC(op_28_0), 0, 40 }, /* OR.B #.B,(d16,An) */ -{ CPUFUNC(op_30_3), 0, 48 }, /* OR.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_38_0), 0, 56 }, /* OR.B #.B,(xxx).W */ -{ CPUFUNC(op_39_0), 0, 57 }, /* OR.B #.B,(xxx).L */ -{ CPUFUNC(op_3c_0), 0, 60 }, /* ORSR.B #.W */ -{ CPUFUNC(op_40_0), 0, 64 }, /* OR.W #.W,Dn */ -{ CPUFUNC(op_50_0), 0, 80 }, /* OR.W #.W,(An) */ -{ CPUFUNC(op_58_0), 0, 88 }, /* OR.W #.W,(An)+ */ -{ CPUFUNC(op_60_0), 0, 96 }, /* OR.W #.W,-(An) */ -{ CPUFUNC(op_68_0), 0, 104 }, /* OR.W #.W,(d16,An) */ -{ CPUFUNC(op_70_3), 0, 112 }, /* OR.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_78_0), 0, 120 }, /* OR.W #.W,(xxx).W */ -{ CPUFUNC(op_79_0), 0, 121 }, /* OR.W #.W,(xxx).L */ -{ CPUFUNC(op_7c_0), 0, 124 }, /* ORSR.W #.W */ -{ CPUFUNC(op_80_0), 0, 128 }, /* OR.L #.L,Dn */ -{ CPUFUNC(op_90_0), 0, 144 }, /* OR.L #.L,(An) */ -{ CPUFUNC(op_98_0), 0, 152 }, /* OR.L #.L,(An)+ */ -{ CPUFUNC(op_a0_0), 0, 160 }, /* OR.L #.L,-(An) */ -{ CPUFUNC(op_a8_0), 0, 168 }, /* OR.L #.L,(d16,An) */ -{ CPUFUNC(op_b0_3), 0, 176 }, /* OR.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_b8_0), 0, 184 }, /* OR.L #.L,(xxx).W */ -{ CPUFUNC(op_b9_0), 0, 185 }, /* OR.L #.L,(xxx).L */ -{ CPUFUNC(op_100_0), 0, 256 }, /* BTST.L Dn,Dn */ -{ CPUFUNC_FF(op_108_0), 0, 264 }, /* MVPMR.W (d16,An),Dn */ -{ CPUFUNC(op_110_0), 0, 272 }, /* BTST.B Dn,(An) */ -{ CPUFUNC(op_118_0), 0, 280 }, /* BTST.B Dn,(An)+ */ -{ CPUFUNC(op_120_0), 0, 288 }, /* BTST.B Dn,-(An) */ -{ CPUFUNC(op_128_0), 0, 296 }, /* BTST.B Dn,(d16,An) */ -{ CPUFUNC(op_130_3), 0, 304 }, /* BTST.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_138_0), 0, 312 }, /* BTST.B Dn,(xxx).W */ -{ CPUFUNC(op_139_0), 0, 313 }, /* BTST.B Dn,(xxx).L */ -{ CPUFUNC(op_13a_0), 0, 314 }, /* BTST.B Dn,(d16,PC) */ -{ CPUFUNC(op_13b_3), 0, 315 }, /* BTST.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_13c_0), 0, 316 }, /* BTST.B Dn,#.B */ -{ CPUFUNC(op_140_0), 0, 320 }, /* BCHG.L Dn,Dn */ -{ CPUFUNC_FF(op_148_0), 0, 328 }, /* MVPMR.L (d16,An),Dn */ -{ CPUFUNC(op_150_0), 0, 336 }, /* BCHG.B Dn,(An) */ -{ CPUFUNC(op_158_0), 0, 344 }, /* BCHG.B Dn,(An)+ */ -{ CPUFUNC(op_160_0), 0, 352 }, /* BCHG.B Dn,-(An) */ -{ CPUFUNC(op_168_0), 0, 360 }, /* BCHG.B Dn,(d16,An) */ -{ CPUFUNC(op_170_3), 0, 368 }, /* BCHG.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_178_0), 0, 376 }, /* BCHG.B Dn,(xxx).W */ -{ CPUFUNC(op_179_0), 0, 377 }, /* BCHG.B Dn,(xxx).L */ -{ CPUFUNC(op_17a_0), 0, 378 }, /* BCHG.B Dn,(d16,PC) */ -{ CPUFUNC(op_17b_3), 0, 379 }, /* BCHG.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_180_0), 0, 384 }, /* BCLR.L Dn,Dn */ -{ CPUFUNC_FF(op_188_0), 0, 392 }, /* MVPRM.W Dn,(d16,An) */ -{ CPUFUNC(op_190_0), 0, 400 }, /* BCLR.B Dn,(An) */ -{ CPUFUNC(op_198_0), 0, 408 }, /* BCLR.B Dn,(An)+ */ -{ CPUFUNC(op_1a0_0), 0, 416 }, /* BCLR.B Dn,-(An) */ -{ CPUFUNC(op_1a8_0), 0, 424 }, /* BCLR.B Dn,(d16,An) */ -{ CPUFUNC(op_1b0_3), 0, 432 }, /* BCLR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1b8_0), 0, 440 }, /* BCLR.B Dn,(xxx).W */ -{ CPUFUNC(op_1b9_0), 0, 441 }, /* BCLR.B Dn,(xxx).L */ -{ CPUFUNC(op_1ba_0), 0, 442 }, /* BCLR.B Dn,(d16,PC) */ -{ CPUFUNC(op_1bb_3), 0, 443 }, /* BCLR.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_1c0_0), 0, 448 }, /* BSET.L Dn,Dn */ -{ CPUFUNC_FF(op_1c8_0), 0, 456 }, /* MVPRM.L Dn,(d16,An) */ -{ CPUFUNC(op_1d0_0), 0, 464 }, /* BSET.B Dn,(An) */ -{ CPUFUNC(op_1d8_0), 0, 472 }, /* BSET.B Dn,(An)+ */ -{ CPUFUNC(op_1e0_0), 0, 480 }, /* BSET.B Dn,-(An) */ -{ CPUFUNC(op_1e8_0), 0, 488 }, /* BSET.B Dn,(d16,An) */ -{ CPUFUNC(op_1f0_3), 0, 496 }, /* BSET.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1f8_0), 0, 504 }, /* BSET.B Dn,(xxx).W */ -{ CPUFUNC(op_1f9_0), 0, 505 }, /* BSET.B Dn,(xxx).L */ -{ CPUFUNC(op_1fa_0), 0, 506 }, /* BSET.B Dn,(d16,PC) */ -{ CPUFUNC(op_1fb_3), 0, 507 }, /* BSET.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_200_0), 0, 512 }, /* AND.B #.B,Dn */ -{ CPUFUNC(op_210_0), 0, 528 }, /* AND.B #.B,(An) */ -{ CPUFUNC(op_218_0), 0, 536 }, /* AND.B #.B,(An)+ */ -{ CPUFUNC(op_220_0), 0, 544 }, /* AND.B #.B,-(An) */ -{ CPUFUNC(op_228_0), 0, 552 }, /* AND.B #.B,(d16,An) */ -{ CPUFUNC(op_230_3), 0, 560 }, /* AND.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_238_0), 0, 568 }, /* AND.B #.B,(xxx).W */ -{ CPUFUNC(op_239_0), 0, 569 }, /* AND.B #.B,(xxx).L */ -{ CPUFUNC(op_23c_0), 0, 572 }, /* ANDSR.B #.W */ -{ CPUFUNC(op_240_0), 0, 576 }, /* AND.W #.W,Dn */ -{ CPUFUNC(op_250_0), 0, 592 }, /* AND.W #.W,(An) */ -{ CPUFUNC(op_258_0), 0, 600 }, /* AND.W #.W,(An)+ */ -{ CPUFUNC(op_260_0), 0, 608 }, /* AND.W #.W,-(An) */ -{ CPUFUNC(op_268_0), 0, 616 }, /* AND.W #.W,(d16,An) */ -{ CPUFUNC(op_270_3), 0, 624 }, /* AND.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_278_0), 0, 632 }, /* AND.W #.W,(xxx).W */ -{ CPUFUNC(op_279_0), 0, 633 }, /* AND.W #.W,(xxx).L */ -{ CPUFUNC(op_27c_0), 0, 636 }, /* ANDSR.W #.W */ -{ CPUFUNC(op_280_0), 0, 640 }, /* AND.L #.L,Dn */ -{ CPUFUNC(op_290_0), 0, 656 }, /* AND.L #.L,(An) */ -{ CPUFUNC(op_298_0), 0, 664 }, /* AND.L #.L,(An)+ */ -{ CPUFUNC(op_2a0_0), 0, 672 }, /* AND.L #.L,-(An) */ -{ CPUFUNC(op_2a8_0), 0, 680 }, /* AND.L #.L,(d16,An) */ -{ CPUFUNC(op_2b0_3), 0, 688 }, /* AND.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_2b8_0), 0, 696 }, /* AND.L #.L,(xxx).W */ -{ CPUFUNC(op_2b9_0), 0, 697 }, /* AND.L #.L,(xxx).L */ -{ CPUFUNC(op_400_0), 0, 1024 }, /* SUB.B #.B,Dn */ -{ CPUFUNC(op_410_0), 0, 1040 }, /* SUB.B #.B,(An) */ -{ CPUFUNC(op_418_0), 0, 1048 }, /* SUB.B #.B,(An)+ */ -{ CPUFUNC(op_420_0), 0, 1056 }, /* SUB.B #.B,-(An) */ -{ CPUFUNC(op_428_0), 0, 1064 }, /* SUB.B #.B,(d16,An) */ -{ CPUFUNC(op_430_3), 0, 1072 }, /* SUB.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_438_0), 0, 1080 }, /* SUB.B #.B,(xxx).W */ -{ CPUFUNC(op_439_0), 0, 1081 }, /* SUB.B #.B,(xxx).L */ -{ CPUFUNC(op_440_0), 0, 1088 }, /* SUB.W #.W,Dn */ -{ CPUFUNC(op_450_0), 0, 1104 }, /* SUB.W #.W,(An) */ -{ CPUFUNC(op_458_0), 0, 1112 }, /* SUB.W #.W,(An)+ */ -{ CPUFUNC(op_460_0), 0, 1120 }, /* SUB.W #.W,-(An) */ -{ CPUFUNC(op_468_0), 0, 1128 }, /* SUB.W #.W,(d16,An) */ -{ CPUFUNC(op_470_3), 0, 1136 }, /* SUB.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_478_0), 0, 1144 }, /* SUB.W #.W,(xxx).W */ -{ CPUFUNC(op_479_0), 0, 1145 }, /* SUB.W #.W,(xxx).L */ -{ CPUFUNC(op_480_0), 0, 1152 }, /* SUB.L #.L,Dn */ -{ CPUFUNC(op_490_0), 0, 1168 }, /* SUB.L #.L,(An) */ -{ CPUFUNC(op_498_0), 0, 1176 }, /* SUB.L #.L,(An)+ */ -{ CPUFUNC(op_4a0_0), 0, 1184 }, /* SUB.L #.L,-(An) */ -{ CPUFUNC(op_4a8_0), 0, 1192 }, /* SUB.L #.L,(d16,An) */ -{ CPUFUNC(op_4b0_3), 0, 1200 }, /* SUB.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_4b8_0), 0, 1208 }, /* SUB.L #.L,(xxx).W */ -{ CPUFUNC(op_4b9_0), 0, 1209 }, /* SUB.L #.L,(xxx).L */ -{ CPUFUNC(op_600_0), 0, 1536 }, /* ADD.B #.B,Dn */ -{ CPUFUNC(op_610_0), 0, 1552 }, /* ADD.B #.B,(An) */ -{ CPUFUNC(op_618_0), 0, 1560 }, /* ADD.B #.B,(An)+ */ -{ CPUFUNC(op_620_0), 0, 1568 }, /* ADD.B #.B,-(An) */ -{ CPUFUNC(op_628_0), 0, 1576 }, /* ADD.B #.B,(d16,An) */ -{ CPUFUNC(op_630_3), 0, 1584 }, /* ADD.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_638_0), 0, 1592 }, /* ADD.B #.B,(xxx).W */ -{ CPUFUNC(op_639_0), 0, 1593 }, /* ADD.B #.B,(xxx).L */ -{ CPUFUNC(op_640_0), 0, 1600 }, /* ADD.W #.W,Dn */ -{ CPUFUNC(op_650_0), 0, 1616 }, /* ADD.W #.W,(An) */ -{ CPUFUNC(op_658_0), 0, 1624 }, /* ADD.W #.W,(An)+ */ -{ CPUFUNC(op_660_0), 0, 1632 }, /* ADD.W #.W,-(An) */ -{ CPUFUNC(op_668_0), 0, 1640 }, /* ADD.W #.W,(d16,An) */ -{ CPUFUNC(op_670_3), 0, 1648 }, /* ADD.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_678_0), 0, 1656 }, /* ADD.W #.W,(xxx).W */ -{ CPUFUNC(op_679_0), 0, 1657 }, /* ADD.W #.W,(xxx).L */ -{ CPUFUNC(op_680_0), 0, 1664 }, /* ADD.L #.L,Dn */ -{ CPUFUNC(op_690_0), 0, 1680 }, /* ADD.L #.L,(An) */ -{ CPUFUNC(op_698_0), 0, 1688 }, /* ADD.L #.L,(An)+ */ -{ CPUFUNC(op_6a0_0), 0, 1696 }, /* ADD.L #.L,-(An) */ -{ CPUFUNC(op_6a8_0), 0, 1704 }, /* ADD.L #.L,(d16,An) */ -{ CPUFUNC(op_6b0_3), 0, 1712 }, /* ADD.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_6b8_0), 0, 1720 }, /* ADD.L #.L,(xxx).W */ -{ CPUFUNC(op_6b9_0), 0, 1721 }, /* ADD.L #.L,(xxx).L */ -{ CPUFUNC(op_800_0), 0, 2048 }, /* BTST.L #.W,Dn */ -{ CPUFUNC(op_810_0), 0, 2064 }, /* BTST.B #.W,(An) */ -{ CPUFUNC(op_818_0), 0, 2072 }, /* BTST.B #.W,(An)+ */ -{ CPUFUNC(op_820_0), 0, 2080 }, /* BTST.B #.W,-(An) */ -{ CPUFUNC(op_828_0), 0, 2088 }, /* BTST.B #.W,(d16,An) */ -{ CPUFUNC(op_830_3), 0, 2096 }, /* BTST.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_838_0), 0, 2104 }, /* BTST.B #.W,(xxx).W */ -{ CPUFUNC(op_839_0), 0, 2105 }, /* BTST.B #.W,(xxx).L */ -{ CPUFUNC(op_83a_0), 0, 2106 }, /* BTST.B #.W,(d16,PC) */ -{ CPUFUNC(op_83b_3), 0, 2107 }, /* BTST.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_83c_0), 0, 2108 }, /* BTST.B #.W,#.B */ -{ CPUFUNC(op_840_0), 0, 2112 }, /* BCHG.L #.W,Dn */ -{ CPUFUNC(op_850_0), 0, 2128 }, /* BCHG.B #.W,(An) */ -{ CPUFUNC(op_858_0), 0, 2136 }, /* BCHG.B #.W,(An)+ */ -{ CPUFUNC(op_860_0), 0, 2144 }, /* BCHG.B #.W,-(An) */ -{ CPUFUNC(op_868_0), 0, 2152 }, /* BCHG.B #.W,(d16,An) */ -{ CPUFUNC(op_870_3), 0, 2160 }, /* BCHG.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_878_0), 0, 2168 }, /* BCHG.B #.W,(xxx).W */ -{ CPUFUNC(op_879_0), 0, 2169 }, /* BCHG.B #.W,(xxx).L */ -{ CPUFUNC(op_87a_0), 0, 2170 }, /* BCHG.B #.W,(d16,PC) */ -{ CPUFUNC(op_87b_3), 0, 2171 }, /* BCHG.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_880_0), 0, 2176 }, /* BCLR.L #.W,Dn */ -{ CPUFUNC(op_890_0), 0, 2192 }, /* BCLR.B #.W,(An) */ -{ CPUFUNC(op_898_0), 0, 2200 }, /* BCLR.B #.W,(An)+ */ -{ CPUFUNC(op_8a0_0), 0, 2208 }, /* BCLR.B #.W,-(An) */ -{ CPUFUNC(op_8a8_0), 0, 2216 }, /* BCLR.B #.W,(d16,An) */ -{ CPUFUNC(op_8b0_3), 0, 2224 }, /* BCLR.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_8b8_0), 0, 2232 }, /* BCLR.B #.W,(xxx).W */ -{ CPUFUNC(op_8b9_0), 0, 2233 }, /* BCLR.B #.W,(xxx).L */ -{ CPUFUNC(op_8ba_0), 0, 2234 }, /* BCLR.B #.W,(d16,PC) */ -{ CPUFUNC(op_8bb_3), 0, 2235 }, /* BCLR.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_8c0_0), 0, 2240 }, /* BSET.L #.W,Dn */ -{ CPUFUNC(op_8d0_0), 0, 2256 }, /* BSET.B #.W,(An) */ -{ CPUFUNC(op_8d8_0), 0, 2264 }, /* BSET.B #.W,(An)+ */ -{ CPUFUNC(op_8e0_0), 0, 2272 }, /* BSET.B #.W,-(An) */ -{ CPUFUNC(op_8e8_0), 0, 2280 }, /* BSET.B #.W,(d16,An) */ -{ CPUFUNC(op_8f0_3), 0, 2288 }, /* BSET.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_8f8_0), 0, 2296 }, /* BSET.B #.W,(xxx).W */ -{ CPUFUNC(op_8f9_0), 0, 2297 }, /* BSET.B #.W,(xxx).L */ -{ CPUFUNC(op_8fa_0), 0, 2298 }, /* BSET.B #.W,(d16,PC) */ -{ CPUFUNC(op_8fb_3), 0, 2299 }, /* BSET.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_a00_0), 0, 2560 }, /* EOR.B #.B,Dn */ -{ CPUFUNC(op_a10_0), 0, 2576 }, /* EOR.B #.B,(An) */ -{ CPUFUNC(op_a18_0), 0, 2584 }, /* EOR.B #.B,(An)+ */ -{ CPUFUNC(op_a20_0), 0, 2592 }, /* EOR.B #.B,-(An) */ -{ CPUFUNC(op_a28_0), 0, 2600 }, /* EOR.B #.B,(d16,An) */ -{ CPUFUNC(op_a30_3), 0, 2608 }, /* EOR.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_a38_0), 0, 2616 }, /* EOR.B #.B,(xxx).W */ -{ CPUFUNC(op_a39_0), 0, 2617 }, /* EOR.B #.B,(xxx).L */ -{ CPUFUNC(op_a3c_0), 0, 2620 }, /* EORSR.B #.W */ -{ CPUFUNC(op_a40_0), 0, 2624 }, /* EOR.W #.W,Dn */ -{ CPUFUNC(op_a50_0), 0, 2640 }, /* EOR.W #.W,(An) */ -{ CPUFUNC(op_a58_0), 0, 2648 }, /* EOR.W #.W,(An)+ */ -{ CPUFUNC(op_a60_0), 0, 2656 }, /* EOR.W #.W,-(An) */ -{ CPUFUNC(op_a68_0), 0, 2664 }, /* EOR.W #.W,(d16,An) */ -{ CPUFUNC(op_a70_3), 0, 2672 }, /* EOR.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_a78_0), 0, 2680 }, /* EOR.W #.W,(xxx).W */ -{ CPUFUNC(op_a79_0), 0, 2681 }, /* EOR.W #.W,(xxx).L */ -{ CPUFUNC(op_a7c_0), 0, 2684 }, /* EORSR.W #.W */ -{ CPUFUNC(op_a80_0), 0, 2688 }, /* EOR.L #.L,Dn */ -{ CPUFUNC(op_a90_0), 0, 2704 }, /* EOR.L #.L,(An) */ -{ CPUFUNC(op_a98_0), 0, 2712 }, /* EOR.L #.L,(An)+ */ -{ CPUFUNC(op_aa0_0), 0, 2720 }, /* EOR.L #.L,-(An) */ -{ CPUFUNC(op_aa8_0), 0, 2728 }, /* EOR.L #.L,(d16,An) */ -{ CPUFUNC(op_ab0_3), 0, 2736 }, /* EOR.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_ab8_0), 0, 2744 }, /* EOR.L #.L,(xxx).W */ -{ CPUFUNC(op_ab9_0), 0, 2745 }, /* EOR.L #.L,(xxx).L */ -{ CPUFUNC(op_c00_0), 0, 3072 }, /* CMP.B #.B,Dn */ -{ CPUFUNC(op_c10_0), 0, 3088 }, /* CMP.B #.B,(An) */ -{ CPUFUNC(op_c18_0), 0, 3096 }, /* CMP.B #.B,(An)+ */ -{ CPUFUNC(op_c20_0), 0, 3104 }, /* CMP.B #.B,-(An) */ -{ CPUFUNC(op_c28_0), 0, 3112 }, /* CMP.B #.B,(d16,An) */ -{ CPUFUNC(op_c30_3), 0, 3120 }, /* CMP.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_c38_0), 0, 3128 }, /* CMP.B #.B,(xxx).W */ -{ CPUFUNC(op_c39_0), 0, 3129 }, /* CMP.B #.B,(xxx).L */ -{ CPUFUNC(op_c3a_0), 0, 3130 }, /* CMP.B #.B,(d16,PC) */ -{ CPUFUNC(op_c3b_3), 0, 3131 }, /* CMP.B #.B,(d8,PC,Xn) */ -{ CPUFUNC(op_c40_0), 0, 3136 }, /* CMP.W #.W,Dn */ -{ CPUFUNC(op_c50_0), 0, 3152 }, /* CMP.W #.W,(An) */ -{ CPUFUNC(op_c58_0), 0, 3160 }, /* CMP.W #.W,(An)+ */ -{ CPUFUNC(op_c60_0), 0, 3168 }, /* CMP.W #.W,-(An) */ -{ CPUFUNC(op_c68_0), 0, 3176 }, /* CMP.W #.W,(d16,An) */ -{ CPUFUNC(op_c70_3), 0, 3184 }, /* CMP.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_c78_0), 0, 3192 }, /* CMP.W #.W,(xxx).W */ -{ CPUFUNC(op_c79_0), 0, 3193 }, /* CMP.W #.W,(xxx).L */ -{ CPUFUNC(op_c7a_0), 0, 3194 }, /* CMP.W #.W,(d16,PC) */ -{ CPUFUNC(op_c7b_3), 0, 3195 }, /* CMP.W #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_c80_0), 0, 3200 }, /* CMP.L #.L,Dn */ -{ CPUFUNC(op_c90_0), 0, 3216 }, /* CMP.L #.L,(An) */ -{ CPUFUNC(op_c98_0), 0, 3224 }, /* CMP.L #.L,(An)+ */ -{ CPUFUNC(op_ca0_0), 0, 3232 }, /* CMP.L #.L,-(An) */ -{ CPUFUNC(op_ca8_0), 0, 3240 }, /* CMP.L #.L,(d16,An) */ -{ CPUFUNC(op_cb0_3), 0, 3248 }, /* CMP.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_cb8_0), 0, 3256 }, /* CMP.L #.L,(xxx).W */ -{ CPUFUNC(op_cb9_0), 0, 3257 }, /* CMP.L #.L,(xxx).L */ -{ CPUFUNC(op_cba_0), 0, 3258 }, /* CMP.L #.L,(d16,PC) */ -{ CPUFUNC(op_cbb_3), 0, 3259 }, /* CMP.L #.L,(d8,PC,Xn) */ -{ CPUFUNC(op_1000_0), 0, 4096 }, /* MOVE.B Dn,Dn */ -{ CPUFUNC(op_1010_0), 0, 4112 }, /* MOVE.B (An),Dn */ -{ CPUFUNC(op_1018_0), 0, 4120 }, /* MOVE.B (An)+,Dn */ -{ CPUFUNC(op_1020_0), 0, 4128 }, /* MOVE.B -(An),Dn */ -{ CPUFUNC(op_1028_0), 0, 4136 }, /* MOVE.B (d16,An),Dn */ -{ CPUFUNC(op_1030_3), 0, 4144 }, /* MOVE.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_1038_0), 0, 4152 }, /* MOVE.B (xxx).W,Dn */ -{ CPUFUNC(op_1039_0), 0, 4153 }, /* MOVE.B (xxx).L,Dn */ -{ CPUFUNC(op_103a_0), 0, 4154 }, /* MOVE.B (d16,PC),Dn */ -{ CPUFUNC(op_103b_3), 0, 4155 }, /* MOVE.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_103c_0), 0, 4156 }, /* MOVE.B #.B,Dn */ -{ CPUFUNC(op_1080_0), 0, 4224 }, /* MOVE.B Dn,(An) */ -{ CPUFUNC(op_1090_0), 0, 4240 }, /* MOVE.B (An),(An) */ -{ CPUFUNC(op_1098_0), 0, 4248 }, /* MOVE.B (An)+,(An) */ -{ CPUFUNC(op_10a0_0), 0, 4256 }, /* MOVE.B -(An),(An) */ -{ CPUFUNC(op_10a8_0), 0, 4264 }, /* MOVE.B (d16,An),(An) */ -{ CPUFUNC(op_10b0_3), 0, 4272 }, /* MOVE.B (d8,An,Xn),(An) */ -{ CPUFUNC(op_10b8_0), 0, 4280 }, /* MOVE.B (xxx).W,(An) */ -{ CPUFUNC(op_10b9_0), 0, 4281 }, /* MOVE.B (xxx).L,(An) */ -{ CPUFUNC(op_10ba_0), 0, 4282 }, /* MOVE.B (d16,PC),(An) */ -{ CPUFUNC(op_10bb_3), 0, 4283 }, /* MOVE.B (d8,PC,Xn),(An) */ -{ CPUFUNC(op_10bc_0), 0, 4284 }, /* MOVE.B #.B,(An) */ -{ CPUFUNC(op_10c0_0), 0, 4288 }, /* MOVE.B Dn,(An)+ */ -{ CPUFUNC(op_10d0_0), 0, 4304 }, /* MOVE.B (An),(An)+ */ -{ CPUFUNC(op_10d8_0), 0, 4312 }, /* MOVE.B (An)+,(An)+ */ -{ CPUFUNC(op_10e0_0), 0, 4320 }, /* MOVE.B -(An),(An)+ */ -{ CPUFUNC(op_10e8_0), 0, 4328 }, /* MOVE.B (d16,An),(An)+ */ -{ CPUFUNC(op_10f0_3), 0, 4336 }, /* MOVE.B (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_10f8_0), 0, 4344 }, /* MOVE.B (xxx).W,(An)+ */ -{ CPUFUNC(op_10f9_0), 0, 4345 }, /* MOVE.B (xxx).L,(An)+ */ -{ CPUFUNC(op_10fa_0), 0, 4346 }, /* MOVE.B (d16,PC),(An)+ */ -{ CPUFUNC(op_10fb_3), 0, 4347 }, /* MOVE.B (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_10fc_0), 0, 4348 }, /* MOVE.B #.B,(An)+ */ -{ CPUFUNC(op_1100_0), 0, 4352 }, /* MOVE.B Dn,-(An) */ -{ CPUFUNC(op_1110_0), 0, 4368 }, /* MOVE.B (An),-(An) */ -{ CPUFUNC(op_1118_0), 0, 4376 }, /* MOVE.B (An)+,-(An) */ -{ CPUFUNC(op_1120_0), 0, 4384 }, /* MOVE.B -(An),-(An) */ -{ CPUFUNC(op_1128_0), 0, 4392 }, /* MOVE.B (d16,An),-(An) */ -{ CPUFUNC(op_1130_3), 0, 4400 }, /* MOVE.B (d8,An,Xn),-(An) */ -{ CPUFUNC(op_1138_0), 0, 4408 }, /* MOVE.B (xxx).W,-(An) */ -{ CPUFUNC(op_1139_0), 0, 4409 }, /* MOVE.B (xxx).L,-(An) */ -{ CPUFUNC(op_113a_0), 0, 4410 }, /* MOVE.B (d16,PC),-(An) */ -{ CPUFUNC(op_113b_3), 0, 4411 }, /* MOVE.B (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_113c_0), 0, 4412 }, /* MOVE.B #.B,-(An) */ -{ CPUFUNC(op_1140_0), 0, 4416 }, /* MOVE.B Dn,(d16,An) */ -{ CPUFUNC(op_1150_0), 0, 4432 }, /* MOVE.B (An),(d16,An) */ -{ CPUFUNC(op_1158_0), 0, 4440 }, /* MOVE.B (An)+,(d16,An) */ -{ CPUFUNC(op_1160_0), 0, 4448 }, /* MOVE.B -(An),(d16,An) */ -{ CPUFUNC(op_1168_0), 0, 4456 }, /* MOVE.B (d16,An),(d16,An) */ -{ CPUFUNC(op_1170_3), 0, 4464 }, /* MOVE.B (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_1178_0), 0, 4472 }, /* MOVE.B (xxx).W,(d16,An) */ -{ CPUFUNC(op_1179_0), 0, 4473 }, /* MOVE.B (xxx).L,(d16,An) */ -{ CPUFUNC(op_117a_0), 0, 4474 }, /* MOVE.B (d16,PC),(d16,An) */ -{ CPUFUNC(op_117b_3), 0, 4475 }, /* MOVE.B (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_117c_0), 0, 4476 }, /* MOVE.B #.B,(d16,An) */ -{ CPUFUNC(op_1180_3), 0, 4480 }, /* MOVE.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1190_3), 0, 4496 }, /* MOVE.B (An),(d8,An,Xn) */ -{ CPUFUNC(op_1198_3), 0, 4504 }, /* MOVE.B (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_11a0_3), 0, 4512 }, /* MOVE.B -(An),(d8,An,Xn) */ -{ CPUFUNC(op_11a8_3), 0, 4520 }, /* MOVE.B (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_11b0_3), 0, 4528 }, /* MOVE.B (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_11b8_3), 0, 4536 }, /* MOVE.B (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_11b9_3), 0, 4537 }, /* MOVE.B (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_11ba_3), 0, 4538 }, /* MOVE.B (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_11bb_3), 0, 4539 }, /* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_11bc_3), 0, 4540 }, /* MOVE.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_11c0_0), 0, 4544 }, /* MOVE.B Dn,(xxx).W */ -{ CPUFUNC(op_11d0_0), 0, 4560 }, /* MOVE.B (An),(xxx).W */ -{ CPUFUNC(op_11d8_0), 0, 4568 }, /* MOVE.B (An)+,(xxx).W */ -{ CPUFUNC(op_11e0_0), 0, 4576 }, /* MOVE.B -(An),(xxx).W */ -{ CPUFUNC(op_11e8_0), 0, 4584 }, /* MOVE.B (d16,An),(xxx).W */ -{ CPUFUNC(op_11f0_3), 0, 4592 }, /* MOVE.B (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_11f8_0), 0, 4600 }, /* MOVE.B (xxx).W,(xxx).W */ -{ CPUFUNC(op_11f9_0), 0, 4601 }, /* MOVE.B (xxx).L,(xxx).W */ -{ CPUFUNC(op_11fa_0), 0, 4602 }, /* MOVE.B (d16,PC),(xxx).W */ -{ CPUFUNC(op_11fb_3), 0, 4603 }, /* MOVE.B (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_11fc_0), 0, 4604 }, /* MOVE.B #.B,(xxx).W */ -{ CPUFUNC(op_13c0_0), 0, 5056 }, /* MOVE.B Dn,(xxx).L */ -{ CPUFUNC(op_13d0_0), 0, 5072 }, /* MOVE.B (An),(xxx).L */ -{ CPUFUNC(op_13d8_0), 0, 5080 }, /* MOVE.B (An)+,(xxx).L */ -{ CPUFUNC(op_13e0_0), 0, 5088 }, /* MOVE.B -(An),(xxx).L */ -{ CPUFUNC(op_13e8_0), 0, 5096 }, /* MOVE.B (d16,An),(xxx).L */ -{ CPUFUNC(op_13f0_3), 0, 5104 }, /* MOVE.B (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_13f8_0), 0, 5112 }, /* MOVE.B (xxx).W,(xxx).L */ -{ CPUFUNC(op_13f9_0), 0, 5113 }, /* MOVE.B (xxx).L,(xxx).L */ -{ CPUFUNC(op_13fa_0), 0, 5114 }, /* MOVE.B (d16,PC),(xxx).L */ -{ CPUFUNC(op_13fb_3), 0, 5115 }, /* MOVE.B (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_13fc_0), 0, 5116 }, /* MOVE.B #.B,(xxx).L */ -{ CPUFUNC(op_2000_0), 0, 8192 }, /* MOVE.L Dn,Dn */ -{ CPUFUNC(op_2008_0), 0, 8200 }, /* MOVE.L An,Dn */ -{ CPUFUNC(op_2010_0), 0, 8208 }, /* MOVE.L (An),Dn */ -{ CPUFUNC(op_2018_0), 0, 8216 }, /* MOVE.L (An)+,Dn */ -{ CPUFUNC(op_2020_0), 0, 8224 }, /* MOVE.L -(An),Dn */ -{ CPUFUNC(op_2028_0), 0, 8232 }, /* MOVE.L (d16,An),Dn */ -{ CPUFUNC(op_2030_3), 0, 8240 }, /* MOVE.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_2038_0), 0, 8248 }, /* MOVE.L (xxx).W,Dn */ -{ CPUFUNC(op_2039_0), 0, 8249 }, /* MOVE.L (xxx).L,Dn */ -{ CPUFUNC(op_203a_0), 0, 8250 }, /* MOVE.L (d16,PC),Dn */ -{ CPUFUNC(op_203b_3), 0, 8251 }, /* MOVE.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_203c_0), 0, 8252 }, /* MOVE.L #.L,Dn */ -{ CPUFUNC_FF(op_2040_0), 0, 8256 }, /* MOVEA.L Dn,An */ -{ CPUFUNC_FF(op_2048_0), 0, 8264 }, /* MOVEA.L An,An */ -{ CPUFUNC_FF(op_2050_0), 0, 8272 }, /* MOVEA.L (An),An */ -{ CPUFUNC_FF(op_2058_0), 0, 8280 }, /* MOVEA.L (An)+,An */ -{ CPUFUNC_FF(op_2060_0), 0, 8288 }, /* MOVEA.L -(An),An */ -{ CPUFUNC_FF(op_2068_0), 0, 8296 }, /* MOVEA.L (d16,An),An */ -{ CPUFUNC_FF(op_2070_3), 0, 8304 }, /* MOVEA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_2078_0), 0, 8312 }, /* MOVEA.L (xxx).W,An */ -{ CPUFUNC_FF(op_2079_0), 0, 8313 }, /* MOVEA.L (xxx).L,An */ -{ CPUFUNC_FF(op_207a_0), 0, 8314 }, /* MOVEA.L (d16,PC),An */ -{ CPUFUNC_FF(op_207b_3), 0, 8315 }, /* MOVEA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_207c_0), 0, 8316 }, /* MOVEA.L #.L,An */ -{ CPUFUNC(op_2080_0), 0, 8320 }, /* MOVE.L Dn,(An) */ -{ CPUFUNC(op_2088_0), 0, 8328 }, /* MOVE.L An,(An) */ -{ CPUFUNC(op_2090_0), 0, 8336 }, /* MOVE.L (An),(An) */ -{ CPUFUNC(op_2098_0), 0, 8344 }, /* MOVE.L (An)+,(An) */ -{ CPUFUNC(op_20a0_0), 0, 8352 }, /* MOVE.L -(An),(An) */ -{ CPUFUNC(op_20a8_0), 0, 8360 }, /* MOVE.L (d16,An),(An) */ -{ CPUFUNC(op_20b0_3), 0, 8368 }, /* MOVE.L (d8,An,Xn),(An) */ -{ CPUFUNC(op_20b8_0), 0, 8376 }, /* MOVE.L (xxx).W,(An) */ -{ CPUFUNC(op_20b9_0), 0, 8377 }, /* MOVE.L (xxx).L,(An) */ -{ CPUFUNC(op_20ba_0), 0, 8378 }, /* MOVE.L (d16,PC),(An) */ -{ CPUFUNC(op_20bb_3), 0, 8379 }, /* MOVE.L (d8,PC,Xn),(An) */ -{ CPUFUNC(op_20bc_0), 0, 8380 }, /* MOVE.L #.L,(An) */ -{ CPUFUNC(op_20c0_0), 0, 8384 }, /* MOVE.L Dn,(An)+ */ -{ CPUFUNC(op_20c8_0), 0, 8392 }, /* MOVE.L An,(An)+ */ -{ CPUFUNC(op_20d0_0), 0, 8400 }, /* MOVE.L (An),(An)+ */ -{ CPUFUNC(op_20d8_0), 0, 8408 }, /* MOVE.L (An)+,(An)+ */ -{ CPUFUNC(op_20e0_0), 0, 8416 }, /* MOVE.L -(An),(An)+ */ -{ CPUFUNC(op_20e8_0), 0, 8424 }, /* MOVE.L (d16,An),(An)+ */ -{ CPUFUNC(op_20f0_3), 0, 8432 }, /* MOVE.L (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_20f8_0), 0, 8440 }, /* MOVE.L (xxx).W,(An)+ */ -{ CPUFUNC(op_20f9_0), 0, 8441 }, /* MOVE.L (xxx).L,(An)+ */ -{ CPUFUNC(op_20fa_0), 0, 8442 }, /* MOVE.L (d16,PC),(An)+ */ -{ CPUFUNC(op_20fb_3), 0, 8443 }, /* MOVE.L (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_20fc_0), 0, 8444 }, /* MOVE.L #.L,(An)+ */ -{ CPUFUNC(op_2100_0), 0, 8448 }, /* MOVE.L Dn,-(An) */ -{ CPUFUNC(op_2108_0), 0, 8456 }, /* MOVE.L An,-(An) */ -{ CPUFUNC(op_2110_0), 0, 8464 }, /* MOVE.L (An),-(An) */ -{ CPUFUNC(op_2118_0), 0, 8472 }, /* MOVE.L (An)+,-(An) */ -{ CPUFUNC(op_2120_0), 0, 8480 }, /* MOVE.L -(An),-(An) */ -{ CPUFUNC(op_2128_0), 0, 8488 }, /* MOVE.L (d16,An),-(An) */ -{ CPUFUNC(op_2130_3), 0, 8496 }, /* MOVE.L (d8,An,Xn),-(An) */ -{ CPUFUNC(op_2138_0), 0, 8504 }, /* MOVE.L (xxx).W,-(An) */ -{ CPUFUNC(op_2139_0), 0, 8505 }, /* MOVE.L (xxx).L,-(An) */ -{ CPUFUNC(op_213a_0), 0, 8506 }, /* MOVE.L (d16,PC),-(An) */ -{ CPUFUNC(op_213b_3), 0, 8507 }, /* MOVE.L (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_213c_0), 0, 8508 }, /* MOVE.L #.L,-(An) */ -{ CPUFUNC(op_2140_0), 0, 8512 }, /* MOVE.L Dn,(d16,An) */ -{ CPUFUNC(op_2148_0), 0, 8520 }, /* MOVE.L An,(d16,An) */ -{ CPUFUNC(op_2150_0), 0, 8528 }, /* MOVE.L (An),(d16,An) */ -{ CPUFUNC(op_2158_0), 0, 8536 }, /* MOVE.L (An)+,(d16,An) */ -{ CPUFUNC(op_2160_0), 0, 8544 }, /* MOVE.L -(An),(d16,An) */ -{ CPUFUNC(op_2168_0), 0, 8552 }, /* MOVE.L (d16,An),(d16,An) */ -{ CPUFUNC(op_2170_3), 0, 8560 }, /* MOVE.L (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_2178_0), 0, 8568 }, /* MOVE.L (xxx).W,(d16,An) */ -{ CPUFUNC(op_2179_0), 0, 8569 }, /* MOVE.L (xxx).L,(d16,An) */ -{ CPUFUNC(op_217a_0), 0, 8570 }, /* MOVE.L (d16,PC),(d16,An) */ -{ CPUFUNC(op_217b_3), 0, 8571 }, /* MOVE.L (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_217c_0), 0, 8572 }, /* MOVE.L #.L,(d16,An) */ -{ CPUFUNC(op_2180_3), 0, 8576 }, /* MOVE.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_2188_3), 0, 8584 }, /* MOVE.L An,(d8,An,Xn) */ -{ CPUFUNC(op_2190_3), 0, 8592 }, /* MOVE.L (An),(d8,An,Xn) */ -{ CPUFUNC(op_2198_3), 0, 8600 }, /* MOVE.L (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_21a0_3), 0, 8608 }, /* MOVE.L -(An),(d8,An,Xn) */ -{ CPUFUNC(op_21a8_3), 0, 8616 }, /* MOVE.L (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_21b0_3), 0, 8624 }, /* MOVE.L (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_21b8_3), 0, 8632 }, /* MOVE.L (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_21b9_3), 0, 8633 }, /* MOVE.L (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_21ba_3), 0, 8634 }, /* MOVE.L (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_21bb_3), 0, 8635 }, /* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_21bc_3), 0, 8636 }, /* MOVE.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_21c0_0), 0, 8640 }, /* MOVE.L Dn,(xxx).W */ -{ CPUFUNC(op_21c8_0), 0, 8648 }, /* MOVE.L An,(xxx).W */ -{ CPUFUNC(op_21d0_0), 0, 8656 }, /* MOVE.L (An),(xxx).W */ -{ CPUFUNC(op_21d8_0), 0, 8664 }, /* MOVE.L (An)+,(xxx).W */ -{ CPUFUNC(op_21e0_0), 0, 8672 }, /* MOVE.L -(An),(xxx).W */ -{ CPUFUNC(op_21e8_0), 0, 8680 }, /* MOVE.L (d16,An),(xxx).W */ -{ CPUFUNC(op_21f0_3), 0, 8688 }, /* MOVE.L (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_21f8_0), 0, 8696 }, /* MOVE.L (xxx).W,(xxx).W */ -{ CPUFUNC(op_21f9_0), 0, 8697 }, /* MOVE.L (xxx).L,(xxx).W */ -{ CPUFUNC(op_21fa_0), 0, 8698 }, /* MOVE.L (d16,PC),(xxx).W */ -{ CPUFUNC(op_21fb_3), 0, 8699 }, /* MOVE.L (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_21fc_0), 0, 8700 }, /* MOVE.L #.L,(xxx).W */ -{ CPUFUNC(op_23c0_0), 0, 9152 }, /* MOVE.L Dn,(xxx).L */ -{ CPUFUNC(op_23c8_0), 0, 9160 }, /* MOVE.L An,(xxx).L */ -{ CPUFUNC(op_23d0_0), 0, 9168 }, /* MOVE.L (An),(xxx).L */ -{ CPUFUNC(op_23d8_0), 0, 9176 }, /* MOVE.L (An)+,(xxx).L */ -{ CPUFUNC(op_23e0_0), 0, 9184 }, /* MOVE.L -(An),(xxx).L */ -{ CPUFUNC(op_23e8_0), 0, 9192 }, /* MOVE.L (d16,An),(xxx).L */ -{ CPUFUNC(op_23f0_3), 0, 9200 }, /* MOVE.L (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_23f8_0), 0, 9208 }, /* MOVE.L (xxx).W,(xxx).L */ -{ CPUFUNC(op_23f9_0), 0, 9209 }, /* MOVE.L (xxx).L,(xxx).L */ -{ CPUFUNC(op_23fa_0), 0, 9210 }, /* MOVE.L (d16,PC),(xxx).L */ -{ CPUFUNC(op_23fb_3), 0, 9211 }, /* MOVE.L (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_23fc_0), 0, 9212 }, /* MOVE.L #.L,(xxx).L */ -{ CPUFUNC(op_3000_0), 0, 12288 }, /* MOVE.W Dn,Dn */ -{ CPUFUNC(op_3008_0), 0, 12296 }, /* MOVE.W An,Dn */ -{ CPUFUNC(op_3010_0), 0, 12304 }, /* MOVE.W (An),Dn */ -{ CPUFUNC(op_3018_0), 0, 12312 }, /* MOVE.W (An)+,Dn */ -{ CPUFUNC(op_3020_0), 0, 12320 }, /* MOVE.W -(An),Dn */ -{ CPUFUNC(op_3028_0), 0, 12328 }, /* MOVE.W (d16,An),Dn */ -{ CPUFUNC(op_3030_3), 0, 12336 }, /* MOVE.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_3038_0), 0, 12344 }, /* MOVE.W (xxx).W,Dn */ -{ CPUFUNC(op_3039_0), 0, 12345 }, /* MOVE.W (xxx).L,Dn */ -{ CPUFUNC(op_303a_0), 0, 12346 }, /* MOVE.W (d16,PC),Dn */ -{ CPUFUNC(op_303b_3), 0, 12347 }, /* MOVE.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_303c_0), 0, 12348 }, /* MOVE.W #.W,Dn */ -{ CPUFUNC_FF(op_3040_0), 0, 12352 }, /* MOVEA.W Dn,An */ -{ CPUFUNC_FF(op_3048_0), 0, 12360 }, /* MOVEA.W An,An */ -{ CPUFUNC_FF(op_3050_0), 0, 12368 }, /* MOVEA.W (An),An */ -{ CPUFUNC_FF(op_3058_0), 0, 12376 }, /* MOVEA.W (An)+,An */ -{ CPUFUNC_FF(op_3060_0), 0, 12384 }, /* MOVEA.W -(An),An */ -{ CPUFUNC_FF(op_3068_0), 0, 12392 }, /* MOVEA.W (d16,An),An */ -{ CPUFUNC_FF(op_3070_3), 0, 12400 }, /* MOVEA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_3078_0), 0, 12408 }, /* MOVEA.W (xxx).W,An */ -{ CPUFUNC_FF(op_3079_0), 0, 12409 }, /* MOVEA.W (xxx).L,An */ -{ CPUFUNC_FF(op_307a_0), 0, 12410 }, /* MOVEA.W (d16,PC),An */ -{ CPUFUNC_FF(op_307b_3), 0, 12411 }, /* MOVEA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_307c_0), 0, 12412 }, /* MOVEA.W #.W,An */ -{ CPUFUNC(op_3080_0), 0, 12416 }, /* MOVE.W Dn,(An) */ -{ CPUFUNC(op_3088_0), 0, 12424 }, /* MOVE.W An,(An) */ -{ CPUFUNC(op_3090_0), 0, 12432 }, /* MOVE.W (An),(An) */ -{ CPUFUNC(op_3098_0), 0, 12440 }, /* MOVE.W (An)+,(An) */ -{ CPUFUNC(op_30a0_0), 0, 12448 }, /* MOVE.W -(An),(An) */ -{ CPUFUNC(op_30a8_0), 0, 12456 }, /* MOVE.W (d16,An),(An) */ -{ CPUFUNC(op_30b0_3), 0, 12464 }, /* MOVE.W (d8,An,Xn),(An) */ -{ CPUFUNC(op_30b8_0), 0, 12472 }, /* MOVE.W (xxx).W,(An) */ -{ CPUFUNC(op_30b9_0), 0, 12473 }, /* MOVE.W (xxx).L,(An) */ -{ CPUFUNC(op_30ba_0), 0, 12474 }, /* MOVE.W (d16,PC),(An) */ -{ CPUFUNC(op_30bb_3), 0, 12475 }, /* MOVE.W (d8,PC,Xn),(An) */ -{ CPUFUNC(op_30bc_0), 0, 12476 }, /* MOVE.W #.W,(An) */ -{ CPUFUNC(op_30c0_0), 0, 12480 }, /* MOVE.W Dn,(An)+ */ -{ CPUFUNC(op_30c8_0), 0, 12488 }, /* MOVE.W An,(An)+ */ -{ CPUFUNC(op_30d0_0), 0, 12496 }, /* MOVE.W (An),(An)+ */ -{ CPUFUNC(op_30d8_0), 0, 12504 }, /* MOVE.W (An)+,(An)+ */ -{ CPUFUNC(op_30e0_0), 0, 12512 }, /* MOVE.W -(An),(An)+ */ -{ CPUFUNC(op_30e8_0), 0, 12520 }, /* MOVE.W (d16,An),(An)+ */ -{ CPUFUNC(op_30f0_3), 0, 12528 }, /* MOVE.W (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_30f8_0), 0, 12536 }, /* MOVE.W (xxx).W,(An)+ */ -{ CPUFUNC(op_30f9_0), 0, 12537 }, /* MOVE.W (xxx).L,(An)+ */ -{ CPUFUNC(op_30fa_0), 0, 12538 }, /* MOVE.W (d16,PC),(An)+ */ -{ CPUFUNC(op_30fb_3), 0, 12539 }, /* MOVE.W (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_30fc_0), 0, 12540 }, /* MOVE.W #.W,(An)+ */ -{ CPUFUNC(op_3100_0), 0, 12544 }, /* MOVE.W Dn,-(An) */ -{ CPUFUNC(op_3108_0), 0, 12552 }, /* MOVE.W An,-(An) */ -{ CPUFUNC(op_3110_0), 0, 12560 }, /* MOVE.W (An),-(An) */ -{ CPUFUNC(op_3118_0), 0, 12568 }, /* MOVE.W (An)+,-(An) */ -{ CPUFUNC(op_3120_0), 0, 12576 }, /* MOVE.W -(An),-(An) */ -{ CPUFUNC(op_3128_0), 0, 12584 }, /* MOVE.W (d16,An),-(An) */ -{ CPUFUNC(op_3130_3), 0, 12592 }, /* MOVE.W (d8,An,Xn),-(An) */ -{ CPUFUNC(op_3138_0), 0, 12600 }, /* MOVE.W (xxx).W,-(An) */ -{ CPUFUNC(op_3139_0), 0, 12601 }, /* MOVE.W (xxx).L,-(An) */ -{ CPUFUNC(op_313a_0), 0, 12602 }, /* MOVE.W (d16,PC),-(An) */ -{ CPUFUNC(op_313b_3), 0, 12603 }, /* MOVE.W (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_313c_0), 0, 12604 }, /* MOVE.W #.W,-(An) */ -{ CPUFUNC(op_3140_0), 0, 12608 }, /* MOVE.W Dn,(d16,An) */ -{ CPUFUNC(op_3148_0), 0, 12616 }, /* MOVE.W An,(d16,An) */ -{ CPUFUNC(op_3150_0), 0, 12624 }, /* MOVE.W (An),(d16,An) */ -{ CPUFUNC(op_3158_0), 0, 12632 }, /* MOVE.W (An)+,(d16,An) */ -{ CPUFUNC(op_3160_0), 0, 12640 }, /* MOVE.W -(An),(d16,An) */ -{ CPUFUNC(op_3168_0), 0, 12648 }, /* MOVE.W (d16,An),(d16,An) */ -{ CPUFUNC(op_3170_3), 0, 12656 }, /* MOVE.W (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_3178_0), 0, 12664 }, /* MOVE.W (xxx).W,(d16,An) */ -{ CPUFUNC(op_3179_0), 0, 12665 }, /* MOVE.W (xxx).L,(d16,An) */ -{ CPUFUNC(op_317a_0), 0, 12666 }, /* MOVE.W (d16,PC),(d16,An) */ -{ CPUFUNC(op_317b_3), 0, 12667 }, /* MOVE.W (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_317c_0), 0, 12668 }, /* MOVE.W #.W,(d16,An) */ -{ CPUFUNC(op_3180_3), 0, 12672 }, /* MOVE.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_3188_3), 0, 12680 }, /* MOVE.W An,(d8,An,Xn) */ -{ CPUFUNC(op_3190_3), 0, 12688 }, /* MOVE.W (An),(d8,An,Xn) */ -{ CPUFUNC(op_3198_3), 0, 12696 }, /* MOVE.W (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_31a0_3), 0, 12704 }, /* MOVE.W -(An),(d8,An,Xn) */ -{ CPUFUNC(op_31a8_3), 0, 12712 }, /* MOVE.W (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_31b0_3), 0, 12720 }, /* MOVE.W (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_31b8_3), 0, 12728 }, /* MOVE.W (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_31b9_3), 0, 12729 }, /* MOVE.W (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_31ba_3), 0, 12730 }, /* MOVE.W (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_31bb_3), 0, 12731 }, /* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_31bc_3), 0, 12732 }, /* MOVE.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_31c0_0), 0, 12736 }, /* MOVE.W Dn,(xxx).W */ -{ CPUFUNC(op_31c8_0), 0, 12744 }, /* MOVE.W An,(xxx).W */ -{ CPUFUNC(op_31d0_0), 0, 12752 }, /* MOVE.W (An),(xxx).W */ -{ CPUFUNC(op_31d8_0), 0, 12760 }, /* MOVE.W (An)+,(xxx).W */ -{ CPUFUNC(op_31e0_0), 0, 12768 }, /* MOVE.W -(An),(xxx).W */ -{ CPUFUNC(op_31e8_0), 0, 12776 }, /* MOVE.W (d16,An),(xxx).W */ -{ CPUFUNC(op_31f0_3), 0, 12784 }, /* MOVE.W (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_31f8_0), 0, 12792 }, /* MOVE.W (xxx).W,(xxx).W */ -{ CPUFUNC(op_31f9_0), 0, 12793 }, /* MOVE.W (xxx).L,(xxx).W */ -{ CPUFUNC(op_31fa_0), 0, 12794 }, /* MOVE.W (d16,PC),(xxx).W */ -{ CPUFUNC(op_31fb_3), 0, 12795 }, /* MOVE.W (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_31fc_0), 0, 12796 }, /* MOVE.W #.W,(xxx).W */ -{ CPUFUNC(op_33c0_0), 0, 13248 }, /* MOVE.W Dn,(xxx).L */ -{ CPUFUNC(op_33c8_0), 0, 13256 }, /* MOVE.W An,(xxx).L */ -{ CPUFUNC(op_33d0_0), 0, 13264 }, /* MOVE.W (An),(xxx).L */ -{ CPUFUNC(op_33d8_0), 0, 13272 }, /* MOVE.W (An)+,(xxx).L */ -{ CPUFUNC(op_33e0_0), 0, 13280 }, /* MOVE.W -(An),(xxx).L */ -{ CPUFUNC(op_33e8_0), 0, 13288 }, /* MOVE.W (d16,An),(xxx).L */ -{ CPUFUNC(op_33f0_3), 0, 13296 }, /* MOVE.W (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_33f8_0), 0, 13304 }, /* MOVE.W (xxx).W,(xxx).L */ -{ CPUFUNC(op_33f9_0), 0, 13305 }, /* MOVE.W (xxx).L,(xxx).L */ -{ CPUFUNC(op_33fa_0), 0, 13306 }, /* MOVE.W (d16,PC),(xxx).L */ -{ CPUFUNC(op_33fb_3), 0, 13307 }, /* MOVE.W (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_33fc_0), 0, 13308 }, /* MOVE.W #.W,(xxx).L */ -{ CPUFUNC(op_4000_0), 0, 16384 }, /* NEGX.B Dn */ -{ CPUFUNC(op_4010_0), 0, 16400 }, /* NEGX.B (An) */ -{ CPUFUNC(op_4018_0), 0, 16408 }, /* NEGX.B (An)+ */ -{ CPUFUNC(op_4020_0), 0, 16416 }, /* NEGX.B -(An) */ -{ CPUFUNC(op_4028_0), 0, 16424 }, /* NEGX.B (d16,An) */ -{ CPUFUNC(op_4030_3), 0, 16432 }, /* NEGX.B (d8,An,Xn) */ -{ CPUFUNC(op_4038_0), 0, 16440 }, /* NEGX.B (xxx).W */ -{ CPUFUNC(op_4039_0), 0, 16441 }, /* NEGX.B (xxx).L */ -{ CPUFUNC(op_4040_0), 0, 16448 }, /* NEGX.W Dn */ -{ CPUFUNC(op_4050_0), 0, 16464 }, /* NEGX.W (An) */ -{ CPUFUNC(op_4058_0), 0, 16472 }, /* NEGX.W (An)+ */ -{ CPUFUNC(op_4060_0), 0, 16480 }, /* NEGX.W -(An) */ -{ CPUFUNC(op_4068_0), 0, 16488 }, /* NEGX.W (d16,An) */ -{ CPUFUNC(op_4070_3), 0, 16496 }, /* NEGX.W (d8,An,Xn) */ -{ CPUFUNC(op_4078_0), 0, 16504 }, /* NEGX.W (xxx).W */ -{ CPUFUNC(op_4079_0), 0, 16505 }, /* NEGX.W (xxx).L */ -{ CPUFUNC(op_4080_0), 0, 16512 }, /* NEGX.L Dn */ -{ CPUFUNC(op_4090_0), 0, 16528 }, /* NEGX.L (An) */ -{ CPUFUNC(op_4098_0), 0, 16536 }, /* NEGX.L (An)+ */ -{ CPUFUNC(op_40a0_0), 0, 16544 }, /* NEGX.L -(An) */ -{ CPUFUNC(op_40a8_0), 0, 16552 }, /* NEGX.L (d16,An) */ -{ CPUFUNC(op_40b0_3), 0, 16560 }, /* NEGX.L (d8,An,Xn) */ -{ CPUFUNC(op_40b8_0), 0, 16568 }, /* NEGX.L (xxx).W */ -{ CPUFUNC(op_40b9_0), 0, 16569 }, /* NEGX.L (xxx).L */ -{ CPUFUNC_FF(op_40c0_0), 0, 16576 }, /* MVSR2.W Dn */ -{ CPUFUNC_FF(op_40d0_0), 0, 16592 }, /* MVSR2.W (An) */ -{ CPUFUNC_FF(op_40d8_0), 0, 16600 }, /* MVSR2.W (An)+ */ -{ CPUFUNC_FF(op_40e0_0), 0, 16608 }, /* MVSR2.W -(An) */ -{ CPUFUNC_FF(op_40e8_0), 0, 16616 }, /* MVSR2.W (d16,An) */ -{ CPUFUNC_FF(op_40f0_3), 0, 16624 }, /* MVSR2.W (d8,An,Xn) */ -{ CPUFUNC_FF(op_40f8_0), 0, 16632 }, /* MVSR2.W (xxx).W */ -{ CPUFUNC_FF(op_40f9_0), 0, 16633 }, /* MVSR2.W (xxx).L */ -{ CPUFUNC(op_4100_0), 0, 16640 }, /* CHK.L Dn,Dn */ -{ CPUFUNC(op_4110_0), 0, 16656 }, /* CHK.L (An),Dn */ -{ CPUFUNC(op_4118_0), 0, 16664 }, /* CHK.L (An)+,Dn */ -{ CPUFUNC(op_4120_0), 0, 16672 }, /* CHK.L -(An),Dn */ -{ CPUFUNC(op_4128_0), 0, 16680 }, /* CHK.L (d16,An),Dn */ -{ CPUFUNC(op_4130_3), 0, 16688 }, /* CHK.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_4138_0), 0, 16696 }, /* CHK.L (xxx).W,Dn */ -{ CPUFUNC(op_4139_0), 0, 16697 }, /* CHK.L (xxx).L,Dn */ -{ CPUFUNC(op_413a_0), 0, 16698 }, /* CHK.L (d16,PC),Dn */ -{ CPUFUNC(op_413b_3), 0, 16699 }, /* CHK.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_413c_0), 0, 16700 }, /* CHK.L #.L,Dn */ -{ CPUFUNC(op_4180_0), 0, 16768 }, /* CHK.W Dn,Dn */ -{ CPUFUNC(op_4190_0), 0, 16784 }, /* CHK.W (An),Dn */ -{ CPUFUNC(op_4198_0), 0, 16792 }, /* CHK.W (An)+,Dn */ -{ CPUFUNC(op_41a0_0), 0, 16800 }, /* CHK.W -(An),Dn */ -{ CPUFUNC(op_41a8_0), 0, 16808 }, /* CHK.W (d16,An),Dn */ -{ CPUFUNC(op_41b0_3), 0, 16816 }, /* CHK.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_41b8_0), 0, 16824 }, /* CHK.W (xxx).W,Dn */ -{ CPUFUNC(op_41b9_0), 0, 16825 }, /* CHK.W (xxx).L,Dn */ -{ CPUFUNC(op_41ba_0), 0, 16826 }, /* CHK.W (d16,PC),Dn */ -{ CPUFUNC(op_41bb_3), 0, 16827 }, /* CHK.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_41bc_0), 0, 16828 }, /* CHK.W #.W,Dn */ -{ CPUFUNC_FF(op_41d0_0), 0, 16848 }, /* LEA.L (An),An */ -{ CPUFUNC_FF(op_41e8_0), 0, 16872 }, /* LEA.L (d16,An),An */ -{ CPUFUNC_FF(op_41f0_3), 0, 16880 }, /* LEA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_41f8_0), 0, 16888 }, /* LEA.L (xxx).W,An */ -{ CPUFUNC_FF(op_41f9_0), 0, 16889 }, /* LEA.L (xxx).L,An */ -{ CPUFUNC_FF(op_41fa_0), 0, 16890 }, /* LEA.L (d16,PC),An */ -{ CPUFUNC_FF(op_41fb_3), 0, 16891 }, /* LEA.L (d8,PC,Xn),An */ -{ CPUFUNC(op_4200_0), 0, 16896 }, /* CLR.B Dn */ -{ CPUFUNC(op_4210_0), 0, 16912 }, /* CLR.B (An) */ -{ CPUFUNC(op_4218_0), 0, 16920 }, /* CLR.B (An)+ */ -{ CPUFUNC(op_4220_0), 0, 16928 }, /* CLR.B -(An) */ -{ CPUFUNC(op_4228_0), 0, 16936 }, /* CLR.B (d16,An) */ -{ CPUFUNC(op_4230_3), 0, 16944 }, /* CLR.B (d8,An,Xn) */ -{ CPUFUNC(op_4238_0), 0, 16952 }, /* CLR.B (xxx).W */ -{ CPUFUNC(op_4239_0), 0, 16953 }, /* CLR.B (xxx).L */ -{ CPUFUNC(op_4240_0), 0, 16960 }, /* CLR.W Dn */ -{ CPUFUNC(op_4250_0), 0, 16976 }, /* CLR.W (An) */ -{ CPUFUNC(op_4258_0), 0, 16984 }, /* CLR.W (An)+ */ -{ CPUFUNC(op_4260_0), 0, 16992 }, /* CLR.W -(An) */ -{ CPUFUNC(op_4268_0), 0, 17000 }, /* CLR.W (d16,An) */ -{ CPUFUNC(op_4270_3), 0, 17008 }, /* CLR.W (d8,An,Xn) */ -{ CPUFUNC(op_4278_0), 0, 17016 }, /* CLR.W (xxx).W */ -{ CPUFUNC(op_4279_0), 0, 17017 }, /* CLR.W (xxx).L */ -{ CPUFUNC(op_4280_0), 0, 17024 }, /* CLR.L Dn */ -{ CPUFUNC(op_4290_0), 0, 17040 }, /* CLR.L (An) */ -{ CPUFUNC(op_4298_0), 0, 17048 }, /* CLR.L (An)+ */ -{ CPUFUNC(op_42a0_0), 0, 17056 }, /* CLR.L -(An) */ -{ CPUFUNC(op_42a8_0), 0, 17064 }, /* CLR.L (d16,An) */ -{ CPUFUNC(op_42b0_3), 0, 17072 }, /* CLR.L (d8,An,Xn) */ -{ CPUFUNC(op_42b8_0), 0, 17080 }, /* CLR.L (xxx).W */ -{ CPUFUNC(op_42b9_0), 0, 17081 }, /* CLR.L (xxx).L */ -{ CPUFUNC_FF(op_42c0_0), 0, 17088 }, /* MVSR2.B Dn */ -{ CPUFUNC_FF(op_42d0_0), 0, 17104 }, /* MVSR2.B (An) */ -{ CPUFUNC_FF(op_42d8_0), 0, 17112 }, /* MVSR2.B (An)+ */ -{ CPUFUNC_FF(op_42e0_0), 0, 17120 }, /* MVSR2.B -(An) */ -{ CPUFUNC_FF(op_42e8_0), 0, 17128 }, /* MVSR2.B (d16,An) */ -{ CPUFUNC_FF(op_42f0_3), 0, 17136 }, /* MVSR2.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_42f8_0), 0, 17144 }, /* MVSR2.B (xxx).W */ -{ CPUFUNC_FF(op_42f9_0), 0, 17145 }, /* MVSR2.B (xxx).L */ -{ CPUFUNC(op_4400_0), 0, 17408 }, /* NEG.B Dn */ -{ CPUFUNC(op_4410_0), 0, 17424 }, /* NEG.B (An) */ -{ CPUFUNC(op_4418_0), 0, 17432 }, /* NEG.B (An)+ */ -{ CPUFUNC(op_4420_0), 0, 17440 }, /* NEG.B -(An) */ -{ CPUFUNC(op_4428_0), 0, 17448 }, /* NEG.B (d16,An) */ -{ CPUFUNC(op_4430_3), 0, 17456 }, /* NEG.B (d8,An,Xn) */ -{ CPUFUNC(op_4438_0), 0, 17464 }, /* NEG.B (xxx).W */ -{ CPUFUNC(op_4439_0), 0, 17465 }, /* NEG.B (xxx).L */ -{ CPUFUNC(op_4440_0), 0, 17472 }, /* NEG.W Dn */ -{ CPUFUNC(op_4450_0), 0, 17488 }, /* NEG.W (An) */ -{ CPUFUNC(op_4458_0), 0, 17496 }, /* NEG.W (An)+ */ -{ CPUFUNC(op_4460_0), 0, 17504 }, /* NEG.W -(An) */ -{ CPUFUNC(op_4468_0), 0, 17512 }, /* NEG.W (d16,An) */ -{ CPUFUNC(op_4470_3), 0, 17520 }, /* NEG.W (d8,An,Xn) */ -{ CPUFUNC(op_4478_0), 0, 17528 }, /* NEG.W (xxx).W */ -{ CPUFUNC(op_4479_0), 0, 17529 }, /* NEG.W (xxx).L */ -{ CPUFUNC(op_4480_0), 0, 17536 }, /* NEG.L Dn */ -{ CPUFUNC(op_4490_0), 0, 17552 }, /* NEG.L (An) */ -{ CPUFUNC(op_4498_0), 0, 17560 }, /* NEG.L (An)+ */ -{ CPUFUNC(op_44a0_0), 0, 17568 }, /* NEG.L -(An) */ -{ CPUFUNC(op_44a8_0), 0, 17576 }, /* NEG.L (d16,An) */ -{ CPUFUNC(op_44b0_3), 0, 17584 }, /* NEG.L (d8,An,Xn) */ -{ CPUFUNC(op_44b8_0), 0, 17592 }, /* NEG.L (xxx).W */ -{ CPUFUNC(op_44b9_0), 0, 17593 }, /* NEG.L (xxx).L */ -{ CPUFUNC(op_44c0_0), 0, 17600 }, /* MV2SR.B Dn */ -{ CPUFUNC(op_44d0_0), 0, 17616 }, /* MV2SR.B (An) */ -{ CPUFUNC(op_44d8_0), 0, 17624 }, /* MV2SR.B (An)+ */ -{ CPUFUNC(op_44e0_0), 0, 17632 }, /* MV2SR.B -(An) */ -{ CPUFUNC(op_44e8_0), 0, 17640 }, /* MV2SR.B (d16,An) */ -{ CPUFUNC(op_44f0_3), 0, 17648 }, /* MV2SR.B (d8,An,Xn) */ -{ CPUFUNC(op_44f8_0), 0, 17656 }, /* MV2SR.B (xxx).W */ -{ CPUFUNC(op_44f9_0), 0, 17657 }, /* MV2SR.B (xxx).L */ -{ CPUFUNC(op_44fa_0), 0, 17658 }, /* MV2SR.B (d16,PC) */ -{ CPUFUNC(op_44fb_3), 0, 17659 }, /* MV2SR.B (d8,PC,Xn) */ -{ CPUFUNC(op_44fc_0), 0, 17660 }, /* MV2SR.B #.B */ -{ CPUFUNC(op_4600_0), 0, 17920 }, /* NOT.B Dn */ -{ CPUFUNC(op_4610_0), 0, 17936 }, /* NOT.B (An) */ -{ CPUFUNC(op_4618_0), 0, 17944 }, /* NOT.B (An)+ */ -{ CPUFUNC(op_4620_0), 0, 17952 }, /* NOT.B -(An) */ -{ CPUFUNC(op_4628_0), 0, 17960 }, /* NOT.B (d16,An) */ -{ CPUFUNC(op_4630_3), 0, 17968 }, /* NOT.B (d8,An,Xn) */ -{ CPUFUNC(op_4638_0), 0, 17976 }, /* NOT.B (xxx).W */ -{ CPUFUNC(op_4639_0), 0, 17977 }, /* NOT.B (xxx).L */ -{ CPUFUNC(op_4640_0), 0, 17984 }, /* NOT.W Dn */ -{ CPUFUNC(op_4650_0), 0, 18000 }, /* NOT.W (An) */ -{ CPUFUNC(op_4658_0), 0, 18008 }, /* NOT.W (An)+ */ -{ CPUFUNC(op_4660_0), 0, 18016 }, /* NOT.W -(An) */ -{ CPUFUNC(op_4668_0), 0, 18024 }, /* NOT.W (d16,An) */ -{ CPUFUNC(op_4670_3), 0, 18032 }, /* NOT.W (d8,An,Xn) */ -{ CPUFUNC(op_4678_0), 0, 18040 }, /* NOT.W (xxx).W */ -{ CPUFUNC(op_4679_0), 0, 18041 }, /* NOT.W (xxx).L */ -{ CPUFUNC(op_4680_0), 0, 18048 }, /* NOT.L Dn */ -{ CPUFUNC(op_4690_0), 0, 18064 }, /* NOT.L (An) */ -{ CPUFUNC(op_4698_0), 0, 18072 }, /* NOT.L (An)+ */ -{ CPUFUNC(op_46a0_0), 0, 18080 }, /* NOT.L -(An) */ -{ CPUFUNC(op_46a8_0), 0, 18088 }, /* NOT.L (d16,An) */ -{ CPUFUNC(op_46b0_3), 0, 18096 }, /* NOT.L (d8,An,Xn) */ -{ CPUFUNC(op_46b8_0), 0, 18104 }, /* NOT.L (xxx).W */ -{ CPUFUNC(op_46b9_0), 0, 18105 }, /* NOT.L (xxx).L */ -{ CPUFUNC(op_46c0_0), 0, 18112 }, /* MV2SR.W Dn */ -{ CPUFUNC(op_46d0_0), 0, 18128 }, /* MV2SR.W (An) */ -{ CPUFUNC(op_46d8_0), 0, 18136 }, /* MV2SR.W (An)+ */ -{ CPUFUNC(op_46e0_0), 0, 18144 }, /* MV2SR.W -(An) */ -{ CPUFUNC(op_46e8_0), 0, 18152 }, /* MV2SR.W (d16,An) */ -{ CPUFUNC(op_46f0_3), 0, 18160 }, /* MV2SR.W (d8,An,Xn) */ -{ CPUFUNC(op_46f8_0), 0, 18168 }, /* MV2SR.W (xxx).W */ -{ CPUFUNC(op_46f9_0), 0, 18169 }, /* MV2SR.W (xxx).L */ -{ CPUFUNC(op_46fa_0), 0, 18170 }, /* MV2SR.W (d16,PC) */ -{ CPUFUNC(op_46fb_3), 0, 18171 }, /* MV2SR.W (d8,PC,Xn) */ -{ CPUFUNC(op_46fc_0), 0, 18172 }, /* MV2SR.W #.W */ -{ CPUFUNC(op_4800_1), 0, 18432 }, /* NBCD.B Dn */ -{ CPUFUNC(op_4810_1), 0, 18448 }, /* NBCD.B (An) */ -{ CPUFUNC(op_4818_1), 0, 18456 }, /* NBCD.B (An)+ */ -{ CPUFUNC(op_4820_1), 0, 18464 }, /* NBCD.B -(An) */ -{ CPUFUNC(op_4828_1), 0, 18472 }, /* NBCD.B (d16,An) */ -{ CPUFUNC(op_4830_3), 0, 18480 }, /* NBCD.B (d8,An,Xn) */ -{ CPUFUNC(op_4838_1), 0, 18488 }, /* NBCD.B (xxx).W */ -{ CPUFUNC(op_4839_1), 0, 18489 }, /* NBCD.B (xxx).L */ -{ CPUFUNC(op_4840_0), 0, 18496 }, /* SWAP.W Dn */ -{ CPUFUNC_FF(op_4850_0), 0, 18512 }, /* PEA.L (An) */ -{ CPUFUNC_FF(op_4868_0), 0, 18536 }, /* PEA.L (d16,An) */ -{ CPUFUNC_FF(op_4870_3), 0, 18544 }, /* PEA.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4878_0), 0, 18552 }, /* PEA.L (xxx).W */ -{ CPUFUNC_FF(op_4879_0), 0, 18553 }, /* PEA.L (xxx).L */ -{ CPUFUNC_FF(op_487a_0), 0, 18554 }, /* PEA.L (d16,PC) */ -{ CPUFUNC_FF(op_487b_3), 0, 18555 }, /* PEA.L (d8,PC,Xn) */ -{ CPUFUNC(op_4880_0), 0, 18560 }, /* EXT.W Dn */ -{ CPUFUNC_FF(op_4890_0), 0, 18576 }, /* MVMLE.W #.W,(An) */ -{ CPUFUNC_FF(op_48a0_0), 0, 18592 }, /* MVMLE.W #.W,-(An) */ -{ CPUFUNC_FF(op_48a8_0), 0, 18600 }, /* MVMLE.W #.W,(d16,An) */ -{ CPUFUNC_FF(op_48b0_3), 0, 18608 }, /* MVMLE.W #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_48b8_0), 0, 18616 }, /* MVMLE.W #.W,(xxx).W */ -{ CPUFUNC_FF(op_48b9_0), 0, 18617 }, /* MVMLE.W #.W,(xxx).L */ -{ CPUFUNC(op_48c0_0), 0, 18624 }, /* EXT.L Dn */ -{ CPUFUNC_FF(op_48d0_0), 0, 18640 }, /* MVMLE.L #.W,(An) */ -{ CPUFUNC_FF(op_48e0_0), 0, 18656 }, /* MVMLE.L #.W,-(An) */ -{ CPUFUNC_FF(op_48e8_0), 0, 18664 }, /* MVMLE.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_48f0_3), 0, 18672 }, /* MVMLE.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_48f8_0), 0, 18680 }, /* MVMLE.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_48f9_0), 0, 18681 }, /* MVMLE.L #.W,(xxx).L */ -{ CPUFUNC(op_49c0_0), 0, 18880 }, /* EXT.B Dn */ -{ CPUFUNC(op_4a00_0), 0, 18944 }, /* TST.B Dn */ -{ CPUFUNC(op_4a10_0), 0, 18960 }, /* TST.B (An) */ -{ CPUFUNC(op_4a18_0), 0, 18968 }, /* TST.B (An)+ */ -{ CPUFUNC(op_4a20_0), 0, 18976 }, /* TST.B -(An) */ -{ CPUFUNC(op_4a28_0), 0, 18984 }, /* TST.B (d16,An) */ -{ CPUFUNC(op_4a30_3), 0, 18992 }, /* TST.B (d8,An,Xn) */ -{ CPUFUNC(op_4a38_0), 0, 19000 }, /* TST.B (xxx).W */ -{ CPUFUNC(op_4a39_0), 0, 19001 }, /* TST.B (xxx).L */ -{ CPUFUNC(op_4a3a_0), 0, 19002 }, /* TST.B (d16,PC) */ -{ CPUFUNC(op_4a3b_3), 0, 19003 }, /* TST.B (d8,PC,Xn) */ -{ CPUFUNC(op_4a3c_0), 0, 19004 }, /* TST.B #.B */ -{ CPUFUNC(op_4a40_0), 0, 19008 }, /* TST.W Dn */ -{ CPUFUNC(op_4a48_0), 0, 19016 }, /* TST.W An */ -{ CPUFUNC(op_4a50_0), 0, 19024 }, /* TST.W (An) */ -{ CPUFUNC(op_4a58_0), 0, 19032 }, /* TST.W (An)+ */ -{ CPUFUNC(op_4a60_0), 0, 19040 }, /* TST.W -(An) */ -{ CPUFUNC(op_4a68_0), 0, 19048 }, /* TST.W (d16,An) */ -{ CPUFUNC(op_4a70_3), 0, 19056 }, /* TST.W (d8,An,Xn) */ -{ CPUFUNC(op_4a78_0), 0, 19064 }, /* TST.W (xxx).W */ -{ CPUFUNC(op_4a79_0), 0, 19065 }, /* TST.W (xxx).L */ -{ CPUFUNC(op_4a7a_0), 0, 19066 }, /* TST.W (d16,PC) */ -{ CPUFUNC(op_4a7b_3), 0, 19067 }, /* TST.W (d8,PC,Xn) */ -{ CPUFUNC(op_4a7c_0), 0, 19068 }, /* TST.W #.W */ -{ CPUFUNC(op_4a80_0), 0, 19072 }, /* TST.L Dn */ -{ CPUFUNC(op_4a88_0), 0, 19080 }, /* TST.L An */ -{ CPUFUNC(op_4a90_0), 0, 19088 }, /* TST.L (An) */ -{ CPUFUNC(op_4a98_0), 0, 19096 }, /* TST.L (An)+ */ -{ CPUFUNC(op_4aa0_0), 0, 19104 }, /* TST.L -(An) */ -{ CPUFUNC(op_4aa8_0), 0, 19112 }, /* TST.L (d16,An) */ -{ CPUFUNC(op_4ab0_3), 0, 19120 }, /* TST.L (d8,An,Xn) */ -{ CPUFUNC(op_4ab8_0), 0, 19128 }, /* TST.L (xxx).W */ -{ CPUFUNC(op_4ab9_0), 0, 19129 }, /* TST.L (xxx).L */ -{ CPUFUNC(op_4aba_0), 0, 19130 }, /* TST.L (d16,PC) */ -{ CPUFUNC(op_4abb_3), 0, 19131 }, /* TST.L (d8,PC,Xn) */ -{ CPUFUNC(op_4abc_0), 0, 19132 }, /* TST.L #.L */ -{ CPUFUNC(op_4ac0_0), 0, 19136 }, /* TAS.B Dn */ -{ CPUFUNC(op_4ad0_0), 0, 19152 }, /* TAS.B (An) */ -{ CPUFUNC(op_4ad8_0), 0, 19160 }, /* TAS.B (An)+ */ -{ CPUFUNC(op_4ae0_0), 0, 19168 }, /* TAS.B -(An) */ -{ CPUFUNC(op_4ae8_0), 0, 19176 }, /* TAS.B (d16,An) */ -{ CPUFUNC(op_4af0_3), 0, 19184 }, /* TAS.B (d8,An,Xn) */ -{ CPUFUNC(op_4af8_0), 0, 19192 }, /* TAS.B (xxx).W */ -{ CPUFUNC(op_4af9_0), 0, 19193 }, /* TAS.B (xxx).L */ -{ CPUFUNC_FF(op_4c90_0), 0, 19600 }, /* MVMEL.W #.W,(An) */ -{ CPUFUNC_FF(op_4c98_0), 0, 19608 }, /* MVMEL.W #.W,(An)+ */ -{ CPUFUNC_FF(op_4ca8_0), 0, 19624 }, /* MVMEL.W #.W,(d16,An) */ -{ CPUFUNC_FF(op_4cb0_3), 0, 19632 }, /* MVMEL.W #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_4cb8_0), 0, 19640 }, /* MVMEL.W #.W,(xxx).W */ -{ CPUFUNC_FF(op_4cb9_0), 0, 19641 }, /* MVMEL.W #.W,(xxx).L */ -{ CPUFUNC_FF(op_4cba_0), 0, 19642 }, /* MVMEL.W #.W,(d16,PC) */ -{ CPUFUNC_FF(op_4cbb_3), 0, 19643 }, /* MVMEL.W #.W,(d8,PC,Xn) */ -{ CPUFUNC_FF(op_4cd0_0), 0, 19664 }, /* MVMEL.L #.W,(An) */ -{ CPUFUNC_FF(op_4cd8_0), 0, 19672 }, /* MVMEL.L #.W,(An)+ */ -{ CPUFUNC_FF(op_4ce8_0), 0, 19688 }, /* MVMEL.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_4cf0_3), 0, 19696 }, /* MVMEL.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_4cf8_0), 0, 19704 }, /* MVMEL.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_4cf9_0), 0, 19705 }, /* MVMEL.L #.W,(xxx).L */ -{ CPUFUNC_FF(op_4cfa_0), 0, 19706 }, /* MVMEL.L #.W,(d16,PC) */ -{ CPUFUNC_FF(op_4cfb_3), 0, 19707 }, /* MVMEL.L #.W,(d8,PC,Xn) */ -{ CPUFUNC_FF(op_4e40_0), 0, 20032 }, /* TRAP.L # */ -{ CPUFUNC_FF(op_4e50_0), 0, 20048 }, /* LINK.W An,#.W */ -{ CPUFUNC_FF(op_4e58_0), 0, 20056 }, /* UNLK.L An */ -{ CPUFUNC_FF(op_4e60_0), 0, 20064 }, /* MVR2USP.L An */ -{ CPUFUNC_FF(op_4e68_0), 0, 20072 }, /* MVUSP2R.L An */ -{ CPUFUNC_FF(op_4e70_0), 0, 20080 }, /* RESET.L */ -{ CPUFUNC_FF(op_4e71_0), 0, 20081 }, /* NOP.L */ -{ CPUFUNC(op_4e72_0), 0, 20082 }, /* STOP.L #.W */ -{ CPUFUNC(op_4e73_0), 0, 20083 }, /* RTE.L */ -{ CPUFUNC_FF(op_4e74_0), 0, 20084 }, /* RTD.L #.W */ -{ CPUFUNC_FF(op_4e75_0), 0, 20085 }, /* RTS.L */ -{ CPUFUNC_FF(op_4e76_0), 0, 20086 }, /* TRAPV.L */ -{ CPUFUNC(op_4e77_0), 0, 20087 }, /* RTR.L */ -{ CPUFUNC_FF(op_4e7a_0), 0, 20090 }, /* MOVEC2.L #.W */ -{ CPUFUNC_FF(op_4e7b_0), 0, 20091 }, /* MOVE2C.L #.W */ -{ CPUFUNC_FF(op_4e90_0), 0, 20112 }, /* JSR.L (An) */ -{ CPUFUNC_FF(op_4ea8_0), 0, 20136 }, /* JSR.L (d16,An) */ -{ CPUFUNC_FF(op_4eb0_3), 0, 20144 }, /* JSR.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4eb8_0), 0, 20152 }, /* JSR.L (xxx).W */ -{ CPUFUNC_FF(op_4eb9_0), 0, 20153 }, /* JSR.L (xxx).L */ -{ CPUFUNC_FF(op_4eba_0), 0, 20154 }, /* JSR.L (d16,PC) */ -{ CPUFUNC_FF(op_4ebb_3), 0, 20155 }, /* JSR.L (d8,PC,Xn) */ -{ CPUFUNC_FF(op_4ed0_0), 0, 20176 }, /* JMP.L (An) */ -{ CPUFUNC_FF(op_4ee8_0), 0, 20200 }, /* JMP.L (d16,An) */ -{ CPUFUNC_FF(op_4ef0_3), 0, 20208 }, /* JMP.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4ef8_0), 0, 20216 }, /* JMP.L (xxx).W */ -{ CPUFUNC_FF(op_4ef9_0), 0, 20217 }, /* JMP.L (xxx).L */ -{ CPUFUNC_FF(op_4efa_0), 0, 20218 }, /* JMP.L (d16,PC) */ -{ CPUFUNC_FF(op_4efb_3), 0, 20219 }, /* JMP.L (d8,PC,Xn) */ -{ CPUFUNC(op_5000_0), 0, 20480 }, /* ADD.B #,Dn */ -{ CPUFUNC(op_5010_0), 0, 20496 }, /* ADD.B #,(An) */ -{ CPUFUNC(op_5018_0), 0, 20504 }, /* ADD.B #,(An)+ */ -{ CPUFUNC(op_5020_0), 0, 20512 }, /* ADD.B #,-(An) */ -{ CPUFUNC(op_5028_0), 0, 20520 }, /* ADD.B #,(d16,An) */ -{ CPUFUNC(op_5030_3), 0, 20528 }, /* ADD.B #,(d8,An,Xn) */ -{ CPUFUNC(op_5038_0), 0, 20536 }, /* ADD.B #,(xxx).W */ -{ CPUFUNC(op_5039_0), 0, 20537 }, /* ADD.B #,(xxx).L */ -{ CPUFUNC(op_5040_0), 0, 20544 }, /* ADD.W #,Dn */ -{ CPUFUNC_FF(op_5048_0), 0, 20552 }, /* ADDA.W #,An */ -{ CPUFUNC(op_5050_0), 0, 20560 }, /* ADD.W #,(An) */ -{ CPUFUNC(op_5058_0), 0, 20568 }, /* ADD.W #,(An)+ */ -{ CPUFUNC(op_5060_0), 0, 20576 }, /* ADD.W #,-(An) */ -{ CPUFUNC(op_5068_0), 0, 20584 }, /* ADD.W #,(d16,An) */ -{ CPUFUNC(op_5070_3), 0, 20592 }, /* ADD.W #,(d8,An,Xn) */ -{ CPUFUNC(op_5078_0), 0, 20600 }, /* ADD.W #,(xxx).W */ -{ CPUFUNC(op_5079_0), 0, 20601 }, /* ADD.W #,(xxx).L */ -{ CPUFUNC(op_5080_0), 0, 20608 }, /* ADD.L #,Dn */ -{ CPUFUNC_FF(op_5088_0), 0, 20616 }, /* ADDA.L #,An */ -{ CPUFUNC(op_5090_0), 0, 20624 }, /* ADD.L #,(An) */ -{ CPUFUNC(op_5098_0), 0, 20632 }, /* ADD.L #,(An)+ */ -{ CPUFUNC(op_50a0_0), 0, 20640 }, /* ADD.L #,-(An) */ -{ CPUFUNC(op_50a8_0), 0, 20648 }, /* ADD.L #,(d16,An) */ -{ CPUFUNC(op_50b0_3), 0, 20656 }, /* ADD.L #,(d8,An,Xn) */ -{ CPUFUNC(op_50b8_0), 0, 20664 }, /* ADD.L #,(xxx).W */ -{ CPUFUNC(op_50b9_0), 0, 20665 }, /* ADD.L #,(xxx).L */ -{ CPUFUNC_FF(op_50c0_0), 0, 20672 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_50c8_0), 0, 20680 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_50d0_0), 0, 20688 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_50d8_0), 0, 20696 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_50e0_0), 0, 20704 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_50e8_0), 0, 20712 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_50f0_3), 0, 20720 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_50f8_0), 0, 20728 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_50f9_0), 0, 20729 }, /* Scc.B (xxx).L */ -{ CPUFUNC(op_5100_0), 0, 20736 }, /* SUB.B #,Dn */ -{ CPUFUNC(op_5110_0), 0, 20752 }, /* SUB.B #,(An) */ -{ CPUFUNC(op_5118_0), 0, 20760 }, /* SUB.B #,(An)+ */ -{ CPUFUNC(op_5120_0), 0, 20768 }, /* SUB.B #,-(An) */ -{ CPUFUNC(op_5128_0), 0, 20776 }, /* SUB.B #,(d16,An) */ -{ CPUFUNC(op_5130_3), 0, 20784 }, /* SUB.B #,(d8,An,Xn) */ -{ CPUFUNC(op_5138_0), 0, 20792 }, /* SUB.B #,(xxx).W */ -{ CPUFUNC(op_5139_0), 0, 20793 }, /* SUB.B #,(xxx).L */ -{ CPUFUNC(op_5140_0), 0, 20800 }, /* SUB.W #,Dn */ -{ CPUFUNC_FF(op_5148_0), 0, 20808 }, /* SUBA.W #,An */ -{ CPUFUNC(op_5150_0), 0, 20816 }, /* SUB.W #,(An) */ -{ CPUFUNC(op_5158_0), 0, 20824 }, /* SUB.W #,(An)+ */ -{ CPUFUNC(op_5160_0), 0, 20832 }, /* SUB.W #,-(An) */ -{ CPUFUNC(op_5168_0), 0, 20840 }, /* SUB.W #,(d16,An) */ -{ CPUFUNC(op_5170_3), 0, 20848 }, /* SUB.W #,(d8,An,Xn) */ -{ CPUFUNC(op_5178_0), 0, 20856 }, /* SUB.W #,(xxx).W */ -{ CPUFUNC(op_5179_0), 0, 20857 }, /* SUB.W #,(xxx).L */ -{ CPUFUNC(op_5180_0), 0, 20864 }, /* SUB.L #,Dn */ -{ CPUFUNC_FF(op_5188_0), 0, 20872 }, /* SUBA.L #,An */ -{ CPUFUNC(op_5190_0), 0, 20880 }, /* SUB.L #,(An) */ -{ CPUFUNC(op_5198_0), 0, 20888 }, /* SUB.L #,(An)+ */ -{ CPUFUNC(op_51a0_0), 0, 20896 }, /* SUB.L #,-(An) */ -{ CPUFUNC(op_51a8_0), 0, 20904 }, /* SUB.L #,(d16,An) */ -{ CPUFUNC(op_51b0_3), 0, 20912 }, /* SUB.L #,(d8,An,Xn) */ -{ CPUFUNC(op_51b8_0), 0, 20920 }, /* SUB.L #,(xxx).W */ -{ CPUFUNC(op_51b9_0), 0, 20921 }, /* SUB.L #,(xxx).L */ -{ CPUFUNC_FF(op_51c0_0), 0, 20928 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_51c8_0), 0, 20936 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_51d0_0), 0, 20944 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_51d8_0), 0, 20952 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_51e0_0), 0, 20960 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_51e8_0), 0, 20968 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_51f0_3), 0, 20976 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_51f8_0), 0, 20984 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_51f9_0), 0, 20985 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_52c0_0), 0, 21184 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_52c8_0), 0, 21192 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_52d0_0), 0, 21200 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_52d8_0), 0, 21208 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_52e0_0), 0, 21216 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_52e8_0), 0, 21224 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_52f0_3), 0, 21232 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_52f8_0), 0, 21240 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_52f9_0), 0, 21241 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_53c0_0), 0, 21440 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_53c8_0), 0, 21448 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_53d0_0), 0, 21456 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_53d8_0), 0, 21464 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_53e0_0), 0, 21472 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_53e8_0), 0, 21480 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_53f0_3), 0, 21488 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_53f8_0), 0, 21496 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_53f9_0), 0, 21497 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_54c0_0), 0, 21696 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_54c8_0), 0, 21704 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_54d0_0), 0, 21712 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_54d8_0), 0, 21720 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_54e0_0), 0, 21728 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_54e8_0), 0, 21736 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_54f0_3), 0, 21744 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_54f8_0), 0, 21752 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_54f9_0), 0, 21753 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_55c0_0), 0, 21952 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_55c8_0), 0, 21960 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_55d0_0), 0, 21968 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_55d8_0), 0, 21976 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_55e0_0), 0, 21984 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_55e8_0), 0, 21992 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_55f0_3), 0, 22000 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_55f8_0), 0, 22008 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_55f9_0), 0, 22009 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_56c0_0), 0, 22208 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_56c8_0), 0, 22216 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_56d0_0), 0, 22224 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_56d8_0), 0, 22232 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_56e0_0), 0, 22240 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_56e8_0), 0, 22248 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_56f0_3), 0, 22256 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_56f8_0), 0, 22264 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_56f9_0), 0, 22265 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_57c0_0), 0, 22464 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_57c8_0), 0, 22472 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_57d0_0), 0, 22480 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_57d8_0), 0, 22488 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_57e0_0), 0, 22496 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_57e8_0), 0, 22504 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_57f0_3), 0, 22512 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_57f8_0), 0, 22520 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_57f9_0), 0, 22521 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_58c0_0), 0, 22720 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_58c8_0), 0, 22728 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_58d0_0), 0, 22736 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_58d8_0), 0, 22744 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_58e0_0), 0, 22752 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_58e8_0), 0, 22760 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_58f0_3), 0, 22768 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_58f8_0), 0, 22776 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_58f9_0), 0, 22777 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_59c0_0), 0, 22976 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_59c8_0), 0, 22984 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_59d0_0), 0, 22992 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_59d8_0), 0, 23000 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_59e0_0), 0, 23008 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_59e8_0), 0, 23016 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_59f0_3), 0, 23024 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_59f8_0), 0, 23032 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_59f9_0), 0, 23033 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5ac0_0), 0, 23232 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5ac8_0), 0, 23240 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5ad0_0), 0, 23248 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5ad8_0), 0, 23256 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ae0_0), 0, 23264 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ae8_0), 0, 23272 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5af0_3), 0, 23280 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5af8_0), 0, 23288 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5af9_0), 0, 23289 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5bc0_0), 0, 23488 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5bc8_0), 0, 23496 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5bd0_0), 0, 23504 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5bd8_0), 0, 23512 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5be0_0), 0, 23520 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5be8_0), 0, 23528 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5bf0_3), 0, 23536 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5bf8_0), 0, 23544 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5bf9_0), 0, 23545 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5cc0_0), 0, 23744 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5cc8_0), 0, 23752 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5cd0_0), 0, 23760 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5cd8_0), 0, 23768 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ce0_0), 0, 23776 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ce8_0), 0, 23784 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5cf0_3), 0, 23792 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5cf8_0), 0, 23800 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5cf9_0), 0, 23801 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5dc0_0), 0, 24000 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5dc8_0), 0, 24008 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5dd0_0), 0, 24016 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5dd8_0), 0, 24024 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5de0_0), 0, 24032 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5de8_0), 0, 24040 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5df0_3), 0, 24048 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5df8_0), 0, 24056 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5df9_0), 0, 24057 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5ec0_0), 0, 24256 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5ec8_0), 0, 24264 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5ed0_0), 0, 24272 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5ed8_0), 0, 24280 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ee0_0), 0, 24288 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ee8_0), 0, 24296 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5ef0_3), 0, 24304 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5ef8_0), 0, 24312 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5ef9_0), 0, 24313 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5fc0_0), 0, 24512 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5fc8_0), 0, 24520 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5fd0_0), 0, 24528 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5fd8_0), 0, 24536 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5fe0_0), 0, 24544 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5fe8_0), 0, 24552 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5ff0_3), 0, 24560 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5ff8_0), 0, 24568 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5ff9_0), 0, 24569 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_6000_0), 0, 24576 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6001_0), 0, 24577 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_60ff_3), 0, 24831 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6100_0), 0, 24832 }, /* BSR.W #.W */ -{ CPUFUNC_FF(op_6101_0), 0, 24833 }, /* BSR.B # */ -{ CPUFUNC_FF(op_61ff_0), 0, 25087 }, /* BSR.L #.L */ -{ CPUFUNC_FF(op_6200_0), 0, 25088 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6201_0), 0, 25089 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_62ff_3), 0, 25343 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6300_0), 0, 25344 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6301_0), 0, 25345 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_63ff_3), 0, 25599 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6400_0), 0, 25600 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6401_0), 0, 25601 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_64ff_3), 0, 25855 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6500_0), 0, 25856 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6501_0), 0, 25857 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_65ff_3), 0, 26111 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6600_0), 0, 26112 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6601_0), 0, 26113 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_66ff_3), 0, 26367 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6700_0), 0, 26368 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6701_0), 0, 26369 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_67ff_3), 0, 26623 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6800_0), 0, 26624 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6801_0), 0, 26625 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_68ff_3), 0, 26879 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6900_0), 0, 26880 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6901_0), 0, 26881 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_69ff_3), 0, 27135 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6a00_0), 0, 27136 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6a01_0), 0, 27137 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6aff_3), 0, 27391 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6b00_0), 0, 27392 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6b01_0), 0, 27393 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6bff_3), 0, 27647 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6c00_0), 0, 27648 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6c01_0), 0, 27649 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6cff_3), 0, 27903 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6d00_0), 0, 27904 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6d01_0), 0, 27905 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6dff_3), 0, 28159 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6e00_0), 0, 28160 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6e01_0), 0, 28161 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6eff_3), 0, 28415 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6f00_0), 0, 28416 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6f01_0), 0, 28417 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6fff_3), 0, 28671 }, /* Bcc.L #.L */ -{ CPUFUNC(op_7000_0), 0, 28672 }, /* MOVE.L #,Dn */ -{ CPUFUNC_FF(op_7100_0), 0, 28928 }, /* EMULOP_RETURN.L */ -{ CPUFUNC_FF(op_7101_0), 0, 28929 }, /* EMULOP.L # */ -{ CPUFUNC(op_8000_0), 0, 32768 }, /* OR.B Dn,Dn */ -{ CPUFUNC(op_8010_0), 0, 32784 }, /* OR.B (An),Dn */ -{ CPUFUNC(op_8018_0), 0, 32792 }, /* OR.B (An)+,Dn */ -{ CPUFUNC(op_8020_0), 0, 32800 }, /* OR.B -(An),Dn */ -{ CPUFUNC(op_8028_0), 0, 32808 }, /* OR.B (d16,An),Dn */ -{ CPUFUNC(op_8030_3), 0, 32816 }, /* OR.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_8038_0), 0, 32824 }, /* OR.B (xxx).W,Dn */ -{ CPUFUNC(op_8039_0), 0, 32825 }, /* OR.B (xxx).L,Dn */ -{ CPUFUNC(op_803a_0), 0, 32826 }, /* OR.B (d16,PC),Dn */ -{ CPUFUNC(op_803b_3), 0, 32827 }, /* OR.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_803c_0), 0, 32828 }, /* OR.B #.B,Dn */ -{ CPUFUNC(op_8040_0), 0, 32832 }, /* OR.W Dn,Dn */ -{ CPUFUNC(op_8050_0), 0, 32848 }, /* OR.W (An),Dn */ -{ CPUFUNC(op_8058_0), 0, 32856 }, /* OR.W (An)+,Dn */ -{ CPUFUNC(op_8060_0), 0, 32864 }, /* OR.W -(An),Dn */ -{ CPUFUNC(op_8068_0), 0, 32872 }, /* OR.W (d16,An),Dn */ -{ CPUFUNC(op_8070_3), 0, 32880 }, /* OR.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_8078_0), 0, 32888 }, /* OR.W (xxx).W,Dn */ -{ CPUFUNC(op_8079_0), 0, 32889 }, /* OR.W (xxx).L,Dn */ -{ CPUFUNC(op_807a_0), 0, 32890 }, /* OR.W (d16,PC),Dn */ -{ CPUFUNC(op_807b_3), 0, 32891 }, /* OR.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_807c_0), 0, 32892 }, /* OR.W #.W,Dn */ -{ CPUFUNC(op_8080_0), 0, 32896 }, /* OR.L Dn,Dn */ -{ CPUFUNC(op_8090_0), 0, 32912 }, /* OR.L (An),Dn */ -{ CPUFUNC(op_8098_0), 0, 32920 }, /* OR.L (An)+,Dn */ -{ CPUFUNC(op_80a0_0), 0, 32928 }, /* OR.L -(An),Dn */ -{ CPUFUNC(op_80a8_0), 0, 32936 }, /* OR.L (d16,An),Dn */ -{ CPUFUNC(op_80b0_3), 0, 32944 }, /* OR.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_80b8_0), 0, 32952 }, /* OR.L (xxx).W,Dn */ -{ CPUFUNC(op_80b9_0), 0, 32953 }, /* OR.L (xxx).L,Dn */ -{ CPUFUNC(op_80ba_0), 0, 32954 }, /* OR.L (d16,PC),Dn */ -{ CPUFUNC(op_80bb_3), 0, 32955 }, /* OR.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_80bc_0), 0, 32956 }, /* OR.L #.L,Dn */ -{ CPUFUNC(op_80c0_0), 0, 32960 }, /* DIVU.W Dn,Dn */ -{ CPUFUNC(op_80d0_0), 0, 32976 }, /* DIVU.W (An),Dn */ -{ CPUFUNC(op_80d8_0), 0, 32984 }, /* DIVU.W (An)+,Dn */ -{ CPUFUNC(op_80e0_0), 0, 32992 }, /* DIVU.W -(An),Dn */ -{ CPUFUNC(op_80e8_0), 0, 33000 }, /* DIVU.W (d16,An),Dn */ -{ CPUFUNC(op_80f0_3), 0, 33008 }, /* DIVU.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_80f8_0), 0, 33016 }, /* DIVU.W (xxx).W,Dn */ -{ CPUFUNC(op_80f9_0), 0, 33017 }, /* DIVU.W (xxx).L,Dn */ -{ CPUFUNC(op_80fa_0), 0, 33018 }, /* DIVU.W (d16,PC),Dn */ -{ CPUFUNC(op_80fb_3), 0, 33019 }, /* DIVU.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_80fc_0), 0, 33020 }, /* DIVU.W #.W,Dn */ -{ CPUFUNC(op_8100_1), 0, 33024 }, /* SBCD.B Dn,Dn */ -{ CPUFUNC(op_8108_1), 0, 33032 }, /* SBCD.B -(An),-(An) */ -{ CPUFUNC(op_8110_0), 0, 33040 }, /* OR.B Dn,(An) */ -{ CPUFUNC(op_8118_0), 0, 33048 }, /* OR.B Dn,(An)+ */ -{ CPUFUNC(op_8120_0), 0, 33056 }, /* OR.B Dn,-(An) */ -{ CPUFUNC(op_8128_0), 0, 33064 }, /* OR.B Dn,(d16,An) */ -{ CPUFUNC(op_8130_3), 0, 33072 }, /* OR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_8138_0), 0, 33080 }, /* OR.B Dn,(xxx).W */ -{ CPUFUNC(op_8139_0), 0, 33081 }, /* OR.B Dn,(xxx).L */ -{ CPUFUNC(op_8150_0), 0, 33104 }, /* OR.W Dn,(An) */ -{ CPUFUNC(op_8158_0), 0, 33112 }, /* OR.W Dn,(An)+ */ -{ CPUFUNC(op_8160_0), 0, 33120 }, /* OR.W Dn,-(An) */ -{ CPUFUNC(op_8168_0), 0, 33128 }, /* OR.W Dn,(d16,An) */ -{ CPUFUNC(op_8170_3), 0, 33136 }, /* OR.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_8178_0), 0, 33144 }, /* OR.W Dn,(xxx).W */ -{ CPUFUNC(op_8179_0), 0, 33145 }, /* OR.W Dn,(xxx).L */ -{ CPUFUNC(op_8190_0), 0, 33168 }, /* OR.L Dn,(An) */ -{ CPUFUNC(op_8198_0), 0, 33176 }, /* OR.L Dn,(An)+ */ -{ CPUFUNC(op_81a0_0), 0, 33184 }, /* OR.L Dn,-(An) */ -{ CPUFUNC(op_81a8_0), 0, 33192 }, /* OR.L Dn,(d16,An) */ -{ CPUFUNC(op_81b0_3), 0, 33200 }, /* OR.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_81b8_0), 0, 33208 }, /* OR.L Dn,(xxx).W */ -{ CPUFUNC(op_81b9_0), 0, 33209 }, /* OR.L Dn,(xxx).L */ -{ CPUFUNC(op_81c0_0), 0, 33216 }, /* DIVS.W Dn,Dn */ -{ CPUFUNC(op_81d0_0), 0, 33232 }, /* DIVS.W (An),Dn */ -{ CPUFUNC(op_81d8_0), 0, 33240 }, /* DIVS.W (An)+,Dn */ -{ CPUFUNC(op_81e0_0), 0, 33248 }, /* DIVS.W -(An),Dn */ -{ CPUFUNC(op_81e8_0), 0, 33256 }, /* DIVS.W (d16,An),Dn */ -{ CPUFUNC(op_81f0_3), 0, 33264 }, /* DIVS.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_81f8_0), 0, 33272 }, /* DIVS.W (xxx).W,Dn */ -{ CPUFUNC(op_81f9_0), 0, 33273 }, /* DIVS.W (xxx).L,Dn */ -{ CPUFUNC(op_81fa_0), 0, 33274 }, /* DIVS.W (d16,PC),Dn */ -{ CPUFUNC(op_81fb_3), 0, 33275 }, /* DIVS.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_81fc_0), 0, 33276 }, /* DIVS.W #.W,Dn */ -{ CPUFUNC(op_9000_0), 0, 36864 }, /* SUB.B Dn,Dn */ -{ CPUFUNC(op_9010_0), 0, 36880 }, /* SUB.B (An),Dn */ -{ CPUFUNC(op_9018_0), 0, 36888 }, /* SUB.B (An)+,Dn */ -{ CPUFUNC(op_9020_0), 0, 36896 }, /* SUB.B -(An),Dn */ -{ CPUFUNC(op_9028_0), 0, 36904 }, /* SUB.B (d16,An),Dn */ -{ CPUFUNC(op_9030_3), 0, 36912 }, /* SUB.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_9038_0), 0, 36920 }, /* SUB.B (xxx).W,Dn */ -{ CPUFUNC(op_9039_0), 0, 36921 }, /* SUB.B (xxx).L,Dn */ -{ CPUFUNC(op_903a_0), 0, 36922 }, /* SUB.B (d16,PC),Dn */ -{ CPUFUNC(op_903b_3), 0, 36923 }, /* SUB.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_903c_0), 0, 36924 }, /* SUB.B #.B,Dn */ -{ CPUFUNC(op_9040_0), 0, 36928 }, /* SUB.W Dn,Dn */ -{ CPUFUNC(op_9048_0), 0, 36936 }, /* SUB.W An,Dn */ -{ CPUFUNC(op_9050_0), 0, 36944 }, /* SUB.W (An),Dn */ -{ CPUFUNC(op_9058_0), 0, 36952 }, /* SUB.W (An)+,Dn */ -{ CPUFUNC(op_9060_0), 0, 36960 }, /* SUB.W -(An),Dn */ -{ CPUFUNC(op_9068_0), 0, 36968 }, /* SUB.W (d16,An),Dn */ -{ CPUFUNC(op_9070_3), 0, 36976 }, /* SUB.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_9078_0), 0, 36984 }, /* SUB.W (xxx).W,Dn */ -{ CPUFUNC(op_9079_0), 0, 36985 }, /* SUB.W (xxx).L,Dn */ -{ CPUFUNC(op_907a_0), 0, 36986 }, /* SUB.W (d16,PC),Dn */ -{ CPUFUNC(op_907b_3), 0, 36987 }, /* SUB.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_907c_0), 0, 36988 }, /* SUB.W #.W,Dn */ -{ CPUFUNC(op_9080_0), 0, 36992 }, /* SUB.L Dn,Dn */ -{ CPUFUNC(op_9088_0), 0, 37000 }, /* SUB.L An,Dn */ -{ CPUFUNC(op_9090_0), 0, 37008 }, /* SUB.L (An),Dn */ -{ CPUFUNC(op_9098_0), 0, 37016 }, /* SUB.L (An)+,Dn */ -{ CPUFUNC(op_90a0_0), 0, 37024 }, /* SUB.L -(An),Dn */ -{ CPUFUNC(op_90a8_0), 0, 37032 }, /* SUB.L (d16,An),Dn */ -{ CPUFUNC(op_90b0_3), 0, 37040 }, /* SUB.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_90b8_0), 0, 37048 }, /* SUB.L (xxx).W,Dn */ -{ CPUFUNC(op_90b9_0), 0, 37049 }, /* SUB.L (xxx).L,Dn */ -{ CPUFUNC(op_90ba_0), 0, 37050 }, /* SUB.L (d16,PC),Dn */ -{ CPUFUNC(op_90bb_3), 0, 37051 }, /* SUB.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_90bc_0), 0, 37052 }, /* SUB.L #.L,Dn */ -{ CPUFUNC_FF(op_90c0_0), 0, 37056 }, /* SUBA.W Dn,An */ -{ CPUFUNC_FF(op_90c8_0), 0, 37064 }, /* SUBA.W An,An */ -{ CPUFUNC_FF(op_90d0_0), 0, 37072 }, /* SUBA.W (An),An */ -{ CPUFUNC_FF(op_90d8_0), 0, 37080 }, /* SUBA.W (An)+,An */ -{ CPUFUNC_FF(op_90e0_0), 0, 37088 }, /* SUBA.W -(An),An */ -{ CPUFUNC_FF(op_90e8_0), 0, 37096 }, /* SUBA.W (d16,An),An */ -{ CPUFUNC_FF(op_90f0_3), 0, 37104 }, /* SUBA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_90f8_0), 0, 37112 }, /* SUBA.W (xxx).W,An */ -{ CPUFUNC_FF(op_90f9_0), 0, 37113 }, /* SUBA.W (xxx).L,An */ -{ CPUFUNC_FF(op_90fa_0), 0, 37114 }, /* SUBA.W (d16,PC),An */ -{ CPUFUNC_FF(op_90fb_3), 0, 37115 }, /* SUBA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_90fc_0), 0, 37116 }, /* SUBA.W #.W,An */ -{ CPUFUNC(op_9100_0), 0, 37120 }, /* SUBX.B Dn,Dn */ -{ CPUFUNC(op_9108_0), 0, 37128 }, /* SUBX.B -(An),-(An) */ -{ CPUFUNC(op_9110_0), 0, 37136 }, /* SUB.B Dn,(An) */ -{ CPUFUNC(op_9118_0), 0, 37144 }, /* SUB.B Dn,(An)+ */ -{ CPUFUNC(op_9120_0), 0, 37152 }, /* SUB.B Dn,-(An) */ -{ CPUFUNC(op_9128_0), 0, 37160 }, /* SUB.B Dn,(d16,An) */ -{ CPUFUNC(op_9130_3), 0, 37168 }, /* SUB.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_9138_0), 0, 37176 }, /* SUB.B Dn,(xxx).W */ -{ CPUFUNC(op_9139_0), 0, 37177 }, /* SUB.B Dn,(xxx).L */ -{ CPUFUNC(op_9140_0), 0, 37184 }, /* SUBX.W Dn,Dn */ -{ CPUFUNC(op_9148_0), 0, 37192 }, /* SUBX.W -(An),-(An) */ -{ CPUFUNC(op_9150_0), 0, 37200 }, /* SUB.W Dn,(An) */ -{ CPUFUNC(op_9158_0), 0, 37208 }, /* SUB.W Dn,(An)+ */ -{ CPUFUNC(op_9160_0), 0, 37216 }, /* SUB.W Dn,-(An) */ -{ CPUFUNC(op_9168_0), 0, 37224 }, /* SUB.W Dn,(d16,An) */ -{ CPUFUNC(op_9170_3), 0, 37232 }, /* SUB.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_9178_0), 0, 37240 }, /* SUB.W Dn,(xxx).W */ -{ CPUFUNC(op_9179_0), 0, 37241 }, /* SUB.W Dn,(xxx).L */ -{ CPUFUNC(op_9180_0), 0, 37248 }, /* SUBX.L Dn,Dn */ -{ CPUFUNC(op_9188_0), 0, 37256 }, /* SUBX.L -(An),-(An) */ -{ CPUFUNC(op_9190_0), 0, 37264 }, /* SUB.L Dn,(An) */ -{ CPUFUNC(op_9198_0), 0, 37272 }, /* SUB.L Dn,(An)+ */ -{ CPUFUNC(op_91a0_0), 0, 37280 }, /* SUB.L Dn,-(An) */ -{ CPUFUNC(op_91a8_0), 0, 37288 }, /* SUB.L Dn,(d16,An) */ -{ CPUFUNC(op_91b0_3), 0, 37296 }, /* SUB.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_91b8_0), 0, 37304 }, /* SUB.L Dn,(xxx).W */ -{ CPUFUNC(op_91b9_0), 0, 37305 }, /* SUB.L Dn,(xxx).L */ -{ CPUFUNC_FF(op_91c0_0), 0, 37312 }, /* SUBA.L Dn,An */ -{ CPUFUNC_FF(op_91c8_0), 0, 37320 }, /* SUBA.L An,An */ -{ CPUFUNC_FF(op_91d0_0), 0, 37328 }, /* SUBA.L (An),An */ -{ CPUFUNC_FF(op_91d8_0), 0, 37336 }, /* SUBA.L (An)+,An */ -{ CPUFUNC_FF(op_91e0_0), 0, 37344 }, /* SUBA.L -(An),An */ -{ CPUFUNC_FF(op_91e8_0), 0, 37352 }, /* SUBA.L (d16,An),An */ -{ CPUFUNC_FF(op_91f0_3), 0, 37360 }, /* SUBA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_91f8_0), 0, 37368 }, /* SUBA.L (xxx).W,An */ -{ CPUFUNC_FF(op_91f9_0), 0, 37369 }, /* SUBA.L (xxx).L,An */ -{ CPUFUNC_FF(op_91fa_0), 0, 37370 }, /* SUBA.L (d16,PC),An */ -{ CPUFUNC_FF(op_91fb_3), 0, 37371 }, /* SUBA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_91fc_0), 0, 37372 }, /* SUBA.L #.L,An */ -{ CPUFUNC(op_b000_0), 0, 45056 }, /* CMP.B Dn,Dn */ -{ CPUFUNC(op_b010_0), 0, 45072 }, /* CMP.B (An),Dn */ -{ CPUFUNC(op_b018_0), 0, 45080 }, /* CMP.B (An)+,Dn */ -{ CPUFUNC(op_b020_0), 0, 45088 }, /* CMP.B -(An),Dn */ -{ CPUFUNC(op_b028_0), 0, 45096 }, /* CMP.B (d16,An),Dn */ -{ CPUFUNC(op_b030_3), 0, 45104 }, /* CMP.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_b038_0), 0, 45112 }, /* CMP.B (xxx).W,Dn */ -{ CPUFUNC(op_b039_0), 0, 45113 }, /* CMP.B (xxx).L,Dn */ -{ CPUFUNC(op_b03a_0), 0, 45114 }, /* CMP.B (d16,PC),Dn */ -{ CPUFUNC(op_b03b_3), 0, 45115 }, /* CMP.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b03c_0), 0, 45116 }, /* CMP.B #.B,Dn */ -{ CPUFUNC(op_b040_0), 0, 45120 }, /* CMP.W Dn,Dn */ -{ CPUFUNC(op_b048_0), 0, 45128 }, /* CMP.W An,Dn */ -{ CPUFUNC(op_b050_0), 0, 45136 }, /* CMP.W (An),Dn */ -{ CPUFUNC(op_b058_0), 0, 45144 }, /* CMP.W (An)+,Dn */ -{ CPUFUNC(op_b060_0), 0, 45152 }, /* CMP.W -(An),Dn */ -{ CPUFUNC(op_b068_0), 0, 45160 }, /* CMP.W (d16,An),Dn */ -{ CPUFUNC(op_b070_3), 0, 45168 }, /* CMP.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_b078_0), 0, 45176 }, /* CMP.W (xxx).W,Dn */ -{ CPUFUNC(op_b079_0), 0, 45177 }, /* CMP.W (xxx).L,Dn */ -{ CPUFUNC(op_b07a_0), 0, 45178 }, /* CMP.W (d16,PC),Dn */ -{ CPUFUNC(op_b07b_3), 0, 45179 }, /* CMP.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b07c_0), 0, 45180 }, /* CMP.W #.W,Dn */ -{ CPUFUNC(op_b080_0), 0, 45184 }, /* CMP.L Dn,Dn */ -{ CPUFUNC(op_b088_0), 0, 45192 }, /* CMP.L An,Dn */ -{ CPUFUNC(op_b090_0), 0, 45200 }, /* CMP.L (An),Dn */ -{ CPUFUNC(op_b098_0), 0, 45208 }, /* CMP.L (An)+,Dn */ -{ CPUFUNC(op_b0a0_0), 0, 45216 }, /* CMP.L -(An),Dn */ -{ CPUFUNC(op_b0a8_0), 0, 45224 }, /* CMP.L (d16,An),Dn */ -{ CPUFUNC(op_b0b0_3), 0, 45232 }, /* CMP.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_b0b8_0), 0, 45240 }, /* CMP.L (xxx).W,Dn */ -{ CPUFUNC(op_b0b9_0), 0, 45241 }, /* CMP.L (xxx).L,Dn */ -{ CPUFUNC(op_b0ba_0), 0, 45242 }, /* CMP.L (d16,PC),Dn */ -{ CPUFUNC(op_b0bb_3), 0, 45243 }, /* CMP.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b0bc_0), 0, 45244 }, /* CMP.L #.L,Dn */ -{ CPUFUNC(op_b0c0_0), 0, 45248 }, /* CMPA.W Dn,An */ -{ CPUFUNC(op_b0c8_0), 0, 45256 }, /* CMPA.W An,An */ -{ CPUFUNC(op_b0d0_0), 0, 45264 }, /* CMPA.W (An),An */ -{ CPUFUNC(op_b0d8_0), 0, 45272 }, /* CMPA.W (An)+,An */ -{ CPUFUNC(op_b0e0_0), 0, 45280 }, /* CMPA.W -(An),An */ -{ CPUFUNC(op_b0e8_0), 0, 45288 }, /* CMPA.W (d16,An),An */ -{ CPUFUNC(op_b0f0_3), 0, 45296 }, /* CMPA.W (d8,An,Xn),An */ -{ CPUFUNC(op_b0f8_0), 0, 45304 }, /* CMPA.W (xxx).W,An */ -{ CPUFUNC(op_b0f9_0), 0, 45305 }, /* CMPA.W (xxx).L,An */ -{ CPUFUNC(op_b0fa_0), 0, 45306 }, /* CMPA.W (d16,PC),An */ -{ CPUFUNC(op_b0fb_3), 0, 45307 }, /* CMPA.W (d8,PC,Xn),An */ -{ CPUFUNC(op_b0fc_0), 0, 45308 }, /* CMPA.W #.W,An */ -{ CPUFUNC(op_b100_0), 0, 45312 }, /* EOR.B Dn,Dn */ -{ CPUFUNC(op_b108_0), 0, 45320 }, /* CMPM.B (An)+,(An)+ */ -{ CPUFUNC(op_b110_0), 0, 45328 }, /* EOR.B Dn,(An) */ -{ CPUFUNC(op_b118_0), 0, 45336 }, /* EOR.B Dn,(An)+ */ -{ CPUFUNC(op_b120_0), 0, 45344 }, /* EOR.B Dn,-(An) */ -{ CPUFUNC(op_b128_0), 0, 45352 }, /* EOR.B Dn,(d16,An) */ -{ CPUFUNC(op_b130_3), 0, 45360 }, /* EOR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b138_0), 0, 45368 }, /* EOR.B Dn,(xxx).W */ -{ CPUFUNC(op_b139_0), 0, 45369 }, /* EOR.B Dn,(xxx).L */ -{ CPUFUNC(op_b140_0), 0, 45376 }, /* EOR.W Dn,Dn */ -{ CPUFUNC(op_b148_0), 0, 45384 }, /* CMPM.W (An)+,(An)+ */ -{ CPUFUNC(op_b150_0), 0, 45392 }, /* EOR.W Dn,(An) */ -{ CPUFUNC(op_b158_0), 0, 45400 }, /* EOR.W Dn,(An)+ */ -{ CPUFUNC(op_b160_0), 0, 45408 }, /* EOR.W Dn,-(An) */ -{ CPUFUNC(op_b168_0), 0, 45416 }, /* EOR.W Dn,(d16,An) */ -{ CPUFUNC(op_b170_3), 0, 45424 }, /* EOR.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b178_0), 0, 45432 }, /* EOR.W Dn,(xxx).W */ -{ CPUFUNC(op_b179_0), 0, 45433 }, /* EOR.W Dn,(xxx).L */ -{ CPUFUNC(op_b180_0), 0, 45440 }, /* EOR.L Dn,Dn */ -{ CPUFUNC(op_b188_0), 0, 45448 }, /* CMPM.L (An)+,(An)+ */ -{ CPUFUNC(op_b190_0), 0, 45456 }, /* EOR.L Dn,(An) */ -{ CPUFUNC(op_b198_0), 0, 45464 }, /* EOR.L Dn,(An)+ */ -{ CPUFUNC(op_b1a0_0), 0, 45472 }, /* EOR.L Dn,-(An) */ -{ CPUFUNC(op_b1a8_0), 0, 45480 }, /* EOR.L Dn,(d16,An) */ -{ CPUFUNC(op_b1b0_3), 0, 45488 }, /* EOR.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b1b8_0), 0, 45496 }, /* EOR.L Dn,(xxx).W */ -{ CPUFUNC(op_b1b9_0), 0, 45497 }, /* EOR.L Dn,(xxx).L */ -{ CPUFUNC(op_b1c0_0), 0, 45504 }, /* CMPA.L Dn,An */ -{ CPUFUNC(op_b1c8_0), 0, 45512 }, /* CMPA.L An,An */ -{ CPUFUNC(op_b1d0_0), 0, 45520 }, /* CMPA.L (An),An */ -{ CPUFUNC(op_b1d8_0), 0, 45528 }, /* CMPA.L (An)+,An */ -{ CPUFUNC(op_b1e0_0), 0, 45536 }, /* CMPA.L -(An),An */ -{ CPUFUNC(op_b1e8_0), 0, 45544 }, /* CMPA.L (d16,An),An */ -{ CPUFUNC(op_b1f0_3), 0, 45552 }, /* CMPA.L (d8,An,Xn),An */ -{ CPUFUNC(op_b1f8_0), 0, 45560 }, /* CMPA.L (xxx).W,An */ -{ CPUFUNC(op_b1f9_0), 0, 45561 }, /* CMPA.L (xxx).L,An */ -{ CPUFUNC(op_b1fa_0), 0, 45562 }, /* CMPA.L (d16,PC),An */ -{ CPUFUNC(op_b1fb_3), 0, 45563 }, /* CMPA.L (d8,PC,Xn),An */ -{ CPUFUNC(op_b1fc_0), 0, 45564 }, /* CMPA.L #.L,An */ -{ CPUFUNC(op_c000_0), 0, 49152 }, /* AND.B Dn,Dn */ -{ CPUFUNC(op_c010_0), 0, 49168 }, /* AND.B (An),Dn */ -{ CPUFUNC(op_c018_0), 0, 49176 }, /* AND.B (An)+,Dn */ -{ CPUFUNC(op_c020_0), 0, 49184 }, /* AND.B -(An),Dn */ -{ CPUFUNC(op_c028_0), 0, 49192 }, /* AND.B (d16,An),Dn */ -{ CPUFUNC(op_c030_3), 0, 49200 }, /* AND.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_c038_0), 0, 49208 }, /* AND.B (xxx).W,Dn */ -{ CPUFUNC(op_c039_0), 0, 49209 }, /* AND.B (xxx).L,Dn */ -{ CPUFUNC(op_c03a_0), 0, 49210 }, /* AND.B (d16,PC),Dn */ -{ CPUFUNC(op_c03b_3), 0, 49211 }, /* AND.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c03c_0), 0, 49212 }, /* AND.B #.B,Dn */ -{ CPUFUNC(op_c040_0), 0, 49216 }, /* AND.W Dn,Dn */ -{ CPUFUNC(op_c050_0), 0, 49232 }, /* AND.W (An),Dn */ -{ CPUFUNC(op_c058_0), 0, 49240 }, /* AND.W (An)+,Dn */ -{ CPUFUNC(op_c060_0), 0, 49248 }, /* AND.W -(An),Dn */ -{ CPUFUNC(op_c068_0), 0, 49256 }, /* AND.W (d16,An),Dn */ -{ CPUFUNC(op_c070_3), 0, 49264 }, /* AND.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c078_0), 0, 49272 }, /* AND.W (xxx).W,Dn */ -{ CPUFUNC(op_c079_0), 0, 49273 }, /* AND.W (xxx).L,Dn */ -{ CPUFUNC(op_c07a_0), 0, 49274 }, /* AND.W (d16,PC),Dn */ -{ CPUFUNC(op_c07b_3), 0, 49275 }, /* AND.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c07c_0), 0, 49276 }, /* AND.W #.W,Dn */ -{ CPUFUNC(op_c080_0), 0, 49280 }, /* AND.L Dn,Dn */ -{ CPUFUNC(op_c090_0), 0, 49296 }, /* AND.L (An),Dn */ -{ CPUFUNC(op_c098_0), 0, 49304 }, /* AND.L (An)+,Dn */ -{ CPUFUNC(op_c0a0_0), 0, 49312 }, /* AND.L -(An),Dn */ -{ CPUFUNC(op_c0a8_0), 0, 49320 }, /* AND.L (d16,An),Dn */ -{ CPUFUNC(op_c0b0_3), 0, 49328 }, /* AND.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_c0b8_0), 0, 49336 }, /* AND.L (xxx).W,Dn */ -{ CPUFUNC(op_c0b9_0), 0, 49337 }, /* AND.L (xxx).L,Dn */ -{ CPUFUNC(op_c0ba_0), 0, 49338 }, /* AND.L (d16,PC),Dn */ -{ CPUFUNC(op_c0bb_3), 0, 49339 }, /* AND.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c0bc_0), 0, 49340 }, /* AND.L #.L,Dn */ -{ CPUFUNC(op_c0c0_0), 0, 49344 }, /* MULU.W Dn,Dn */ -{ CPUFUNC(op_c0d0_0), 0, 49360 }, /* MULU.W (An),Dn */ -{ CPUFUNC(op_c0d8_0), 0, 49368 }, /* MULU.W (An)+,Dn */ -{ CPUFUNC(op_c0e0_0), 0, 49376 }, /* MULU.W -(An),Dn */ -{ CPUFUNC(op_c0e8_0), 0, 49384 }, /* MULU.W (d16,An),Dn */ -{ CPUFUNC(op_c0f0_3), 0, 49392 }, /* MULU.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c0f8_0), 0, 49400 }, /* MULU.W (xxx).W,Dn */ -{ CPUFUNC(op_c0f9_0), 0, 49401 }, /* MULU.W (xxx).L,Dn */ -{ CPUFUNC(op_c0fa_0), 0, 49402 }, /* MULU.W (d16,PC),Dn */ -{ CPUFUNC(op_c0fb_3), 0, 49403 }, /* MULU.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c0fc_0), 0, 49404 }, /* MULU.W #.W,Dn */ -{ CPUFUNC(op_c100_1), 0, 49408 }, /* ABCD.B Dn,Dn */ -{ CPUFUNC(op_c108_1), 0, 49416 }, /* ABCD.B -(An),-(An) */ -{ CPUFUNC(op_c110_0), 0, 49424 }, /* AND.B Dn,(An) */ -{ CPUFUNC(op_c118_0), 0, 49432 }, /* AND.B Dn,(An)+ */ -{ CPUFUNC(op_c120_0), 0, 49440 }, /* AND.B Dn,-(An) */ -{ CPUFUNC(op_c128_0), 0, 49448 }, /* AND.B Dn,(d16,An) */ -{ CPUFUNC(op_c130_3), 0, 49456 }, /* AND.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c138_0), 0, 49464 }, /* AND.B Dn,(xxx).W */ -{ CPUFUNC(op_c139_0), 0, 49465 }, /* AND.B Dn,(xxx).L */ -{ CPUFUNC_FF(op_c140_0), 0, 49472 }, /* EXG.L Dn,Dn */ -{ CPUFUNC_FF(op_c148_0), 0, 49480 }, /* EXG.L An,An */ -{ CPUFUNC(op_c150_0), 0, 49488 }, /* AND.W Dn,(An) */ -{ CPUFUNC(op_c158_0), 0, 49496 }, /* AND.W Dn,(An)+ */ -{ CPUFUNC(op_c160_0), 0, 49504 }, /* AND.W Dn,-(An) */ -{ CPUFUNC(op_c168_0), 0, 49512 }, /* AND.W Dn,(d16,An) */ -{ CPUFUNC(op_c170_3), 0, 49520 }, /* AND.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c178_0), 0, 49528 }, /* AND.W Dn,(xxx).W */ -{ CPUFUNC(op_c179_0), 0, 49529 }, /* AND.W Dn,(xxx).L */ -{ CPUFUNC_FF(op_c188_0), 0, 49544 }, /* EXG.L Dn,An */ -{ CPUFUNC(op_c190_0), 0, 49552 }, /* AND.L Dn,(An) */ -{ CPUFUNC(op_c198_0), 0, 49560 }, /* AND.L Dn,(An)+ */ -{ CPUFUNC(op_c1a0_0), 0, 49568 }, /* AND.L Dn,-(An) */ -{ CPUFUNC(op_c1a8_0), 0, 49576 }, /* AND.L Dn,(d16,An) */ -{ CPUFUNC(op_c1b0_3), 0, 49584 }, /* AND.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c1b8_0), 0, 49592 }, /* AND.L Dn,(xxx).W */ -{ CPUFUNC(op_c1b9_0), 0, 49593 }, /* AND.L Dn,(xxx).L */ -{ CPUFUNC(op_c1c0_0), 0, 49600 }, /* MULS.W Dn,Dn */ -{ CPUFUNC(op_c1d0_0), 0, 49616 }, /* MULS.W (An),Dn */ -{ CPUFUNC(op_c1d8_0), 0, 49624 }, /* MULS.W (An)+,Dn */ -{ CPUFUNC(op_c1e0_0), 0, 49632 }, /* MULS.W -(An),Dn */ -{ CPUFUNC(op_c1e8_0), 0, 49640 }, /* MULS.W (d16,An),Dn */ -{ CPUFUNC(op_c1f0_3), 0, 49648 }, /* MULS.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c1f8_0), 0, 49656 }, /* MULS.W (xxx).W,Dn */ -{ CPUFUNC(op_c1f9_0), 0, 49657 }, /* MULS.W (xxx).L,Dn */ -{ CPUFUNC(op_c1fa_0), 0, 49658 }, /* MULS.W (d16,PC),Dn */ -{ CPUFUNC(op_c1fb_3), 0, 49659 }, /* MULS.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c1fc_0), 0, 49660 }, /* MULS.W #.W,Dn */ -{ CPUFUNC(op_d000_0), 0, 53248 }, /* ADD.B Dn,Dn */ -{ CPUFUNC(op_d010_0), 0, 53264 }, /* ADD.B (An),Dn */ -{ CPUFUNC(op_d018_0), 0, 53272 }, /* ADD.B (An)+,Dn */ -{ CPUFUNC(op_d020_0), 0, 53280 }, /* ADD.B -(An),Dn */ -{ CPUFUNC(op_d028_0), 0, 53288 }, /* ADD.B (d16,An),Dn */ -{ CPUFUNC(op_d030_3), 0, 53296 }, /* ADD.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_d038_0), 0, 53304 }, /* ADD.B (xxx).W,Dn */ -{ CPUFUNC(op_d039_0), 0, 53305 }, /* ADD.B (xxx).L,Dn */ -{ CPUFUNC(op_d03a_0), 0, 53306 }, /* ADD.B (d16,PC),Dn */ -{ CPUFUNC(op_d03b_3), 0, 53307 }, /* ADD.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d03c_0), 0, 53308 }, /* ADD.B #.B,Dn */ -{ CPUFUNC(op_d040_0), 0, 53312 }, /* ADD.W Dn,Dn */ -{ CPUFUNC(op_d048_0), 0, 53320 }, /* ADD.W An,Dn */ -{ CPUFUNC(op_d050_0), 0, 53328 }, /* ADD.W (An),Dn */ -{ CPUFUNC(op_d058_0), 0, 53336 }, /* ADD.W (An)+,Dn */ -{ CPUFUNC(op_d060_0), 0, 53344 }, /* ADD.W -(An),Dn */ -{ CPUFUNC(op_d068_0), 0, 53352 }, /* ADD.W (d16,An),Dn */ -{ CPUFUNC(op_d070_3), 0, 53360 }, /* ADD.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_d078_0), 0, 53368 }, /* ADD.W (xxx).W,Dn */ -{ CPUFUNC(op_d079_0), 0, 53369 }, /* ADD.W (xxx).L,Dn */ -{ CPUFUNC(op_d07a_0), 0, 53370 }, /* ADD.W (d16,PC),Dn */ -{ CPUFUNC(op_d07b_3), 0, 53371 }, /* ADD.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d07c_0), 0, 53372 }, /* ADD.W #.W,Dn */ -{ CPUFUNC(op_d080_0), 0, 53376 }, /* ADD.L Dn,Dn */ -{ CPUFUNC(op_d088_0), 0, 53384 }, /* ADD.L An,Dn */ -{ CPUFUNC(op_d090_0), 0, 53392 }, /* ADD.L (An),Dn */ -{ CPUFUNC(op_d098_0), 0, 53400 }, /* ADD.L (An)+,Dn */ -{ CPUFUNC(op_d0a0_0), 0, 53408 }, /* ADD.L -(An),Dn */ -{ CPUFUNC(op_d0a8_0), 0, 53416 }, /* ADD.L (d16,An),Dn */ -{ CPUFUNC(op_d0b0_3), 0, 53424 }, /* ADD.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_d0b8_0), 0, 53432 }, /* ADD.L (xxx).W,Dn */ -{ CPUFUNC(op_d0b9_0), 0, 53433 }, /* ADD.L (xxx).L,Dn */ -{ CPUFUNC(op_d0ba_0), 0, 53434 }, /* ADD.L (d16,PC),Dn */ -{ CPUFUNC(op_d0bb_3), 0, 53435 }, /* ADD.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d0bc_0), 0, 53436 }, /* ADD.L #.L,Dn */ -{ CPUFUNC_FF(op_d0c0_0), 0, 53440 }, /* ADDA.W Dn,An */ -{ CPUFUNC_FF(op_d0c8_0), 0, 53448 }, /* ADDA.W An,An */ -{ CPUFUNC_FF(op_d0d0_0), 0, 53456 }, /* ADDA.W (An),An */ -{ CPUFUNC_FF(op_d0d8_0), 0, 53464 }, /* ADDA.W (An)+,An */ -{ CPUFUNC_FF(op_d0e0_0), 0, 53472 }, /* ADDA.W -(An),An */ -{ CPUFUNC_FF(op_d0e8_0), 0, 53480 }, /* ADDA.W (d16,An),An */ -{ CPUFUNC_FF(op_d0f0_3), 0, 53488 }, /* ADDA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_d0f8_0), 0, 53496 }, /* ADDA.W (xxx).W,An */ -{ CPUFUNC_FF(op_d0f9_0), 0, 53497 }, /* ADDA.W (xxx).L,An */ -{ CPUFUNC_FF(op_d0fa_0), 0, 53498 }, /* ADDA.W (d16,PC),An */ -{ CPUFUNC_FF(op_d0fb_3), 0, 53499 }, /* ADDA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_d0fc_0), 0, 53500 }, /* ADDA.W #.W,An */ -{ CPUFUNC(op_d100_0), 0, 53504 }, /* ADDX.B Dn,Dn */ -{ CPUFUNC(op_d108_0), 0, 53512 }, /* ADDX.B -(An),-(An) */ -{ CPUFUNC(op_d110_0), 0, 53520 }, /* ADD.B Dn,(An) */ -{ CPUFUNC(op_d118_0), 0, 53528 }, /* ADD.B Dn,(An)+ */ -{ CPUFUNC(op_d120_0), 0, 53536 }, /* ADD.B Dn,-(An) */ -{ CPUFUNC(op_d128_0), 0, 53544 }, /* ADD.B Dn,(d16,An) */ -{ CPUFUNC(op_d130_3), 0, 53552 }, /* ADD.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d138_0), 0, 53560 }, /* ADD.B Dn,(xxx).W */ -{ CPUFUNC(op_d139_0), 0, 53561 }, /* ADD.B Dn,(xxx).L */ -{ CPUFUNC(op_d140_0), 0, 53568 }, /* ADDX.W Dn,Dn */ -{ CPUFUNC(op_d148_0), 0, 53576 }, /* ADDX.W -(An),-(An) */ -{ CPUFUNC(op_d150_0), 0, 53584 }, /* ADD.W Dn,(An) */ -{ CPUFUNC(op_d158_0), 0, 53592 }, /* ADD.W Dn,(An)+ */ -{ CPUFUNC(op_d160_0), 0, 53600 }, /* ADD.W Dn,-(An) */ -{ CPUFUNC(op_d168_0), 0, 53608 }, /* ADD.W Dn,(d16,An) */ -{ CPUFUNC(op_d170_3), 0, 53616 }, /* ADD.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d178_0), 0, 53624 }, /* ADD.W Dn,(xxx).W */ -{ CPUFUNC(op_d179_0), 0, 53625 }, /* ADD.W Dn,(xxx).L */ -{ CPUFUNC(op_d180_0), 0, 53632 }, /* ADDX.L Dn,Dn */ -{ CPUFUNC(op_d188_0), 0, 53640 }, /* ADDX.L -(An),-(An) */ -{ CPUFUNC(op_d190_0), 0, 53648 }, /* ADD.L Dn,(An) */ -{ CPUFUNC(op_d198_0), 0, 53656 }, /* ADD.L Dn,(An)+ */ -{ CPUFUNC(op_d1a0_0), 0, 53664 }, /* ADD.L Dn,-(An) */ -{ CPUFUNC(op_d1a8_0), 0, 53672 }, /* ADD.L Dn,(d16,An) */ -{ CPUFUNC(op_d1b0_3), 0, 53680 }, /* ADD.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d1b8_0), 0, 53688 }, /* ADD.L Dn,(xxx).W */ -{ CPUFUNC(op_d1b9_0), 0, 53689 }, /* ADD.L Dn,(xxx).L */ -{ CPUFUNC_FF(op_d1c0_0), 0, 53696 }, /* ADDA.L Dn,An */ -{ CPUFUNC_FF(op_d1c8_0), 0, 53704 }, /* ADDA.L An,An */ -{ CPUFUNC_FF(op_d1d0_0), 0, 53712 }, /* ADDA.L (An),An */ -{ CPUFUNC_FF(op_d1d8_0), 0, 53720 }, /* ADDA.L (An)+,An */ -{ CPUFUNC_FF(op_d1e0_0), 0, 53728 }, /* ADDA.L -(An),An */ -{ CPUFUNC_FF(op_d1e8_0), 0, 53736 }, /* ADDA.L (d16,An),An */ -{ CPUFUNC_FF(op_d1f0_3), 0, 53744 }, /* ADDA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_d1f8_0), 0, 53752 }, /* ADDA.L (xxx).W,An */ -{ CPUFUNC_FF(op_d1f9_0), 0, 53753 }, /* ADDA.L (xxx).L,An */ -{ CPUFUNC_FF(op_d1fa_0), 0, 53754 }, /* ADDA.L (d16,PC),An */ -{ CPUFUNC_FF(op_d1fb_3), 0, 53755 }, /* ADDA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_d1fc_0), 0, 53756 }, /* ADDA.L #.L,An */ -{ CPUFUNC(op_e000_0), 0, 57344 }, /* ASR.B #,Dn */ -{ CPUFUNC(op_e008_0), 0, 57352 }, /* LSR.B #,Dn */ -{ CPUFUNC(op_e010_0), 0, 57360 }, /* ROXR.B #,Dn */ -{ CPUFUNC(op_e018_0), 0, 57368 }, /* ROR.B #,Dn */ -{ CPUFUNC(op_e020_0), 0, 57376 }, /* ASR.B Dn,Dn */ -{ CPUFUNC(op_e028_0), 0, 57384 }, /* LSR.B Dn,Dn */ -{ CPUFUNC(op_e030_0), 0, 57392 }, /* ROXR.B Dn,Dn */ -{ CPUFUNC(op_e038_0), 0, 57400 }, /* ROR.B Dn,Dn */ -{ CPUFUNC(op_e040_0), 0, 57408 }, /* ASR.W #,Dn */ -{ CPUFUNC(op_e048_0), 0, 57416 }, /* LSR.W #,Dn */ -{ CPUFUNC(op_e050_0), 0, 57424 }, /* ROXR.W #,Dn */ -{ CPUFUNC(op_e058_0), 0, 57432 }, /* ROR.W #,Dn */ -{ CPUFUNC(op_e060_0), 0, 57440 }, /* ASR.W Dn,Dn */ -{ CPUFUNC(op_e068_0), 0, 57448 }, /* LSR.W Dn,Dn */ -{ CPUFUNC(op_e070_0), 0, 57456 }, /* ROXR.W Dn,Dn */ -{ CPUFUNC(op_e078_0), 0, 57464 }, /* ROR.W Dn,Dn */ -{ CPUFUNC(op_e080_0), 0, 57472 }, /* ASR.L #,Dn */ -{ CPUFUNC(op_e088_0), 0, 57480 }, /* LSR.L #,Dn */ -{ CPUFUNC(op_e090_0), 0, 57488 }, /* ROXR.L #,Dn */ -{ CPUFUNC(op_e098_0), 0, 57496 }, /* ROR.L #,Dn */ -{ CPUFUNC(op_e0a0_0), 0, 57504 }, /* ASR.L Dn,Dn */ -{ CPUFUNC(op_e0a8_0), 0, 57512 }, /* LSR.L Dn,Dn */ -{ CPUFUNC(op_e0b0_0), 0, 57520 }, /* ROXR.L Dn,Dn */ -{ CPUFUNC(op_e0b8_0), 0, 57528 }, /* ROR.L Dn,Dn */ -{ CPUFUNC(op_e0d0_0), 0, 57552 }, /* ASRW.W (An) */ -{ CPUFUNC(op_e0d8_0), 0, 57560 }, /* ASRW.W (An)+ */ -{ CPUFUNC(op_e0e0_0), 0, 57568 }, /* ASRW.W -(An) */ -{ CPUFUNC(op_e0e8_0), 0, 57576 }, /* ASRW.W (d16,An) */ -{ CPUFUNC(op_e0f0_3), 0, 57584 }, /* ASRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e0f8_0), 0, 57592 }, /* ASRW.W (xxx).W */ -{ CPUFUNC(op_e0f9_0), 0, 57593 }, /* ASRW.W (xxx).L */ -{ CPUFUNC(op_e100_0), 0, 57600 }, /* ASL.B #,Dn */ -{ CPUFUNC(op_e108_0), 0, 57608 }, /* LSL.B #,Dn */ -{ CPUFUNC(op_e110_0), 0, 57616 }, /* ROXL.B #,Dn */ -{ CPUFUNC(op_e118_0), 0, 57624 }, /* ROL.B #,Dn */ -{ CPUFUNC(op_e120_0), 0, 57632 }, /* ASL.B Dn,Dn */ -{ CPUFUNC(op_e128_0), 0, 57640 }, /* LSL.B Dn,Dn */ -{ CPUFUNC(op_e130_0), 0, 57648 }, /* ROXL.B Dn,Dn */ -{ CPUFUNC(op_e138_0), 0, 57656 }, /* ROL.B Dn,Dn */ -{ CPUFUNC(op_e140_0), 0, 57664 }, /* ASL.W #,Dn */ -{ CPUFUNC(op_e148_0), 0, 57672 }, /* LSL.W #,Dn */ -{ CPUFUNC(op_e150_0), 0, 57680 }, /* ROXL.W #,Dn */ -{ CPUFUNC(op_e158_0), 0, 57688 }, /* ROL.W #,Dn */ -{ CPUFUNC(op_e160_0), 0, 57696 }, /* ASL.W Dn,Dn */ -{ CPUFUNC(op_e168_0), 0, 57704 }, /* LSL.W Dn,Dn */ -{ CPUFUNC(op_e170_0), 0, 57712 }, /* ROXL.W Dn,Dn */ -{ CPUFUNC(op_e178_0), 0, 57720 }, /* ROL.W Dn,Dn */ -{ CPUFUNC(op_e180_0), 0, 57728 }, /* ASL.L #,Dn */ -{ CPUFUNC(op_e188_0), 0, 57736 }, /* LSL.L #,Dn */ -{ CPUFUNC(op_e190_0), 0, 57744 }, /* ROXL.L #,Dn */ -{ CPUFUNC(op_e198_0), 0, 57752 }, /* ROL.L #,Dn */ -{ CPUFUNC(op_e1a0_0), 0, 57760 }, /* ASL.L Dn,Dn */ -{ CPUFUNC(op_e1a8_0), 0, 57768 }, /* LSL.L Dn,Dn */ -{ CPUFUNC(op_e1b0_0), 0, 57776 }, /* ROXL.L Dn,Dn */ -{ CPUFUNC(op_e1b8_0), 0, 57784 }, /* ROL.L Dn,Dn */ -{ CPUFUNC(op_e1d0_0), 0, 57808 }, /* ASLW.W (An) */ -{ CPUFUNC(op_e1d8_0), 0, 57816 }, /* ASLW.W (An)+ */ -{ CPUFUNC(op_e1e0_0), 0, 57824 }, /* ASLW.W -(An) */ -{ CPUFUNC(op_e1e8_0), 0, 57832 }, /* ASLW.W (d16,An) */ -{ CPUFUNC(op_e1f0_3), 0, 57840 }, /* ASLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e1f8_0), 0, 57848 }, /* ASLW.W (xxx).W */ -{ CPUFUNC(op_e1f9_0), 0, 57849 }, /* ASLW.W (xxx).L */ -{ CPUFUNC(op_e2d0_0), 0, 58064 }, /* LSRW.W (An) */ -{ CPUFUNC(op_e2d8_0), 0, 58072 }, /* LSRW.W (An)+ */ -{ CPUFUNC(op_e2e0_0), 0, 58080 }, /* LSRW.W -(An) */ -{ CPUFUNC(op_e2e8_0), 0, 58088 }, /* LSRW.W (d16,An) */ -{ CPUFUNC(op_e2f0_3), 0, 58096 }, /* LSRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e2f8_0), 0, 58104 }, /* LSRW.W (xxx).W */ -{ CPUFUNC(op_e2f9_0), 0, 58105 }, /* LSRW.W (xxx).L */ -{ CPUFUNC(op_e3d0_0), 0, 58320 }, /* LSLW.W (An) */ -{ CPUFUNC(op_e3d8_0), 0, 58328 }, /* LSLW.W (An)+ */ -{ CPUFUNC(op_e3e0_0), 0, 58336 }, /* LSLW.W -(An) */ -{ CPUFUNC(op_e3e8_0), 0, 58344 }, /* LSLW.W (d16,An) */ -{ CPUFUNC(op_e3f0_3), 0, 58352 }, /* LSLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e3f8_0), 0, 58360 }, /* LSLW.W (xxx).W */ -{ CPUFUNC(op_e3f9_0), 0, 58361 }, /* LSLW.W (xxx).L */ -{ CPUFUNC(op_e4d0_0), 0, 58576 }, /* ROXRW.W (An) */ -{ CPUFUNC(op_e4d8_0), 0, 58584 }, /* ROXRW.W (An)+ */ -{ CPUFUNC(op_e4e0_0), 0, 58592 }, /* ROXRW.W -(An) */ -{ CPUFUNC(op_e4e8_0), 0, 58600 }, /* ROXRW.W (d16,An) */ -{ CPUFUNC(op_e4f0_3), 0, 58608 }, /* ROXRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e4f8_0), 0, 58616 }, /* ROXRW.W (xxx).W */ -{ CPUFUNC(op_e4f9_0), 0, 58617 }, /* ROXRW.W (xxx).L */ -{ CPUFUNC(op_e5d0_0), 0, 58832 }, /* ROXLW.W (An) */ -{ CPUFUNC(op_e5d8_0), 0, 58840 }, /* ROXLW.W (An)+ */ -{ CPUFUNC(op_e5e0_0), 0, 58848 }, /* ROXLW.W -(An) */ -{ CPUFUNC(op_e5e8_0), 0, 58856 }, /* ROXLW.W (d16,An) */ -{ CPUFUNC(op_e5f0_3), 0, 58864 }, /* ROXLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e5f8_0), 0, 58872 }, /* ROXLW.W (xxx).W */ -{ CPUFUNC(op_e5f9_0), 0, 58873 }, /* ROXLW.W (xxx).L */ -{ CPUFUNC(op_e6d0_0), 0, 59088 }, /* RORW.W (An) */ -{ CPUFUNC(op_e6d8_0), 0, 59096 }, /* RORW.W (An)+ */ -{ CPUFUNC(op_e6e0_0), 0, 59104 }, /* RORW.W -(An) */ -{ CPUFUNC(op_e6e8_0), 0, 59112 }, /* RORW.W (d16,An) */ -{ CPUFUNC(op_e6f0_3), 0, 59120 }, /* RORW.W (d8,An,Xn) */ -{ CPUFUNC(op_e6f8_0), 0, 59128 }, /* RORW.W (xxx).W */ -{ CPUFUNC(op_e6f9_0), 0, 59129 }, /* RORW.W (xxx).L */ -{ CPUFUNC(op_e7d0_0), 0, 59344 }, /* ROLW.W (An) */ -{ CPUFUNC(op_e7d8_0), 0, 59352 }, /* ROLW.W (An)+ */ -{ CPUFUNC(op_e7e0_0), 0, 59360 }, /* ROLW.W -(An) */ -{ CPUFUNC(op_e7e8_0), 0, 59368 }, /* ROLW.W (d16,An) */ -{ CPUFUNC(op_e7f0_3), 0, 59376 }, /* ROLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e7f8_0), 0, 59384 }, /* ROLW.W (xxx).W */ -{ CPUFUNC(op_e7f9_0), 0, 59385 }, /* ROLW.W (xxx).L */ -{ 0, 0, 0 }}; -struct cputbl CPUFUNC(op_smalltbl_4)[] = { -{ CPUFUNC(op_0_0), 0, 0 }, /* OR.B #.B,Dn */ -{ CPUFUNC(op_10_0), 0, 16 }, /* OR.B #.B,(An) */ -{ CPUFUNC(op_18_0), 0, 24 }, /* OR.B #.B,(An)+ */ -{ CPUFUNC(op_20_0), 0, 32 }, /* OR.B #.B,-(An) */ -{ CPUFUNC(op_28_0), 0, 40 }, /* OR.B #.B,(d16,An) */ -{ CPUFUNC(op_30_3), 0, 48 }, /* OR.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_38_0), 0, 56 }, /* OR.B #.B,(xxx).W */ -{ CPUFUNC(op_39_0), 0, 57 }, /* OR.B #.B,(xxx).L */ -{ CPUFUNC(op_3c_0), 0, 60 }, /* ORSR.B #.W */ -{ CPUFUNC(op_40_0), 0, 64 }, /* OR.W #.W,Dn */ -{ CPUFUNC(op_50_0), 0, 80 }, /* OR.W #.W,(An) */ -{ CPUFUNC(op_58_0), 0, 88 }, /* OR.W #.W,(An)+ */ -{ CPUFUNC(op_60_0), 0, 96 }, /* OR.W #.W,-(An) */ -{ CPUFUNC(op_68_0), 0, 104 }, /* OR.W #.W,(d16,An) */ -{ CPUFUNC(op_70_3), 0, 112 }, /* OR.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_78_0), 0, 120 }, /* OR.W #.W,(xxx).W */ -{ CPUFUNC(op_79_0), 0, 121 }, /* OR.W #.W,(xxx).L */ -{ CPUFUNC(op_7c_0), 0, 124 }, /* ORSR.W #.W */ -{ CPUFUNC(op_80_0), 0, 128 }, /* OR.L #.L,Dn */ -{ CPUFUNC(op_90_0), 0, 144 }, /* OR.L #.L,(An) */ -{ CPUFUNC(op_98_0), 0, 152 }, /* OR.L #.L,(An)+ */ -{ CPUFUNC(op_a0_0), 0, 160 }, /* OR.L #.L,-(An) */ -{ CPUFUNC(op_a8_0), 0, 168 }, /* OR.L #.L,(d16,An) */ -{ CPUFUNC(op_b0_3), 0, 176 }, /* OR.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_b8_0), 0, 184 }, /* OR.L #.L,(xxx).W */ -{ CPUFUNC(op_b9_0), 0, 185 }, /* OR.L #.L,(xxx).L */ -{ CPUFUNC(op_100_0), 0, 256 }, /* BTST.L Dn,Dn */ -{ CPUFUNC_FF(op_108_0), 0, 264 }, /* MVPMR.W (d16,An),Dn */ -{ CPUFUNC(op_110_0), 0, 272 }, /* BTST.B Dn,(An) */ -{ CPUFUNC(op_118_0), 0, 280 }, /* BTST.B Dn,(An)+ */ -{ CPUFUNC(op_120_0), 0, 288 }, /* BTST.B Dn,-(An) */ -{ CPUFUNC(op_128_0), 0, 296 }, /* BTST.B Dn,(d16,An) */ -{ CPUFUNC(op_130_3), 0, 304 }, /* BTST.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_138_0), 0, 312 }, /* BTST.B Dn,(xxx).W */ -{ CPUFUNC(op_139_0), 0, 313 }, /* BTST.B Dn,(xxx).L */ -{ CPUFUNC(op_13a_0), 0, 314 }, /* BTST.B Dn,(d16,PC) */ -{ CPUFUNC(op_13b_3), 0, 315 }, /* BTST.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_13c_0), 0, 316 }, /* BTST.B Dn,#.B */ -{ CPUFUNC(op_140_0), 0, 320 }, /* BCHG.L Dn,Dn */ -{ CPUFUNC_FF(op_148_0), 0, 328 }, /* MVPMR.L (d16,An),Dn */ -{ CPUFUNC(op_150_0), 0, 336 }, /* BCHG.B Dn,(An) */ -{ CPUFUNC(op_158_0), 0, 344 }, /* BCHG.B Dn,(An)+ */ -{ CPUFUNC(op_160_0), 0, 352 }, /* BCHG.B Dn,-(An) */ -{ CPUFUNC(op_168_0), 0, 360 }, /* BCHG.B Dn,(d16,An) */ -{ CPUFUNC(op_170_3), 0, 368 }, /* BCHG.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_178_0), 0, 376 }, /* BCHG.B Dn,(xxx).W */ -{ CPUFUNC(op_179_0), 0, 377 }, /* BCHG.B Dn,(xxx).L */ -{ CPUFUNC(op_17a_0), 0, 378 }, /* BCHG.B Dn,(d16,PC) */ -{ CPUFUNC(op_17b_3), 0, 379 }, /* BCHG.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_180_0), 0, 384 }, /* BCLR.L Dn,Dn */ -{ CPUFUNC_FF(op_188_0), 0, 392 }, /* MVPRM.W Dn,(d16,An) */ -{ CPUFUNC(op_190_0), 0, 400 }, /* BCLR.B Dn,(An) */ -{ CPUFUNC(op_198_0), 0, 408 }, /* BCLR.B Dn,(An)+ */ -{ CPUFUNC(op_1a0_0), 0, 416 }, /* BCLR.B Dn,-(An) */ -{ CPUFUNC(op_1a8_0), 0, 424 }, /* BCLR.B Dn,(d16,An) */ -{ CPUFUNC(op_1b0_3), 0, 432 }, /* BCLR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1b8_0), 0, 440 }, /* BCLR.B Dn,(xxx).W */ -{ CPUFUNC(op_1b9_0), 0, 441 }, /* BCLR.B Dn,(xxx).L */ -{ CPUFUNC(op_1ba_0), 0, 442 }, /* BCLR.B Dn,(d16,PC) */ -{ CPUFUNC(op_1bb_3), 0, 443 }, /* BCLR.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_1c0_0), 0, 448 }, /* BSET.L Dn,Dn */ -{ CPUFUNC_FF(op_1c8_0), 0, 456 }, /* MVPRM.L Dn,(d16,An) */ -{ CPUFUNC(op_1d0_0), 0, 464 }, /* BSET.B Dn,(An) */ -{ CPUFUNC(op_1d8_0), 0, 472 }, /* BSET.B Dn,(An)+ */ -{ CPUFUNC(op_1e0_0), 0, 480 }, /* BSET.B Dn,-(An) */ -{ CPUFUNC(op_1e8_0), 0, 488 }, /* BSET.B Dn,(d16,An) */ -{ CPUFUNC(op_1f0_3), 0, 496 }, /* BSET.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1f8_0), 0, 504 }, /* BSET.B Dn,(xxx).W */ -{ CPUFUNC(op_1f9_0), 0, 505 }, /* BSET.B Dn,(xxx).L */ -{ CPUFUNC(op_1fa_0), 0, 506 }, /* BSET.B Dn,(d16,PC) */ -{ CPUFUNC(op_1fb_3), 0, 507 }, /* BSET.B Dn,(d8,PC,Xn) */ -{ CPUFUNC(op_200_0), 0, 512 }, /* AND.B #.B,Dn */ -{ CPUFUNC(op_210_0), 0, 528 }, /* AND.B #.B,(An) */ -{ CPUFUNC(op_218_0), 0, 536 }, /* AND.B #.B,(An)+ */ -{ CPUFUNC(op_220_0), 0, 544 }, /* AND.B #.B,-(An) */ -{ CPUFUNC(op_228_0), 0, 552 }, /* AND.B #.B,(d16,An) */ -{ CPUFUNC(op_230_3), 0, 560 }, /* AND.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_238_0), 0, 568 }, /* AND.B #.B,(xxx).W */ -{ CPUFUNC(op_239_0), 0, 569 }, /* AND.B #.B,(xxx).L */ -{ CPUFUNC(op_23c_0), 0, 572 }, /* ANDSR.B #.W */ -{ CPUFUNC(op_240_0), 0, 576 }, /* AND.W #.W,Dn */ -{ CPUFUNC(op_250_0), 0, 592 }, /* AND.W #.W,(An) */ -{ CPUFUNC(op_258_0), 0, 600 }, /* AND.W #.W,(An)+ */ -{ CPUFUNC(op_260_0), 0, 608 }, /* AND.W #.W,-(An) */ -{ CPUFUNC(op_268_0), 0, 616 }, /* AND.W #.W,(d16,An) */ -{ CPUFUNC(op_270_3), 0, 624 }, /* AND.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_278_0), 0, 632 }, /* AND.W #.W,(xxx).W */ -{ CPUFUNC(op_279_0), 0, 633 }, /* AND.W #.W,(xxx).L */ -{ CPUFUNC(op_27c_0), 0, 636 }, /* ANDSR.W #.W */ -{ CPUFUNC(op_280_0), 0, 640 }, /* AND.L #.L,Dn */ -{ CPUFUNC(op_290_0), 0, 656 }, /* AND.L #.L,(An) */ -{ CPUFUNC(op_298_0), 0, 664 }, /* AND.L #.L,(An)+ */ -{ CPUFUNC(op_2a0_0), 0, 672 }, /* AND.L #.L,-(An) */ -{ CPUFUNC(op_2a8_0), 0, 680 }, /* AND.L #.L,(d16,An) */ -{ CPUFUNC(op_2b0_3), 0, 688 }, /* AND.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_2b8_0), 0, 696 }, /* AND.L #.L,(xxx).W */ -{ CPUFUNC(op_2b9_0), 0, 697 }, /* AND.L #.L,(xxx).L */ -{ CPUFUNC(op_400_0), 0, 1024 }, /* SUB.B #.B,Dn */ -{ CPUFUNC(op_410_0), 0, 1040 }, /* SUB.B #.B,(An) */ -{ CPUFUNC(op_418_0), 0, 1048 }, /* SUB.B #.B,(An)+ */ -{ CPUFUNC(op_420_0), 0, 1056 }, /* SUB.B #.B,-(An) */ -{ CPUFUNC(op_428_0), 0, 1064 }, /* SUB.B #.B,(d16,An) */ -{ CPUFUNC(op_430_3), 0, 1072 }, /* SUB.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_438_0), 0, 1080 }, /* SUB.B #.B,(xxx).W */ -{ CPUFUNC(op_439_0), 0, 1081 }, /* SUB.B #.B,(xxx).L */ -{ CPUFUNC(op_440_0), 0, 1088 }, /* SUB.W #.W,Dn */ -{ CPUFUNC(op_450_0), 0, 1104 }, /* SUB.W #.W,(An) */ -{ CPUFUNC(op_458_0), 0, 1112 }, /* SUB.W #.W,(An)+ */ -{ CPUFUNC(op_460_0), 0, 1120 }, /* SUB.W #.W,-(An) */ -{ CPUFUNC(op_468_0), 0, 1128 }, /* SUB.W #.W,(d16,An) */ -{ CPUFUNC(op_470_3), 0, 1136 }, /* SUB.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_478_0), 0, 1144 }, /* SUB.W #.W,(xxx).W */ -{ CPUFUNC(op_479_0), 0, 1145 }, /* SUB.W #.W,(xxx).L */ -{ CPUFUNC(op_480_0), 0, 1152 }, /* SUB.L #.L,Dn */ -{ CPUFUNC(op_490_0), 0, 1168 }, /* SUB.L #.L,(An) */ -{ CPUFUNC(op_498_0), 0, 1176 }, /* SUB.L #.L,(An)+ */ -{ CPUFUNC(op_4a0_0), 0, 1184 }, /* SUB.L #.L,-(An) */ -{ CPUFUNC(op_4a8_0), 0, 1192 }, /* SUB.L #.L,(d16,An) */ -{ CPUFUNC(op_4b0_3), 0, 1200 }, /* SUB.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_4b8_0), 0, 1208 }, /* SUB.L #.L,(xxx).W */ -{ CPUFUNC(op_4b9_0), 0, 1209 }, /* SUB.L #.L,(xxx).L */ -{ CPUFUNC(op_600_0), 0, 1536 }, /* ADD.B #.B,Dn */ -{ CPUFUNC(op_610_0), 0, 1552 }, /* ADD.B #.B,(An) */ -{ CPUFUNC(op_618_0), 0, 1560 }, /* ADD.B #.B,(An)+ */ -{ CPUFUNC(op_620_0), 0, 1568 }, /* ADD.B #.B,-(An) */ -{ CPUFUNC(op_628_0), 0, 1576 }, /* ADD.B #.B,(d16,An) */ -{ CPUFUNC(op_630_3), 0, 1584 }, /* ADD.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_638_0), 0, 1592 }, /* ADD.B #.B,(xxx).W */ -{ CPUFUNC(op_639_0), 0, 1593 }, /* ADD.B #.B,(xxx).L */ -{ CPUFUNC(op_640_0), 0, 1600 }, /* ADD.W #.W,Dn */ -{ CPUFUNC(op_650_0), 0, 1616 }, /* ADD.W #.W,(An) */ -{ CPUFUNC(op_658_0), 0, 1624 }, /* ADD.W #.W,(An)+ */ -{ CPUFUNC(op_660_0), 0, 1632 }, /* ADD.W #.W,-(An) */ -{ CPUFUNC(op_668_0), 0, 1640 }, /* ADD.W #.W,(d16,An) */ -{ CPUFUNC(op_670_3), 0, 1648 }, /* ADD.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_678_0), 0, 1656 }, /* ADD.W #.W,(xxx).W */ -{ CPUFUNC(op_679_0), 0, 1657 }, /* ADD.W #.W,(xxx).L */ -{ CPUFUNC(op_680_0), 0, 1664 }, /* ADD.L #.L,Dn */ -{ CPUFUNC(op_690_0), 0, 1680 }, /* ADD.L #.L,(An) */ -{ CPUFUNC(op_698_0), 0, 1688 }, /* ADD.L #.L,(An)+ */ -{ CPUFUNC(op_6a0_0), 0, 1696 }, /* ADD.L #.L,-(An) */ -{ CPUFUNC(op_6a8_0), 0, 1704 }, /* ADD.L #.L,(d16,An) */ -{ CPUFUNC(op_6b0_3), 0, 1712 }, /* ADD.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_6b8_0), 0, 1720 }, /* ADD.L #.L,(xxx).W */ -{ CPUFUNC(op_6b9_0), 0, 1721 }, /* ADD.L #.L,(xxx).L */ -{ CPUFUNC(op_800_0), 0, 2048 }, /* BTST.L #.W,Dn */ -{ CPUFUNC(op_810_0), 0, 2064 }, /* BTST.B #.W,(An) */ -{ CPUFUNC(op_818_0), 0, 2072 }, /* BTST.B #.W,(An)+ */ -{ CPUFUNC(op_820_0), 0, 2080 }, /* BTST.B #.W,-(An) */ -{ CPUFUNC(op_828_0), 0, 2088 }, /* BTST.B #.W,(d16,An) */ -{ CPUFUNC(op_830_3), 0, 2096 }, /* BTST.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_838_0), 0, 2104 }, /* BTST.B #.W,(xxx).W */ -{ CPUFUNC(op_839_0), 0, 2105 }, /* BTST.B #.W,(xxx).L */ -{ CPUFUNC(op_83a_0), 0, 2106 }, /* BTST.B #.W,(d16,PC) */ -{ CPUFUNC(op_83b_3), 0, 2107 }, /* BTST.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_83c_0), 0, 2108 }, /* BTST.B #.W,#.B */ -{ CPUFUNC(op_840_0), 0, 2112 }, /* BCHG.L #.W,Dn */ -{ CPUFUNC(op_850_0), 0, 2128 }, /* BCHG.B #.W,(An) */ -{ CPUFUNC(op_858_0), 0, 2136 }, /* BCHG.B #.W,(An)+ */ -{ CPUFUNC(op_860_0), 0, 2144 }, /* BCHG.B #.W,-(An) */ -{ CPUFUNC(op_868_0), 0, 2152 }, /* BCHG.B #.W,(d16,An) */ -{ CPUFUNC(op_870_3), 0, 2160 }, /* BCHG.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_878_0), 0, 2168 }, /* BCHG.B #.W,(xxx).W */ -{ CPUFUNC(op_879_0), 0, 2169 }, /* BCHG.B #.W,(xxx).L */ -{ CPUFUNC(op_87a_0), 0, 2170 }, /* BCHG.B #.W,(d16,PC) */ -{ CPUFUNC(op_87b_3), 0, 2171 }, /* BCHG.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_880_0), 0, 2176 }, /* BCLR.L #.W,Dn */ -{ CPUFUNC(op_890_0), 0, 2192 }, /* BCLR.B #.W,(An) */ -{ CPUFUNC(op_898_0), 0, 2200 }, /* BCLR.B #.W,(An)+ */ -{ CPUFUNC(op_8a0_0), 0, 2208 }, /* BCLR.B #.W,-(An) */ -{ CPUFUNC(op_8a8_0), 0, 2216 }, /* BCLR.B #.W,(d16,An) */ -{ CPUFUNC(op_8b0_3), 0, 2224 }, /* BCLR.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_8b8_0), 0, 2232 }, /* BCLR.B #.W,(xxx).W */ -{ CPUFUNC(op_8b9_0), 0, 2233 }, /* BCLR.B #.W,(xxx).L */ -{ CPUFUNC(op_8ba_0), 0, 2234 }, /* BCLR.B #.W,(d16,PC) */ -{ CPUFUNC(op_8bb_3), 0, 2235 }, /* BCLR.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_8c0_0), 0, 2240 }, /* BSET.L #.W,Dn */ -{ CPUFUNC(op_8d0_0), 0, 2256 }, /* BSET.B #.W,(An) */ -{ CPUFUNC(op_8d8_0), 0, 2264 }, /* BSET.B #.W,(An)+ */ -{ CPUFUNC(op_8e0_0), 0, 2272 }, /* BSET.B #.W,-(An) */ -{ CPUFUNC(op_8e8_0), 0, 2280 }, /* BSET.B #.W,(d16,An) */ -{ CPUFUNC(op_8f0_3), 0, 2288 }, /* BSET.B #.W,(d8,An,Xn) */ -{ CPUFUNC(op_8f8_0), 0, 2296 }, /* BSET.B #.W,(xxx).W */ -{ CPUFUNC(op_8f9_0), 0, 2297 }, /* BSET.B #.W,(xxx).L */ -{ CPUFUNC(op_8fa_0), 0, 2298 }, /* BSET.B #.W,(d16,PC) */ -{ CPUFUNC(op_8fb_3), 0, 2299 }, /* BSET.B #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_a00_0), 0, 2560 }, /* EOR.B #.B,Dn */ -{ CPUFUNC(op_a10_0), 0, 2576 }, /* EOR.B #.B,(An) */ -{ CPUFUNC(op_a18_0), 0, 2584 }, /* EOR.B #.B,(An)+ */ -{ CPUFUNC(op_a20_0), 0, 2592 }, /* EOR.B #.B,-(An) */ -{ CPUFUNC(op_a28_0), 0, 2600 }, /* EOR.B #.B,(d16,An) */ -{ CPUFUNC(op_a30_3), 0, 2608 }, /* EOR.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_a38_0), 0, 2616 }, /* EOR.B #.B,(xxx).W */ -{ CPUFUNC(op_a39_0), 0, 2617 }, /* EOR.B #.B,(xxx).L */ -{ CPUFUNC(op_a3c_0), 0, 2620 }, /* EORSR.B #.W */ -{ CPUFUNC(op_a40_0), 0, 2624 }, /* EOR.W #.W,Dn */ -{ CPUFUNC(op_a50_0), 0, 2640 }, /* EOR.W #.W,(An) */ -{ CPUFUNC(op_a58_0), 0, 2648 }, /* EOR.W #.W,(An)+ */ -{ CPUFUNC(op_a60_0), 0, 2656 }, /* EOR.W #.W,-(An) */ -{ CPUFUNC(op_a68_0), 0, 2664 }, /* EOR.W #.W,(d16,An) */ -{ CPUFUNC(op_a70_3), 0, 2672 }, /* EOR.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_a78_0), 0, 2680 }, /* EOR.W #.W,(xxx).W */ -{ CPUFUNC(op_a79_0), 0, 2681 }, /* EOR.W #.W,(xxx).L */ -{ CPUFUNC(op_a7c_0), 0, 2684 }, /* EORSR.W #.W */ -{ CPUFUNC(op_a80_0), 0, 2688 }, /* EOR.L #.L,Dn */ -{ CPUFUNC(op_a90_0), 0, 2704 }, /* EOR.L #.L,(An) */ -{ CPUFUNC(op_a98_0), 0, 2712 }, /* EOR.L #.L,(An)+ */ -{ CPUFUNC(op_aa0_0), 0, 2720 }, /* EOR.L #.L,-(An) */ -{ CPUFUNC(op_aa8_0), 0, 2728 }, /* EOR.L #.L,(d16,An) */ -{ CPUFUNC(op_ab0_3), 0, 2736 }, /* EOR.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_ab8_0), 0, 2744 }, /* EOR.L #.L,(xxx).W */ -{ CPUFUNC(op_ab9_0), 0, 2745 }, /* EOR.L #.L,(xxx).L */ -{ CPUFUNC(op_c00_0), 0, 3072 }, /* CMP.B #.B,Dn */ -{ CPUFUNC(op_c10_0), 0, 3088 }, /* CMP.B #.B,(An) */ -{ CPUFUNC(op_c18_0), 0, 3096 }, /* CMP.B #.B,(An)+ */ -{ CPUFUNC(op_c20_0), 0, 3104 }, /* CMP.B #.B,-(An) */ -{ CPUFUNC(op_c28_0), 0, 3112 }, /* CMP.B #.B,(d16,An) */ -{ CPUFUNC(op_c30_3), 0, 3120 }, /* CMP.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_c38_0), 0, 3128 }, /* CMP.B #.B,(xxx).W */ -{ CPUFUNC(op_c39_0), 0, 3129 }, /* CMP.B #.B,(xxx).L */ -{ CPUFUNC(op_c3a_0), 0, 3130 }, /* CMP.B #.B,(d16,PC) */ -{ CPUFUNC(op_c3b_3), 0, 3131 }, /* CMP.B #.B,(d8,PC,Xn) */ -{ CPUFUNC(op_c40_0), 0, 3136 }, /* CMP.W #.W,Dn */ -{ CPUFUNC(op_c50_0), 0, 3152 }, /* CMP.W #.W,(An) */ -{ CPUFUNC(op_c58_0), 0, 3160 }, /* CMP.W #.W,(An)+ */ -{ CPUFUNC(op_c60_0), 0, 3168 }, /* CMP.W #.W,-(An) */ -{ CPUFUNC(op_c68_0), 0, 3176 }, /* CMP.W #.W,(d16,An) */ -{ CPUFUNC(op_c70_3), 0, 3184 }, /* CMP.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_c78_0), 0, 3192 }, /* CMP.W #.W,(xxx).W */ -{ CPUFUNC(op_c79_0), 0, 3193 }, /* CMP.W #.W,(xxx).L */ -{ CPUFUNC(op_c7a_0), 0, 3194 }, /* CMP.W #.W,(d16,PC) */ -{ CPUFUNC(op_c7b_3), 0, 3195 }, /* CMP.W #.W,(d8,PC,Xn) */ -{ CPUFUNC(op_c80_0), 0, 3200 }, /* CMP.L #.L,Dn */ -{ CPUFUNC(op_c90_0), 0, 3216 }, /* CMP.L #.L,(An) */ -{ CPUFUNC(op_c98_0), 0, 3224 }, /* CMP.L #.L,(An)+ */ -{ CPUFUNC(op_ca0_0), 0, 3232 }, /* CMP.L #.L,-(An) */ -{ CPUFUNC(op_ca8_0), 0, 3240 }, /* CMP.L #.L,(d16,An) */ -{ CPUFUNC(op_cb0_3), 0, 3248 }, /* CMP.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_cb8_0), 0, 3256 }, /* CMP.L #.L,(xxx).W */ -{ CPUFUNC(op_cb9_0), 0, 3257 }, /* CMP.L #.L,(xxx).L */ -{ CPUFUNC(op_cba_0), 0, 3258 }, /* CMP.L #.L,(d16,PC) */ -{ CPUFUNC(op_cbb_3), 0, 3259 }, /* CMP.L #.L,(d8,PC,Xn) */ -{ CPUFUNC(op_1000_0), 0, 4096 }, /* MOVE.B Dn,Dn */ -{ CPUFUNC(op_1010_0), 0, 4112 }, /* MOVE.B (An),Dn */ -{ CPUFUNC(op_1018_0), 0, 4120 }, /* MOVE.B (An)+,Dn */ -{ CPUFUNC(op_1020_0), 0, 4128 }, /* MOVE.B -(An),Dn */ -{ CPUFUNC(op_1028_0), 0, 4136 }, /* MOVE.B (d16,An),Dn */ -{ CPUFUNC(op_1030_3), 0, 4144 }, /* MOVE.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_1038_0), 0, 4152 }, /* MOVE.B (xxx).W,Dn */ -{ CPUFUNC(op_1039_0), 0, 4153 }, /* MOVE.B (xxx).L,Dn */ -{ CPUFUNC(op_103a_0), 0, 4154 }, /* MOVE.B (d16,PC),Dn */ -{ CPUFUNC(op_103b_3), 0, 4155 }, /* MOVE.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_103c_0), 0, 4156 }, /* MOVE.B #.B,Dn */ -{ CPUFUNC(op_1080_0), 0, 4224 }, /* MOVE.B Dn,(An) */ -{ CPUFUNC(op_1090_0), 0, 4240 }, /* MOVE.B (An),(An) */ -{ CPUFUNC(op_1098_0), 0, 4248 }, /* MOVE.B (An)+,(An) */ -{ CPUFUNC(op_10a0_0), 0, 4256 }, /* MOVE.B -(An),(An) */ -{ CPUFUNC(op_10a8_0), 0, 4264 }, /* MOVE.B (d16,An),(An) */ -{ CPUFUNC(op_10b0_3), 0, 4272 }, /* MOVE.B (d8,An,Xn),(An) */ -{ CPUFUNC(op_10b8_0), 0, 4280 }, /* MOVE.B (xxx).W,(An) */ -{ CPUFUNC(op_10b9_0), 0, 4281 }, /* MOVE.B (xxx).L,(An) */ -{ CPUFUNC(op_10ba_0), 0, 4282 }, /* MOVE.B (d16,PC),(An) */ -{ CPUFUNC(op_10bb_3), 0, 4283 }, /* MOVE.B (d8,PC,Xn),(An) */ -{ CPUFUNC(op_10bc_0), 0, 4284 }, /* MOVE.B #.B,(An) */ -{ CPUFUNC(op_10c0_0), 0, 4288 }, /* MOVE.B Dn,(An)+ */ -{ CPUFUNC(op_10d0_0), 0, 4304 }, /* MOVE.B (An),(An)+ */ -{ CPUFUNC(op_10d8_0), 0, 4312 }, /* MOVE.B (An)+,(An)+ */ -{ CPUFUNC(op_10e0_0), 0, 4320 }, /* MOVE.B -(An),(An)+ */ -{ CPUFUNC(op_10e8_0), 0, 4328 }, /* MOVE.B (d16,An),(An)+ */ -{ CPUFUNC(op_10f0_3), 0, 4336 }, /* MOVE.B (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_10f8_0), 0, 4344 }, /* MOVE.B (xxx).W,(An)+ */ -{ CPUFUNC(op_10f9_0), 0, 4345 }, /* MOVE.B (xxx).L,(An)+ */ -{ CPUFUNC(op_10fa_0), 0, 4346 }, /* MOVE.B (d16,PC),(An)+ */ -{ CPUFUNC(op_10fb_3), 0, 4347 }, /* MOVE.B (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_10fc_0), 0, 4348 }, /* MOVE.B #.B,(An)+ */ -{ CPUFUNC(op_1100_0), 0, 4352 }, /* MOVE.B Dn,-(An) */ -{ CPUFUNC(op_1110_0), 0, 4368 }, /* MOVE.B (An),-(An) */ -{ CPUFUNC(op_1118_0), 0, 4376 }, /* MOVE.B (An)+,-(An) */ -{ CPUFUNC(op_1120_0), 0, 4384 }, /* MOVE.B -(An),-(An) */ -{ CPUFUNC(op_1128_0), 0, 4392 }, /* MOVE.B (d16,An),-(An) */ -{ CPUFUNC(op_1130_3), 0, 4400 }, /* MOVE.B (d8,An,Xn),-(An) */ -{ CPUFUNC(op_1138_0), 0, 4408 }, /* MOVE.B (xxx).W,-(An) */ -{ CPUFUNC(op_1139_0), 0, 4409 }, /* MOVE.B (xxx).L,-(An) */ -{ CPUFUNC(op_113a_0), 0, 4410 }, /* MOVE.B (d16,PC),-(An) */ -{ CPUFUNC(op_113b_3), 0, 4411 }, /* MOVE.B (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_113c_0), 0, 4412 }, /* MOVE.B #.B,-(An) */ -{ CPUFUNC(op_1140_0), 0, 4416 }, /* MOVE.B Dn,(d16,An) */ -{ CPUFUNC(op_1150_0), 0, 4432 }, /* MOVE.B (An),(d16,An) */ -{ CPUFUNC(op_1158_0), 0, 4440 }, /* MOVE.B (An)+,(d16,An) */ -{ CPUFUNC(op_1160_0), 0, 4448 }, /* MOVE.B -(An),(d16,An) */ -{ CPUFUNC(op_1168_0), 0, 4456 }, /* MOVE.B (d16,An),(d16,An) */ -{ CPUFUNC(op_1170_3), 0, 4464 }, /* MOVE.B (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_1178_0), 0, 4472 }, /* MOVE.B (xxx).W,(d16,An) */ -{ CPUFUNC(op_1179_0), 0, 4473 }, /* MOVE.B (xxx).L,(d16,An) */ -{ CPUFUNC(op_117a_0), 0, 4474 }, /* MOVE.B (d16,PC),(d16,An) */ -{ CPUFUNC(op_117b_3), 0, 4475 }, /* MOVE.B (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_117c_0), 0, 4476 }, /* MOVE.B #.B,(d16,An) */ -{ CPUFUNC(op_1180_3), 0, 4480 }, /* MOVE.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_1190_3), 0, 4496 }, /* MOVE.B (An),(d8,An,Xn) */ -{ CPUFUNC(op_1198_3), 0, 4504 }, /* MOVE.B (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_11a0_3), 0, 4512 }, /* MOVE.B -(An),(d8,An,Xn) */ -{ CPUFUNC(op_11a8_3), 0, 4520 }, /* MOVE.B (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_11b0_3), 0, 4528 }, /* MOVE.B (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_11b8_3), 0, 4536 }, /* MOVE.B (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_11b9_3), 0, 4537 }, /* MOVE.B (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_11ba_3), 0, 4538 }, /* MOVE.B (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_11bb_3), 0, 4539 }, /* MOVE.B (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_11bc_3), 0, 4540 }, /* MOVE.B #.B,(d8,An,Xn) */ -{ CPUFUNC(op_11c0_0), 0, 4544 }, /* MOVE.B Dn,(xxx).W */ -{ CPUFUNC(op_11d0_0), 0, 4560 }, /* MOVE.B (An),(xxx).W */ -{ CPUFUNC(op_11d8_0), 0, 4568 }, /* MOVE.B (An)+,(xxx).W */ -{ CPUFUNC(op_11e0_0), 0, 4576 }, /* MOVE.B -(An),(xxx).W */ -{ CPUFUNC(op_11e8_0), 0, 4584 }, /* MOVE.B (d16,An),(xxx).W */ -{ CPUFUNC(op_11f0_3), 0, 4592 }, /* MOVE.B (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_11f8_0), 0, 4600 }, /* MOVE.B (xxx).W,(xxx).W */ -{ CPUFUNC(op_11f9_0), 0, 4601 }, /* MOVE.B (xxx).L,(xxx).W */ -{ CPUFUNC(op_11fa_0), 0, 4602 }, /* MOVE.B (d16,PC),(xxx).W */ -{ CPUFUNC(op_11fb_3), 0, 4603 }, /* MOVE.B (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_11fc_0), 0, 4604 }, /* MOVE.B #.B,(xxx).W */ -{ CPUFUNC(op_13c0_0), 0, 5056 }, /* MOVE.B Dn,(xxx).L */ -{ CPUFUNC(op_13d0_0), 0, 5072 }, /* MOVE.B (An),(xxx).L */ -{ CPUFUNC(op_13d8_0), 0, 5080 }, /* MOVE.B (An)+,(xxx).L */ -{ CPUFUNC(op_13e0_0), 0, 5088 }, /* MOVE.B -(An),(xxx).L */ -{ CPUFUNC(op_13e8_0), 0, 5096 }, /* MOVE.B (d16,An),(xxx).L */ -{ CPUFUNC(op_13f0_3), 0, 5104 }, /* MOVE.B (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_13f8_0), 0, 5112 }, /* MOVE.B (xxx).W,(xxx).L */ -{ CPUFUNC(op_13f9_0), 0, 5113 }, /* MOVE.B (xxx).L,(xxx).L */ -{ CPUFUNC(op_13fa_0), 0, 5114 }, /* MOVE.B (d16,PC),(xxx).L */ -{ CPUFUNC(op_13fb_3), 0, 5115 }, /* MOVE.B (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_13fc_0), 0, 5116 }, /* MOVE.B #.B,(xxx).L */ -{ CPUFUNC(op_2000_0), 0, 8192 }, /* MOVE.L Dn,Dn */ -{ CPUFUNC(op_2008_0), 0, 8200 }, /* MOVE.L An,Dn */ -{ CPUFUNC(op_2010_0), 0, 8208 }, /* MOVE.L (An),Dn */ -{ CPUFUNC(op_2018_0), 0, 8216 }, /* MOVE.L (An)+,Dn */ -{ CPUFUNC(op_2020_0), 0, 8224 }, /* MOVE.L -(An),Dn */ -{ CPUFUNC(op_2028_0), 0, 8232 }, /* MOVE.L (d16,An),Dn */ -{ CPUFUNC(op_2030_3), 0, 8240 }, /* MOVE.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_2038_0), 0, 8248 }, /* MOVE.L (xxx).W,Dn */ -{ CPUFUNC(op_2039_0), 0, 8249 }, /* MOVE.L (xxx).L,Dn */ -{ CPUFUNC(op_203a_0), 0, 8250 }, /* MOVE.L (d16,PC),Dn */ -{ CPUFUNC(op_203b_3), 0, 8251 }, /* MOVE.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_203c_0), 0, 8252 }, /* MOVE.L #.L,Dn */ -{ CPUFUNC_FF(op_2040_0), 0, 8256 }, /* MOVEA.L Dn,An */ -{ CPUFUNC_FF(op_2048_0), 0, 8264 }, /* MOVEA.L An,An */ -{ CPUFUNC_FF(op_2050_0), 0, 8272 }, /* MOVEA.L (An),An */ -{ CPUFUNC_FF(op_2058_0), 0, 8280 }, /* MOVEA.L (An)+,An */ -{ CPUFUNC_FF(op_2060_0), 0, 8288 }, /* MOVEA.L -(An),An */ -{ CPUFUNC_FF(op_2068_0), 0, 8296 }, /* MOVEA.L (d16,An),An */ -{ CPUFUNC_FF(op_2070_3), 0, 8304 }, /* MOVEA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_2078_0), 0, 8312 }, /* MOVEA.L (xxx).W,An */ -{ CPUFUNC_FF(op_2079_0), 0, 8313 }, /* MOVEA.L (xxx).L,An */ -{ CPUFUNC_FF(op_207a_0), 0, 8314 }, /* MOVEA.L (d16,PC),An */ -{ CPUFUNC_FF(op_207b_3), 0, 8315 }, /* MOVEA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_207c_0), 0, 8316 }, /* MOVEA.L #.L,An */ -{ CPUFUNC(op_2080_0), 0, 8320 }, /* MOVE.L Dn,(An) */ -{ CPUFUNC(op_2088_0), 0, 8328 }, /* MOVE.L An,(An) */ -{ CPUFUNC(op_2090_0), 0, 8336 }, /* MOVE.L (An),(An) */ -{ CPUFUNC(op_2098_0), 0, 8344 }, /* MOVE.L (An)+,(An) */ -{ CPUFUNC(op_20a0_0), 0, 8352 }, /* MOVE.L -(An),(An) */ -{ CPUFUNC(op_20a8_0), 0, 8360 }, /* MOVE.L (d16,An),(An) */ -{ CPUFUNC(op_20b0_3), 0, 8368 }, /* MOVE.L (d8,An,Xn),(An) */ -{ CPUFUNC(op_20b8_0), 0, 8376 }, /* MOVE.L (xxx).W,(An) */ -{ CPUFUNC(op_20b9_0), 0, 8377 }, /* MOVE.L (xxx).L,(An) */ -{ CPUFUNC(op_20ba_0), 0, 8378 }, /* MOVE.L (d16,PC),(An) */ -{ CPUFUNC(op_20bb_3), 0, 8379 }, /* MOVE.L (d8,PC,Xn),(An) */ -{ CPUFUNC(op_20bc_0), 0, 8380 }, /* MOVE.L #.L,(An) */ -{ CPUFUNC(op_20c0_0), 0, 8384 }, /* MOVE.L Dn,(An)+ */ -{ CPUFUNC(op_20c8_0), 0, 8392 }, /* MOVE.L An,(An)+ */ -{ CPUFUNC(op_20d0_0), 0, 8400 }, /* MOVE.L (An),(An)+ */ -{ CPUFUNC(op_20d8_0), 0, 8408 }, /* MOVE.L (An)+,(An)+ */ -{ CPUFUNC(op_20e0_0), 0, 8416 }, /* MOVE.L -(An),(An)+ */ -{ CPUFUNC(op_20e8_0), 0, 8424 }, /* MOVE.L (d16,An),(An)+ */ -{ CPUFUNC(op_20f0_3), 0, 8432 }, /* MOVE.L (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_20f8_0), 0, 8440 }, /* MOVE.L (xxx).W,(An)+ */ -{ CPUFUNC(op_20f9_0), 0, 8441 }, /* MOVE.L (xxx).L,(An)+ */ -{ CPUFUNC(op_20fa_0), 0, 8442 }, /* MOVE.L (d16,PC),(An)+ */ -{ CPUFUNC(op_20fb_3), 0, 8443 }, /* MOVE.L (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_20fc_0), 0, 8444 }, /* MOVE.L #.L,(An)+ */ -{ CPUFUNC(op_2100_0), 0, 8448 }, /* MOVE.L Dn,-(An) */ -{ CPUFUNC(op_2108_0), 0, 8456 }, /* MOVE.L An,-(An) */ -{ CPUFUNC(op_2110_0), 0, 8464 }, /* MOVE.L (An),-(An) */ -{ CPUFUNC(op_2118_0), 0, 8472 }, /* MOVE.L (An)+,-(An) */ -{ CPUFUNC(op_2120_0), 0, 8480 }, /* MOVE.L -(An),-(An) */ -{ CPUFUNC(op_2128_0), 0, 8488 }, /* MOVE.L (d16,An),-(An) */ -{ CPUFUNC(op_2130_3), 0, 8496 }, /* MOVE.L (d8,An,Xn),-(An) */ -{ CPUFUNC(op_2138_0), 0, 8504 }, /* MOVE.L (xxx).W,-(An) */ -{ CPUFUNC(op_2139_0), 0, 8505 }, /* MOVE.L (xxx).L,-(An) */ -{ CPUFUNC(op_213a_0), 0, 8506 }, /* MOVE.L (d16,PC),-(An) */ -{ CPUFUNC(op_213b_3), 0, 8507 }, /* MOVE.L (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_213c_0), 0, 8508 }, /* MOVE.L #.L,-(An) */ -{ CPUFUNC(op_2140_0), 0, 8512 }, /* MOVE.L Dn,(d16,An) */ -{ CPUFUNC(op_2148_0), 0, 8520 }, /* MOVE.L An,(d16,An) */ -{ CPUFUNC(op_2150_0), 0, 8528 }, /* MOVE.L (An),(d16,An) */ -{ CPUFUNC(op_2158_0), 0, 8536 }, /* MOVE.L (An)+,(d16,An) */ -{ CPUFUNC(op_2160_0), 0, 8544 }, /* MOVE.L -(An),(d16,An) */ -{ CPUFUNC(op_2168_0), 0, 8552 }, /* MOVE.L (d16,An),(d16,An) */ -{ CPUFUNC(op_2170_3), 0, 8560 }, /* MOVE.L (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_2178_0), 0, 8568 }, /* MOVE.L (xxx).W,(d16,An) */ -{ CPUFUNC(op_2179_0), 0, 8569 }, /* MOVE.L (xxx).L,(d16,An) */ -{ CPUFUNC(op_217a_0), 0, 8570 }, /* MOVE.L (d16,PC),(d16,An) */ -{ CPUFUNC(op_217b_3), 0, 8571 }, /* MOVE.L (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_217c_0), 0, 8572 }, /* MOVE.L #.L,(d16,An) */ -{ CPUFUNC(op_2180_3), 0, 8576 }, /* MOVE.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_2188_3), 0, 8584 }, /* MOVE.L An,(d8,An,Xn) */ -{ CPUFUNC(op_2190_3), 0, 8592 }, /* MOVE.L (An),(d8,An,Xn) */ -{ CPUFUNC(op_2198_3), 0, 8600 }, /* MOVE.L (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_21a0_3), 0, 8608 }, /* MOVE.L -(An),(d8,An,Xn) */ -{ CPUFUNC(op_21a8_3), 0, 8616 }, /* MOVE.L (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_21b0_3), 0, 8624 }, /* MOVE.L (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_21b8_3), 0, 8632 }, /* MOVE.L (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_21b9_3), 0, 8633 }, /* MOVE.L (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_21ba_3), 0, 8634 }, /* MOVE.L (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_21bb_3), 0, 8635 }, /* MOVE.L (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_21bc_3), 0, 8636 }, /* MOVE.L #.L,(d8,An,Xn) */ -{ CPUFUNC(op_21c0_0), 0, 8640 }, /* MOVE.L Dn,(xxx).W */ -{ CPUFUNC(op_21c8_0), 0, 8648 }, /* MOVE.L An,(xxx).W */ -{ CPUFUNC(op_21d0_0), 0, 8656 }, /* MOVE.L (An),(xxx).W */ -{ CPUFUNC(op_21d8_0), 0, 8664 }, /* MOVE.L (An)+,(xxx).W */ -{ CPUFUNC(op_21e0_0), 0, 8672 }, /* MOVE.L -(An),(xxx).W */ -{ CPUFUNC(op_21e8_0), 0, 8680 }, /* MOVE.L (d16,An),(xxx).W */ -{ CPUFUNC(op_21f0_3), 0, 8688 }, /* MOVE.L (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_21f8_0), 0, 8696 }, /* MOVE.L (xxx).W,(xxx).W */ -{ CPUFUNC(op_21f9_0), 0, 8697 }, /* MOVE.L (xxx).L,(xxx).W */ -{ CPUFUNC(op_21fa_0), 0, 8698 }, /* MOVE.L (d16,PC),(xxx).W */ -{ CPUFUNC(op_21fb_3), 0, 8699 }, /* MOVE.L (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_21fc_0), 0, 8700 }, /* MOVE.L #.L,(xxx).W */ -{ CPUFUNC(op_23c0_0), 0, 9152 }, /* MOVE.L Dn,(xxx).L */ -{ CPUFUNC(op_23c8_0), 0, 9160 }, /* MOVE.L An,(xxx).L */ -{ CPUFUNC(op_23d0_0), 0, 9168 }, /* MOVE.L (An),(xxx).L */ -{ CPUFUNC(op_23d8_0), 0, 9176 }, /* MOVE.L (An)+,(xxx).L */ -{ CPUFUNC(op_23e0_0), 0, 9184 }, /* MOVE.L -(An),(xxx).L */ -{ CPUFUNC(op_23e8_0), 0, 9192 }, /* MOVE.L (d16,An),(xxx).L */ -{ CPUFUNC(op_23f0_3), 0, 9200 }, /* MOVE.L (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_23f8_0), 0, 9208 }, /* MOVE.L (xxx).W,(xxx).L */ -{ CPUFUNC(op_23f9_0), 0, 9209 }, /* MOVE.L (xxx).L,(xxx).L */ -{ CPUFUNC(op_23fa_0), 0, 9210 }, /* MOVE.L (d16,PC),(xxx).L */ -{ CPUFUNC(op_23fb_3), 0, 9211 }, /* MOVE.L (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_23fc_0), 0, 9212 }, /* MOVE.L #.L,(xxx).L */ -{ CPUFUNC(op_3000_0), 0, 12288 }, /* MOVE.W Dn,Dn */ -{ CPUFUNC(op_3008_0), 0, 12296 }, /* MOVE.W An,Dn */ -{ CPUFUNC(op_3010_0), 0, 12304 }, /* MOVE.W (An),Dn */ -{ CPUFUNC(op_3018_0), 0, 12312 }, /* MOVE.W (An)+,Dn */ -{ CPUFUNC(op_3020_0), 0, 12320 }, /* MOVE.W -(An),Dn */ -{ CPUFUNC(op_3028_0), 0, 12328 }, /* MOVE.W (d16,An),Dn */ -{ CPUFUNC(op_3030_3), 0, 12336 }, /* MOVE.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_3038_0), 0, 12344 }, /* MOVE.W (xxx).W,Dn */ -{ CPUFUNC(op_3039_0), 0, 12345 }, /* MOVE.W (xxx).L,Dn */ -{ CPUFUNC(op_303a_0), 0, 12346 }, /* MOVE.W (d16,PC),Dn */ -{ CPUFUNC(op_303b_3), 0, 12347 }, /* MOVE.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_303c_0), 0, 12348 }, /* MOVE.W #.W,Dn */ -{ CPUFUNC_FF(op_3040_0), 0, 12352 }, /* MOVEA.W Dn,An */ -{ CPUFUNC_FF(op_3048_0), 0, 12360 }, /* MOVEA.W An,An */ -{ CPUFUNC_FF(op_3050_0), 0, 12368 }, /* MOVEA.W (An),An */ -{ CPUFUNC_FF(op_3058_0), 0, 12376 }, /* MOVEA.W (An)+,An */ -{ CPUFUNC_FF(op_3060_0), 0, 12384 }, /* MOVEA.W -(An),An */ -{ CPUFUNC_FF(op_3068_0), 0, 12392 }, /* MOVEA.W (d16,An),An */ -{ CPUFUNC_FF(op_3070_3), 0, 12400 }, /* MOVEA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_3078_0), 0, 12408 }, /* MOVEA.W (xxx).W,An */ -{ CPUFUNC_FF(op_3079_0), 0, 12409 }, /* MOVEA.W (xxx).L,An */ -{ CPUFUNC_FF(op_307a_0), 0, 12410 }, /* MOVEA.W (d16,PC),An */ -{ CPUFUNC_FF(op_307b_3), 0, 12411 }, /* MOVEA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_307c_0), 0, 12412 }, /* MOVEA.W #.W,An */ -{ CPUFUNC(op_3080_0), 0, 12416 }, /* MOVE.W Dn,(An) */ -{ CPUFUNC(op_3088_0), 0, 12424 }, /* MOVE.W An,(An) */ -{ CPUFUNC(op_3090_0), 0, 12432 }, /* MOVE.W (An),(An) */ -{ CPUFUNC(op_3098_0), 0, 12440 }, /* MOVE.W (An)+,(An) */ -{ CPUFUNC(op_30a0_0), 0, 12448 }, /* MOVE.W -(An),(An) */ -{ CPUFUNC(op_30a8_0), 0, 12456 }, /* MOVE.W (d16,An),(An) */ -{ CPUFUNC(op_30b0_3), 0, 12464 }, /* MOVE.W (d8,An,Xn),(An) */ -{ CPUFUNC(op_30b8_0), 0, 12472 }, /* MOVE.W (xxx).W,(An) */ -{ CPUFUNC(op_30b9_0), 0, 12473 }, /* MOVE.W (xxx).L,(An) */ -{ CPUFUNC(op_30ba_0), 0, 12474 }, /* MOVE.W (d16,PC),(An) */ -{ CPUFUNC(op_30bb_3), 0, 12475 }, /* MOVE.W (d8,PC,Xn),(An) */ -{ CPUFUNC(op_30bc_0), 0, 12476 }, /* MOVE.W #.W,(An) */ -{ CPUFUNC(op_30c0_0), 0, 12480 }, /* MOVE.W Dn,(An)+ */ -{ CPUFUNC(op_30c8_0), 0, 12488 }, /* MOVE.W An,(An)+ */ -{ CPUFUNC(op_30d0_0), 0, 12496 }, /* MOVE.W (An),(An)+ */ -{ CPUFUNC(op_30d8_0), 0, 12504 }, /* MOVE.W (An)+,(An)+ */ -{ CPUFUNC(op_30e0_0), 0, 12512 }, /* MOVE.W -(An),(An)+ */ -{ CPUFUNC(op_30e8_0), 0, 12520 }, /* MOVE.W (d16,An),(An)+ */ -{ CPUFUNC(op_30f0_3), 0, 12528 }, /* MOVE.W (d8,An,Xn),(An)+ */ -{ CPUFUNC(op_30f8_0), 0, 12536 }, /* MOVE.W (xxx).W,(An)+ */ -{ CPUFUNC(op_30f9_0), 0, 12537 }, /* MOVE.W (xxx).L,(An)+ */ -{ CPUFUNC(op_30fa_0), 0, 12538 }, /* MOVE.W (d16,PC),(An)+ */ -{ CPUFUNC(op_30fb_3), 0, 12539 }, /* MOVE.W (d8,PC,Xn),(An)+ */ -{ CPUFUNC(op_30fc_0), 0, 12540 }, /* MOVE.W #.W,(An)+ */ -{ CPUFUNC(op_3100_0), 0, 12544 }, /* MOVE.W Dn,-(An) */ -{ CPUFUNC(op_3108_0), 0, 12552 }, /* MOVE.W An,-(An) */ -{ CPUFUNC(op_3110_0), 0, 12560 }, /* MOVE.W (An),-(An) */ -{ CPUFUNC(op_3118_0), 0, 12568 }, /* MOVE.W (An)+,-(An) */ -{ CPUFUNC(op_3120_0), 0, 12576 }, /* MOVE.W -(An),-(An) */ -{ CPUFUNC(op_3128_0), 0, 12584 }, /* MOVE.W (d16,An),-(An) */ -{ CPUFUNC(op_3130_3), 0, 12592 }, /* MOVE.W (d8,An,Xn),-(An) */ -{ CPUFUNC(op_3138_0), 0, 12600 }, /* MOVE.W (xxx).W,-(An) */ -{ CPUFUNC(op_3139_0), 0, 12601 }, /* MOVE.W (xxx).L,-(An) */ -{ CPUFUNC(op_313a_0), 0, 12602 }, /* MOVE.W (d16,PC),-(An) */ -{ CPUFUNC(op_313b_3), 0, 12603 }, /* MOVE.W (d8,PC,Xn),-(An) */ -{ CPUFUNC(op_313c_0), 0, 12604 }, /* MOVE.W #.W,-(An) */ -{ CPUFUNC(op_3140_0), 0, 12608 }, /* MOVE.W Dn,(d16,An) */ -{ CPUFUNC(op_3148_0), 0, 12616 }, /* MOVE.W An,(d16,An) */ -{ CPUFUNC(op_3150_0), 0, 12624 }, /* MOVE.W (An),(d16,An) */ -{ CPUFUNC(op_3158_0), 0, 12632 }, /* MOVE.W (An)+,(d16,An) */ -{ CPUFUNC(op_3160_0), 0, 12640 }, /* MOVE.W -(An),(d16,An) */ -{ CPUFUNC(op_3168_0), 0, 12648 }, /* MOVE.W (d16,An),(d16,An) */ -{ CPUFUNC(op_3170_3), 0, 12656 }, /* MOVE.W (d8,An,Xn),(d16,An) */ -{ CPUFUNC(op_3178_0), 0, 12664 }, /* MOVE.W (xxx).W,(d16,An) */ -{ CPUFUNC(op_3179_0), 0, 12665 }, /* MOVE.W (xxx).L,(d16,An) */ -{ CPUFUNC(op_317a_0), 0, 12666 }, /* MOVE.W (d16,PC),(d16,An) */ -{ CPUFUNC(op_317b_3), 0, 12667 }, /* MOVE.W (d8,PC,Xn),(d16,An) */ -{ CPUFUNC(op_317c_0), 0, 12668 }, /* MOVE.W #.W,(d16,An) */ -{ CPUFUNC(op_3180_3), 0, 12672 }, /* MOVE.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_3188_3), 0, 12680 }, /* MOVE.W An,(d8,An,Xn) */ -{ CPUFUNC(op_3190_3), 0, 12688 }, /* MOVE.W (An),(d8,An,Xn) */ -{ CPUFUNC(op_3198_3), 0, 12696 }, /* MOVE.W (An)+,(d8,An,Xn) */ -{ CPUFUNC(op_31a0_3), 0, 12704 }, /* MOVE.W -(An),(d8,An,Xn) */ -{ CPUFUNC(op_31a8_3), 0, 12712 }, /* MOVE.W (d16,An),(d8,An,Xn) */ -{ CPUFUNC(op_31b0_3), 0, 12720 }, /* MOVE.W (d8,An,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_31b8_3), 0, 12728 }, /* MOVE.W (xxx).W,(d8,An,Xn) */ -{ CPUFUNC(op_31b9_3), 0, 12729 }, /* MOVE.W (xxx).L,(d8,An,Xn) */ -{ CPUFUNC(op_31ba_3), 0, 12730 }, /* MOVE.W (d16,PC),(d8,An,Xn) */ -{ CPUFUNC(op_31bb_3), 0, 12731 }, /* MOVE.W (d8,PC,Xn),(d8,An,Xn) */ -{ CPUFUNC(op_31bc_3), 0, 12732 }, /* MOVE.W #.W,(d8,An,Xn) */ -{ CPUFUNC(op_31c0_0), 0, 12736 }, /* MOVE.W Dn,(xxx).W */ -{ CPUFUNC(op_31c8_0), 0, 12744 }, /* MOVE.W An,(xxx).W */ -{ CPUFUNC(op_31d0_0), 0, 12752 }, /* MOVE.W (An),(xxx).W */ -{ CPUFUNC(op_31d8_0), 0, 12760 }, /* MOVE.W (An)+,(xxx).W */ -{ CPUFUNC(op_31e0_0), 0, 12768 }, /* MOVE.W -(An),(xxx).W */ -{ CPUFUNC(op_31e8_0), 0, 12776 }, /* MOVE.W (d16,An),(xxx).W */ -{ CPUFUNC(op_31f0_3), 0, 12784 }, /* MOVE.W (d8,An,Xn),(xxx).W */ -{ CPUFUNC(op_31f8_0), 0, 12792 }, /* MOVE.W (xxx).W,(xxx).W */ -{ CPUFUNC(op_31f9_0), 0, 12793 }, /* MOVE.W (xxx).L,(xxx).W */ -{ CPUFUNC(op_31fa_0), 0, 12794 }, /* MOVE.W (d16,PC),(xxx).W */ -{ CPUFUNC(op_31fb_3), 0, 12795 }, /* MOVE.W (d8,PC,Xn),(xxx).W */ -{ CPUFUNC(op_31fc_0), 0, 12796 }, /* MOVE.W #.W,(xxx).W */ -{ CPUFUNC(op_33c0_0), 0, 13248 }, /* MOVE.W Dn,(xxx).L */ -{ CPUFUNC(op_33c8_0), 0, 13256 }, /* MOVE.W An,(xxx).L */ -{ CPUFUNC(op_33d0_0), 0, 13264 }, /* MOVE.W (An),(xxx).L */ -{ CPUFUNC(op_33d8_0), 0, 13272 }, /* MOVE.W (An)+,(xxx).L */ -{ CPUFUNC(op_33e0_0), 0, 13280 }, /* MOVE.W -(An),(xxx).L */ -{ CPUFUNC(op_33e8_0), 0, 13288 }, /* MOVE.W (d16,An),(xxx).L */ -{ CPUFUNC(op_33f0_3), 0, 13296 }, /* MOVE.W (d8,An,Xn),(xxx).L */ -{ CPUFUNC(op_33f8_0), 0, 13304 }, /* MOVE.W (xxx).W,(xxx).L */ -{ CPUFUNC(op_33f9_0), 0, 13305 }, /* MOVE.W (xxx).L,(xxx).L */ -{ CPUFUNC(op_33fa_0), 0, 13306 }, /* MOVE.W (d16,PC),(xxx).L */ -{ CPUFUNC(op_33fb_3), 0, 13307 }, /* MOVE.W (d8,PC,Xn),(xxx).L */ -{ CPUFUNC(op_33fc_0), 0, 13308 }, /* MOVE.W #.W,(xxx).L */ -{ CPUFUNC(op_4000_0), 0, 16384 }, /* NEGX.B Dn */ -{ CPUFUNC(op_4010_0), 0, 16400 }, /* NEGX.B (An) */ -{ CPUFUNC(op_4018_0), 0, 16408 }, /* NEGX.B (An)+ */ -{ CPUFUNC(op_4020_0), 0, 16416 }, /* NEGX.B -(An) */ -{ CPUFUNC(op_4028_0), 0, 16424 }, /* NEGX.B (d16,An) */ -{ CPUFUNC(op_4030_3), 0, 16432 }, /* NEGX.B (d8,An,Xn) */ -{ CPUFUNC(op_4038_0), 0, 16440 }, /* NEGX.B (xxx).W */ -{ CPUFUNC(op_4039_0), 0, 16441 }, /* NEGX.B (xxx).L */ -{ CPUFUNC(op_4040_0), 0, 16448 }, /* NEGX.W Dn */ -{ CPUFUNC(op_4050_0), 0, 16464 }, /* NEGX.W (An) */ -{ CPUFUNC(op_4058_0), 0, 16472 }, /* NEGX.W (An)+ */ -{ CPUFUNC(op_4060_0), 0, 16480 }, /* NEGX.W -(An) */ -{ CPUFUNC(op_4068_0), 0, 16488 }, /* NEGX.W (d16,An) */ -{ CPUFUNC(op_4070_3), 0, 16496 }, /* NEGX.W (d8,An,Xn) */ -{ CPUFUNC(op_4078_0), 0, 16504 }, /* NEGX.W (xxx).W */ -{ CPUFUNC(op_4079_0), 0, 16505 }, /* NEGX.W (xxx).L */ -{ CPUFUNC(op_4080_0), 0, 16512 }, /* NEGX.L Dn */ -{ CPUFUNC(op_4090_0), 0, 16528 }, /* NEGX.L (An) */ -{ CPUFUNC(op_4098_0), 0, 16536 }, /* NEGX.L (An)+ */ -{ CPUFUNC(op_40a0_0), 0, 16544 }, /* NEGX.L -(An) */ -{ CPUFUNC(op_40a8_0), 0, 16552 }, /* NEGX.L (d16,An) */ -{ CPUFUNC(op_40b0_3), 0, 16560 }, /* NEGX.L (d8,An,Xn) */ -{ CPUFUNC(op_40b8_0), 0, 16568 }, /* NEGX.L (xxx).W */ -{ CPUFUNC(op_40b9_0), 0, 16569 }, /* NEGX.L (xxx).L */ -{ CPUFUNC_FF(op_40c0_4), 0, 16576 }, /* MVSR2.W Dn */ -{ CPUFUNC_FF(op_40d0_4), 0, 16592 }, /* MVSR2.W (An) */ -{ CPUFUNC_FF(op_40d8_4), 0, 16600 }, /* MVSR2.W (An)+ */ -{ CPUFUNC_FF(op_40e0_4), 0, 16608 }, /* MVSR2.W -(An) */ -{ CPUFUNC_FF(op_40e8_4), 0, 16616 }, /* MVSR2.W (d16,An) */ -{ CPUFUNC_FF(op_40f0_4), 0, 16624 }, /* MVSR2.W (d8,An,Xn) */ -{ CPUFUNC_FF(op_40f8_4), 0, 16632 }, /* MVSR2.W (xxx).W */ -{ CPUFUNC_FF(op_40f9_4), 0, 16633 }, /* MVSR2.W (xxx).L */ -{ CPUFUNC(op_4100_0), 0, 16640 }, /* CHK.L Dn,Dn */ -{ CPUFUNC(op_4110_0), 0, 16656 }, /* CHK.L (An),Dn */ -{ CPUFUNC(op_4118_0), 0, 16664 }, /* CHK.L (An)+,Dn */ -{ CPUFUNC(op_4120_0), 0, 16672 }, /* CHK.L -(An),Dn */ -{ CPUFUNC(op_4128_0), 0, 16680 }, /* CHK.L (d16,An),Dn */ -{ CPUFUNC(op_4130_3), 0, 16688 }, /* CHK.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_4138_0), 0, 16696 }, /* CHK.L (xxx).W,Dn */ -{ CPUFUNC(op_4139_0), 0, 16697 }, /* CHK.L (xxx).L,Dn */ -{ CPUFUNC(op_413a_0), 0, 16698 }, /* CHK.L (d16,PC),Dn */ -{ CPUFUNC(op_413b_3), 0, 16699 }, /* CHK.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_413c_0), 0, 16700 }, /* CHK.L #.L,Dn */ -{ CPUFUNC(op_4180_0), 0, 16768 }, /* CHK.W Dn,Dn */ -{ CPUFUNC(op_4190_0), 0, 16784 }, /* CHK.W (An),Dn */ -{ CPUFUNC(op_4198_0), 0, 16792 }, /* CHK.W (An)+,Dn */ -{ CPUFUNC(op_41a0_0), 0, 16800 }, /* CHK.W -(An),Dn */ -{ CPUFUNC(op_41a8_0), 0, 16808 }, /* CHK.W (d16,An),Dn */ -{ CPUFUNC(op_41b0_3), 0, 16816 }, /* CHK.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_41b8_0), 0, 16824 }, /* CHK.W (xxx).W,Dn */ -{ CPUFUNC(op_41b9_0), 0, 16825 }, /* CHK.W (xxx).L,Dn */ -{ CPUFUNC(op_41ba_0), 0, 16826 }, /* CHK.W (d16,PC),Dn */ -{ CPUFUNC(op_41bb_3), 0, 16827 }, /* CHK.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_41bc_0), 0, 16828 }, /* CHK.W #.W,Dn */ -{ CPUFUNC_FF(op_41d0_0), 0, 16848 }, /* LEA.L (An),An */ -{ CPUFUNC_FF(op_41e8_0), 0, 16872 }, /* LEA.L (d16,An),An */ -{ CPUFUNC_FF(op_41f0_3), 0, 16880 }, /* LEA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_41f8_0), 0, 16888 }, /* LEA.L (xxx).W,An */ -{ CPUFUNC_FF(op_41f9_0), 0, 16889 }, /* LEA.L (xxx).L,An */ -{ CPUFUNC_FF(op_41fa_0), 0, 16890 }, /* LEA.L (d16,PC),An */ -{ CPUFUNC_FF(op_41fb_3), 0, 16891 }, /* LEA.L (d8,PC,Xn),An */ -{ CPUFUNC(op_4200_0), 0, 16896 }, /* CLR.B Dn */ -{ CPUFUNC(op_4210_0), 0, 16912 }, /* CLR.B (An) */ -{ CPUFUNC(op_4218_0), 0, 16920 }, /* CLR.B (An)+ */ -{ CPUFUNC(op_4220_0), 0, 16928 }, /* CLR.B -(An) */ -{ CPUFUNC(op_4228_0), 0, 16936 }, /* CLR.B (d16,An) */ -{ CPUFUNC(op_4230_3), 0, 16944 }, /* CLR.B (d8,An,Xn) */ -{ CPUFUNC(op_4238_0), 0, 16952 }, /* CLR.B (xxx).W */ -{ CPUFUNC(op_4239_0), 0, 16953 }, /* CLR.B (xxx).L */ -{ CPUFUNC(op_4240_0), 0, 16960 }, /* CLR.W Dn */ -{ CPUFUNC(op_4250_0), 0, 16976 }, /* CLR.W (An) */ -{ CPUFUNC(op_4258_0), 0, 16984 }, /* CLR.W (An)+ */ -{ CPUFUNC(op_4260_0), 0, 16992 }, /* CLR.W -(An) */ -{ CPUFUNC(op_4268_0), 0, 17000 }, /* CLR.W (d16,An) */ -{ CPUFUNC(op_4270_3), 0, 17008 }, /* CLR.W (d8,An,Xn) */ -{ CPUFUNC(op_4278_0), 0, 17016 }, /* CLR.W (xxx).W */ -{ CPUFUNC(op_4279_0), 0, 17017 }, /* CLR.W (xxx).L */ -{ CPUFUNC(op_4280_0), 0, 17024 }, /* CLR.L Dn */ -{ CPUFUNC(op_4290_0), 0, 17040 }, /* CLR.L (An) */ -{ CPUFUNC(op_4298_0), 0, 17048 }, /* CLR.L (An)+ */ -{ CPUFUNC(op_42a0_0), 0, 17056 }, /* CLR.L -(An) */ -{ CPUFUNC(op_42a8_0), 0, 17064 }, /* CLR.L (d16,An) */ -{ CPUFUNC(op_42b0_3), 0, 17072 }, /* CLR.L (d8,An,Xn) */ -{ CPUFUNC(op_42b8_0), 0, 17080 }, /* CLR.L (xxx).W */ -{ CPUFUNC(op_42b9_0), 0, 17081 }, /* CLR.L (xxx).L */ -{ CPUFUNC(op_4400_0), 0, 17408 }, /* NEG.B Dn */ -{ CPUFUNC(op_4410_0), 0, 17424 }, /* NEG.B (An) */ -{ CPUFUNC(op_4418_0), 0, 17432 }, /* NEG.B (An)+ */ -{ CPUFUNC(op_4420_0), 0, 17440 }, /* NEG.B -(An) */ -{ CPUFUNC(op_4428_0), 0, 17448 }, /* NEG.B (d16,An) */ -{ CPUFUNC(op_4430_3), 0, 17456 }, /* NEG.B (d8,An,Xn) */ -{ CPUFUNC(op_4438_0), 0, 17464 }, /* NEG.B (xxx).W */ -{ CPUFUNC(op_4439_0), 0, 17465 }, /* NEG.B (xxx).L */ -{ CPUFUNC(op_4440_0), 0, 17472 }, /* NEG.W Dn */ -{ CPUFUNC(op_4450_0), 0, 17488 }, /* NEG.W (An) */ -{ CPUFUNC(op_4458_0), 0, 17496 }, /* NEG.W (An)+ */ -{ CPUFUNC(op_4460_0), 0, 17504 }, /* NEG.W -(An) */ -{ CPUFUNC(op_4468_0), 0, 17512 }, /* NEG.W (d16,An) */ -{ CPUFUNC(op_4470_3), 0, 17520 }, /* NEG.W (d8,An,Xn) */ -{ CPUFUNC(op_4478_0), 0, 17528 }, /* NEG.W (xxx).W */ -{ CPUFUNC(op_4479_0), 0, 17529 }, /* NEG.W (xxx).L */ -{ CPUFUNC(op_4480_0), 0, 17536 }, /* NEG.L Dn */ -{ CPUFUNC(op_4490_0), 0, 17552 }, /* NEG.L (An) */ -{ CPUFUNC(op_4498_0), 0, 17560 }, /* NEG.L (An)+ */ -{ CPUFUNC(op_44a0_0), 0, 17568 }, /* NEG.L -(An) */ -{ CPUFUNC(op_44a8_0), 0, 17576 }, /* NEG.L (d16,An) */ -{ CPUFUNC(op_44b0_3), 0, 17584 }, /* NEG.L (d8,An,Xn) */ -{ CPUFUNC(op_44b8_0), 0, 17592 }, /* NEG.L (xxx).W */ -{ CPUFUNC(op_44b9_0), 0, 17593 }, /* NEG.L (xxx).L */ -{ CPUFUNC(op_44c0_0), 0, 17600 }, /* MV2SR.B Dn */ -{ CPUFUNC(op_44d0_0), 0, 17616 }, /* MV2SR.B (An) */ -{ CPUFUNC(op_44d8_0), 0, 17624 }, /* MV2SR.B (An)+ */ -{ CPUFUNC(op_44e0_0), 0, 17632 }, /* MV2SR.B -(An) */ -{ CPUFUNC(op_44e8_0), 0, 17640 }, /* MV2SR.B (d16,An) */ -{ CPUFUNC(op_44f0_3), 0, 17648 }, /* MV2SR.B (d8,An,Xn) */ -{ CPUFUNC(op_44f8_0), 0, 17656 }, /* MV2SR.B (xxx).W */ -{ CPUFUNC(op_44f9_0), 0, 17657 }, /* MV2SR.B (xxx).L */ -{ CPUFUNC(op_44fa_0), 0, 17658 }, /* MV2SR.B (d16,PC) */ -{ CPUFUNC(op_44fb_3), 0, 17659 }, /* MV2SR.B (d8,PC,Xn) */ -{ CPUFUNC(op_44fc_0), 0, 17660 }, /* MV2SR.B #.B */ -{ CPUFUNC(op_4600_0), 0, 17920 }, /* NOT.B Dn */ -{ CPUFUNC(op_4610_0), 0, 17936 }, /* NOT.B (An) */ -{ CPUFUNC(op_4618_0), 0, 17944 }, /* NOT.B (An)+ */ -{ CPUFUNC(op_4620_0), 0, 17952 }, /* NOT.B -(An) */ -{ CPUFUNC(op_4628_0), 0, 17960 }, /* NOT.B (d16,An) */ -{ CPUFUNC(op_4630_3), 0, 17968 }, /* NOT.B (d8,An,Xn) */ -{ CPUFUNC(op_4638_0), 0, 17976 }, /* NOT.B (xxx).W */ -{ CPUFUNC(op_4639_0), 0, 17977 }, /* NOT.B (xxx).L */ -{ CPUFUNC(op_4640_0), 0, 17984 }, /* NOT.W Dn */ -{ CPUFUNC(op_4650_0), 0, 18000 }, /* NOT.W (An) */ -{ CPUFUNC(op_4658_0), 0, 18008 }, /* NOT.W (An)+ */ -{ CPUFUNC(op_4660_0), 0, 18016 }, /* NOT.W -(An) */ -{ CPUFUNC(op_4668_0), 0, 18024 }, /* NOT.W (d16,An) */ -{ CPUFUNC(op_4670_3), 0, 18032 }, /* NOT.W (d8,An,Xn) */ -{ CPUFUNC(op_4678_0), 0, 18040 }, /* NOT.W (xxx).W */ -{ CPUFUNC(op_4679_0), 0, 18041 }, /* NOT.W (xxx).L */ -{ CPUFUNC(op_4680_0), 0, 18048 }, /* NOT.L Dn */ -{ CPUFUNC(op_4690_0), 0, 18064 }, /* NOT.L (An) */ -{ CPUFUNC(op_4698_0), 0, 18072 }, /* NOT.L (An)+ */ -{ CPUFUNC(op_46a0_0), 0, 18080 }, /* NOT.L -(An) */ -{ CPUFUNC(op_46a8_0), 0, 18088 }, /* NOT.L (d16,An) */ -{ CPUFUNC(op_46b0_3), 0, 18096 }, /* NOT.L (d8,An,Xn) */ -{ CPUFUNC(op_46b8_0), 0, 18104 }, /* NOT.L (xxx).W */ -{ CPUFUNC(op_46b9_0), 0, 18105 }, /* NOT.L (xxx).L */ -{ CPUFUNC(op_46c0_0), 0, 18112 }, /* MV2SR.W Dn */ -{ CPUFUNC(op_46d0_0), 0, 18128 }, /* MV2SR.W (An) */ -{ CPUFUNC(op_46d8_0), 0, 18136 }, /* MV2SR.W (An)+ */ -{ CPUFUNC(op_46e0_0), 0, 18144 }, /* MV2SR.W -(An) */ -{ CPUFUNC(op_46e8_0), 0, 18152 }, /* MV2SR.W (d16,An) */ -{ CPUFUNC(op_46f0_3), 0, 18160 }, /* MV2SR.W (d8,An,Xn) */ -{ CPUFUNC(op_46f8_0), 0, 18168 }, /* MV2SR.W (xxx).W */ -{ CPUFUNC(op_46f9_0), 0, 18169 }, /* MV2SR.W (xxx).L */ -{ CPUFUNC(op_46fa_0), 0, 18170 }, /* MV2SR.W (d16,PC) */ -{ CPUFUNC(op_46fb_3), 0, 18171 }, /* MV2SR.W (d8,PC,Xn) */ -{ CPUFUNC(op_46fc_0), 0, 18172 }, /* MV2SR.W #.W */ -{ CPUFUNC(op_4800_1), 0, 18432 }, /* NBCD.B Dn */ -{ CPUFUNC(op_4810_1), 0, 18448 }, /* NBCD.B (An) */ -{ CPUFUNC(op_4818_1), 0, 18456 }, /* NBCD.B (An)+ */ -{ CPUFUNC(op_4820_1), 0, 18464 }, /* NBCD.B -(An) */ -{ CPUFUNC(op_4828_1), 0, 18472 }, /* NBCD.B (d16,An) */ -{ CPUFUNC(op_4830_3), 0, 18480 }, /* NBCD.B (d8,An,Xn) */ -{ CPUFUNC(op_4838_1), 0, 18488 }, /* NBCD.B (xxx).W */ -{ CPUFUNC(op_4839_1), 0, 18489 }, /* NBCD.B (xxx).L */ -{ CPUFUNC(op_4840_0), 0, 18496 }, /* SWAP.W Dn */ -{ CPUFUNC_FF(op_4850_0), 0, 18512 }, /* PEA.L (An) */ -{ CPUFUNC_FF(op_4868_0), 0, 18536 }, /* PEA.L (d16,An) */ -{ CPUFUNC_FF(op_4870_3), 0, 18544 }, /* PEA.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4878_0), 0, 18552 }, /* PEA.L (xxx).W */ -{ CPUFUNC_FF(op_4879_0), 0, 18553 }, /* PEA.L (xxx).L */ -{ CPUFUNC_FF(op_487a_0), 0, 18554 }, /* PEA.L (d16,PC) */ -{ CPUFUNC_FF(op_487b_3), 0, 18555 }, /* PEA.L (d8,PC,Xn) */ -{ CPUFUNC(op_4880_0), 0, 18560 }, /* EXT.W Dn */ -{ CPUFUNC_FF(op_4890_0), 0, 18576 }, /* MVMLE.W #.W,(An) */ -{ CPUFUNC_FF(op_48a0_0), 0, 18592 }, /* MVMLE.W #.W,-(An) */ -{ CPUFUNC_FF(op_48a8_0), 0, 18600 }, /* MVMLE.W #.W,(d16,An) */ -{ CPUFUNC_FF(op_48b0_3), 0, 18608 }, /* MVMLE.W #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_48b8_0), 0, 18616 }, /* MVMLE.W #.W,(xxx).W */ -{ CPUFUNC_FF(op_48b9_0), 0, 18617 }, /* MVMLE.W #.W,(xxx).L */ -{ CPUFUNC(op_48c0_0), 0, 18624 }, /* EXT.L Dn */ -{ CPUFUNC_FF(op_48d0_0), 0, 18640 }, /* MVMLE.L #.W,(An) */ -{ CPUFUNC_FF(op_48e0_0), 0, 18656 }, /* MVMLE.L #.W,-(An) */ -{ CPUFUNC_FF(op_48e8_0), 0, 18664 }, /* MVMLE.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_48f0_3), 0, 18672 }, /* MVMLE.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_48f8_0), 0, 18680 }, /* MVMLE.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_48f9_0), 0, 18681 }, /* MVMLE.L #.W,(xxx).L */ -{ CPUFUNC(op_49c0_0), 0, 18880 }, /* EXT.B Dn */ -{ CPUFUNC(op_4a00_0), 0, 18944 }, /* TST.B Dn */ -{ CPUFUNC(op_4a10_0), 0, 18960 }, /* TST.B (An) */ -{ CPUFUNC(op_4a18_0), 0, 18968 }, /* TST.B (An)+ */ -{ CPUFUNC(op_4a20_0), 0, 18976 }, /* TST.B -(An) */ -{ CPUFUNC(op_4a28_0), 0, 18984 }, /* TST.B (d16,An) */ -{ CPUFUNC(op_4a30_3), 0, 18992 }, /* TST.B (d8,An,Xn) */ -{ CPUFUNC(op_4a38_0), 0, 19000 }, /* TST.B (xxx).W */ -{ CPUFUNC(op_4a39_0), 0, 19001 }, /* TST.B (xxx).L */ -{ CPUFUNC(op_4a3a_0), 0, 19002 }, /* TST.B (d16,PC) */ -{ CPUFUNC(op_4a3b_3), 0, 19003 }, /* TST.B (d8,PC,Xn) */ -{ CPUFUNC(op_4a3c_0), 0, 19004 }, /* TST.B #.B */ -{ CPUFUNC(op_4a40_0), 0, 19008 }, /* TST.W Dn */ -{ CPUFUNC(op_4a48_0), 0, 19016 }, /* TST.W An */ -{ CPUFUNC(op_4a50_0), 0, 19024 }, /* TST.W (An) */ -{ CPUFUNC(op_4a58_0), 0, 19032 }, /* TST.W (An)+ */ -{ CPUFUNC(op_4a60_0), 0, 19040 }, /* TST.W -(An) */ -{ CPUFUNC(op_4a68_0), 0, 19048 }, /* TST.W (d16,An) */ -{ CPUFUNC(op_4a70_3), 0, 19056 }, /* TST.W (d8,An,Xn) */ -{ CPUFUNC(op_4a78_0), 0, 19064 }, /* TST.W (xxx).W */ -{ CPUFUNC(op_4a79_0), 0, 19065 }, /* TST.W (xxx).L */ -{ CPUFUNC(op_4a7a_0), 0, 19066 }, /* TST.W (d16,PC) */ -{ CPUFUNC(op_4a7b_3), 0, 19067 }, /* TST.W (d8,PC,Xn) */ -{ CPUFUNC(op_4a7c_0), 0, 19068 }, /* TST.W #.W */ -{ CPUFUNC(op_4a80_0), 0, 19072 }, /* TST.L Dn */ -{ CPUFUNC(op_4a88_0), 0, 19080 }, /* TST.L An */ -{ CPUFUNC(op_4a90_0), 0, 19088 }, /* TST.L (An) */ -{ CPUFUNC(op_4a98_0), 0, 19096 }, /* TST.L (An)+ */ -{ CPUFUNC(op_4aa0_0), 0, 19104 }, /* TST.L -(An) */ -{ CPUFUNC(op_4aa8_0), 0, 19112 }, /* TST.L (d16,An) */ -{ CPUFUNC(op_4ab0_3), 0, 19120 }, /* TST.L (d8,An,Xn) */ -{ CPUFUNC(op_4ab8_0), 0, 19128 }, /* TST.L (xxx).W */ -{ CPUFUNC(op_4ab9_0), 0, 19129 }, /* TST.L (xxx).L */ -{ CPUFUNC(op_4aba_0), 0, 19130 }, /* TST.L (d16,PC) */ -{ CPUFUNC(op_4abb_3), 0, 19131 }, /* TST.L (d8,PC,Xn) */ -{ CPUFUNC(op_4abc_0), 0, 19132 }, /* TST.L #.L */ -{ CPUFUNC(op_4ac0_0), 0, 19136 }, /* TAS.B Dn */ -{ CPUFUNC(op_4ad0_0), 0, 19152 }, /* TAS.B (An) */ -{ CPUFUNC(op_4ad8_0), 0, 19160 }, /* TAS.B (An)+ */ -{ CPUFUNC(op_4ae0_0), 0, 19168 }, /* TAS.B -(An) */ -{ CPUFUNC(op_4ae8_0), 0, 19176 }, /* TAS.B (d16,An) */ -{ CPUFUNC(op_4af0_3), 0, 19184 }, /* TAS.B (d8,An,Xn) */ -{ CPUFUNC(op_4af8_0), 0, 19192 }, /* TAS.B (xxx).W */ -{ CPUFUNC(op_4af9_0), 0, 19193 }, /* TAS.B (xxx).L */ -{ CPUFUNC_FF(op_4c90_0), 0, 19600 }, /* MVMEL.W #.W,(An) */ -{ CPUFUNC_FF(op_4c98_0), 0, 19608 }, /* MVMEL.W #.W,(An)+ */ -{ CPUFUNC_FF(op_4ca8_0), 0, 19624 }, /* MVMEL.W #.W,(d16,An) */ -{ CPUFUNC_FF(op_4cb0_3), 0, 19632 }, /* MVMEL.W #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_4cb8_0), 0, 19640 }, /* MVMEL.W #.W,(xxx).W */ -{ CPUFUNC_FF(op_4cb9_0), 0, 19641 }, /* MVMEL.W #.W,(xxx).L */ -{ CPUFUNC_FF(op_4cba_0), 0, 19642 }, /* MVMEL.W #.W,(d16,PC) */ -{ CPUFUNC_FF(op_4cbb_3), 0, 19643 }, /* MVMEL.W #.W,(d8,PC,Xn) */ -{ CPUFUNC_FF(op_4cd0_0), 0, 19664 }, /* MVMEL.L #.W,(An) */ -{ CPUFUNC_FF(op_4cd8_0), 0, 19672 }, /* MVMEL.L #.W,(An)+ */ -{ CPUFUNC_FF(op_4ce8_0), 0, 19688 }, /* MVMEL.L #.W,(d16,An) */ -{ CPUFUNC_FF(op_4cf0_3), 0, 19696 }, /* MVMEL.L #.W,(d8,An,Xn) */ -{ CPUFUNC_FF(op_4cf8_0), 0, 19704 }, /* MVMEL.L #.W,(xxx).W */ -{ CPUFUNC_FF(op_4cf9_0), 0, 19705 }, /* MVMEL.L #.W,(xxx).L */ -{ CPUFUNC_FF(op_4cfa_0), 0, 19706 }, /* MVMEL.L #.W,(d16,PC) */ -{ CPUFUNC_FF(op_4cfb_3), 0, 19707 }, /* MVMEL.L #.W,(d8,PC,Xn) */ -{ CPUFUNC_FF(op_4e40_0), 0, 20032 }, /* TRAP.L # */ -{ CPUFUNC_FF(op_4e50_0), 0, 20048 }, /* LINK.W An,#.W */ -{ CPUFUNC_FF(op_4e58_0), 0, 20056 }, /* UNLK.L An */ -{ CPUFUNC_FF(op_4e60_0), 0, 20064 }, /* MVR2USP.L An */ -{ CPUFUNC_FF(op_4e68_0), 0, 20072 }, /* MVUSP2R.L An */ -{ CPUFUNC_FF(op_4e70_0), 0, 20080 }, /* RESET.L */ -{ CPUFUNC_FF(op_4e71_0), 0, 20081 }, /* NOP.L */ -{ CPUFUNC(op_4e72_0), 0, 20082 }, /* STOP.L #.W */ -{ CPUFUNC(op_4e73_4), 0, 20083 }, /* RTE.L */ -{ CPUFUNC_FF(op_4e74_0), 0, 20084 }, /* RTD.L #.W */ -{ CPUFUNC_FF(op_4e75_0), 0, 20085 }, /* RTS.L */ -{ CPUFUNC_FF(op_4e76_0), 0, 20086 }, /* TRAPV.L */ -{ CPUFUNC(op_4e77_0), 0, 20087 }, /* RTR.L */ -{ CPUFUNC_FF(op_4e90_0), 0, 20112 }, /* JSR.L (An) */ -{ CPUFUNC_FF(op_4ea8_0), 0, 20136 }, /* JSR.L (d16,An) */ -{ CPUFUNC_FF(op_4eb0_3), 0, 20144 }, /* JSR.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4eb8_0), 0, 20152 }, /* JSR.L (xxx).W */ -{ CPUFUNC_FF(op_4eb9_0), 0, 20153 }, /* JSR.L (xxx).L */ -{ CPUFUNC_FF(op_4eba_0), 0, 20154 }, /* JSR.L (d16,PC) */ -{ CPUFUNC_FF(op_4ebb_3), 0, 20155 }, /* JSR.L (d8,PC,Xn) */ -{ CPUFUNC_FF(op_4ed0_0), 0, 20176 }, /* JMP.L (An) */ -{ CPUFUNC_FF(op_4ee8_0), 0, 20200 }, /* JMP.L (d16,An) */ -{ CPUFUNC_FF(op_4ef0_3), 0, 20208 }, /* JMP.L (d8,An,Xn) */ -{ CPUFUNC_FF(op_4ef8_0), 0, 20216 }, /* JMP.L (xxx).W */ -{ CPUFUNC_FF(op_4ef9_0), 0, 20217 }, /* JMP.L (xxx).L */ -{ CPUFUNC_FF(op_4efa_0), 0, 20218 }, /* JMP.L (d16,PC) */ -{ CPUFUNC_FF(op_4efb_3), 0, 20219 }, /* JMP.L (d8,PC,Xn) */ -{ CPUFUNC(op_5000_0), 0, 20480 }, /* ADD.B #,Dn */ -{ CPUFUNC(op_5010_0), 0, 20496 }, /* ADD.B #,(An) */ -{ CPUFUNC(op_5018_0), 0, 20504 }, /* ADD.B #,(An)+ */ -{ CPUFUNC(op_5020_0), 0, 20512 }, /* ADD.B #,-(An) */ -{ CPUFUNC(op_5028_0), 0, 20520 }, /* ADD.B #,(d16,An) */ -{ CPUFUNC(op_5030_3), 0, 20528 }, /* ADD.B #,(d8,An,Xn) */ -{ CPUFUNC(op_5038_0), 0, 20536 }, /* ADD.B #,(xxx).W */ -{ CPUFUNC(op_5039_0), 0, 20537 }, /* ADD.B #,(xxx).L */ -{ CPUFUNC(op_5040_0), 0, 20544 }, /* ADD.W #,Dn */ -{ CPUFUNC_FF(op_5048_0), 0, 20552 }, /* ADDA.W #,An */ -{ CPUFUNC(op_5050_0), 0, 20560 }, /* ADD.W #,(An) */ -{ CPUFUNC(op_5058_0), 0, 20568 }, /* ADD.W #,(An)+ */ -{ CPUFUNC(op_5060_0), 0, 20576 }, /* ADD.W #,-(An) */ -{ CPUFUNC(op_5068_0), 0, 20584 }, /* ADD.W #,(d16,An) */ -{ CPUFUNC(op_5070_3), 0, 20592 }, /* ADD.W #,(d8,An,Xn) */ -{ CPUFUNC(op_5078_0), 0, 20600 }, /* ADD.W #,(xxx).W */ -{ CPUFUNC(op_5079_0), 0, 20601 }, /* ADD.W #,(xxx).L */ -{ CPUFUNC(op_5080_0), 0, 20608 }, /* ADD.L #,Dn */ -{ CPUFUNC_FF(op_5088_0), 0, 20616 }, /* ADDA.L #,An */ -{ CPUFUNC(op_5090_0), 0, 20624 }, /* ADD.L #,(An) */ -{ CPUFUNC(op_5098_0), 0, 20632 }, /* ADD.L #,(An)+ */ -{ CPUFUNC(op_50a0_0), 0, 20640 }, /* ADD.L #,-(An) */ -{ CPUFUNC(op_50a8_0), 0, 20648 }, /* ADD.L #,(d16,An) */ -{ CPUFUNC(op_50b0_3), 0, 20656 }, /* ADD.L #,(d8,An,Xn) */ -{ CPUFUNC(op_50b8_0), 0, 20664 }, /* ADD.L #,(xxx).W */ -{ CPUFUNC(op_50b9_0), 0, 20665 }, /* ADD.L #,(xxx).L */ -{ CPUFUNC_FF(op_50c0_0), 0, 20672 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_50c8_0), 0, 20680 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_50d0_0), 0, 20688 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_50d8_0), 0, 20696 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_50e0_0), 0, 20704 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_50e8_0), 0, 20712 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_50f0_3), 0, 20720 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_50f8_0), 0, 20728 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_50f9_0), 0, 20729 }, /* Scc.B (xxx).L */ -{ CPUFUNC(op_5100_0), 0, 20736 }, /* SUB.B #,Dn */ -{ CPUFUNC(op_5110_0), 0, 20752 }, /* SUB.B #,(An) */ -{ CPUFUNC(op_5118_0), 0, 20760 }, /* SUB.B #,(An)+ */ -{ CPUFUNC(op_5120_0), 0, 20768 }, /* SUB.B #,-(An) */ -{ CPUFUNC(op_5128_0), 0, 20776 }, /* SUB.B #,(d16,An) */ -{ CPUFUNC(op_5130_3), 0, 20784 }, /* SUB.B #,(d8,An,Xn) */ -{ CPUFUNC(op_5138_0), 0, 20792 }, /* SUB.B #,(xxx).W */ -{ CPUFUNC(op_5139_0), 0, 20793 }, /* SUB.B #,(xxx).L */ -{ CPUFUNC(op_5140_0), 0, 20800 }, /* SUB.W #,Dn */ -{ CPUFUNC_FF(op_5148_0), 0, 20808 }, /* SUBA.W #,An */ -{ CPUFUNC(op_5150_0), 0, 20816 }, /* SUB.W #,(An) */ -{ CPUFUNC(op_5158_0), 0, 20824 }, /* SUB.W #,(An)+ */ -{ CPUFUNC(op_5160_0), 0, 20832 }, /* SUB.W #,-(An) */ -{ CPUFUNC(op_5168_0), 0, 20840 }, /* SUB.W #,(d16,An) */ -{ CPUFUNC(op_5170_3), 0, 20848 }, /* SUB.W #,(d8,An,Xn) */ -{ CPUFUNC(op_5178_0), 0, 20856 }, /* SUB.W #,(xxx).W */ -{ CPUFUNC(op_5179_0), 0, 20857 }, /* SUB.W #,(xxx).L */ -{ CPUFUNC(op_5180_0), 0, 20864 }, /* SUB.L #,Dn */ -{ CPUFUNC_FF(op_5188_0), 0, 20872 }, /* SUBA.L #,An */ -{ CPUFUNC(op_5190_0), 0, 20880 }, /* SUB.L #,(An) */ -{ CPUFUNC(op_5198_0), 0, 20888 }, /* SUB.L #,(An)+ */ -{ CPUFUNC(op_51a0_0), 0, 20896 }, /* SUB.L #,-(An) */ -{ CPUFUNC(op_51a8_0), 0, 20904 }, /* SUB.L #,(d16,An) */ -{ CPUFUNC(op_51b0_3), 0, 20912 }, /* SUB.L #,(d8,An,Xn) */ -{ CPUFUNC(op_51b8_0), 0, 20920 }, /* SUB.L #,(xxx).W */ -{ CPUFUNC(op_51b9_0), 0, 20921 }, /* SUB.L #,(xxx).L */ -{ CPUFUNC_FF(op_51c0_0), 0, 20928 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_51c8_0), 0, 20936 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_51d0_0), 0, 20944 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_51d8_0), 0, 20952 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_51e0_0), 0, 20960 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_51e8_0), 0, 20968 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_51f0_3), 0, 20976 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_51f8_0), 0, 20984 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_51f9_0), 0, 20985 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_52c0_0), 0, 21184 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_52c8_0), 0, 21192 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_52d0_0), 0, 21200 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_52d8_0), 0, 21208 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_52e0_0), 0, 21216 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_52e8_0), 0, 21224 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_52f0_3), 0, 21232 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_52f8_0), 0, 21240 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_52f9_0), 0, 21241 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_53c0_0), 0, 21440 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_53c8_0), 0, 21448 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_53d0_0), 0, 21456 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_53d8_0), 0, 21464 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_53e0_0), 0, 21472 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_53e8_0), 0, 21480 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_53f0_3), 0, 21488 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_53f8_0), 0, 21496 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_53f9_0), 0, 21497 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_54c0_0), 0, 21696 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_54c8_0), 0, 21704 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_54d0_0), 0, 21712 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_54d8_0), 0, 21720 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_54e0_0), 0, 21728 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_54e8_0), 0, 21736 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_54f0_3), 0, 21744 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_54f8_0), 0, 21752 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_54f9_0), 0, 21753 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_55c0_0), 0, 21952 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_55c8_0), 0, 21960 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_55d0_0), 0, 21968 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_55d8_0), 0, 21976 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_55e0_0), 0, 21984 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_55e8_0), 0, 21992 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_55f0_3), 0, 22000 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_55f8_0), 0, 22008 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_55f9_0), 0, 22009 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_56c0_0), 0, 22208 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_56c8_0), 0, 22216 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_56d0_0), 0, 22224 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_56d8_0), 0, 22232 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_56e0_0), 0, 22240 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_56e8_0), 0, 22248 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_56f0_3), 0, 22256 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_56f8_0), 0, 22264 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_56f9_0), 0, 22265 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_57c0_0), 0, 22464 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_57c8_0), 0, 22472 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_57d0_0), 0, 22480 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_57d8_0), 0, 22488 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_57e0_0), 0, 22496 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_57e8_0), 0, 22504 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_57f0_3), 0, 22512 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_57f8_0), 0, 22520 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_57f9_0), 0, 22521 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_58c0_0), 0, 22720 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_58c8_0), 0, 22728 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_58d0_0), 0, 22736 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_58d8_0), 0, 22744 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_58e0_0), 0, 22752 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_58e8_0), 0, 22760 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_58f0_3), 0, 22768 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_58f8_0), 0, 22776 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_58f9_0), 0, 22777 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_59c0_0), 0, 22976 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_59c8_0), 0, 22984 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_59d0_0), 0, 22992 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_59d8_0), 0, 23000 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_59e0_0), 0, 23008 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_59e8_0), 0, 23016 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_59f0_3), 0, 23024 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_59f8_0), 0, 23032 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_59f9_0), 0, 23033 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5ac0_0), 0, 23232 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5ac8_0), 0, 23240 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5ad0_0), 0, 23248 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5ad8_0), 0, 23256 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ae0_0), 0, 23264 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ae8_0), 0, 23272 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5af0_3), 0, 23280 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5af8_0), 0, 23288 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5af9_0), 0, 23289 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5bc0_0), 0, 23488 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5bc8_0), 0, 23496 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5bd0_0), 0, 23504 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5bd8_0), 0, 23512 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5be0_0), 0, 23520 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5be8_0), 0, 23528 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5bf0_3), 0, 23536 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5bf8_0), 0, 23544 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5bf9_0), 0, 23545 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5cc0_0), 0, 23744 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5cc8_0), 0, 23752 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5cd0_0), 0, 23760 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5cd8_0), 0, 23768 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ce0_0), 0, 23776 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ce8_0), 0, 23784 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5cf0_3), 0, 23792 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5cf8_0), 0, 23800 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5cf9_0), 0, 23801 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5dc0_0), 0, 24000 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5dc8_0), 0, 24008 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5dd0_0), 0, 24016 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5dd8_0), 0, 24024 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5de0_0), 0, 24032 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5de8_0), 0, 24040 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5df0_3), 0, 24048 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5df8_0), 0, 24056 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5df9_0), 0, 24057 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5ec0_0), 0, 24256 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5ec8_0), 0, 24264 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5ed0_0), 0, 24272 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5ed8_0), 0, 24280 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5ee0_0), 0, 24288 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5ee8_0), 0, 24296 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5ef0_3), 0, 24304 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5ef8_0), 0, 24312 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5ef9_0), 0, 24313 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_5fc0_0), 0, 24512 }, /* Scc.B Dn */ -{ CPUFUNC_FF(op_5fc8_0), 0, 24520 }, /* DBcc.W Dn,#.W */ -{ CPUFUNC_FF(op_5fd0_0), 0, 24528 }, /* Scc.B (An) */ -{ CPUFUNC_FF(op_5fd8_0), 0, 24536 }, /* Scc.B (An)+ */ -{ CPUFUNC_FF(op_5fe0_0), 0, 24544 }, /* Scc.B -(An) */ -{ CPUFUNC_FF(op_5fe8_0), 0, 24552 }, /* Scc.B (d16,An) */ -{ CPUFUNC_FF(op_5ff0_3), 0, 24560 }, /* Scc.B (d8,An,Xn) */ -{ CPUFUNC_FF(op_5ff8_0), 0, 24568 }, /* Scc.B (xxx).W */ -{ CPUFUNC_FF(op_5ff9_0), 0, 24569 }, /* Scc.B (xxx).L */ -{ CPUFUNC_FF(op_6000_0), 0, 24576 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6001_0), 0, 24577 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_60ff_3), 0, 24831 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6100_0), 0, 24832 }, /* BSR.W #.W */ -{ CPUFUNC_FF(op_6101_0), 0, 24833 }, /* BSR.B # */ -{ CPUFUNC_FF(op_61ff_0), 0, 25087 }, /* BSR.L #.L */ -{ CPUFUNC_FF(op_6200_0), 0, 25088 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6201_0), 0, 25089 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_62ff_3), 0, 25343 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6300_0), 0, 25344 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6301_0), 0, 25345 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_63ff_3), 0, 25599 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6400_0), 0, 25600 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6401_0), 0, 25601 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_64ff_3), 0, 25855 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6500_0), 0, 25856 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6501_0), 0, 25857 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_65ff_3), 0, 26111 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6600_0), 0, 26112 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6601_0), 0, 26113 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_66ff_3), 0, 26367 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6700_0), 0, 26368 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6701_0), 0, 26369 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_67ff_3), 0, 26623 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6800_0), 0, 26624 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6801_0), 0, 26625 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_68ff_3), 0, 26879 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6900_0), 0, 26880 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6901_0), 0, 26881 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_69ff_3), 0, 27135 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6a00_0), 0, 27136 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6a01_0), 0, 27137 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6aff_3), 0, 27391 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6b00_0), 0, 27392 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6b01_0), 0, 27393 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6bff_3), 0, 27647 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6c00_0), 0, 27648 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6c01_0), 0, 27649 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6cff_3), 0, 27903 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6d00_0), 0, 27904 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6d01_0), 0, 27905 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6dff_3), 0, 28159 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6e00_0), 0, 28160 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6e01_0), 0, 28161 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6eff_3), 0, 28415 }, /* Bcc.L #.L */ -{ CPUFUNC_FF(op_6f00_0), 0, 28416 }, /* Bcc.W #.W */ -{ CPUFUNC_FF(op_6f01_0), 0, 28417 }, /* Bcc.B # */ -{ CPUFUNC_FF(op_6fff_3), 0, 28671 }, /* Bcc.L #.L */ -{ CPUFUNC(op_7000_0), 0, 28672 }, /* MOVE.L #,Dn */ -{ CPUFUNC_FF(op_7100_0), 0, 28928 }, /* EMULOP_RETURN.L */ -{ CPUFUNC_FF(op_7101_0), 0, 28929 }, /* EMULOP.L # */ -{ CPUFUNC(op_8000_0), 0, 32768 }, /* OR.B Dn,Dn */ -{ CPUFUNC(op_8010_0), 0, 32784 }, /* OR.B (An),Dn */ -{ CPUFUNC(op_8018_0), 0, 32792 }, /* OR.B (An)+,Dn */ -{ CPUFUNC(op_8020_0), 0, 32800 }, /* OR.B -(An),Dn */ -{ CPUFUNC(op_8028_0), 0, 32808 }, /* OR.B (d16,An),Dn */ -{ CPUFUNC(op_8030_3), 0, 32816 }, /* OR.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_8038_0), 0, 32824 }, /* OR.B (xxx).W,Dn */ -{ CPUFUNC(op_8039_0), 0, 32825 }, /* OR.B (xxx).L,Dn */ -{ CPUFUNC(op_803a_0), 0, 32826 }, /* OR.B (d16,PC),Dn */ -{ CPUFUNC(op_803b_3), 0, 32827 }, /* OR.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_803c_0), 0, 32828 }, /* OR.B #.B,Dn */ -{ CPUFUNC(op_8040_0), 0, 32832 }, /* OR.W Dn,Dn */ -{ CPUFUNC(op_8050_0), 0, 32848 }, /* OR.W (An),Dn */ -{ CPUFUNC(op_8058_0), 0, 32856 }, /* OR.W (An)+,Dn */ -{ CPUFUNC(op_8060_0), 0, 32864 }, /* OR.W -(An),Dn */ -{ CPUFUNC(op_8068_0), 0, 32872 }, /* OR.W (d16,An),Dn */ -{ CPUFUNC(op_8070_3), 0, 32880 }, /* OR.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_8078_0), 0, 32888 }, /* OR.W (xxx).W,Dn */ -{ CPUFUNC(op_8079_0), 0, 32889 }, /* OR.W (xxx).L,Dn */ -{ CPUFUNC(op_807a_0), 0, 32890 }, /* OR.W (d16,PC),Dn */ -{ CPUFUNC(op_807b_3), 0, 32891 }, /* OR.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_807c_0), 0, 32892 }, /* OR.W #.W,Dn */ -{ CPUFUNC(op_8080_0), 0, 32896 }, /* OR.L Dn,Dn */ -{ CPUFUNC(op_8090_0), 0, 32912 }, /* OR.L (An),Dn */ -{ CPUFUNC(op_8098_0), 0, 32920 }, /* OR.L (An)+,Dn */ -{ CPUFUNC(op_80a0_0), 0, 32928 }, /* OR.L -(An),Dn */ -{ CPUFUNC(op_80a8_0), 0, 32936 }, /* OR.L (d16,An),Dn */ -{ CPUFUNC(op_80b0_3), 0, 32944 }, /* OR.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_80b8_0), 0, 32952 }, /* OR.L (xxx).W,Dn */ -{ CPUFUNC(op_80b9_0), 0, 32953 }, /* OR.L (xxx).L,Dn */ -{ CPUFUNC(op_80ba_0), 0, 32954 }, /* OR.L (d16,PC),Dn */ -{ CPUFUNC(op_80bb_3), 0, 32955 }, /* OR.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_80bc_0), 0, 32956 }, /* OR.L #.L,Dn */ -{ CPUFUNC(op_80c0_0), 0, 32960 }, /* DIVU.W Dn,Dn */ -{ CPUFUNC(op_80d0_0), 0, 32976 }, /* DIVU.W (An),Dn */ -{ CPUFUNC(op_80d8_0), 0, 32984 }, /* DIVU.W (An)+,Dn */ -{ CPUFUNC(op_80e0_0), 0, 32992 }, /* DIVU.W -(An),Dn */ -{ CPUFUNC(op_80e8_0), 0, 33000 }, /* DIVU.W (d16,An),Dn */ -{ CPUFUNC(op_80f0_3), 0, 33008 }, /* DIVU.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_80f8_0), 0, 33016 }, /* DIVU.W (xxx).W,Dn */ -{ CPUFUNC(op_80f9_0), 0, 33017 }, /* DIVU.W (xxx).L,Dn */ -{ CPUFUNC(op_80fa_0), 0, 33018 }, /* DIVU.W (d16,PC),Dn */ -{ CPUFUNC(op_80fb_3), 0, 33019 }, /* DIVU.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_80fc_0), 0, 33020 }, /* DIVU.W #.W,Dn */ -{ CPUFUNC(op_8100_1), 0, 33024 }, /* SBCD.B Dn,Dn */ -{ CPUFUNC(op_8108_1), 0, 33032 }, /* SBCD.B -(An),-(An) */ -{ CPUFUNC(op_8110_0), 0, 33040 }, /* OR.B Dn,(An) */ -{ CPUFUNC(op_8118_0), 0, 33048 }, /* OR.B Dn,(An)+ */ -{ CPUFUNC(op_8120_0), 0, 33056 }, /* OR.B Dn,-(An) */ -{ CPUFUNC(op_8128_0), 0, 33064 }, /* OR.B Dn,(d16,An) */ -{ CPUFUNC(op_8130_3), 0, 33072 }, /* OR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_8138_0), 0, 33080 }, /* OR.B Dn,(xxx).W */ -{ CPUFUNC(op_8139_0), 0, 33081 }, /* OR.B Dn,(xxx).L */ -{ CPUFUNC(op_8150_0), 0, 33104 }, /* OR.W Dn,(An) */ -{ CPUFUNC(op_8158_0), 0, 33112 }, /* OR.W Dn,(An)+ */ -{ CPUFUNC(op_8160_0), 0, 33120 }, /* OR.W Dn,-(An) */ -{ CPUFUNC(op_8168_0), 0, 33128 }, /* OR.W Dn,(d16,An) */ -{ CPUFUNC(op_8170_3), 0, 33136 }, /* OR.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_8178_0), 0, 33144 }, /* OR.W Dn,(xxx).W */ -{ CPUFUNC(op_8179_0), 0, 33145 }, /* OR.W Dn,(xxx).L */ -{ CPUFUNC(op_8190_0), 0, 33168 }, /* OR.L Dn,(An) */ -{ CPUFUNC(op_8198_0), 0, 33176 }, /* OR.L Dn,(An)+ */ -{ CPUFUNC(op_81a0_0), 0, 33184 }, /* OR.L Dn,-(An) */ -{ CPUFUNC(op_81a8_0), 0, 33192 }, /* OR.L Dn,(d16,An) */ -{ CPUFUNC(op_81b0_3), 0, 33200 }, /* OR.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_81b8_0), 0, 33208 }, /* OR.L Dn,(xxx).W */ -{ CPUFUNC(op_81b9_0), 0, 33209 }, /* OR.L Dn,(xxx).L */ -{ CPUFUNC(op_81c0_0), 0, 33216 }, /* DIVS.W Dn,Dn */ -{ CPUFUNC(op_81d0_0), 0, 33232 }, /* DIVS.W (An),Dn */ -{ CPUFUNC(op_81d8_0), 0, 33240 }, /* DIVS.W (An)+,Dn */ -{ CPUFUNC(op_81e0_0), 0, 33248 }, /* DIVS.W -(An),Dn */ -{ CPUFUNC(op_81e8_0), 0, 33256 }, /* DIVS.W (d16,An),Dn */ -{ CPUFUNC(op_81f0_3), 0, 33264 }, /* DIVS.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_81f8_0), 0, 33272 }, /* DIVS.W (xxx).W,Dn */ -{ CPUFUNC(op_81f9_0), 0, 33273 }, /* DIVS.W (xxx).L,Dn */ -{ CPUFUNC(op_81fa_0), 0, 33274 }, /* DIVS.W (d16,PC),Dn */ -{ CPUFUNC(op_81fb_3), 0, 33275 }, /* DIVS.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_81fc_0), 0, 33276 }, /* DIVS.W #.W,Dn */ -{ CPUFUNC(op_9000_0), 0, 36864 }, /* SUB.B Dn,Dn */ -{ CPUFUNC(op_9010_0), 0, 36880 }, /* SUB.B (An),Dn */ -{ CPUFUNC(op_9018_0), 0, 36888 }, /* SUB.B (An)+,Dn */ -{ CPUFUNC(op_9020_0), 0, 36896 }, /* SUB.B -(An),Dn */ -{ CPUFUNC(op_9028_0), 0, 36904 }, /* SUB.B (d16,An),Dn */ -{ CPUFUNC(op_9030_3), 0, 36912 }, /* SUB.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_9038_0), 0, 36920 }, /* SUB.B (xxx).W,Dn */ -{ CPUFUNC(op_9039_0), 0, 36921 }, /* SUB.B (xxx).L,Dn */ -{ CPUFUNC(op_903a_0), 0, 36922 }, /* SUB.B (d16,PC),Dn */ -{ CPUFUNC(op_903b_3), 0, 36923 }, /* SUB.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_903c_0), 0, 36924 }, /* SUB.B #.B,Dn */ -{ CPUFUNC(op_9040_0), 0, 36928 }, /* SUB.W Dn,Dn */ -{ CPUFUNC(op_9048_0), 0, 36936 }, /* SUB.W An,Dn */ -{ CPUFUNC(op_9050_0), 0, 36944 }, /* SUB.W (An),Dn */ -{ CPUFUNC(op_9058_0), 0, 36952 }, /* SUB.W (An)+,Dn */ -{ CPUFUNC(op_9060_0), 0, 36960 }, /* SUB.W -(An),Dn */ -{ CPUFUNC(op_9068_0), 0, 36968 }, /* SUB.W (d16,An),Dn */ -{ CPUFUNC(op_9070_3), 0, 36976 }, /* SUB.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_9078_0), 0, 36984 }, /* SUB.W (xxx).W,Dn */ -{ CPUFUNC(op_9079_0), 0, 36985 }, /* SUB.W (xxx).L,Dn */ -{ CPUFUNC(op_907a_0), 0, 36986 }, /* SUB.W (d16,PC),Dn */ -{ CPUFUNC(op_907b_3), 0, 36987 }, /* SUB.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_907c_0), 0, 36988 }, /* SUB.W #.W,Dn */ -{ CPUFUNC(op_9080_0), 0, 36992 }, /* SUB.L Dn,Dn */ -{ CPUFUNC(op_9088_0), 0, 37000 }, /* SUB.L An,Dn */ -{ CPUFUNC(op_9090_0), 0, 37008 }, /* SUB.L (An),Dn */ -{ CPUFUNC(op_9098_0), 0, 37016 }, /* SUB.L (An)+,Dn */ -{ CPUFUNC(op_90a0_0), 0, 37024 }, /* SUB.L -(An),Dn */ -{ CPUFUNC(op_90a8_0), 0, 37032 }, /* SUB.L (d16,An),Dn */ -{ CPUFUNC(op_90b0_3), 0, 37040 }, /* SUB.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_90b8_0), 0, 37048 }, /* SUB.L (xxx).W,Dn */ -{ CPUFUNC(op_90b9_0), 0, 37049 }, /* SUB.L (xxx).L,Dn */ -{ CPUFUNC(op_90ba_0), 0, 37050 }, /* SUB.L (d16,PC),Dn */ -{ CPUFUNC(op_90bb_3), 0, 37051 }, /* SUB.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_90bc_0), 0, 37052 }, /* SUB.L #.L,Dn */ -{ CPUFUNC_FF(op_90c0_0), 0, 37056 }, /* SUBA.W Dn,An */ -{ CPUFUNC_FF(op_90c8_0), 0, 37064 }, /* SUBA.W An,An */ -{ CPUFUNC_FF(op_90d0_0), 0, 37072 }, /* SUBA.W (An),An */ -{ CPUFUNC_FF(op_90d8_0), 0, 37080 }, /* SUBA.W (An)+,An */ -{ CPUFUNC_FF(op_90e0_0), 0, 37088 }, /* SUBA.W -(An),An */ -{ CPUFUNC_FF(op_90e8_0), 0, 37096 }, /* SUBA.W (d16,An),An */ -{ CPUFUNC_FF(op_90f0_3), 0, 37104 }, /* SUBA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_90f8_0), 0, 37112 }, /* SUBA.W (xxx).W,An */ -{ CPUFUNC_FF(op_90f9_0), 0, 37113 }, /* SUBA.W (xxx).L,An */ -{ CPUFUNC_FF(op_90fa_0), 0, 37114 }, /* SUBA.W (d16,PC),An */ -{ CPUFUNC_FF(op_90fb_3), 0, 37115 }, /* SUBA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_90fc_0), 0, 37116 }, /* SUBA.W #.W,An */ -{ CPUFUNC(op_9100_0), 0, 37120 }, /* SUBX.B Dn,Dn */ -{ CPUFUNC(op_9108_0), 0, 37128 }, /* SUBX.B -(An),-(An) */ -{ CPUFUNC(op_9110_0), 0, 37136 }, /* SUB.B Dn,(An) */ -{ CPUFUNC(op_9118_0), 0, 37144 }, /* SUB.B Dn,(An)+ */ -{ CPUFUNC(op_9120_0), 0, 37152 }, /* SUB.B Dn,-(An) */ -{ CPUFUNC(op_9128_0), 0, 37160 }, /* SUB.B Dn,(d16,An) */ -{ CPUFUNC(op_9130_3), 0, 37168 }, /* SUB.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_9138_0), 0, 37176 }, /* SUB.B Dn,(xxx).W */ -{ CPUFUNC(op_9139_0), 0, 37177 }, /* SUB.B Dn,(xxx).L */ -{ CPUFUNC(op_9140_0), 0, 37184 }, /* SUBX.W Dn,Dn */ -{ CPUFUNC(op_9148_0), 0, 37192 }, /* SUBX.W -(An),-(An) */ -{ CPUFUNC(op_9150_0), 0, 37200 }, /* SUB.W Dn,(An) */ -{ CPUFUNC(op_9158_0), 0, 37208 }, /* SUB.W Dn,(An)+ */ -{ CPUFUNC(op_9160_0), 0, 37216 }, /* SUB.W Dn,-(An) */ -{ CPUFUNC(op_9168_0), 0, 37224 }, /* SUB.W Dn,(d16,An) */ -{ CPUFUNC(op_9170_3), 0, 37232 }, /* SUB.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_9178_0), 0, 37240 }, /* SUB.W Dn,(xxx).W */ -{ CPUFUNC(op_9179_0), 0, 37241 }, /* SUB.W Dn,(xxx).L */ -{ CPUFUNC(op_9180_0), 0, 37248 }, /* SUBX.L Dn,Dn */ -{ CPUFUNC(op_9188_0), 0, 37256 }, /* SUBX.L -(An),-(An) */ -{ CPUFUNC(op_9190_0), 0, 37264 }, /* SUB.L Dn,(An) */ -{ CPUFUNC(op_9198_0), 0, 37272 }, /* SUB.L Dn,(An)+ */ -{ CPUFUNC(op_91a0_0), 0, 37280 }, /* SUB.L Dn,-(An) */ -{ CPUFUNC(op_91a8_0), 0, 37288 }, /* SUB.L Dn,(d16,An) */ -{ CPUFUNC(op_91b0_3), 0, 37296 }, /* SUB.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_91b8_0), 0, 37304 }, /* SUB.L Dn,(xxx).W */ -{ CPUFUNC(op_91b9_0), 0, 37305 }, /* SUB.L Dn,(xxx).L */ -{ CPUFUNC_FF(op_91c0_0), 0, 37312 }, /* SUBA.L Dn,An */ -{ CPUFUNC_FF(op_91c8_0), 0, 37320 }, /* SUBA.L An,An */ -{ CPUFUNC_FF(op_91d0_0), 0, 37328 }, /* SUBA.L (An),An */ -{ CPUFUNC_FF(op_91d8_0), 0, 37336 }, /* SUBA.L (An)+,An */ -{ CPUFUNC_FF(op_91e0_0), 0, 37344 }, /* SUBA.L -(An),An */ -{ CPUFUNC_FF(op_91e8_0), 0, 37352 }, /* SUBA.L (d16,An),An */ -{ CPUFUNC_FF(op_91f0_3), 0, 37360 }, /* SUBA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_91f8_0), 0, 37368 }, /* SUBA.L (xxx).W,An */ -{ CPUFUNC_FF(op_91f9_0), 0, 37369 }, /* SUBA.L (xxx).L,An */ -{ CPUFUNC_FF(op_91fa_0), 0, 37370 }, /* SUBA.L (d16,PC),An */ -{ CPUFUNC_FF(op_91fb_3), 0, 37371 }, /* SUBA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_91fc_0), 0, 37372 }, /* SUBA.L #.L,An */ -{ CPUFUNC(op_b000_0), 0, 45056 }, /* CMP.B Dn,Dn */ -{ CPUFUNC(op_b010_0), 0, 45072 }, /* CMP.B (An),Dn */ -{ CPUFUNC(op_b018_0), 0, 45080 }, /* CMP.B (An)+,Dn */ -{ CPUFUNC(op_b020_0), 0, 45088 }, /* CMP.B -(An),Dn */ -{ CPUFUNC(op_b028_0), 0, 45096 }, /* CMP.B (d16,An),Dn */ -{ CPUFUNC(op_b030_3), 0, 45104 }, /* CMP.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_b038_0), 0, 45112 }, /* CMP.B (xxx).W,Dn */ -{ CPUFUNC(op_b039_0), 0, 45113 }, /* CMP.B (xxx).L,Dn */ -{ CPUFUNC(op_b03a_0), 0, 45114 }, /* CMP.B (d16,PC),Dn */ -{ CPUFUNC(op_b03b_3), 0, 45115 }, /* CMP.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b03c_0), 0, 45116 }, /* CMP.B #.B,Dn */ -{ CPUFUNC(op_b040_0), 0, 45120 }, /* CMP.W Dn,Dn */ -{ CPUFUNC(op_b048_0), 0, 45128 }, /* CMP.W An,Dn */ -{ CPUFUNC(op_b050_0), 0, 45136 }, /* CMP.W (An),Dn */ -{ CPUFUNC(op_b058_0), 0, 45144 }, /* CMP.W (An)+,Dn */ -{ CPUFUNC(op_b060_0), 0, 45152 }, /* CMP.W -(An),Dn */ -{ CPUFUNC(op_b068_0), 0, 45160 }, /* CMP.W (d16,An),Dn */ -{ CPUFUNC(op_b070_3), 0, 45168 }, /* CMP.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_b078_0), 0, 45176 }, /* CMP.W (xxx).W,Dn */ -{ CPUFUNC(op_b079_0), 0, 45177 }, /* CMP.W (xxx).L,Dn */ -{ CPUFUNC(op_b07a_0), 0, 45178 }, /* CMP.W (d16,PC),Dn */ -{ CPUFUNC(op_b07b_3), 0, 45179 }, /* CMP.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b07c_0), 0, 45180 }, /* CMP.W #.W,Dn */ -{ CPUFUNC(op_b080_0), 0, 45184 }, /* CMP.L Dn,Dn */ -{ CPUFUNC(op_b088_0), 0, 45192 }, /* CMP.L An,Dn */ -{ CPUFUNC(op_b090_0), 0, 45200 }, /* CMP.L (An),Dn */ -{ CPUFUNC(op_b098_0), 0, 45208 }, /* CMP.L (An)+,Dn */ -{ CPUFUNC(op_b0a0_0), 0, 45216 }, /* CMP.L -(An),Dn */ -{ CPUFUNC(op_b0a8_0), 0, 45224 }, /* CMP.L (d16,An),Dn */ -{ CPUFUNC(op_b0b0_3), 0, 45232 }, /* CMP.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_b0b8_0), 0, 45240 }, /* CMP.L (xxx).W,Dn */ -{ CPUFUNC(op_b0b9_0), 0, 45241 }, /* CMP.L (xxx).L,Dn */ -{ CPUFUNC(op_b0ba_0), 0, 45242 }, /* CMP.L (d16,PC),Dn */ -{ CPUFUNC(op_b0bb_3), 0, 45243 }, /* CMP.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_b0bc_0), 0, 45244 }, /* CMP.L #.L,Dn */ -{ CPUFUNC(op_b0c0_0), 0, 45248 }, /* CMPA.W Dn,An */ -{ CPUFUNC(op_b0c8_0), 0, 45256 }, /* CMPA.W An,An */ -{ CPUFUNC(op_b0d0_0), 0, 45264 }, /* CMPA.W (An),An */ -{ CPUFUNC(op_b0d8_0), 0, 45272 }, /* CMPA.W (An)+,An */ -{ CPUFUNC(op_b0e0_0), 0, 45280 }, /* CMPA.W -(An),An */ -{ CPUFUNC(op_b0e8_0), 0, 45288 }, /* CMPA.W (d16,An),An */ -{ CPUFUNC(op_b0f0_3), 0, 45296 }, /* CMPA.W (d8,An,Xn),An */ -{ CPUFUNC(op_b0f8_0), 0, 45304 }, /* CMPA.W (xxx).W,An */ -{ CPUFUNC(op_b0f9_0), 0, 45305 }, /* CMPA.W (xxx).L,An */ -{ CPUFUNC(op_b0fa_0), 0, 45306 }, /* CMPA.W (d16,PC),An */ -{ CPUFUNC(op_b0fb_3), 0, 45307 }, /* CMPA.W (d8,PC,Xn),An */ -{ CPUFUNC(op_b0fc_0), 0, 45308 }, /* CMPA.W #.W,An */ -{ CPUFUNC(op_b100_0), 0, 45312 }, /* EOR.B Dn,Dn */ -{ CPUFUNC(op_b108_0), 0, 45320 }, /* CMPM.B (An)+,(An)+ */ -{ CPUFUNC(op_b110_0), 0, 45328 }, /* EOR.B Dn,(An) */ -{ CPUFUNC(op_b118_0), 0, 45336 }, /* EOR.B Dn,(An)+ */ -{ CPUFUNC(op_b120_0), 0, 45344 }, /* EOR.B Dn,-(An) */ -{ CPUFUNC(op_b128_0), 0, 45352 }, /* EOR.B Dn,(d16,An) */ -{ CPUFUNC(op_b130_3), 0, 45360 }, /* EOR.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b138_0), 0, 45368 }, /* EOR.B Dn,(xxx).W */ -{ CPUFUNC(op_b139_0), 0, 45369 }, /* EOR.B Dn,(xxx).L */ -{ CPUFUNC(op_b140_0), 0, 45376 }, /* EOR.W Dn,Dn */ -{ CPUFUNC(op_b148_0), 0, 45384 }, /* CMPM.W (An)+,(An)+ */ -{ CPUFUNC(op_b150_0), 0, 45392 }, /* EOR.W Dn,(An) */ -{ CPUFUNC(op_b158_0), 0, 45400 }, /* EOR.W Dn,(An)+ */ -{ CPUFUNC(op_b160_0), 0, 45408 }, /* EOR.W Dn,-(An) */ -{ CPUFUNC(op_b168_0), 0, 45416 }, /* EOR.W Dn,(d16,An) */ -{ CPUFUNC(op_b170_3), 0, 45424 }, /* EOR.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b178_0), 0, 45432 }, /* EOR.W Dn,(xxx).W */ -{ CPUFUNC(op_b179_0), 0, 45433 }, /* EOR.W Dn,(xxx).L */ -{ CPUFUNC(op_b180_0), 0, 45440 }, /* EOR.L Dn,Dn */ -{ CPUFUNC(op_b188_0), 0, 45448 }, /* CMPM.L (An)+,(An)+ */ -{ CPUFUNC(op_b190_0), 0, 45456 }, /* EOR.L Dn,(An) */ -{ CPUFUNC(op_b198_0), 0, 45464 }, /* EOR.L Dn,(An)+ */ -{ CPUFUNC(op_b1a0_0), 0, 45472 }, /* EOR.L Dn,-(An) */ -{ CPUFUNC(op_b1a8_0), 0, 45480 }, /* EOR.L Dn,(d16,An) */ -{ CPUFUNC(op_b1b0_3), 0, 45488 }, /* EOR.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_b1b8_0), 0, 45496 }, /* EOR.L Dn,(xxx).W */ -{ CPUFUNC(op_b1b9_0), 0, 45497 }, /* EOR.L Dn,(xxx).L */ -{ CPUFUNC(op_b1c0_0), 0, 45504 }, /* CMPA.L Dn,An */ -{ CPUFUNC(op_b1c8_0), 0, 45512 }, /* CMPA.L An,An */ -{ CPUFUNC(op_b1d0_0), 0, 45520 }, /* CMPA.L (An),An */ -{ CPUFUNC(op_b1d8_0), 0, 45528 }, /* CMPA.L (An)+,An */ -{ CPUFUNC(op_b1e0_0), 0, 45536 }, /* CMPA.L -(An),An */ -{ CPUFUNC(op_b1e8_0), 0, 45544 }, /* CMPA.L (d16,An),An */ -{ CPUFUNC(op_b1f0_3), 0, 45552 }, /* CMPA.L (d8,An,Xn),An */ -{ CPUFUNC(op_b1f8_0), 0, 45560 }, /* CMPA.L (xxx).W,An */ -{ CPUFUNC(op_b1f9_0), 0, 45561 }, /* CMPA.L (xxx).L,An */ -{ CPUFUNC(op_b1fa_0), 0, 45562 }, /* CMPA.L (d16,PC),An */ -{ CPUFUNC(op_b1fb_3), 0, 45563 }, /* CMPA.L (d8,PC,Xn),An */ -{ CPUFUNC(op_b1fc_0), 0, 45564 }, /* CMPA.L #.L,An */ -{ CPUFUNC(op_c000_0), 0, 49152 }, /* AND.B Dn,Dn */ -{ CPUFUNC(op_c010_0), 0, 49168 }, /* AND.B (An),Dn */ -{ CPUFUNC(op_c018_0), 0, 49176 }, /* AND.B (An)+,Dn */ -{ CPUFUNC(op_c020_0), 0, 49184 }, /* AND.B -(An),Dn */ -{ CPUFUNC(op_c028_0), 0, 49192 }, /* AND.B (d16,An),Dn */ -{ CPUFUNC(op_c030_3), 0, 49200 }, /* AND.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_c038_0), 0, 49208 }, /* AND.B (xxx).W,Dn */ -{ CPUFUNC(op_c039_0), 0, 49209 }, /* AND.B (xxx).L,Dn */ -{ CPUFUNC(op_c03a_0), 0, 49210 }, /* AND.B (d16,PC),Dn */ -{ CPUFUNC(op_c03b_3), 0, 49211 }, /* AND.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c03c_0), 0, 49212 }, /* AND.B #.B,Dn */ -{ CPUFUNC(op_c040_0), 0, 49216 }, /* AND.W Dn,Dn */ -{ CPUFUNC(op_c050_0), 0, 49232 }, /* AND.W (An),Dn */ -{ CPUFUNC(op_c058_0), 0, 49240 }, /* AND.W (An)+,Dn */ -{ CPUFUNC(op_c060_0), 0, 49248 }, /* AND.W -(An),Dn */ -{ CPUFUNC(op_c068_0), 0, 49256 }, /* AND.W (d16,An),Dn */ -{ CPUFUNC(op_c070_3), 0, 49264 }, /* AND.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c078_0), 0, 49272 }, /* AND.W (xxx).W,Dn */ -{ CPUFUNC(op_c079_0), 0, 49273 }, /* AND.W (xxx).L,Dn */ -{ CPUFUNC(op_c07a_0), 0, 49274 }, /* AND.W (d16,PC),Dn */ -{ CPUFUNC(op_c07b_3), 0, 49275 }, /* AND.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c07c_0), 0, 49276 }, /* AND.W #.W,Dn */ -{ CPUFUNC(op_c080_0), 0, 49280 }, /* AND.L Dn,Dn */ -{ CPUFUNC(op_c090_0), 0, 49296 }, /* AND.L (An),Dn */ -{ CPUFUNC(op_c098_0), 0, 49304 }, /* AND.L (An)+,Dn */ -{ CPUFUNC(op_c0a0_0), 0, 49312 }, /* AND.L -(An),Dn */ -{ CPUFUNC(op_c0a8_0), 0, 49320 }, /* AND.L (d16,An),Dn */ -{ CPUFUNC(op_c0b0_3), 0, 49328 }, /* AND.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_c0b8_0), 0, 49336 }, /* AND.L (xxx).W,Dn */ -{ CPUFUNC(op_c0b9_0), 0, 49337 }, /* AND.L (xxx).L,Dn */ -{ CPUFUNC(op_c0ba_0), 0, 49338 }, /* AND.L (d16,PC),Dn */ -{ CPUFUNC(op_c0bb_3), 0, 49339 }, /* AND.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c0bc_0), 0, 49340 }, /* AND.L #.L,Dn */ -{ CPUFUNC(op_c0c0_0), 0, 49344 }, /* MULU.W Dn,Dn */ -{ CPUFUNC(op_c0d0_0), 0, 49360 }, /* MULU.W (An),Dn */ -{ CPUFUNC(op_c0d8_0), 0, 49368 }, /* MULU.W (An)+,Dn */ -{ CPUFUNC(op_c0e0_0), 0, 49376 }, /* MULU.W -(An),Dn */ -{ CPUFUNC(op_c0e8_0), 0, 49384 }, /* MULU.W (d16,An),Dn */ -{ CPUFUNC(op_c0f0_3), 0, 49392 }, /* MULU.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c0f8_0), 0, 49400 }, /* MULU.W (xxx).W,Dn */ -{ CPUFUNC(op_c0f9_0), 0, 49401 }, /* MULU.W (xxx).L,Dn */ -{ CPUFUNC(op_c0fa_0), 0, 49402 }, /* MULU.W (d16,PC),Dn */ -{ CPUFUNC(op_c0fb_3), 0, 49403 }, /* MULU.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c0fc_0), 0, 49404 }, /* MULU.W #.W,Dn */ -{ CPUFUNC(op_c100_1), 0, 49408 }, /* ABCD.B Dn,Dn */ -{ CPUFUNC(op_c108_1), 0, 49416 }, /* ABCD.B -(An),-(An) */ -{ CPUFUNC(op_c110_0), 0, 49424 }, /* AND.B Dn,(An) */ -{ CPUFUNC(op_c118_0), 0, 49432 }, /* AND.B Dn,(An)+ */ -{ CPUFUNC(op_c120_0), 0, 49440 }, /* AND.B Dn,-(An) */ -{ CPUFUNC(op_c128_0), 0, 49448 }, /* AND.B Dn,(d16,An) */ -{ CPUFUNC(op_c130_3), 0, 49456 }, /* AND.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c138_0), 0, 49464 }, /* AND.B Dn,(xxx).W */ -{ CPUFUNC(op_c139_0), 0, 49465 }, /* AND.B Dn,(xxx).L */ -{ CPUFUNC_FF(op_c140_0), 0, 49472 }, /* EXG.L Dn,Dn */ -{ CPUFUNC_FF(op_c148_0), 0, 49480 }, /* EXG.L An,An */ -{ CPUFUNC(op_c150_0), 0, 49488 }, /* AND.W Dn,(An) */ -{ CPUFUNC(op_c158_0), 0, 49496 }, /* AND.W Dn,(An)+ */ -{ CPUFUNC(op_c160_0), 0, 49504 }, /* AND.W Dn,-(An) */ -{ CPUFUNC(op_c168_0), 0, 49512 }, /* AND.W Dn,(d16,An) */ -{ CPUFUNC(op_c170_3), 0, 49520 }, /* AND.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c178_0), 0, 49528 }, /* AND.W Dn,(xxx).W */ -{ CPUFUNC(op_c179_0), 0, 49529 }, /* AND.W Dn,(xxx).L */ -{ CPUFUNC_FF(op_c188_0), 0, 49544 }, /* EXG.L Dn,An */ -{ CPUFUNC(op_c190_0), 0, 49552 }, /* AND.L Dn,(An) */ -{ CPUFUNC(op_c198_0), 0, 49560 }, /* AND.L Dn,(An)+ */ -{ CPUFUNC(op_c1a0_0), 0, 49568 }, /* AND.L Dn,-(An) */ -{ CPUFUNC(op_c1a8_0), 0, 49576 }, /* AND.L Dn,(d16,An) */ -{ CPUFUNC(op_c1b0_3), 0, 49584 }, /* AND.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_c1b8_0), 0, 49592 }, /* AND.L Dn,(xxx).W */ -{ CPUFUNC(op_c1b9_0), 0, 49593 }, /* AND.L Dn,(xxx).L */ -{ CPUFUNC(op_c1c0_0), 0, 49600 }, /* MULS.W Dn,Dn */ -{ CPUFUNC(op_c1d0_0), 0, 49616 }, /* MULS.W (An),Dn */ -{ CPUFUNC(op_c1d8_0), 0, 49624 }, /* MULS.W (An)+,Dn */ -{ CPUFUNC(op_c1e0_0), 0, 49632 }, /* MULS.W -(An),Dn */ -{ CPUFUNC(op_c1e8_0), 0, 49640 }, /* MULS.W (d16,An),Dn */ -{ CPUFUNC(op_c1f0_3), 0, 49648 }, /* MULS.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_c1f8_0), 0, 49656 }, /* MULS.W (xxx).W,Dn */ -{ CPUFUNC(op_c1f9_0), 0, 49657 }, /* MULS.W (xxx).L,Dn */ -{ CPUFUNC(op_c1fa_0), 0, 49658 }, /* MULS.W (d16,PC),Dn */ -{ CPUFUNC(op_c1fb_3), 0, 49659 }, /* MULS.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_c1fc_0), 0, 49660 }, /* MULS.W #.W,Dn */ -{ CPUFUNC(op_d000_0), 0, 53248 }, /* ADD.B Dn,Dn */ -{ CPUFUNC(op_d010_0), 0, 53264 }, /* ADD.B (An),Dn */ -{ CPUFUNC(op_d018_0), 0, 53272 }, /* ADD.B (An)+,Dn */ -{ CPUFUNC(op_d020_0), 0, 53280 }, /* ADD.B -(An),Dn */ -{ CPUFUNC(op_d028_0), 0, 53288 }, /* ADD.B (d16,An),Dn */ -{ CPUFUNC(op_d030_3), 0, 53296 }, /* ADD.B (d8,An,Xn),Dn */ -{ CPUFUNC(op_d038_0), 0, 53304 }, /* ADD.B (xxx).W,Dn */ -{ CPUFUNC(op_d039_0), 0, 53305 }, /* ADD.B (xxx).L,Dn */ -{ CPUFUNC(op_d03a_0), 0, 53306 }, /* ADD.B (d16,PC),Dn */ -{ CPUFUNC(op_d03b_3), 0, 53307 }, /* ADD.B (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d03c_0), 0, 53308 }, /* ADD.B #.B,Dn */ -{ CPUFUNC(op_d040_0), 0, 53312 }, /* ADD.W Dn,Dn */ -{ CPUFUNC(op_d048_0), 0, 53320 }, /* ADD.W An,Dn */ -{ CPUFUNC(op_d050_0), 0, 53328 }, /* ADD.W (An),Dn */ -{ CPUFUNC(op_d058_0), 0, 53336 }, /* ADD.W (An)+,Dn */ -{ CPUFUNC(op_d060_0), 0, 53344 }, /* ADD.W -(An),Dn */ -{ CPUFUNC(op_d068_0), 0, 53352 }, /* ADD.W (d16,An),Dn */ -{ CPUFUNC(op_d070_3), 0, 53360 }, /* ADD.W (d8,An,Xn),Dn */ -{ CPUFUNC(op_d078_0), 0, 53368 }, /* ADD.W (xxx).W,Dn */ -{ CPUFUNC(op_d079_0), 0, 53369 }, /* ADD.W (xxx).L,Dn */ -{ CPUFUNC(op_d07a_0), 0, 53370 }, /* ADD.W (d16,PC),Dn */ -{ CPUFUNC(op_d07b_3), 0, 53371 }, /* ADD.W (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d07c_0), 0, 53372 }, /* ADD.W #.W,Dn */ -{ CPUFUNC(op_d080_0), 0, 53376 }, /* ADD.L Dn,Dn */ -{ CPUFUNC(op_d088_0), 0, 53384 }, /* ADD.L An,Dn */ -{ CPUFUNC(op_d090_0), 0, 53392 }, /* ADD.L (An),Dn */ -{ CPUFUNC(op_d098_0), 0, 53400 }, /* ADD.L (An)+,Dn */ -{ CPUFUNC(op_d0a0_0), 0, 53408 }, /* ADD.L -(An),Dn */ -{ CPUFUNC(op_d0a8_0), 0, 53416 }, /* ADD.L (d16,An),Dn */ -{ CPUFUNC(op_d0b0_3), 0, 53424 }, /* ADD.L (d8,An,Xn),Dn */ -{ CPUFUNC(op_d0b8_0), 0, 53432 }, /* ADD.L (xxx).W,Dn */ -{ CPUFUNC(op_d0b9_0), 0, 53433 }, /* ADD.L (xxx).L,Dn */ -{ CPUFUNC(op_d0ba_0), 0, 53434 }, /* ADD.L (d16,PC),Dn */ -{ CPUFUNC(op_d0bb_3), 0, 53435 }, /* ADD.L (d8,PC,Xn),Dn */ -{ CPUFUNC(op_d0bc_0), 0, 53436 }, /* ADD.L #.L,Dn */ -{ CPUFUNC_FF(op_d0c0_0), 0, 53440 }, /* ADDA.W Dn,An */ -{ CPUFUNC_FF(op_d0c8_0), 0, 53448 }, /* ADDA.W An,An */ -{ CPUFUNC_FF(op_d0d0_0), 0, 53456 }, /* ADDA.W (An),An */ -{ CPUFUNC_FF(op_d0d8_0), 0, 53464 }, /* ADDA.W (An)+,An */ -{ CPUFUNC_FF(op_d0e0_0), 0, 53472 }, /* ADDA.W -(An),An */ -{ CPUFUNC_FF(op_d0e8_0), 0, 53480 }, /* ADDA.W (d16,An),An */ -{ CPUFUNC_FF(op_d0f0_3), 0, 53488 }, /* ADDA.W (d8,An,Xn),An */ -{ CPUFUNC_FF(op_d0f8_0), 0, 53496 }, /* ADDA.W (xxx).W,An */ -{ CPUFUNC_FF(op_d0f9_0), 0, 53497 }, /* ADDA.W (xxx).L,An */ -{ CPUFUNC_FF(op_d0fa_0), 0, 53498 }, /* ADDA.W (d16,PC),An */ -{ CPUFUNC_FF(op_d0fb_3), 0, 53499 }, /* ADDA.W (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_d0fc_0), 0, 53500 }, /* ADDA.W #.W,An */ -{ CPUFUNC(op_d100_0), 0, 53504 }, /* ADDX.B Dn,Dn */ -{ CPUFUNC(op_d108_0), 0, 53512 }, /* ADDX.B -(An),-(An) */ -{ CPUFUNC(op_d110_0), 0, 53520 }, /* ADD.B Dn,(An) */ -{ CPUFUNC(op_d118_0), 0, 53528 }, /* ADD.B Dn,(An)+ */ -{ CPUFUNC(op_d120_0), 0, 53536 }, /* ADD.B Dn,-(An) */ -{ CPUFUNC(op_d128_0), 0, 53544 }, /* ADD.B Dn,(d16,An) */ -{ CPUFUNC(op_d130_3), 0, 53552 }, /* ADD.B Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d138_0), 0, 53560 }, /* ADD.B Dn,(xxx).W */ -{ CPUFUNC(op_d139_0), 0, 53561 }, /* ADD.B Dn,(xxx).L */ -{ CPUFUNC(op_d140_0), 0, 53568 }, /* ADDX.W Dn,Dn */ -{ CPUFUNC(op_d148_0), 0, 53576 }, /* ADDX.W -(An),-(An) */ -{ CPUFUNC(op_d150_0), 0, 53584 }, /* ADD.W Dn,(An) */ -{ CPUFUNC(op_d158_0), 0, 53592 }, /* ADD.W Dn,(An)+ */ -{ CPUFUNC(op_d160_0), 0, 53600 }, /* ADD.W Dn,-(An) */ -{ CPUFUNC(op_d168_0), 0, 53608 }, /* ADD.W Dn,(d16,An) */ -{ CPUFUNC(op_d170_3), 0, 53616 }, /* ADD.W Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d178_0), 0, 53624 }, /* ADD.W Dn,(xxx).W */ -{ CPUFUNC(op_d179_0), 0, 53625 }, /* ADD.W Dn,(xxx).L */ -{ CPUFUNC(op_d180_0), 0, 53632 }, /* ADDX.L Dn,Dn */ -{ CPUFUNC(op_d188_0), 0, 53640 }, /* ADDX.L -(An),-(An) */ -{ CPUFUNC(op_d190_0), 0, 53648 }, /* ADD.L Dn,(An) */ -{ CPUFUNC(op_d198_0), 0, 53656 }, /* ADD.L Dn,(An)+ */ -{ CPUFUNC(op_d1a0_0), 0, 53664 }, /* ADD.L Dn,-(An) */ -{ CPUFUNC(op_d1a8_0), 0, 53672 }, /* ADD.L Dn,(d16,An) */ -{ CPUFUNC(op_d1b0_3), 0, 53680 }, /* ADD.L Dn,(d8,An,Xn) */ -{ CPUFUNC(op_d1b8_0), 0, 53688 }, /* ADD.L Dn,(xxx).W */ -{ CPUFUNC(op_d1b9_0), 0, 53689 }, /* ADD.L Dn,(xxx).L */ -{ CPUFUNC_FF(op_d1c0_0), 0, 53696 }, /* ADDA.L Dn,An */ -{ CPUFUNC_FF(op_d1c8_0), 0, 53704 }, /* ADDA.L An,An */ -{ CPUFUNC_FF(op_d1d0_0), 0, 53712 }, /* ADDA.L (An),An */ -{ CPUFUNC_FF(op_d1d8_0), 0, 53720 }, /* ADDA.L (An)+,An */ -{ CPUFUNC_FF(op_d1e0_0), 0, 53728 }, /* ADDA.L -(An),An */ -{ CPUFUNC_FF(op_d1e8_0), 0, 53736 }, /* ADDA.L (d16,An),An */ -{ CPUFUNC_FF(op_d1f0_3), 0, 53744 }, /* ADDA.L (d8,An,Xn),An */ -{ CPUFUNC_FF(op_d1f8_0), 0, 53752 }, /* ADDA.L (xxx).W,An */ -{ CPUFUNC_FF(op_d1f9_0), 0, 53753 }, /* ADDA.L (xxx).L,An */ -{ CPUFUNC_FF(op_d1fa_0), 0, 53754 }, /* ADDA.L (d16,PC),An */ -{ CPUFUNC_FF(op_d1fb_3), 0, 53755 }, /* ADDA.L (d8,PC,Xn),An */ -{ CPUFUNC_FF(op_d1fc_0), 0, 53756 }, /* ADDA.L #.L,An */ -{ CPUFUNC(op_e000_0), 0, 57344 }, /* ASR.B #,Dn */ -{ CPUFUNC(op_e008_0), 0, 57352 }, /* LSR.B #,Dn */ -{ CPUFUNC(op_e010_0), 0, 57360 }, /* ROXR.B #,Dn */ -{ CPUFUNC(op_e018_0), 0, 57368 }, /* ROR.B #,Dn */ -{ CPUFUNC(op_e020_0), 0, 57376 }, /* ASR.B Dn,Dn */ -{ CPUFUNC(op_e028_0), 0, 57384 }, /* LSR.B Dn,Dn */ -{ CPUFUNC(op_e030_0), 0, 57392 }, /* ROXR.B Dn,Dn */ -{ CPUFUNC(op_e038_0), 0, 57400 }, /* ROR.B Dn,Dn */ -{ CPUFUNC(op_e040_0), 0, 57408 }, /* ASR.W #,Dn */ -{ CPUFUNC(op_e048_0), 0, 57416 }, /* LSR.W #,Dn */ -{ CPUFUNC(op_e050_0), 0, 57424 }, /* ROXR.W #,Dn */ -{ CPUFUNC(op_e058_0), 0, 57432 }, /* ROR.W #,Dn */ -{ CPUFUNC(op_e060_0), 0, 57440 }, /* ASR.W Dn,Dn */ -{ CPUFUNC(op_e068_0), 0, 57448 }, /* LSR.W Dn,Dn */ -{ CPUFUNC(op_e070_0), 0, 57456 }, /* ROXR.W Dn,Dn */ -{ CPUFUNC(op_e078_0), 0, 57464 }, /* ROR.W Dn,Dn */ -{ CPUFUNC(op_e080_0), 0, 57472 }, /* ASR.L #,Dn */ -{ CPUFUNC(op_e088_0), 0, 57480 }, /* LSR.L #,Dn */ -{ CPUFUNC(op_e090_0), 0, 57488 }, /* ROXR.L #,Dn */ -{ CPUFUNC(op_e098_0), 0, 57496 }, /* ROR.L #,Dn */ -{ CPUFUNC(op_e0a0_0), 0, 57504 }, /* ASR.L Dn,Dn */ -{ CPUFUNC(op_e0a8_0), 0, 57512 }, /* LSR.L Dn,Dn */ -{ CPUFUNC(op_e0b0_0), 0, 57520 }, /* ROXR.L Dn,Dn */ -{ CPUFUNC(op_e0b8_0), 0, 57528 }, /* ROR.L Dn,Dn */ -{ CPUFUNC(op_e0d0_0), 0, 57552 }, /* ASRW.W (An) */ -{ CPUFUNC(op_e0d8_0), 0, 57560 }, /* ASRW.W (An)+ */ -{ CPUFUNC(op_e0e0_0), 0, 57568 }, /* ASRW.W -(An) */ -{ CPUFUNC(op_e0e8_0), 0, 57576 }, /* ASRW.W (d16,An) */ -{ CPUFUNC(op_e0f0_3), 0, 57584 }, /* ASRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e0f8_0), 0, 57592 }, /* ASRW.W (xxx).W */ -{ CPUFUNC(op_e0f9_0), 0, 57593 }, /* ASRW.W (xxx).L */ -{ CPUFUNC(op_e100_0), 0, 57600 }, /* ASL.B #,Dn */ -{ CPUFUNC(op_e108_0), 0, 57608 }, /* LSL.B #,Dn */ -{ CPUFUNC(op_e110_0), 0, 57616 }, /* ROXL.B #,Dn */ -{ CPUFUNC(op_e118_0), 0, 57624 }, /* ROL.B #,Dn */ -{ CPUFUNC(op_e120_0), 0, 57632 }, /* ASL.B Dn,Dn */ -{ CPUFUNC(op_e128_0), 0, 57640 }, /* LSL.B Dn,Dn */ -{ CPUFUNC(op_e130_0), 0, 57648 }, /* ROXL.B Dn,Dn */ -{ CPUFUNC(op_e138_0), 0, 57656 }, /* ROL.B Dn,Dn */ -{ CPUFUNC(op_e140_0), 0, 57664 }, /* ASL.W #,Dn */ -{ CPUFUNC(op_e148_0), 0, 57672 }, /* LSL.W #,Dn */ -{ CPUFUNC(op_e150_0), 0, 57680 }, /* ROXL.W #,Dn */ -{ CPUFUNC(op_e158_0), 0, 57688 }, /* ROL.W #,Dn */ -{ CPUFUNC(op_e160_0), 0, 57696 }, /* ASL.W Dn,Dn */ -{ CPUFUNC(op_e168_0), 0, 57704 }, /* LSL.W Dn,Dn */ -{ CPUFUNC(op_e170_0), 0, 57712 }, /* ROXL.W Dn,Dn */ -{ CPUFUNC(op_e178_0), 0, 57720 }, /* ROL.W Dn,Dn */ -{ CPUFUNC(op_e180_0), 0, 57728 }, /* ASL.L #,Dn */ -{ CPUFUNC(op_e188_0), 0, 57736 }, /* LSL.L #,Dn */ -{ CPUFUNC(op_e190_0), 0, 57744 }, /* ROXL.L #,Dn */ -{ CPUFUNC(op_e198_0), 0, 57752 }, /* ROL.L #,Dn */ -{ CPUFUNC(op_e1a0_0), 0, 57760 }, /* ASL.L Dn,Dn */ -{ CPUFUNC(op_e1a8_0), 0, 57768 }, /* LSL.L Dn,Dn */ -{ CPUFUNC(op_e1b0_0), 0, 57776 }, /* ROXL.L Dn,Dn */ -{ CPUFUNC(op_e1b8_0), 0, 57784 }, /* ROL.L Dn,Dn */ -{ CPUFUNC(op_e1d0_0), 0, 57808 }, /* ASLW.W (An) */ -{ CPUFUNC(op_e1d8_0), 0, 57816 }, /* ASLW.W (An)+ */ -{ CPUFUNC(op_e1e0_0), 0, 57824 }, /* ASLW.W -(An) */ -{ CPUFUNC(op_e1e8_0), 0, 57832 }, /* ASLW.W (d16,An) */ -{ CPUFUNC(op_e1f0_3), 0, 57840 }, /* ASLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e1f8_0), 0, 57848 }, /* ASLW.W (xxx).W */ -{ CPUFUNC(op_e1f9_0), 0, 57849 }, /* ASLW.W (xxx).L */ -{ CPUFUNC(op_e2d0_0), 0, 58064 }, /* LSRW.W (An) */ -{ CPUFUNC(op_e2d8_0), 0, 58072 }, /* LSRW.W (An)+ */ -{ CPUFUNC(op_e2e0_0), 0, 58080 }, /* LSRW.W -(An) */ -{ CPUFUNC(op_e2e8_0), 0, 58088 }, /* LSRW.W (d16,An) */ -{ CPUFUNC(op_e2f0_3), 0, 58096 }, /* LSRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e2f8_0), 0, 58104 }, /* LSRW.W (xxx).W */ -{ CPUFUNC(op_e2f9_0), 0, 58105 }, /* LSRW.W (xxx).L */ -{ CPUFUNC(op_e3d0_0), 0, 58320 }, /* LSLW.W (An) */ -{ CPUFUNC(op_e3d8_0), 0, 58328 }, /* LSLW.W (An)+ */ -{ CPUFUNC(op_e3e0_0), 0, 58336 }, /* LSLW.W -(An) */ -{ CPUFUNC(op_e3e8_0), 0, 58344 }, /* LSLW.W (d16,An) */ -{ CPUFUNC(op_e3f0_3), 0, 58352 }, /* LSLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e3f8_0), 0, 58360 }, /* LSLW.W (xxx).W */ -{ CPUFUNC(op_e3f9_0), 0, 58361 }, /* LSLW.W (xxx).L */ -{ CPUFUNC(op_e4d0_0), 0, 58576 }, /* ROXRW.W (An) */ -{ CPUFUNC(op_e4d8_0), 0, 58584 }, /* ROXRW.W (An)+ */ -{ CPUFUNC(op_e4e0_0), 0, 58592 }, /* ROXRW.W -(An) */ -{ CPUFUNC(op_e4e8_0), 0, 58600 }, /* ROXRW.W (d16,An) */ -{ CPUFUNC(op_e4f0_3), 0, 58608 }, /* ROXRW.W (d8,An,Xn) */ -{ CPUFUNC(op_e4f8_0), 0, 58616 }, /* ROXRW.W (xxx).W */ -{ CPUFUNC(op_e4f9_0), 0, 58617 }, /* ROXRW.W (xxx).L */ -{ CPUFUNC(op_e5d0_0), 0, 58832 }, /* ROXLW.W (An) */ -{ CPUFUNC(op_e5d8_0), 0, 58840 }, /* ROXLW.W (An)+ */ -{ CPUFUNC(op_e5e0_0), 0, 58848 }, /* ROXLW.W -(An) */ -{ CPUFUNC(op_e5e8_0), 0, 58856 }, /* ROXLW.W (d16,An) */ -{ CPUFUNC(op_e5f0_3), 0, 58864 }, /* ROXLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e5f8_0), 0, 58872 }, /* ROXLW.W (xxx).W */ -{ CPUFUNC(op_e5f9_0), 0, 58873 }, /* ROXLW.W (xxx).L */ -{ CPUFUNC(op_e6d0_0), 0, 59088 }, /* RORW.W (An) */ -{ CPUFUNC(op_e6d8_0), 0, 59096 }, /* RORW.W (An)+ */ -{ CPUFUNC(op_e6e0_0), 0, 59104 }, /* RORW.W -(An) */ -{ CPUFUNC(op_e6e8_0), 0, 59112 }, /* RORW.W (d16,An) */ -{ CPUFUNC(op_e6f0_3), 0, 59120 }, /* RORW.W (d8,An,Xn) */ -{ CPUFUNC(op_e6f8_0), 0, 59128 }, /* RORW.W (xxx).W */ -{ CPUFUNC(op_e6f9_0), 0, 59129 }, /* RORW.W (xxx).L */ -{ CPUFUNC(op_e7d0_0), 0, 59344 }, /* ROLW.W (An) */ -{ CPUFUNC(op_e7d8_0), 0, 59352 }, /* ROLW.W (An)+ */ -{ CPUFUNC(op_e7e0_0), 0, 59360 }, /* ROLW.W -(An) */ -{ CPUFUNC(op_e7e8_0), 0, 59368 }, /* ROLW.W (d16,An) */ -{ CPUFUNC(op_e7f0_3), 0, 59376 }, /* ROLW.W (d8,An,Xn) */ -{ CPUFUNC(op_e7f8_0), 0, 59384 }, /* ROLW.W (xxx).W */ -{ CPUFUNC(op_e7f9_0), 0, 59385 }, /* ROLW.W (xxx).L */ -{ 0, 0, 0 }}; diff --git a/BasiliskII/src/uae_cpu/cpustbl_nf.cpp b/BasiliskII/src/uae_cpu/cpustbl_nf.cpp deleted file mode 100644 index e59ae0f0..00000000 --- a/BasiliskII/src/uae_cpu/cpustbl_nf.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#define NOFLAGS -#include "cpustbl.cpp" diff --git a/BasiliskII/src/uae_cpu/cputbl.h b/BasiliskII/src/uae_cpu/cputbl.h deleted file mode 100644 index 421a51d3..00000000 --- a/BasiliskII/src/uae_cpu/cputbl.h +++ /dev/null @@ -1,4322 +0,0 @@ -extern cpuop_func op_0_0_nf; -extern cpuop_func op_0_0_ff; -extern cpuop_func op_10_0_nf; -extern cpuop_func op_10_0_ff; -extern cpuop_func op_18_0_nf; -extern cpuop_func op_18_0_ff; -extern cpuop_func op_20_0_nf; -extern cpuop_func op_20_0_ff; -extern cpuop_func op_28_0_nf; -extern cpuop_func op_28_0_ff; -extern cpuop_func op_30_0_nf; -extern cpuop_func op_30_0_ff; -extern cpuop_func op_38_0_nf; -extern cpuop_func op_38_0_ff; -extern cpuop_func op_39_0_nf; -extern cpuop_func op_39_0_ff; -extern cpuop_func op_3c_0_nf; -extern cpuop_func op_3c_0_ff; -extern cpuop_func op_40_0_nf; -extern cpuop_func op_40_0_ff; -extern cpuop_func op_50_0_nf; -extern cpuop_func op_50_0_ff; -extern cpuop_func op_58_0_nf; -extern cpuop_func op_58_0_ff; -extern cpuop_func op_60_0_nf; -extern cpuop_func op_60_0_ff; -extern cpuop_func op_68_0_nf; -extern cpuop_func op_68_0_ff; -extern cpuop_func op_70_0_nf; -extern cpuop_func op_70_0_ff; -extern cpuop_func op_78_0_nf; -extern cpuop_func op_78_0_ff; -extern cpuop_func op_79_0_nf; -extern cpuop_func op_79_0_ff; -extern cpuop_func op_7c_0_nf; -extern cpuop_func op_7c_0_ff; -extern cpuop_func op_80_0_nf; -extern cpuop_func op_80_0_ff; -extern cpuop_func op_90_0_nf; -extern cpuop_func op_90_0_ff; -extern cpuop_func op_98_0_nf; -extern cpuop_func op_98_0_ff; -extern cpuop_func op_a0_0_nf; -extern cpuop_func op_a0_0_ff; -extern cpuop_func op_a8_0_nf; -extern cpuop_func op_a8_0_ff; -extern cpuop_func op_b0_0_nf; -extern cpuop_func op_b0_0_ff; -extern cpuop_func op_b8_0_nf; -extern cpuop_func op_b8_0_ff; -extern cpuop_func op_b9_0_nf; -extern cpuop_func op_b9_0_ff; -extern cpuop_func op_d0_0_nf; -extern cpuop_func op_d0_0_ff; -extern cpuop_func op_e8_0_nf; -extern cpuop_func op_e8_0_ff; -extern cpuop_func op_f0_0_nf; -extern cpuop_func op_f0_0_ff; -extern cpuop_func op_f8_0_nf; -extern cpuop_func op_f8_0_ff; -extern cpuop_func op_f9_0_nf; -extern cpuop_func op_f9_0_ff; -extern cpuop_func op_fa_0_nf; -extern cpuop_func op_fa_0_ff; -extern cpuop_func op_fb_0_nf; -extern cpuop_func op_fb_0_ff; -extern cpuop_func op_100_0_nf; -extern cpuop_func op_100_0_ff; -extern cpuop_func op_108_0_nf; -extern cpuop_func op_108_0_ff; -extern cpuop_func op_110_0_nf; -extern cpuop_func op_110_0_ff; -extern cpuop_func op_118_0_nf; -extern cpuop_func op_118_0_ff; -extern cpuop_func op_120_0_nf; -extern cpuop_func op_120_0_ff; -extern cpuop_func op_128_0_nf; -extern cpuop_func op_128_0_ff; -extern cpuop_func op_130_0_nf; -extern cpuop_func op_130_0_ff; -extern cpuop_func op_138_0_nf; -extern cpuop_func op_138_0_ff; -extern cpuop_func op_139_0_nf; -extern cpuop_func op_139_0_ff; -extern cpuop_func op_13a_0_nf; -extern cpuop_func op_13a_0_ff; -extern cpuop_func op_13b_0_nf; -extern cpuop_func op_13b_0_ff; -extern cpuop_func op_13c_0_nf; -extern cpuop_func op_13c_0_ff; -extern cpuop_func op_140_0_nf; -extern cpuop_func op_140_0_ff; -extern cpuop_func op_148_0_nf; -extern cpuop_func op_148_0_ff; -extern cpuop_func op_150_0_nf; -extern cpuop_func op_150_0_ff; -extern cpuop_func op_158_0_nf; -extern cpuop_func op_158_0_ff; -extern cpuop_func op_160_0_nf; -extern cpuop_func op_160_0_ff; -extern cpuop_func op_168_0_nf; -extern cpuop_func op_168_0_ff; -extern cpuop_func op_170_0_nf; -extern cpuop_func op_170_0_ff; -extern cpuop_func op_178_0_nf; -extern cpuop_func op_178_0_ff; -extern cpuop_func op_179_0_nf; -extern cpuop_func op_179_0_ff; -extern cpuop_func op_17a_0_nf; -extern cpuop_func op_17a_0_ff; -extern cpuop_func op_17b_0_nf; -extern cpuop_func op_17b_0_ff; -extern cpuop_func op_180_0_nf; -extern cpuop_func op_180_0_ff; -extern cpuop_func op_188_0_nf; -extern cpuop_func op_188_0_ff; -extern cpuop_func op_190_0_nf; -extern cpuop_func op_190_0_ff; -extern cpuop_func op_198_0_nf; -extern cpuop_func op_198_0_ff; -extern cpuop_func op_1a0_0_nf; -extern cpuop_func op_1a0_0_ff; -extern cpuop_func op_1a8_0_nf; -extern cpuop_func op_1a8_0_ff; -extern cpuop_func op_1b0_0_nf; -extern cpuop_func op_1b0_0_ff; -extern cpuop_func op_1b8_0_nf; -extern cpuop_func op_1b8_0_ff; -extern cpuop_func op_1b9_0_nf; -extern cpuop_func op_1b9_0_ff; -extern cpuop_func op_1ba_0_nf; -extern cpuop_func op_1ba_0_ff; -extern cpuop_func op_1bb_0_nf; -extern cpuop_func op_1bb_0_ff; -extern cpuop_func op_1c0_0_nf; -extern cpuop_func op_1c0_0_ff; -extern cpuop_func op_1c8_0_nf; -extern cpuop_func op_1c8_0_ff; -extern cpuop_func op_1d0_0_nf; -extern cpuop_func op_1d0_0_ff; -extern cpuop_func op_1d8_0_nf; -extern cpuop_func op_1d8_0_ff; -extern cpuop_func op_1e0_0_nf; -extern cpuop_func op_1e0_0_ff; -extern cpuop_func op_1e8_0_nf; -extern cpuop_func op_1e8_0_ff; -extern cpuop_func op_1f0_0_nf; -extern cpuop_func op_1f0_0_ff; -extern cpuop_func op_1f8_0_nf; -extern cpuop_func op_1f8_0_ff; -extern cpuop_func op_1f9_0_nf; -extern cpuop_func op_1f9_0_ff; -extern cpuop_func op_1fa_0_nf; -extern cpuop_func op_1fa_0_ff; -extern cpuop_func op_1fb_0_nf; -extern cpuop_func op_1fb_0_ff; -extern cpuop_func op_200_0_nf; -extern cpuop_func op_200_0_ff; -extern cpuop_func op_210_0_nf; -extern cpuop_func op_210_0_ff; -extern cpuop_func op_218_0_nf; -extern cpuop_func op_218_0_ff; -extern cpuop_func op_220_0_nf; -extern cpuop_func op_220_0_ff; -extern cpuop_func op_228_0_nf; -extern cpuop_func op_228_0_ff; -extern cpuop_func op_230_0_nf; -extern cpuop_func op_230_0_ff; -extern cpuop_func op_238_0_nf; -extern cpuop_func op_238_0_ff; -extern cpuop_func op_239_0_nf; -extern cpuop_func op_239_0_ff; -extern cpuop_func op_23c_0_nf; -extern cpuop_func op_23c_0_ff; -extern cpuop_func op_240_0_nf; -extern cpuop_func op_240_0_ff; -extern cpuop_func op_250_0_nf; -extern cpuop_func op_250_0_ff; -extern cpuop_func op_258_0_nf; -extern cpuop_func op_258_0_ff; -extern cpuop_func op_260_0_nf; -extern cpuop_func op_260_0_ff; -extern cpuop_func op_268_0_nf; -extern cpuop_func op_268_0_ff; -extern cpuop_func op_270_0_nf; -extern cpuop_func op_270_0_ff; -extern cpuop_func op_278_0_nf; -extern cpuop_func op_278_0_ff; -extern cpuop_func op_279_0_nf; -extern cpuop_func op_279_0_ff; -extern cpuop_func op_27c_0_nf; -extern cpuop_func op_27c_0_ff; -extern cpuop_func op_280_0_nf; -extern cpuop_func op_280_0_ff; -extern cpuop_func op_290_0_nf; -extern cpuop_func op_290_0_ff; -extern cpuop_func op_298_0_nf; -extern cpuop_func op_298_0_ff; -extern cpuop_func op_2a0_0_nf; -extern cpuop_func op_2a0_0_ff; -extern cpuop_func op_2a8_0_nf; -extern cpuop_func op_2a8_0_ff; -extern cpuop_func op_2b0_0_nf; -extern cpuop_func op_2b0_0_ff; -extern cpuop_func op_2b8_0_nf; -extern cpuop_func op_2b8_0_ff; -extern cpuop_func op_2b9_0_nf; -extern cpuop_func op_2b9_0_ff; -extern cpuop_func op_2d0_0_nf; -extern cpuop_func op_2d0_0_ff; -extern cpuop_func op_2e8_0_nf; -extern cpuop_func op_2e8_0_ff; -extern cpuop_func op_2f0_0_nf; -extern cpuop_func op_2f0_0_ff; -extern cpuop_func op_2f8_0_nf; -extern cpuop_func op_2f8_0_ff; -extern cpuop_func op_2f9_0_nf; -extern cpuop_func op_2f9_0_ff; -extern cpuop_func op_2fa_0_nf; -extern cpuop_func op_2fa_0_ff; -extern cpuop_func op_2fb_0_nf; -extern cpuop_func op_2fb_0_ff; -extern cpuop_func op_400_0_nf; -extern cpuop_func op_400_0_ff; -extern cpuop_func op_410_0_nf; -extern cpuop_func op_410_0_ff; -extern cpuop_func op_418_0_nf; -extern cpuop_func op_418_0_ff; -extern cpuop_func op_420_0_nf; -extern cpuop_func op_420_0_ff; -extern cpuop_func op_428_0_nf; -extern cpuop_func op_428_0_ff; -extern cpuop_func op_430_0_nf; -extern cpuop_func op_430_0_ff; -extern cpuop_func op_438_0_nf; -extern cpuop_func op_438_0_ff; -extern cpuop_func op_439_0_nf; -extern cpuop_func op_439_0_ff; -extern cpuop_func op_440_0_nf; -extern cpuop_func op_440_0_ff; -extern cpuop_func op_450_0_nf; -extern cpuop_func op_450_0_ff; -extern cpuop_func op_458_0_nf; -extern cpuop_func op_458_0_ff; -extern cpuop_func op_460_0_nf; -extern cpuop_func op_460_0_ff; -extern cpuop_func op_468_0_nf; -extern cpuop_func op_468_0_ff; -extern cpuop_func op_470_0_nf; -extern cpuop_func op_470_0_ff; -extern cpuop_func op_478_0_nf; -extern cpuop_func op_478_0_ff; -extern cpuop_func op_479_0_nf; -extern cpuop_func op_479_0_ff; -extern cpuop_func op_480_0_nf; -extern cpuop_func op_480_0_ff; -extern cpuop_func op_490_0_nf; -extern cpuop_func op_490_0_ff; -extern cpuop_func op_498_0_nf; -extern cpuop_func op_498_0_ff; -extern cpuop_func op_4a0_0_nf; -extern cpuop_func op_4a0_0_ff; -extern cpuop_func op_4a8_0_nf; -extern cpuop_func op_4a8_0_ff; -extern cpuop_func op_4b0_0_nf; -extern cpuop_func op_4b0_0_ff; -extern cpuop_func op_4b8_0_nf; -extern cpuop_func op_4b8_0_ff; -extern cpuop_func op_4b9_0_nf; -extern cpuop_func op_4b9_0_ff; -extern cpuop_func op_4d0_0_nf; -extern cpuop_func op_4d0_0_ff; -extern cpuop_func op_4e8_0_nf; -extern cpuop_func op_4e8_0_ff; -extern cpuop_func op_4f0_0_nf; -extern cpuop_func op_4f0_0_ff; -extern cpuop_func op_4f8_0_nf; -extern cpuop_func op_4f8_0_ff; -extern cpuop_func op_4f9_0_nf; -extern cpuop_func op_4f9_0_ff; -extern cpuop_func op_4fa_0_nf; -extern cpuop_func op_4fa_0_ff; -extern cpuop_func op_4fb_0_nf; -extern cpuop_func op_4fb_0_ff; -extern cpuop_func op_600_0_nf; -extern cpuop_func op_600_0_ff; -extern cpuop_func op_610_0_nf; -extern cpuop_func op_610_0_ff; -extern cpuop_func op_618_0_nf; -extern cpuop_func op_618_0_ff; -extern cpuop_func op_620_0_nf; -extern cpuop_func op_620_0_ff; -extern cpuop_func op_628_0_nf; -extern cpuop_func op_628_0_ff; -extern cpuop_func op_630_0_nf; -extern cpuop_func op_630_0_ff; -extern cpuop_func op_638_0_nf; -extern cpuop_func op_638_0_ff; -extern cpuop_func op_639_0_nf; -extern cpuop_func op_639_0_ff; -extern cpuop_func op_640_0_nf; -extern cpuop_func op_640_0_ff; -extern cpuop_func op_650_0_nf; -extern cpuop_func op_650_0_ff; -extern cpuop_func op_658_0_nf; -extern cpuop_func op_658_0_ff; -extern cpuop_func op_660_0_nf; -extern cpuop_func op_660_0_ff; -extern cpuop_func op_668_0_nf; -extern cpuop_func op_668_0_ff; -extern cpuop_func op_670_0_nf; -extern cpuop_func op_670_0_ff; -extern cpuop_func op_678_0_nf; -extern cpuop_func op_678_0_ff; -extern cpuop_func op_679_0_nf; -extern cpuop_func op_679_0_ff; -extern cpuop_func op_680_0_nf; -extern cpuop_func op_680_0_ff; -extern cpuop_func op_690_0_nf; -extern cpuop_func op_690_0_ff; -extern cpuop_func op_698_0_nf; -extern cpuop_func op_698_0_ff; -extern cpuop_func op_6a0_0_nf; -extern cpuop_func op_6a0_0_ff; -extern cpuop_func op_6a8_0_nf; -extern cpuop_func op_6a8_0_ff; -extern cpuop_func op_6b0_0_nf; -extern cpuop_func op_6b0_0_ff; -extern cpuop_func op_6b8_0_nf; -extern cpuop_func op_6b8_0_ff; -extern cpuop_func op_6b9_0_nf; -extern cpuop_func op_6b9_0_ff; -extern cpuop_func op_6c0_0_nf; -extern cpuop_func op_6c0_0_ff; -extern cpuop_func op_6c8_0_nf; -extern cpuop_func op_6c8_0_ff; -extern cpuop_func op_6d0_0_nf; -extern cpuop_func op_6d0_0_ff; -extern cpuop_func op_6e8_0_nf; -extern cpuop_func op_6e8_0_ff; -extern cpuop_func op_6f0_0_nf; -extern cpuop_func op_6f0_0_ff; -extern cpuop_func op_6f8_0_nf; -extern cpuop_func op_6f8_0_ff; -extern cpuop_func op_6f9_0_nf; -extern cpuop_func op_6f9_0_ff; -extern cpuop_func op_6fa_0_nf; -extern cpuop_func op_6fa_0_ff; -extern cpuop_func op_6fb_0_nf; -extern cpuop_func op_6fb_0_ff; -extern cpuop_func op_800_0_nf; -extern cpuop_func op_800_0_ff; -extern cpuop_func op_810_0_nf; -extern cpuop_func op_810_0_ff; -extern cpuop_func op_818_0_nf; -extern cpuop_func op_818_0_ff; -extern cpuop_func op_820_0_nf; -extern cpuop_func op_820_0_ff; -extern cpuop_func op_828_0_nf; -extern cpuop_func op_828_0_ff; -extern cpuop_func op_830_0_nf; -extern cpuop_func op_830_0_ff; -extern cpuop_func op_838_0_nf; -extern cpuop_func op_838_0_ff; -extern cpuop_func op_839_0_nf; -extern cpuop_func op_839_0_ff; -extern cpuop_func op_83a_0_nf; -extern cpuop_func op_83a_0_ff; -extern cpuop_func op_83b_0_nf; -extern cpuop_func op_83b_0_ff; -extern cpuop_func op_83c_0_nf; -extern cpuop_func op_83c_0_ff; -extern cpuop_func op_840_0_nf; -extern cpuop_func op_840_0_ff; -extern cpuop_func op_850_0_nf; -extern cpuop_func op_850_0_ff; -extern cpuop_func op_858_0_nf; -extern cpuop_func op_858_0_ff; -extern cpuop_func op_860_0_nf; -extern cpuop_func op_860_0_ff; -extern cpuop_func op_868_0_nf; -extern cpuop_func op_868_0_ff; -extern cpuop_func op_870_0_nf; -extern cpuop_func op_870_0_ff; -extern cpuop_func op_878_0_nf; -extern cpuop_func op_878_0_ff; -extern cpuop_func op_879_0_nf; -extern cpuop_func op_879_0_ff; -extern cpuop_func op_87a_0_nf; -extern cpuop_func op_87a_0_ff; -extern cpuop_func op_87b_0_nf; -extern cpuop_func op_87b_0_ff; -extern cpuop_func op_880_0_nf; -extern cpuop_func op_880_0_ff; -extern cpuop_func op_890_0_nf; -extern cpuop_func op_890_0_ff; -extern cpuop_func op_898_0_nf; -extern cpuop_func op_898_0_ff; -extern cpuop_func op_8a0_0_nf; -extern cpuop_func op_8a0_0_ff; -extern cpuop_func op_8a8_0_nf; -extern cpuop_func op_8a8_0_ff; -extern cpuop_func op_8b0_0_nf; -extern cpuop_func op_8b0_0_ff; -extern cpuop_func op_8b8_0_nf; -extern cpuop_func op_8b8_0_ff; -extern cpuop_func op_8b9_0_nf; -extern cpuop_func op_8b9_0_ff; -extern cpuop_func op_8ba_0_nf; -extern cpuop_func op_8ba_0_ff; -extern cpuop_func op_8bb_0_nf; -extern cpuop_func op_8bb_0_ff; -extern cpuop_func op_8c0_0_nf; -extern cpuop_func op_8c0_0_ff; -extern cpuop_func op_8d0_0_nf; -extern cpuop_func op_8d0_0_ff; -extern cpuop_func op_8d8_0_nf; -extern cpuop_func op_8d8_0_ff; -extern cpuop_func op_8e0_0_nf; -extern cpuop_func op_8e0_0_ff; -extern cpuop_func op_8e8_0_nf; -extern cpuop_func op_8e8_0_ff; -extern cpuop_func op_8f0_0_nf; -extern cpuop_func op_8f0_0_ff; -extern cpuop_func op_8f8_0_nf; -extern cpuop_func op_8f8_0_ff; -extern cpuop_func op_8f9_0_nf; -extern cpuop_func op_8f9_0_ff; -extern cpuop_func op_8fa_0_nf; -extern cpuop_func op_8fa_0_ff; -extern cpuop_func op_8fb_0_nf; -extern cpuop_func op_8fb_0_ff; -extern cpuop_func op_a00_0_nf; -extern cpuop_func op_a00_0_ff; -extern cpuop_func op_a10_0_nf; -extern cpuop_func op_a10_0_ff; -extern cpuop_func op_a18_0_nf; -extern cpuop_func op_a18_0_ff; -extern cpuop_func op_a20_0_nf; -extern cpuop_func op_a20_0_ff; -extern cpuop_func op_a28_0_nf; -extern cpuop_func op_a28_0_ff; -extern cpuop_func op_a30_0_nf; -extern cpuop_func op_a30_0_ff; -extern cpuop_func op_a38_0_nf; -extern cpuop_func op_a38_0_ff; -extern cpuop_func op_a39_0_nf; -extern cpuop_func op_a39_0_ff; -extern cpuop_func op_a3c_0_nf; -extern cpuop_func op_a3c_0_ff; -extern cpuop_func op_a40_0_nf; -extern cpuop_func op_a40_0_ff; -extern cpuop_func op_a50_0_nf; -extern cpuop_func op_a50_0_ff; -extern cpuop_func op_a58_0_nf; -extern cpuop_func op_a58_0_ff; -extern cpuop_func op_a60_0_nf; -extern cpuop_func op_a60_0_ff; -extern cpuop_func op_a68_0_nf; -extern cpuop_func op_a68_0_ff; -extern cpuop_func op_a70_0_nf; -extern cpuop_func op_a70_0_ff; -extern cpuop_func op_a78_0_nf; -extern cpuop_func op_a78_0_ff; -extern cpuop_func op_a79_0_nf; -extern cpuop_func op_a79_0_ff; -extern cpuop_func op_a7c_0_nf; -extern cpuop_func op_a7c_0_ff; -extern cpuop_func op_a80_0_nf; -extern cpuop_func op_a80_0_ff; -extern cpuop_func op_a90_0_nf; -extern cpuop_func op_a90_0_ff; -extern cpuop_func op_a98_0_nf; -extern cpuop_func op_a98_0_ff; -extern cpuop_func op_aa0_0_nf; -extern cpuop_func op_aa0_0_ff; -extern cpuop_func op_aa8_0_nf; -extern cpuop_func op_aa8_0_ff; -extern cpuop_func op_ab0_0_nf; -extern cpuop_func op_ab0_0_ff; -extern cpuop_func op_ab8_0_nf; -extern cpuop_func op_ab8_0_ff; -extern cpuop_func op_ab9_0_nf; -extern cpuop_func op_ab9_0_ff; -extern cpuop_func op_ad0_0_nf; -extern cpuop_func op_ad0_0_ff; -extern cpuop_func op_ad8_0_nf; -extern cpuop_func op_ad8_0_ff; -extern cpuop_func op_ae0_0_nf; -extern cpuop_func op_ae0_0_ff; -extern cpuop_func op_ae8_0_nf; -extern cpuop_func op_ae8_0_ff; -extern cpuop_func op_af0_0_nf; -extern cpuop_func op_af0_0_ff; -extern cpuop_func op_af8_0_nf; -extern cpuop_func op_af8_0_ff; -extern cpuop_func op_af9_0_nf; -extern cpuop_func op_af9_0_ff; -extern cpuop_func op_c00_0_nf; -extern cpuop_func op_c00_0_ff; -extern cpuop_func op_c10_0_nf; -extern cpuop_func op_c10_0_ff; -extern cpuop_func op_c18_0_nf; -extern cpuop_func op_c18_0_ff; -extern cpuop_func op_c20_0_nf; -extern cpuop_func op_c20_0_ff; -extern cpuop_func op_c28_0_nf; -extern cpuop_func op_c28_0_ff; -extern cpuop_func op_c30_0_nf; -extern cpuop_func op_c30_0_ff; -extern cpuop_func op_c38_0_nf; -extern cpuop_func op_c38_0_ff; -extern cpuop_func op_c39_0_nf; -extern cpuop_func op_c39_0_ff; -extern cpuop_func op_c3a_0_nf; -extern cpuop_func op_c3a_0_ff; -extern cpuop_func op_c3b_0_nf; -extern cpuop_func op_c3b_0_ff; -extern cpuop_func op_c40_0_nf; -extern cpuop_func op_c40_0_ff; -extern cpuop_func op_c50_0_nf; -extern cpuop_func op_c50_0_ff; -extern cpuop_func op_c58_0_nf; -extern cpuop_func op_c58_0_ff; -extern cpuop_func op_c60_0_nf; -extern cpuop_func op_c60_0_ff; -extern cpuop_func op_c68_0_nf; -extern cpuop_func op_c68_0_ff; -extern cpuop_func op_c70_0_nf; -extern cpuop_func op_c70_0_ff; -extern cpuop_func op_c78_0_nf; -extern cpuop_func op_c78_0_ff; -extern cpuop_func op_c79_0_nf; -extern cpuop_func op_c79_0_ff; -extern cpuop_func op_c7a_0_nf; -extern cpuop_func op_c7a_0_ff; -extern cpuop_func op_c7b_0_nf; -extern cpuop_func op_c7b_0_ff; -extern cpuop_func op_c80_0_nf; -extern cpuop_func op_c80_0_ff; -extern cpuop_func op_c90_0_nf; -extern cpuop_func op_c90_0_ff; -extern cpuop_func op_c98_0_nf; -extern cpuop_func op_c98_0_ff; -extern cpuop_func op_ca0_0_nf; -extern cpuop_func op_ca0_0_ff; -extern cpuop_func op_ca8_0_nf; -extern cpuop_func op_ca8_0_ff; -extern cpuop_func op_cb0_0_nf; -extern cpuop_func op_cb0_0_ff; -extern cpuop_func op_cb8_0_nf; -extern cpuop_func op_cb8_0_ff; -extern cpuop_func op_cb9_0_nf; -extern cpuop_func op_cb9_0_ff; -extern cpuop_func op_cba_0_nf; -extern cpuop_func op_cba_0_ff; -extern cpuop_func op_cbb_0_nf; -extern cpuop_func op_cbb_0_ff; -extern cpuop_func op_cd0_0_nf; -extern cpuop_func op_cd0_0_ff; -extern cpuop_func op_cd8_0_nf; -extern cpuop_func op_cd8_0_ff; -extern cpuop_func op_ce0_0_nf; -extern cpuop_func op_ce0_0_ff; -extern cpuop_func op_ce8_0_nf; -extern cpuop_func op_ce8_0_ff; -extern cpuop_func op_cf0_0_nf; -extern cpuop_func op_cf0_0_ff; -extern cpuop_func op_cf8_0_nf; -extern cpuop_func op_cf8_0_ff; -extern cpuop_func op_cf9_0_nf; -extern cpuop_func op_cf9_0_ff; -extern cpuop_func op_cfc_0_nf; -extern cpuop_func op_cfc_0_ff; -extern cpuop_func op_e10_0_nf; -extern cpuop_func op_e10_0_ff; -extern cpuop_func op_e18_0_nf; -extern cpuop_func op_e18_0_ff; -extern cpuop_func op_e20_0_nf; -extern cpuop_func op_e20_0_ff; -extern cpuop_func op_e28_0_nf; -extern cpuop_func op_e28_0_ff; -extern cpuop_func op_e30_0_nf; -extern cpuop_func op_e30_0_ff; -extern cpuop_func op_e38_0_nf; -extern cpuop_func op_e38_0_ff; -extern cpuop_func op_e39_0_nf; -extern cpuop_func op_e39_0_ff; -extern cpuop_func op_e50_0_nf; -extern cpuop_func op_e50_0_ff; -extern cpuop_func op_e58_0_nf; -extern cpuop_func op_e58_0_ff; -extern cpuop_func op_e60_0_nf; -extern cpuop_func op_e60_0_ff; -extern cpuop_func op_e68_0_nf; -extern cpuop_func op_e68_0_ff; -extern cpuop_func op_e70_0_nf; -extern cpuop_func op_e70_0_ff; -extern cpuop_func op_e78_0_nf; -extern cpuop_func op_e78_0_ff; -extern cpuop_func op_e79_0_nf; -extern cpuop_func op_e79_0_ff; -extern cpuop_func op_e90_0_nf; -extern cpuop_func op_e90_0_ff; -extern cpuop_func op_e98_0_nf; -extern cpuop_func op_e98_0_ff; -extern cpuop_func op_ea0_0_nf; -extern cpuop_func op_ea0_0_ff; -extern cpuop_func op_ea8_0_nf; -extern cpuop_func op_ea8_0_ff; -extern cpuop_func op_eb0_0_nf; -extern cpuop_func op_eb0_0_ff; -extern cpuop_func op_eb8_0_nf; -extern cpuop_func op_eb8_0_ff; -extern cpuop_func op_eb9_0_nf; -extern cpuop_func op_eb9_0_ff; -extern cpuop_func op_ed0_0_nf; -extern cpuop_func op_ed0_0_ff; -extern cpuop_func op_ed8_0_nf; -extern cpuop_func op_ed8_0_ff; -extern cpuop_func op_ee0_0_nf; -extern cpuop_func op_ee0_0_ff; -extern cpuop_func op_ee8_0_nf; -extern cpuop_func op_ee8_0_ff; -extern cpuop_func op_ef0_0_nf; -extern cpuop_func op_ef0_0_ff; -extern cpuop_func op_ef8_0_nf; -extern cpuop_func op_ef8_0_ff; -extern cpuop_func op_ef9_0_nf; -extern cpuop_func op_ef9_0_ff; -extern cpuop_func op_efc_0_nf; -extern cpuop_func op_efc_0_ff; -extern cpuop_func op_1000_0_nf; -extern cpuop_func op_1000_0_ff; -extern cpuop_func op_1010_0_nf; -extern cpuop_func op_1010_0_ff; -extern cpuop_func op_1018_0_nf; -extern cpuop_func op_1018_0_ff; -extern cpuop_func op_1020_0_nf; -extern cpuop_func op_1020_0_ff; -extern cpuop_func op_1028_0_nf; -extern cpuop_func op_1028_0_ff; -extern cpuop_func op_1030_0_nf; -extern cpuop_func op_1030_0_ff; -extern cpuop_func op_1038_0_nf; -extern cpuop_func op_1038_0_ff; -extern cpuop_func op_1039_0_nf; -extern cpuop_func op_1039_0_ff; -extern cpuop_func op_103a_0_nf; -extern cpuop_func op_103a_0_ff; -extern cpuop_func op_103b_0_nf; -extern cpuop_func op_103b_0_ff; -extern cpuop_func op_103c_0_nf; -extern cpuop_func op_103c_0_ff; -extern cpuop_func op_1080_0_nf; -extern cpuop_func op_1080_0_ff; -extern cpuop_func op_1090_0_nf; -extern cpuop_func op_1090_0_ff; -extern cpuop_func op_1098_0_nf; -extern cpuop_func op_1098_0_ff; -extern cpuop_func op_10a0_0_nf; -extern cpuop_func op_10a0_0_ff; -extern cpuop_func op_10a8_0_nf; -extern cpuop_func op_10a8_0_ff; -extern cpuop_func op_10b0_0_nf; -extern cpuop_func op_10b0_0_ff; -extern cpuop_func op_10b8_0_nf; -extern cpuop_func op_10b8_0_ff; -extern cpuop_func op_10b9_0_nf; -extern cpuop_func op_10b9_0_ff; -extern cpuop_func op_10ba_0_nf; -extern cpuop_func op_10ba_0_ff; -extern cpuop_func op_10bb_0_nf; -extern cpuop_func op_10bb_0_ff; -extern cpuop_func op_10bc_0_nf; -extern cpuop_func op_10bc_0_ff; -extern cpuop_func op_10c0_0_nf; -extern cpuop_func op_10c0_0_ff; -extern cpuop_func op_10d0_0_nf; -extern cpuop_func op_10d0_0_ff; -extern cpuop_func op_10d8_0_nf; -extern cpuop_func op_10d8_0_ff; -extern cpuop_func op_10e0_0_nf; -extern cpuop_func op_10e0_0_ff; -extern cpuop_func op_10e8_0_nf; -extern cpuop_func op_10e8_0_ff; -extern cpuop_func op_10f0_0_nf; -extern cpuop_func op_10f0_0_ff; -extern cpuop_func op_10f8_0_nf; -extern cpuop_func op_10f8_0_ff; -extern cpuop_func op_10f9_0_nf; -extern cpuop_func op_10f9_0_ff; -extern cpuop_func op_10fa_0_nf; -extern cpuop_func op_10fa_0_ff; -extern cpuop_func op_10fb_0_nf; -extern cpuop_func op_10fb_0_ff; -extern cpuop_func op_10fc_0_nf; -extern cpuop_func op_10fc_0_ff; -extern cpuop_func op_1100_0_nf; -extern cpuop_func op_1100_0_ff; -extern cpuop_func op_1110_0_nf; -extern cpuop_func op_1110_0_ff; -extern cpuop_func op_1118_0_nf; -extern cpuop_func op_1118_0_ff; -extern cpuop_func op_1120_0_nf; -extern cpuop_func op_1120_0_ff; -extern cpuop_func op_1128_0_nf; -extern cpuop_func op_1128_0_ff; -extern cpuop_func op_1130_0_nf; -extern cpuop_func op_1130_0_ff; -extern cpuop_func op_1138_0_nf; -extern cpuop_func op_1138_0_ff; -extern cpuop_func op_1139_0_nf; -extern cpuop_func op_1139_0_ff; -extern cpuop_func op_113a_0_nf; -extern cpuop_func op_113a_0_ff; -extern cpuop_func op_113b_0_nf; -extern cpuop_func op_113b_0_ff; -extern cpuop_func op_113c_0_nf; -extern cpuop_func op_113c_0_ff; -extern cpuop_func op_1140_0_nf; -extern cpuop_func op_1140_0_ff; -extern cpuop_func op_1150_0_nf; -extern cpuop_func op_1150_0_ff; -extern cpuop_func op_1158_0_nf; -extern cpuop_func op_1158_0_ff; -extern cpuop_func op_1160_0_nf; -extern cpuop_func op_1160_0_ff; -extern cpuop_func op_1168_0_nf; -extern cpuop_func op_1168_0_ff; -extern cpuop_func op_1170_0_nf; -extern cpuop_func op_1170_0_ff; -extern cpuop_func op_1178_0_nf; -extern cpuop_func op_1178_0_ff; -extern cpuop_func op_1179_0_nf; -extern cpuop_func op_1179_0_ff; -extern cpuop_func op_117a_0_nf; -extern cpuop_func op_117a_0_ff; -extern cpuop_func op_117b_0_nf; -extern cpuop_func op_117b_0_ff; -extern cpuop_func op_117c_0_nf; -extern cpuop_func op_117c_0_ff; -extern cpuop_func op_1180_0_nf; -extern cpuop_func op_1180_0_ff; -extern cpuop_func op_1190_0_nf; -extern cpuop_func op_1190_0_ff; -extern cpuop_func op_1198_0_nf; -extern cpuop_func op_1198_0_ff; -extern cpuop_func op_11a0_0_nf; -extern cpuop_func op_11a0_0_ff; -extern cpuop_func op_11a8_0_nf; -extern cpuop_func op_11a8_0_ff; -extern cpuop_func op_11b0_0_nf; -extern cpuop_func op_11b0_0_ff; -extern cpuop_func op_11b8_0_nf; -extern cpuop_func op_11b8_0_ff; -extern cpuop_func op_11b9_0_nf; -extern cpuop_func op_11b9_0_ff; -extern cpuop_func op_11ba_0_nf; -extern cpuop_func op_11ba_0_ff; -extern cpuop_func op_11bb_0_nf; -extern cpuop_func op_11bb_0_ff; -extern cpuop_func op_11bc_0_nf; -extern cpuop_func op_11bc_0_ff; -extern cpuop_func op_11c0_0_nf; -extern cpuop_func op_11c0_0_ff; -extern cpuop_func op_11d0_0_nf; -extern cpuop_func op_11d0_0_ff; -extern cpuop_func op_11d8_0_nf; -extern cpuop_func op_11d8_0_ff; -extern cpuop_func op_11e0_0_nf; -extern cpuop_func op_11e0_0_ff; -extern cpuop_func op_11e8_0_nf; -extern cpuop_func op_11e8_0_ff; -extern cpuop_func op_11f0_0_nf; -extern cpuop_func op_11f0_0_ff; -extern cpuop_func op_11f8_0_nf; -extern cpuop_func op_11f8_0_ff; -extern cpuop_func op_11f9_0_nf; -extern cpuop_func op_11f9_0_ff; -extern cpuop_func op_11fa_0_nf; -extern cpuop_func op_11fa_0_ff; -extern cpuop_func op_11fb_0_nf; -extern cpuop_func op_11fb_0_ff; -extern cpuop_func op_11fc_0_nf; -extern cpuop_func op_11fc_0_ff; -extern cpuop_func op_13c0_0_nf; -extern cpuop_func op_13c0_0_ff; -extern cpuop_func op_13d0_0_nf; -extern cpuop_func op_13d0_0_ff; -extern cpuop_func op_13d8_0_nf; -extern cpuop_func op_13d8_0_ff; -extern cpuop_func op_13e0_0_nf; -extern cpuop_func op_13e0_0_ff; -extern cpuop_func op_13e8_0_nf; -extern cpuop_func op_13e8_0_ff; -extern cpuop_func op_13f0_0_nf; -extern cpuop_func op_13f0_0_ff; -extern cpuop_func op_13f8_0_nf; -extern cpuop_func op_13f8_0_ff; -extern cpuop_func op_13f9_0_nf; -extern cpuop_func op_13f9_0_ff; -extern cpuop_func op_13fa_0_nf; -extern cpuop_func op_13fa_0_ff; -extern cpuop_func op_13fb_0_nf; -extern cpuop_func op_13fb_0_ff; -extern cpuop_func op_13fc_0_nf; -extern cpuop_func op_13fc_0_ff; -extern cpuop_func op_2000_0_nf; -extern cpuop_func op_2000_0_ff; -extern cpuop_func op_2008_0_nf; -extern cpuop_func op_2008_0_ff; -extern cpuop_func op_2010_0_nf; -extern cpuop_func op_2010_0_ff; -extern cpuop_func op_2018_0_nf; -extern cpuop_func op_2018_0_ff; -extern cpuop_func op_2020_0_nf; -extern cpuop_func op_2020_0_ff; -extern cpuop_func op_2028_0_nf; -extern cpuop_func op_2028_0_ff; -extern cpuop_func op_2030_0_nf; -extern cpuop_func op_2030_0_ff; -extern cpuop_func op_2038_0_nf; -extern cpuop_func op_2038_0_ff; -extern cpuop_func op_2039_0_nf; -extern cpuop_func op_2039_0_ff; -extern cpuop_func op_203a_0_nf; -extern cpuop_func op_203a_0_ff; -extern cpuop_func op_203b_0_nf; -extern cpuop_func op_203b_0_ff; -extern cpuop_func op_203c_0_nf; -extern cpuop_func op_203c_0_ff; -extern cpuop_func op_2040_0_nf; -extern cpuop_func op_2040_0_ff; -extern cpuop_func op_2048_0_nf; -extern cpuop_func op_2048_0_ff; -extern cpuop_func op_2050_0_nf; -extern cpuop_func op_2050_0_ff; -extern cpuop_func op_2058_0_nf; -extern cpuop_func op_2058_0_ff; -extern cpuop_func op_2060_0_nf; -extern cpuop_func op_2060_0_ff; -extern cpuop_func op_2068_0_nf; -extern cpuop_func op_2068_0_ff; -extern cpuop_func op_2070_0_nf; -extern cpuop_func op_2070_0_ff; -extern cpuop_func op_2078_0_nf; -extern cpuop_func op_2078_0_ff; -extern cpuop_func op_2079_0_nf; -extern cpuop_func op_2079_0_ff; -extern cpuop_func op_207a_0_nf; -extern cpuop_func op_207a_0_ff; -extern cpuop_func op_207b_0_nf; -extern cpuop_func op_207b_0_ff; -extern cpuop_func op_207c_0_nf; -extern cpuop_func op_207c_0_ff; -extern cpuop_func op_2080_0_nf; -extern cpuop_func op_2080_0_ff; -extern cpuop_func op_2088_0_nf; -extern cpuop_func op_2088_0_ff; -extern cpuop_func op_2090_0_nf; -extern cpuop_func op_2090_0_ff; -extern cpuop_func op_2098_0_nf; -extern cpuop_func op_2098_0_ff; -extern cpuop_func op_20a0_0_nf; -extern cpuop_func op_20a0_0_ff; -extern cpuop_func op_20a8_0_nf; -extern cpuop_func op_20a8_0_ff; -extern cpuop_func op_20b0_0_nf; -extern cpuop_func op_20b0_0_ff; -extern cpuop_func op_20b8_0_nf; -extern cpuop_func op_20b8_0_ff; -extern cpuop_func op_20b9_0_nf; -extern cpuop_func op_20b9_0_ff; -extern cpuop_func op_20ba_0_nf; -extern cpuop_func op_20ba_0_ff; -extern cpuop_func op_20bb_0_nf; -extern cpuop_func op_20bb_0_ff; -extern cpuop_func op_20bc_0_nf; -extern cpuop_func op_20bc_0_ff; -extern cpuop_func op_20c0_0_nf; -extern cpuop_func op_20c0_0_ff; -extern cpuop_func op_20c8_0_nf; -extern cpuop_func op_20c8_0_ff; -extern cpuop_func op_20d0_0_nf; -extern cpuop_func op_20d0_0_ff; -extern cpuop_func op_20d8_0_nf; -extern cpuop_func op_20d8_0_ff; -extern cpuop_func op_20e0_0_nf; -extern cpuop_func op_20e0_0_ff; -extern cpuop_func op_20e8_0_nf; -extern cpuop_func op_20e8_0_ff; -extern cpuop_func op_20f0_0_nf; -extern cpuop_func op_20f0_0_ff; -extern cpuop_func op_20f8_0_nf; -extern cpuop_func op_20f8_0_ff; -extern cpuop_func op_20f9_0_nf; -extern cpuop_func op_20f9_0_ff; -extern cpuop_func op_20fa_0_nf; -extern cpuop_func op_20fa_0_ff; -extern cpuop_func op_20fb_0_nf; -extern cpuop_func op_20fb_0_ff; -extern cpuop_func op_20fc_0_nf; -extern cpuop_func op_20fc_0_ff; -extern cpuop_func op_2100_0_nf; -extern cpuop_func op_2100_0_ff; -extern cpuop_func op_2108_0_nf; -extern cpuop_func op_2108_0_ff; -extern cpuop_func op_2110_0_nf; -extern cpuop_func op_2110_0_ff; -extern cpuop_func op_2118_0_nf; -extern cpuop_func op_2118_0_ff; -extern cpuop_func op_2120_0_nf; -extern cpuop_func op_2120_0_ff; -extern cpuop_func op_2128_0_nf; -extern cpuop_func op_2128_0_ff; -extern cpuop_func op_2130_0_nf; -extern cpuop_func op_2130_0_ff; -extern cpuop_func op_2138_0_nf; -extern cpuop_func op_2138_0_ff; -extern cpuop_func op_2139_0_nf; -extern cpuop_func op_2139_0_ff; -extern cpuop_func op_213a_0_nf; -extern cpuop_func op_213a_0_ff; -extern cpuop_func op_213b_0_nf; -extern cpuop_func op_213b_0_ff; -extern cpuop_func op_213c_0_nf; -extern cpuop_func op_213c_0_ff; -extern cpuop_func op_2140_0_nf; -extern cpuop_func op_2140_0_ff; -extern cpuop_func op_2148_0_nf; -extern cpuop_func op_2148_0_ff; -extern cpuop_func op_2150_0_nf; -extern cpuop_func op_2150_0_ff; -extern cpuop_func op_2158_0_nf; -extern cpuop_func op_2158_0_ff; -extern cpuop_func op_2160_0_nf; -extern cpuop_func op_2160_0_ff; -extern cpuop_func op_2168_0_nf; -extern cpuop_func op_2168_0_ff; -extern cpuop_func op_2170_0_nf; -extern cpuop_func op_2170_0_ff; -extern cpuop_func op_2178_0_nf; -extern cpuop_func op_2178_0_ff; -extern cpuop_func op_2179_0_nf; -extern cpuop_func op_2179_0_ff; -extern cpuop_func op_217a_0_nf; -extern cpuop_func op_217a_0_ff; -extern cpuop_func op_217b_0_nf; -extern cpuop_func op_217b_0_ff; -extern cpuop_func op_217c_0_nf; -extern cpuop_func op_217c_0_ff; -extern cpuop_func op_2180_0_nf; -extern cpuop_func op_2180_0_ff; -extern cpuop_func op_2188_0_nf; -extern cpuop_func op_2188_0_ff; -extern cpuop_func op_2190_0_nf; -extern cpuop_func op_2190_0_ff; -extern cpuop_func op_2198_0_nf; -extern cpuop_func op_2198_0_ff; -extern cpuop_func op_21a0_0_nf; -extern cpuop_func op_21a0_0_ff; -extern cpuop_func op_21a8_0_nf; -extern cpuop_func op_21a8_0_ff; -extern cpuop_func op_21b0_0_nf; -extern cpuop_func op_21b0_0_ff; -extern cpuop_func op_21b8_0_nf; -extern cpuop_func op_21b8_0_ff; -extern cpuop_func op_21b9_0_nf; -extern cpuop_func op_21b9_0_ff; -extern cpuop_func op_21ba_0_nf; -extern cpuop_func op_21ba_0_ff; -extern cpuop_func op_21bb_0_nf; -extern cpuop_func op_21bb_0_ff; -extern cpuop_func op_21bc_0_nf; -extern cpuop_func op_21bc_0_ff; -extern cpuop_func op_21c0_0_nf; -extern cpuop_func op_21c0_0_ff; -extern cpuop_func op_21c8_0_nf; -extern cpuop_func op_21c8_0_ff; -extern cpuop_func op_21d0_0_nf; -extern cpuop_func op_21d0_0_ff; -extern cpuop_func op_21d8_0_nf; -extern cpuop_func op_21d8_0_ff; -extern cpuop_func op_21e0_0_nf; -extern cpuop_func op_21e0_0_ff; -extern cpuop_func op_21e8_0_nf; -extern cpuop_func op_21e8_0_ff; -extern cpuop_func op_21f0_0_nf; -extern cpuop_func op_21f0_0_ff; -extern cpuop_func op_21f8_0_nf; -extern cpuop_func op_21f8_0_ff; -extern cpuop_func op_21f9_0_nf; -extern cpuop_func op_21f9_0_ff; -extern cpuop_func op_21fa_0_nf; -extern cpuop_func op_21fa_0_ff; -extern cpuop_func op_21fb_0_nf; -extern cpuop_func op_21fb_0_ff; -extern cpuop_func op_21fc_0_nf; -extern cpuop_func op_21fc_0_ff; -extern cpuop_func op_23c0_0_nf; -extern cpuop_func op_23c0_0_ff; -extern cpuop_func op_23c8_0_nf; -extern cpuop_func op_23c8_0_ff; -extern cpuop_func op_23d0_0_nf; -extern cpuop_func op_23d0_0_ff; -extern cpuop_func op_23d8_0_nf; -extern cpuop_func op_23d8_0_ff; -extern cpuop_func op_23e0_0_nf; -extern cpuop_func op_23e0_0_ff; -extern cpuop_func op_23e8_0_nf; -extern cpuop_func op_23e8_0_ff; -extern cpuop_func op_23f0_0_nf; -extern cpuop_func op_23f0_0_ff; -extern cpuop_func op_23f8_0_nf; -extern cpuop_func op_23f8_0_ff; -extern cpuop_func op_23f9_0_nf; -extern cpuop_func op_23f9_0_ff; -extern cpuop_func op_23fa_0_nf; -extern cpuop_func op_23fa_0_ff; -extern cpuop_func op_23fb_0_nf; -extern cpuop_func op_23fb_0_ff; -extern cpuop_func op_23fc_0_nf; -extern cpuop_func op_23fc_0_ff; -extern cpuop_func op_3000_0_nf; -extern cpuop_func op_3000_0_ff; -extern cpuop_func op_3008_0_nf; -extern cpuop_func op_3008_0_ff; -extern cpuop_func op_3010_0_nf; -extern cpuop_func op_3010_0_ff; -extern cpuop_func op_3018_0_nf; -extern cpuop_func op_3018_0_ff; -extern cpuop_func op_3020_0_nf; -extern cpuop_func op_3020_0_ff; -extern cpuop_func op_3028_0_nf; -extern cpuop_func op_3028_0_ff; -extern cpuop_func op_3030_0_nf; -extern cpuop_func op_3030_0_ff; -extern cpuop_func op_3038_0_nf; -extern cpuop_func op_3038_0_ff; -extern cpuop_func op_3039_0_nf; -extern cpuop_func op_3039_0_ff; -extern cpuop_func op_303a_0_nf; -extern cpuop_func op_303a_0_ff; -extern cpuop_func op_303b_0_nf; -extern cpuop_func op_303b_0_ff; -extern cpuop_func op_303c_0_nf; -extern cpuop_func op_303c_0_ff; -extern cpuop_func op_3040_0_nf; -extern cpuop_func op_3040_0_ff; -extern cpuop_func op_3048_0_nf; -extern cpuop_func op_3048_0_ff; -extern cpuop_func op_3050_0_nf; -extern cpuop_func op_3050_0_ff; -extern cpuop_func op_3058_0_nf; -extern cpuop_func op_3058_0_ff; -extern cpuop_func op_3060_0_nf; -extern cpuop_func op_3060_0_ff; -extern cpuop_func op_3068_0_nf; -extern cpuop_func op_3068_0_ff; -extern cpuop_func op_3070_0_nf; -extern cpuop_func op_3070_0_ff; -extern cpuop_func op_3078_0_nf; -extern cpuop_func op_3078_0_ff; -extern cpuop_func op_3079_0_nf; -extern cpuop_func op_3079_0_ff; -extern cpuop_func op_307a_0_nf; -extern cpuop_func op_307a_0_ff; -extern cpuop_func op_307b_0_nf; -extern cpuop_func op_307b_0_ff; -extern cpuop_func op_307c_0_nf; -extern cpuop_func op_307c_0_ff; -extern cpuop_func op_3080_0_nf; -extern cpuop_func op_3080_0_ff; -extern cpuop_func op_3088_0_nf; -extern cpuop_func op_3088_0_ff; -extern cpuop_func op_3090_0_nf; -extern cpuop_func op_3090_0_ff; -extern cpuop_func op_3098_0_nf; -extern cpuop_func op_3098_0_ff; -extern cpuop_func op_30a0_0_nf; -extern cpuop_func op_30a0_0_ff; -extern cpuop_func op_30a8_0_nf; -extern cpuop_func op_30a8_0_ff; -extern cpuop_func op_30b0_0_nf; -extern cpuop_func op_30b0_0_ff; -extern cpuop_func op_30b8_0_nf; -extern cpuop_func op_30b8_0_ff; -extern cpuop_func op_30b9_0_nf; -extern cpuop_func op_30b9_0_ff; -extern cpuop_func op_30ba_0_nf; -extern cpuop_func op_30ba_0_ff; -extern cpuop_func op_30bb_0_nf; -extern cpuop_func op_30bb_0_ff; -extern cpuop_func op_30bc_0_nf; -extern cpuop_func op_30bc_0_ff; -extern cpuop_func op_30c0_0_nf; -extern cpuop_func op_30c0_0_ff; -extern cpuop_func op_30c8_0_nf; -extern cpuop_func op_30c8_0_ff; -extern cpuop_func op_30d0_0_nf; -extern cpuop_func op_30d0_0_ff; -extern cpuop_func op_30d8_0_nf; -extern cpuop_func op_30d8_0_ff; -extern cpuop_func op_30e0_0_nf; -extern cpuop_func op_30e0_0_ff; -extern cpuop_func op_30e8_0_nf; -extern cpuop_func op_30e8_0_ff; -extern cpuop_func op_30f0_0_nf; -extern cpuop_func op_30f0_0_ff; -extern cpuop_func op_30f8_0_nf; -extern cpuop_func op_30f8_0_ff; -extern cpuop_func op_30f9_0_nf; -extern cpuop_func op_30f9_0_ff; -extern cpuop_func op_30fa_0_nf; -extern cpuop_func op_30fa_0_ff; -extern cpuop_func op_30fb_0_nf; -extern cpuop_func op_30fb_0_ff; -extern cpuop_func op_30fc_0_nf; -extern cpuop_func op_30fc_0_ff; -extern cpuop_func op_3100_0_nf; -extern cpuop_func op_3100_0_ff; -extern cpuop_func op_3108_0_nf; -extern cpuop_func op_3108_0_ff; -extern cpuop_func op_3110_0_nf; -extern cpuop_func op_3110_0_ff; -extern cpuop_func op_3118_0_nf; -extern cpuop_func op_3118_0_ff; -extern cpuop_func op_3120_0_nf; -extern cpuop_func op_3120_0_ff; -extern cpuop_func op_3128_0_nf; -extern cpuop_func op_3128_0_ff; -extern cpuop_func op_3130_0_nf; -extern cpuop_func op_3130_0_ff; -extern cpuop_func op_3138_0_nf; -extern cpuop_func op_3138_0_ff; -extern cpuop_func op_3139_0_nf; -extern cpuop_func op_3139_0_ff; -extern cpuop_func op_313a_0_nf; -extern cpuop_func op_313a_0_ff; -extern cpuop_func op_313b_0_nf; -extern cpuop_func op_313b_0_ff; -extern cpuop_func op_313c_0_nf; -extern cpuop_func op_313c_0_ff; -extern cpuop_func op_3140_0_nf; -extern cpuop_func op_3140_0_ff; -extern cpuop_func op_3148_0_nf; -extern cpuop_func op_3148_0_ff; -extern cpuop_func op_3150_0_nf; -extern cpuop_func op_3150_0_ff; -extern cpuop_func op_3158_0_nf; -extern cpuop_func op_3158_0_ff; -extern cpuop_func op_3160_0_nf; -extern cpuop_func op_3160_0_ff; -extern cpuop_func op_3168_0_nf; -extern cpuop_func op_3168_0_ff; -extern cpuop_func op_3170_0_nf; -extern cpuop_func op_3170_0_ff; -extern cpuop_func op_3178_0_nf; -extern cpuop_func op_3178_0_ff; -extern cpuop_func op_3179_0_nf; -extern cpuop_func op_3179_0_ff; -extern cpuop_func op_317a_0_nf; -extern cpuop_func op_317a_0_ff; -extern cpuop_func op_317b_0_nf; -extern cpuop_func op_317b_0_ff; -extern cpuop_func op_317c_0_nf; -extern cpuop_func op_317c_0_ff; -extern cpuop_func op_3180_0_nf; -extern cpuop_func op_3180_0_ff; -extern cpuop_func op_3188_0_nf; -extern cpuop_func op_3188_0_ff; -extern cpuop_func op_3190_0_nf; -extern cpuop_func op_3190_0_ff; -extern cpuop_func op_3198_0_nf; -extern cpuop_func op_3198_0_ff; -extern cpuop_func op_31a0_0_nf; -extern cpuop_func op_31a0_0_ff; -extern cpuop_func op_31a8_0_nf; -extern cpuop_func op_31a8_0_ff; -extern cpuop_func op_31b0_0_nf; -extern cpuop_func op_31b0_0_ff; -extern cpuop_func op_31b8_0_nf; -extern cpuop_func op_31b8_0_ff; -extern cpuop_func op_31b9_0_nf; -extern cpuop_func op_31b9_0_ff; -extern cpuop_func op_31ba_0_nf; -extern cpuop_func op_31ba_0_ff; -extern cpuop_func op_31bb_0_nf; -extern cpuop_func op_31bb_0_ff; -extern cpuop_func op_31bc_0_nf; -extern cpuop_func op_31bc_0_ff; -extern cpuop_func op_31c0_0_nf; -extern cpuop_func op_31c0_0_ff; -extern cpuop_func op_31c8_0_nf; -extern cpuop_func op_31c8_0_ff; -extern cpuop_func op_31d0_0_nf; -extern cpuop_func op_31d0_0_ff; -extern cpuop_func op_31d8_0_nf; -extern cpuop_func op_31d8_0_ff; -extern cpuop_func op_31e0_0_nf; -extern cpuop_func op_31e0_0_ff; -extern cpuop_func op_31e8_0_nf; -extern cpuop_func op_31e8_0_ff; -extern cpuop_func op_31f0_0_nf; -extern cpuop_func op_31f0_0_ff; -extern cpuop_func op_31f8_0_nf; -extern cpuop_func op_31f8_0_ff; -extern cpuop_func op_31f9_0_nf; -extern cpuop_func op_31f9_0_ff; -extern cpuop_func op_31fa_0_nf; -extern cpuop_func op_31fa_0_ff; -extern cpuop_func op_31fb_0_nf; -extern cpuop_func op_31fb_0_ff; -extern cpuop_func op_31fc_0_nf; -extern cpuop_func op_31fc_0_ff; -extern cpuop_func op_33c0_0_nf; -extern cpuop_func op_33c0_0_ff; -extern cpuop_func op_33c8_0_nf; -extern cpuop_func op_33c8_0_ff; -extern cpuop_func op_33d0_0_nf; -extern cpuop_func op_33d0_0_ff; -extern cpuop_func op_33d8_0_nf; -extern cpuop_func op_33d8_0_ff; -extern cpuop_func op_33e0_0_nf; -extern cpuop_func op_33e0_0_ff; -extern cpuop_func op_33e8_0_nf; -extern cpuop_func op_33e8_0_ff; -extern cpuop_func op_33f0_0_nf; -extern cpuop_func op_33f0_0_ff; -extern cpuop_func op_33f8_0_nf; -extern cpuop_func op_33f8_0_ff; -extern cpuop_func op_33f9_0_nf; -extern cpuop_func op_33f9_0_ff; -extern cpuop_func op_33fa_0_nf; -extern cpuop_func op_33fa_0_ff; -extern cpuop_func op_33fb_0_nf; -extern cpuop_func op_33fb_0_ff; -extern cpuop_func op_33fc_0_nf; -extern cpuop_func op_33fc_0_ff; -extern cpuop_func op_4000_0_nf; -extern cpuop_func op_4000_0_ff; -extern cpuop_func op_4010_0_nf; -extern cpuop_func op_4010_0_ff; -extern cpuop_func op_4018_0_nf; -extern cpuop_func op_4018_0_ff; -extern cpuop_func op_4020_0_nf; -extern cpuop_func op_4020_0_ff; -extern cpuop_func op_4028_0_nf; -extern cpuop_func op_4028_0_ff; -extern cpuop_func op_4030_0_nf; -extern cpuop_func op_4030_0_ff; -extern cpuop_func op_4038_0_nf; -extern cpuop_func op_4038_0_ff; -extern cpuop_func op_4039_0_nf; -extern cpuop_func op_4039_0_ff; -extern cpuop_func op_4040_0_nf; -extern cpuop_func op_4040_0_ff; -extern cpuop_func op_4050_0_nf; -extern cpuop_func op_4050_0_ff; -extern cpuop_func op_4058_0_nf; -extern cpuop_func op_4058_0_ff; -extern cpuop_func op_4060_0_nf; -extern cpuop_func op_4060_0_ff; -extern cpuop_func op_4068_0_nf; -extern cpuop_func op_4068_0_ff; -extern cpuop_func op_4070_0_nf; -extern cpuop_func op_4070_0_ff; -extern cpuop_func op_4078_0_nf; -extern cpuop_func op_4078_0_ff; -extern cpuop_func op_4079_0_nf; -extern cpuop_func op_4079_0_ff; -extern cpuop_func op_4080_0_nf; -extern cpuop_func op_4080_0_ff; -extern cpuop_func op_4090_0_nf; -extern cpuop_func op_4090_0_ff; -extern cpuop_func op_4098_0_nf; -extern cpuop_func op_4098_0_ff; -extern cpuop_func op_40a0_0_nf; -extern cpuop_func op_40a0_0_ff; -extern cpuop_func op_40a8_0_nf; -extern cpuop_func op_40a8_0_ff; -extern cpuop_func op_40b0_0_nf; -extern cpuop_func op_40b0_0_ff; -extern cpuop_func op_40b8_0_nf; -extern cpuop_func op_40b8_0_ff; -extern cpuop_func op_40b9_0_nf; -extern cpuop_func op_40b9_0_ff; -extern cpuop_func op_40c0_0_nf; -extern cpuop_func op_40c0_0_ff; -extern cpuop_func op_40d0_0_nf; -extern cpuop_func op_40d0_0_ff; -extern cpuop_func op_40d8_0_nf; -extern cpuop_func op_40d8_0_ff; -extern cpuop_func op_40e0_0_nf; -extern cpuop_func op_40e0_0_ff; -extern cpuop_func op_40e8_0_nf; -extern cpuop_func op_40e8_0_ff; -extern cpuop_func op_40f0_0_nf; -extern cpuop_func op_40f0_0_ff; -extern cpuop_func op_40f8_0_nf; -extern cpuop_func op_40f8_0_ff; -extern cpuop_func op_40f9_0_nf; -extern cpuop_func op_40f9_0_ff; -extern cpuop_func op_4100_0_nf; -extern cpuop_func op_4100_0_ff; -extern cpuop_func op_4110_0_nf; -extern cpuop_func op_4110_0_ff; -extern cpuop_func op_4118_0_nf; -extern cpuop_func op_4118_0_ff; -extern cpuop_func op_4120_0_nf; -extern cpuop_func op_4120_0_ff; -extern cpuop_func op_4128_0_nf; -extern cpuop_func op_4128_0_ff; -extern cpuop_func op_4130_0_nf; -extern cpuop_func op_4130_0_ff; -extern cpuop_func op_4138_0_nf; -extern cpuop_func op_4138_0_ff; -extern cpuop_func op_4139_0_nf; -extern cpuop_func op_4139_0_ff; -extern cpuop_func op_413a_0_nf; -extern cpuop_func op_413a_0_ff; -extern cpuop_func op_413b_0_nf; -extern cpuop_func op_413b_0_ff; -extern cpuop_func op_413c_0_nf; -extern cpuop_func op_413c_0_ff; -extern cpuop_func op_4180_0_nf; -extern cpuop_func op_4180_0_ff; -extern cpuop_func op_4190_0_nf; -extern cpuop_func op_4190_0_ff; -extern cpuop_func op_4198_0_nf; -extern cpuop_func op_4198_0_ff; -extern cpuop_func op_41a0_0_nf; -extern cpuop_func op_41a0_0_ff; -extern cpuop_func op_41a8_0_nf; -extern cpuop_func op_41a8_0_ff; -extern cpuop_func op_41b0_0_nf; -extern cpuop_func op_41b0_0_ff; -extern cpuop_func op_41b8_0_nf; -extern cpuop_func op_41b8_0_ff; -extern cpuop_func op_41b9_0_nf; -extern cpuop_func op_41b9_0_ff; -extern cpuop_func op_41ba_0_nf; -extern cpuop_func op_41ba_0_ff; -extern cpuop_func op_41bb_0_nf; -extern cpuop_func op_41bb_0_ff; -extern cpuop_func op_41bc_0_nf; -extern cpuop_func op_41bc_0_ff; -extern cpuop_func op_41d0_0_nf; -extern cpuop_func op_41d0_0_ff; -extern cpuop_func op_41e8_0_nf; -extern cpuop_func op_41e8_0_ff; -extern cpuop_func op_41f0_0_nf; -extern cpuop_func op_41f0_0_ff; -extern cpuop_func op_41f8_0_nf; -extern cpuop_func op_41f8_0_ff; -extern cpuop_func op_41f9_0_nf; -extern cpuop_func op_41f9_0_ff; -extern cpuop_func op_41fa_0_nf; -extern cpuop_func op_41fa_0_ff; -extern cpuop_func op_41fb_0_nf; -extern cpuop_func op_41fb_0_ff; -extern cpuop_func op_4200_0_nf; -extern cpuop_func op_4200_0_ff; -extern cpuop_func op_4210_0_nf; -extern cpuop_func op_4210_0_ff; -extern cpuop_func op_4218_0_nf; -extern cpuop_func op_4218_0_ff; -extern cpuop_func op_4220_0_nf; -extern cpuop_func op_4220_0_ff; -extern cpuop_func op_4228_0_nf; -extern cpuop_func op_4228_0_ff; -extern cpuop_func op_4230_0_nf; -extern cpuop_func op_4230_0_ff; -extern cpuop_func op_4238_0_nf; -extern cpuop_func op_4238_0_ff; -extern cpuop_func op_4239_0_nf; -extern cpuop_func op_4239_0_ff; -extern cpuop_func op_4240_0_nf; -extern cpuop_func op_4240_0_ff; -extern cpuop_func op_4250_0_nf; -extern cpuop_func op_4250_0_ff; -extern cpuop_func op_4258_0_nf; -extern cpuop_func op_4258_0_ff; -extern cpuop_func op_4260_0_nf; -extern cpuop_func op_4260_0_ff; -extern cpuop_func op_4268_0_nf; -extern cpuop_func op_4268_0_ff; -extern cpuop_func op_4270_0_nf; -extern cpuop_func op_4270_0_ff; -extern cpuop_func op_4278_0_nf; -extern cpuop_func op_4278_0_ff; -extern cpuop_func op_4279_0_nf; -extern cpuop_func op_4279_0_ff; -extern cpuop_func op_4280_0_nf; -extern cpuop_func op_4280_0_ff; -extern cpuop_func op_4290_0_nf; -extern cpuop_func op_4290_0_ff; -extern cpuop_func op_4298_0_nf; -extern cpuop_func op_4298_0_ff; -extern cpuop_func op_42a0_0_nf; -extern cpuop_func op_42a0_0_ff; -extern cpuop_func op_42a8_0_nf; -extern cpuop_func op_42a8_0_ff; -extern cpuop_func op_42b0_0_nf; -extern cpuop_func op_42b0_0_ff; -extern cpuop_func op_42b8_0_nf; -extern cpuop_func op_42b8_0_ff; -extern cpuop_func op_42b9_0_nf; -extern cpuop_func op_42b9_0_ff; -extern cpuop_func op_42c0_0_nf; -extern cpuop_func op_42c0_0_ff; -extern cpuop_func op_42d0_0_nf; -extern cpuop_func op_42d0_0_ff; -extern cpuop_func op_42d8_0_nf; -extern cpuop_func op_42d8_0_ff; -extern cpuop_func op_42e0_0_nf; -extern cpuop_func op_42e0_0_ff; -extern cpuop_func op_42e8_0_nf; -extern cpuop_func op_42e8_0_ff; -extern cpuop_func op_42f0_0_nf; -extern cpuop_func op_42f0_0_ff; -extern cpuop_func op_42f8_0_nf; -extern cpuop_func op_42f8_0_ff; -extern cpuop_func op_42f9_0_nf; -extern cpuop_func op_42f9_0_ff; -extern cpuop_func op_4400_0_nf; -extern cpuop_func op_4400_0_ff; -extern cpuop_func op_4410_0_nf; -extern cpuop_func op_4410_0_ff; -extern cpuop_func op_4418_0_nf; -extern cpuop_func op_4418_0_ff; -extern cpuop_func op_4420_0_nf; -extern cpuop_func op_4420_0_ff; -extern cpuop_func op_4428_0_nf; -extern cpuop_func op_4428_0_ff; -extern cpuop_func op_4430_0_nf; -extern cpuop_func op_4430_0_ff; -extern cpuop_func op_4438_0_nf; -extern cpuop_func op_4438_0_ff; -extern cpuop_func op_4439_0_nf; -extern cpuop_func op_4439_0_ff; -extern cpuop_func op_4440_0_nf; -extern cpuop_func op_4440_0_ff; -extern cpuop_func op_4450_0_nf; -extern cpuop_func op_4450_0_ff; -extern cpuop_func op_4458_0_nf; -extern cpuop_func op_4458_0_ff; -extern cpuop_func op_4460_0_nf; -extern cpuop_func op_4460_0_ff; -extern cpuop_func op_4468_0_nf; -extern cpuop_func op_4468_0_ff; -extern cpuop_func op_4470_0_nf; -extern cpuop_func op_4470_0_ff; -extern cpuop_func op_4478_0_nf; -extern cpuop_func op_4478_0_ff; -extern cpuop_func op_4479_0_nf; -extern cpuop_func op_4479_0_ff; -extern cpuop_func op_4480_0_nf; -extern cpuop_func op_4480_0_ff; -extern cpuop_func op_4490_0_nf; -extern cpuop_func op_4490_0_ff; -extern cpuop_func op_4498_0_nf; -extern cpuop_func op_4498_0_ff; -extern cpuop_func op_44a0_0_nf; -extern cpuop_func op_44a0_0_ff; -extern cpuop_func op_44a8_0_nf; -extern cpuop_func op_44a8_0_ff; -extern cpuop_func op_44b0_0_nf; -extern cpuop_func op_44b0_0_ff; -extern cpuop_func op_44b8_0_nf; -extern cpuop_func op_44b8_0_ff; -extern cpuop_func op_44b9_0_nf; -extern cpuop_func op_44b9_0_ff; -extern cpuop_func op_44c0_0_nf; -extern cpuop_func op_44c0_0_ff; -extern cpuop_func op_44d0_0_nf; -extern cpuop_func op_44d0_0_ff; -extern cpuop_func op_44d8_0_nf; -extern cpuop_func op_44d8_0_ff; -extern cpuop_func op_44e0_0_nf; -extern cpuop_func op_44e0_0_ff; -extern cpuop_func op_44e8_0_nf; -extern cpuop_func op_44e8_0_ff; -extern cpuop_func op_44f0_0_nf; -extern cpuop_func op_44f0_0_ff; -extern cpuop_func op_44f8_0_nf; -extern cpuop_func op_44f8_0_ff; -extern cpuop_func op_44f9_0_nf; -extern cpuop_func op_44f9_0_ff; -extern cpuop_func op_44fa_0_nf; -extern cpuop_func op_44fa_0_ff; -extern cpuop_func op_44fb_0_nf; -extern cpuop_func op_44fb_0_ff; -extern cpuop_func op_44fc_0_nf; -extern cpuop_func op_44fc_0_ff; -extern cpuop_func op_4600_0_nf; -extern cpuop_func op_4600_0_ff; -extern cpuop_func op_4610_0_nf; -extern cpuop_func op_4610_0_ff; -extern cpuop_func op_4618_0_nf; -extern cpuop_func op_4618_0_ff; -extern cpuop_func op_4620_0_nf; -extern cpuop_func op_4620_0_ff; -extern cpuop_func op_4628_0_nf; -extern cpuop_func op_4628_0_ff; -extern cpuop_func op_4630_0_nf; -extern cpuop_func op_4630_0_ff; -extern cpuop_func op_4638_0_nf; -extern cpuop_func op_4638_0_ff; -extern cpuop_func op_4639_0_nf; -extern cpuop_func op_4639_0_ff; -extern cpuop_func op_4640_0_nf; -extern cpuop_func op_4640_0_ff; -extern cpuop_func op_4650_0_nf; -extern cpuop_func op_4650_0_ff; -extern cpuop_func op_4658_0_nf; -extern cpuop_func op_4658_0_ff; -extern cpuop_func op_4660_0_nf; -extern cpuop_func op_4660_0_ff; -extern cpuop_func op_4668_0_nf; -extern cpuop_func op_4668_0_ff; -extern cpuop_func op_4670_0_nf; -extern cpuop_func op_4670_0_ff; -extern cpuop_func op_4678_0_nf; -extern cpuop_func op_4678_0_ff; -extern cpuop_func op_4679_0_nf; -extern cpuop_func op_4679_0_ff; -extern cpuop_func op_4680_0_nf; -extern cpuop_func op_4680_0_ff; -extern cpuop_func op_4690_0_nf; -extern cpuop_func op_4690_0_ff; -extern cpuop_func op_4698_0_nf; -extern cpuop_func op_4698_0_ff; -extern cpuop_func op_46a0_0_nf; -extern cpuop_func op_46a0_0_ff; -extern cpuop_func op_46a8_0_nf; -extern cpuop_func op_46a8_0_ff; -extern cpuop_func op_46b0_0_nf; -extern cpuop_func op_46b0_0_ff; -extern cpuop_func op_46b8_0_nf; -extern cpuop_func op_46b8_0_ff; -extern cpuop_func op_46b9_0_nf; -extern cpuop_func op_46b9_0_ff; -extern cpuop_func op_46c0_0_nf; -extern cpuop_func op_46c0_0_ff; -extern cpuop_func op_46d0_0_nf; -extern cpuop_func op_46d0_0_ff; -extern cpuop_func op_46d8_0_nf; -extern cpuop_func op_46d8_0_ff; -extern cpuop_func op_46e0_0_nf; -extern cpuop_func op_46e0_0_ff; -extern cpuop_func op_46e8_0_nf; -extern cpuop_func op_46e8_0_ff; -extern cpuop_func op_46f0_0_nf; -extern cpuop_func op_46f0_0_ff; -extern cpuop_func op_46f8_0_nf; -extern cpuop_func op_46f8_0_ff; -extern cpuop_func op_46f9_0_nf; -extern cpuop_func op_46f9_0_ff; -extern cpuop_func op_46fa_0_nf; -extern cpuop_func op_46fa_0_ff; -extern cpuop_func op_46fb_0_nf; -extern cpuop_func op_46fb_0_ff; -extern cpuop_func op_46fc_0_nf; -extern cpuop_func op_46fc_0_ff; -extern cpuop_func op_4800_0_nf; -extern cpuop_func op_4800_0_ff; -extern cpuop_func op_4808_0_nf; -extern cpuop_func op_4808_0_ff; -extern cpuop_func op_4810_0_nf; -extern cpuop_func op_4810_0_ff; -extern cpuop_func op_4818_0_nf; -extern cpuop_func op_4818_0_ff; -extern cpuop_func op_4820_0_nf; -extern cpuop_func op_4820_0_ff; -extern cpuop_func op_4828_0_nf; -extern cpuop_func op_4828_0_ff; -extern cpuop_func op_4830_0_nf; -extern cpuop_func op_4830_0_ff; -extern cpuop_func op_4838_0_nf; -extern cpuop_func op_4838_0_ff; -extern cpuop_func op_4839_0_nf; -extern cpuop_func op_4839_0_ff; -extern cpuop_func op_4840_0_nf; -extern cpuop_func op_4840_0_ff; -extern cpuop_func op_4848_0_nf; -extern cpuop_func op_4848_0_ff; -extern cpuop_func op_4850_0_nf; -extern cpuop_func op_4850_0_ff; -extern cpuop_func op_4868_0_nf; -extern cpuop_func op_4868_0_ff; -extern cpuop_func op_4870_0_nf; -extern cpuop_func op_4870_0_ff; -extern cpuop_func op_4878_0_nf; -extern cpuop_func op_4878_0_ff; -extern cpuop_func op_4879_0_nf; -extern cpuop_func op_4879_0_ff; -extern cpuop_func op_487a_0_nf; -extern cpuop_func op_487a_0_ff; -extern cpuop_func op_487b_0_nf; -extern cpuop_func op_487b_0_ff; -extern cpuop_func op_4880_0_nf; -extern cpuop_func op_4880_0_ff; -extern cpuop_func op_4890_0_nf; -extern cpuop_func op_4890_0_ff; -extern cpuop_func op_48a0_0_nf; -extern cpuop_func op_48a0_0_ff; -extern cpuop_func op_48a8_0_nf; -extern cpuop_func op_48a8_0_ff; -extern cpuop_func op_48b0_0_nf; -extern cpuop_func op_48b0_0_ff; -extern cpuop_func op_48b8_0_nf; -extern cpuop_func op_48b8_0_ff; -extern cpuop_func op_48b9_0_nf; -extern cpuop_func op_48b9_0_ff; -extern cpuop_func op_48c0_0_nf; -extern cpuop_func op_48c0_0_ff; -extern cpuop_func op_48d0_0_nf; -extern cpuop_func op_48d0_0_ff; -extern cpuop_func op_48e0_0_nf; -extern cpuop_func op_48e0_0_ff; -extern cpuop_func op_48e8_0_nf; -extern cpuop_func op_48e8_0_ff; -extern cpuop_func op_48f0_0_nf; -extern cpuop_func op_48f0_0_ff; -extern cpuop_func op_48f8_0_nf; -extern cpuop_func op_48f8_0_ff; -extern cpuop_func op_48f9_0_nf; -extern cpuop_func op_48f9_0_ff; -extern cpuop_func op_49c0_0_nf; -extern cpuop_func op_49c0_0_ff; -extern cpuop_func op_4a00_0_nf; -extern cpuop_func op_4a00_0_ff; -extern cpuop_func op_4a10_0_nf; -extern cpuop_func op_4a10_0_ff; -extern cpuop_func op_4a18_0_nf; -extern cpuop_func op_4a18_0_ff; -extern cpuop_func op_4a20_0_nf; -extern cpuop_func op_4a20_0_ff; -extern cpuop_func op_4a28_0_nf; -extern cpuop_func op_4a28_0_ff; -extern cpuop_func op_4a30_0_nf; -extern cpuop_func op_4a30_0_ff; -extern cpuop_func op_4a38_0_nf; -extern cpuop_func op_4a38_0_ff; -extern cpuop_func op_4a39_0_nf; -extern cpuop_func op_4a39_0_ff; -extern cpuop_func op_4a3a_0_nf; -extern cpuop_func op_4a3a_0_ff; -extern cpuop_func op_4a3b_0_nf; -extern cpuop_func op_4a3b_0_ff; -extern cpuop_func op_4a3c_0_nf; -extern cpuop_func op_4a3c_0_ff; -extern cpuop_func op_4a40_0_nf; -extern cpuop_func op_4a40_0_ff; -extern cpuop_func op_4a48_0_nf; -extern cpuop_func op_4a48_0_ff; -extern cpuop_func op_4a50_0_nf; -extern cpuop_func op_4a50_0_ff; -extern cpuop_func op_4a58_0_nf; -extern cpuop_func op_4a58_0_ff; -extern cpuop_func op_4a60_0_nf; -extern cpuop_func op_4a60_0_ff; -extern cpuop_func op_4a68_0_nf; -extern cpuop_func op_4a68_0_ff; -extern cpuop_func op_4a70_0_nf; -extern cpuop_func op_4a70_0_ff; -extern cpuop_func op_4a78_0_nf; -extern cpuop_func op_4a78_0_ff; -extern cpuop_func op_4a79_0_nf; -extern cpuop_func op_4a79_0_ff; -extern cpuop_func op_4a7a_0_nf; -extern cpuop_func op_4a7a_0_ff; -extern cpuop_func op_4a7b_0_nf; -extern cpuop_func op_4a7b_0_ff; -extern cpuop_func op_4a7c_0_nf; -extern cpuop_func op_4a7c_0_ff; -extern cpuop_func op_4a80_0_nf; -extern cpuop_func op_4a80_0_ff; -extern cpuop_func op_4a88_0_nf; -extern cpuop_func op_4a88_0_ff; -extern cpuop_func op_4a90_0_nf; -extern cpuop_func op_4a90_0_ff; -extern cpuop_func op_4a98_0_nf; -extern cpuop_func op_4a98_0_ff; -extern cpuop_func op_4aa0_0_nf; -extern cpuop_func op_4aa0_0_ff; -extern cpuop_func op_4aa8_0_nf; -extern cpuop_func op_4aa8_0_ff; -extern cpuop_func op_4ab0_0_nf; -extern cpuop_func op_4ab0_0_ff; -extern cpuop_func op_4ab8_0_nf; -extern cpuop_func op_4ab8_0_ff; -extern cpuop_func op_4ab9_0_nf; -extern cpuop_func op_4ab9_0_ff; -extern cpuop_func op_4aba_0_nf; -extern cpuop_func op_4aba_0_ff; -extern cpuop_func op_4abb_0_nf; -extern cpuop_func op_4abb_0_ff; -extern cpuop_func op_4abc_0_nf; -extern cpuop_func op_4abc_0_ff; -extern cpuop_func op_4ac0_0_nf; -extern cpuop_func op_4ac0_0_ff; -extern cpuop_func op_4ad0_0_nf; -extern cpuop_func op_4ad0_0_ff; -extern cpuop_func op_4ad8_0_nf; -extern cpuop_func op_4ad8_0_ff; -extern cpuop_func op_4ae0_0_nf; -extern cpuop_func op_4ae0_0_ff; -extern cpuop_func op_4ae8_0_nf; -extern cpuop_func op_4ae8_0_ff; -extern cpuop_func op_4af0_0_nf; -extern cpuop_func op_4af0_0_ff; -extern cpuop_func op_4af8_0_nf; -extern cpuop_func op_4af8_0_ff; -extern cpuop_func op_4af9_0_nf; -extern cpuop_func op_4af9_0_ff; -extern cpuop_func op_4c00_0_nf; -extern cpuop_func op_4c00_0_ff; -extern cpuop_func op_4c10_0_nf; -extern cpuop_func op_4c10_0_ff; -extern cpuop_func op_4c18_0_nf; -extern cpuop_func op_4c18_0_ff; -extern cpuop_func op_4c20_0_nf; -extern cpuop_func op_4c20_0_ff; -extern cpuop_func op_4c28_0_nf; -extern cpuop_func op_4c28_0_ff; -extern cpuop_func op_4c30_0_nf; -extern cpuop_func op_4c30_0_ff; -extern cpuop_func op_4c38_0_nf; -extern cpuop_func op_4c38_0_ff; -extern cpuop_func op_4c39_0_nf; -extern cpuop_func op_4c39_0_ff; -extern cpuop_func op_4c3a_0_nf; -extern cpuop_func op_4c3a_0_ff; -extern cpuop_func op_4c3b_0_nf; -extern cpuop_func op_4c3b_0_ff; -extern cpuop_func op_4c3c_0_nf; -extern cpuop_func op_4c3c_0_ff; -extern cpuop_func op_4c40_0_nf; -extern cpuop_func op_4c40_0_ff; -extern cpuop_func op_4c50_0_nf; -extern cpuop_func op_4c50_0_ff; -extern cpuop_func op_4c58_0_nf; -extern cpuop_func op_4c58_0_ff; -extern cpuop_func op_4c60_0_nf; -extern cpuop_func op_4c60_0_ff; -extern cpuop_func op_4c68_0_nf; -extern cpuop_func op_4c68_0_ff; -extern cpuop_func op_4c70_0_nf; -extern cpuop_func op_4c70_0_ff; -extern cpuop_func op_4c78_0_nf; -extern cpuop_func op_4c78_0_ff; -extern cpuop_func op_4c79_0_nf; -extern cpuop_func op_4c79_0_ff; -extern cpuop_func op_4c7a_0_nf; -extern cpuop_func op_4c7a_0_ff; -extern cpuop_func op_4c7b_0_nf; -extern cpuop_func op_4c7b_0_ff; -extern cpuop_func op_4c7c_0_nf; -extern cpuop_func op_4c7c_0_ff; -extern cpuop_func op_4c90_0_nf; -extern cpuop_func op_4c90_0_ff; -extern cpuop_func op_4c98_0_nf; -extern cpuop_func op_4c98_0_ff; -extern cpuop_func op_4ca8_0_nf; -extern cpuop_func op_4ca8_0_ff; -extern cpuop_func op_4cb0_0_nf; -extern cpuop_func op_4cb0_0_ff; -extern cpuop_func op_4cb8_0_nf; -extern cpuop_func op_4cb8_0_ff; -extern cpuop_func op_4cb9_0_nf; -extern cpuop_func op_4cb9_0_ff; -extern cpuop_func op_4cba_0_nf; -extern cpuop_func op_4cba_0_ff; -extern cpuop_func op_4cbb_0_nf; -extern cpuop_func op_4cbb_0_ff; -extern cpuop_func op_4cd0_0_nf; -extern cpuop_func op_4cd0_0_ff; -extern cpuop_func op_4cd8_0_nf; -extern cpuop_func op_4cd8_0_ff; -extern cpuop_func op_4ce8_0_nf; -extern cpuop_func op_4ce8_0_ff; -extern cpuop_func op_4cf0_0_nf; -extern cpuop_func op_4cf0_0_ff; -extern cpuop_func op_4cf8_0_nf; -extern cpuop_func op_4cf8_0_ff; -extern cpuop_func op_4cf9_0_nf; -extern cpuop_func op_4cf9_0_ff; -extern cpuop_func op_4cfa_0_nf; -extern cpuop_func op_4cfa_0_ff; -extern cpuop_func op_4cfb_0_nf; -extern cpuop_func op_4cfb_0_ff; -extern cpuop_func op_4e40_0_nf; -extern cpuop_func op_4e40_0_ff; -extern cpuop_func op_4e50_0_nf; -extern cpuop_func op_4e50_0_ff; -extern cpuop_func op_4e58_0_nf; -extern cpuop_func op_4e58_0_ff; -extern cpuop_func op_4e60_0_nf; -extern cpuop_func op_4e60_0_ff; -extern cpuop_func op_4e68_0_nf; -extern cpuop_func op_4e68_0_ff; -extern cpuop_func op_4e70_0_nf; -extern cpuop_func op_4e70_0_ff; -extern cpuop_func op_4e71_0_nf; -extern cpuop_func op_4e71_0_ff; -extern cpuop_func op_4e72_0_nf; -extern cpuop_func op_4e72_0_ff; -extern cpuop_func op_4e73_0_nf; -extern cpuop_func op_4e73_0_ff; -extern cpuop_func op_4e74_0_nf; -extern cpuop_func op_4e74_0_ff; -extern cpuop_func op_4e75_0_nf; -extern cpuop_func op_4e75_0_ff; -extern cpuop_func op_4e76_0_nf; -extern cpuop_func op_4e76_0_ff; -extern cpuop_func op_4e77_0_nf; -extern cpuop_func op_4e77_0_ff; -extern cpuop_func op_4e7a_0_nf; -extern cpuop_func op_4e7a_0_ff; -extern cpuop_func op_4e7b_0_nf; -extern cpuop_func op_4e7b_0_ff; -extern cpuop_func op_4e90_0_nf; -extern cpuop_func op_4e90_0_ff; -extern cpuop_func op_4ea8_0_nf; -extern cpuop_func op_4ea8_0_ff; -extern cpuop_func op_4eb0_0_nf; -extern cpuop_func op_4eb0_0_ff; -extern cpuop_func op_4eb8_0_nf; -extern cpuop_func op_4eb8_0_ff; -extern cpuop_func op_4eb9_0_nf; -extern cpuop_func op_4eb9_0_ff; -extern cpuop_func op_4eba_0_nf; -extern cpuop_func op_4eba_0_ff; -extern cpuop_func op_4ebb_0_nf; -extern cpuop_func op_4ebb_0_ff; -extern cpuop_func op_4ed0_0_nf; -extern cpuop_func op_4ed0_0_ff; -extern cpuop_func op_4ee8_0_nf; -extern cpuop_func op_4ee8_0_ff; -extern cpuop_func op_4ef0_0_nf; -extern cpuop_func op_4ef0_0_ff; -extern cpuop_func op_4ef8_0_nf; -extern cpuop_func op_4ef8_0_ff; -extern cpuop_func op_4ef9_0_nf; -extern cpuop_func op_4ef9_0_ff; -extern cpuop_func op_4efa_0_nf; -extern cpuop_func op_4efa_0_ff; -extern cpuop_func op_4efb_0_nf; -extern cpuop_func op_4efb_0_ff; -extern cpuop_func op_5000_0_nf; -extern cpuop_func op_5000_0_ff; -extern cpuop_func op_5010_0_nf; -extern cpuop_func op_5010_0_ff; -extern cpuop_func op_5018_0_nf; -extern cpuop_func op_5018_0_ff; -extern cpuop_func op_5020_0_nf; -extern cpuop_func op_5020_0_ff; -extern cpuop_func op_5028_0_nf; -extern cpuop_func op_5028_0_ff; -extern cpuop_func op_5030_0_nf; -extern cpuop_func op_5030_0_ff; -extern cpuop_func op_5038_0_nf; -extern cpuop_func op_5038_0_ff; -extern cpuop_func op_5039_0_nf; -extern cpuop_func op_5039_0_ff; -extern cpuop_func op_5040_0_nf; -extern cpuop_func op_5040_0_ff; -extern cpuop_func op_5048_0_nf; -extern cpuop_func op_5048_0_ff; -extern cpuop_func op_5050_0_nf; -extern cpuop_func op_5050_0_ff; -extern cpuop_func op_5058_0_nf; -extern cpuop_func op_5058_0_ff; -extern cpuop_func op_5060_0_nf; -extern cpuop_func op_5060_0_ff; -extern cpuop_func op_5068_0_nf; -extern cpuop_func op_5068_0_ff; -extern cpuop_func op_5070_0_nf; -extern cpuop_func op_5070_0_ff; -extern cpuop_func op_5078_0_nf; -extern cpuop_func op_5078_0_ff; -extern cpuop_func op_5079_0_nf; -extern cpuop_func op_5079_0_ff; -extern cpuop_func op_5080_0_nf; -extern cpuop_func op_5080_0_ff; -extern cpuop_func op_5088_0_nf; -extern cpuop_func op_5088_0_ff; -extern cpuop_func op_5090_0_nf; -extern cpuop_func op_5090_0_ff; -extern cpuop_func op_5098_0_nf; -extern cpuop_func op_5098_0_ff; -extern cpuop_func op_50a0_0_nf; -extern cpuop_func op_50a0_0_ff; -extern cpuop_func op_50a8_0_nf; -extern cpuop_func op_50a8_0_ff; -extern cpuop_func op_50b0_0_nf; -extern cpuop_func op_50b0_0_ff; -extern cpuop_func op_50b8_0_nf; -extern cpuop_func op_50b8_0_ff; -extern cpuop_func op_50b9_0_nf; -extern cpuop_func op_50b9_0_ff; -extern cpuop_func op_50c0_0_nf; -extern cpuop_func op_50c0_0_ff; -extern cpuop_func op_50c8_0_nf; -extern cpuop_func op_50c8_0_ff; -extern cpuop_func op_50d0_0_nf; -extern cpuop_func op_50d0_0_ff; -extern cpuop_func op_50d8_0_nf; -extern cpuop_func op_50d8_0_ff; -extern cpuop_func op_50e0_0_nf; -extern cpuop_func op_50e0_0_ff; -extern cpuop_func op_50e8_0_nf; -extern cpuop_func op_50e8_0_ff; -extern cpuop_func op_50f0_0_nf; -extern cpuop_func op_50f0_0_ff; -extern cpuop_func op_50f8_0_nf; -extern cpuop_func op_50f8_0_ff; -extern cpuop_func op_50f9_0_nf; -extern cpuop_func op_50f9_0_ff; -extern cpuop_func op_50fa_0_nf; -extern cpuop_func op_50fa_0_ff; -extern cpuop_func op_50fb_0_nf; -extern cpuop_func op_50fb_0_ff; -extern cpuop_func op_50fc_0_nf; -extern cpuop_func op_50fc_0_ff; -extern cpuop_func op_5100_0_nf; -extern cpuop_func op_5100_0_ff; -extern cpuop_func op_5110_0_nf; -extern cpuop_func op_5110_0_ff; -extern cpuop_func op_5118_0_nf; -extern cpuop_func op_5118_0_ff; -extern cpuop_func op_5120_0_nf; -extern cpuop_func op_5120_0_ff; -extern cpuop_func op_5128_0_nf; -extern cpuop_func op_5128_0_ff; -extern cpuop_func op_5130_0_nf; -extern cpuop_func op_5130_0_ff; -extern cpuop_func op_5138_0_nf; -extern cpuop_func op_5138_0_ff; -extern cpuop_func op_5139_0_nf; -extern cpuop_func op_5139_0_ff; -extern cpuop_func op_5140_0_nf; -extern cpuop_func op_5140_0_ff; -extern cpuop_func op_5148_0_nf; -extern cpuop_func op_5148_0_ff; -extern cpuop_func op_5150_0_nf; -extern cpuop_func op_5150_0_ff; -extern cpuop_func op_5158_0_nf; -extern cpuop_func op_5158_0_ff; -extern cpuop_func op_5160_0_nf; -extern cpuop_func op_5160_0_ff; -extern cpuop_func op_5168_0_nf; -extern cpuop_func op_5168_0_ff; -extern cpuop_func op_5170_0_nf; -extern cpuop_func op_5170_0_ff; -extern cpuop_func op_5178_0_nf; -extern cpuop_func op_5178_0_ff; -extern cpuop_func op_5179_0_nf; -extern cpuop_func op_5179_0_ff; -extern cpuop_func op_5180_0_nf; -extern cpuop_func op_5180_0_ff; -extern cpuop_func op_5188_0_nf; -extern cpuop_func op_5188_0_ff; -extern cpuop_func op_5190_0_nf; -extern cpuop_func op_5190_0_ff; -extern cpuop_func op_5198_0_nf; -extern cpuop_func op_5198_0_ff; -extern cpuop_func op_51a0_0_nf; -extern cpuop_func op_51a0_0_ff; -extern cpuop_func op_51a8_0_nf; -extern cpuop_func op_51a8_0_ff; -extern cpuop_func op_51b0_0_nf; -extern cpuop_func op_51b0_0_ff; -extern cpuop_func op_51b8_0_nf; -extern cpuop_func op_51b8_0_ff; -extern cpuop_func op_51b9_0_nf; -extern cpuop_func op_51b9_0_ff; -extern cpuop_func op_51c0_0_nf; -extern cpuop_func op_51c0_0_ff; -extern cpuop_func op_51c8_0_nf; -extern cpuop_func op_51c8_0_ff; -extern cpuop_func op_51d0_0_nf; -extern cpuop_func op_51d0_0_ff; -extern cpuop_func op_51d8_0_nf; -extern cpuop_func op_51d8_0_ff; -extern cpuop_func op_51e0_0_nf; -extern cpuop_func op_51e0_0_ff; -extern cpuop_func op_51e8_0_nf; -extern cpuop_func op_51e8_0_ff; -extern cpuop_func op_51f0_0_nf; -extern cpuop_func op_51f0_0_ff; -extern cpuop_func op_51f8_0_nf; -extern cpuop_func op_51f8_0_ff; -extern cpuop_func op_51f9_0_nf; -extern cpuop_func op_51f9_0_ff; -extern cpuop_func op_51fa_0_nf; -extern cpuop_func op_51fa_0_ff; -extern cpuop_func op_51fb_0_nf; -extern cpuop_func op_51fb_0_ff; -extern cpuop_func op_51fc_0_nf; -extern cpuop_func op_51fc_0_ff; -extern cpuop_func op_52c0_0_nf; -extern cpuop_func op_52c0_0_ff; -extern cpuop_func op_52c8_0_nf; -extern cpuop_func op_52c8_0_ff; -extern cpuop_func op_52d0_0_nf; -extern cpuop_func op_52d0_0_ff; -extern cpuop_func op_52d8_0_nf; -extern cpuop_func op_52d8_0_ff; -extern cpuop_func op_52e0_0_nf; -extern cpuop_func op_52e0_0_ff; -extern cpuop_func op_52e8_0_nf; -extern cpuop_func op_52e8_0_ff; -extern cpuop_func op_52f0_0_nf; -extern cpuop_func op_52f0_0_ff; -extern cpuop_func op_52f8_0_nf; -extern cpuop_func op_52f8_0_ff; -extern cpuop_func op_52f9_0_nf; -extern cpuop_func op_52f9_0_ff; -extern cpuop_func op_52fa_0_nf; -extern cpuop_func op_52fa_0_ff; -extern cpuop_func op_52fb_0_nf; -extern cpuop_func op_52fb_0_ff; -extern cpuop_func op_52fc_0_nf; -extern cpuop_func op_52fc_0_ff; -extern cpuop_func op_53c0_0_nf; -extern cpuop_func op_53c0_0_ff; -extern cpuop_func op_53c8_0_nf; -extern cpuop_func op_53c8_0_ff; -extern cpuop_func op_53d0_0_nf; -extern cpuop_func op_53d0_0_ff; -extern cpuop_func op_53d8_0_nf; -extern cpuop_func op_53d8_0_ff; -extern cpuop_func op_53e0_0_nf; -extern cpuop_func op_53e0_0_ff; -extern cpuop_func op_53e8_0_nf; -extern cpuop_func op_53e8_0_ff; -extern cpuop_func op_53f0_0_nf; -extern cpuop_func op_53f0_0_ff; -extern cpuop_func op_53f8_0_nf; -extern cpuop_func op_53f8_0_ff; -extern cpuop_func op_53f9_0_nf; -extern cpuop_func op_53f9_0_ff; -extern cpuop_func op_53fa_0_nf; -extern cpuop_func op_53fa_0_ff; -extern cpuop_func op_53fb_0_nf; -extern cpuop_func op_53fb_0_ff; -extern cpuop_func op_53fc_0_nf; -extern cpuop_func op_53fc_0_ff; -extern cpuop_func op_54c0_0_nf; -extern cpuop_func op_54c0_0_ff; -extern cpuop_func op_54c8_0_nf; -extern cpuop_func op_54c8_0_ff; -extern cpuop_func op_54d0_0_nf; -extern cpuop_func op_54d0_0_ff; -extern cpuop_func op_54d8_0_nf; -extern cpuop_func op_54d8_0_ff; -extern cpuop_func op_54e0_0_nf; -extern cpuop_func op_54e0_0_ff; -extern cpuop_func op_54e8_0_nf; -extern cpuop_func op_54e8_0_ff; -extern cpuop_func op_54f0_0_nf; -extern cpuop_func op_54f0_0_ff; -extern cpuop_func op_54f8_0_nf; -extern cpuop_func op_54f8_0_ff; -extern cpuop_func op_54f9_0_nf; -extern cpuop_func op_54f9_0_ff; -extern cpuop_func op_54fa_0_nf; -extern cpuop_func op_54fa_0_ff; -extern cpuop_func op_54fb_0_nf; -extern cpuop_func op_54fb_0_ff; -extern cpuop_func op_54fc_0_nf; -extern cpuop_func op_54fc_0_ff; -extern cpuop_func op_55c0_0_nf; -extern cpuop_func op_55c0_0_ff; -extern cpuop_func op_55c8_0_nf; -extern cpuop_func op_55c8_0_ff; -extern cpuop_func op_55d0_0_nf; -extern cpuop_func op_55d0_0_ff; -extern cpuop_func op_55d8_0_nf; -extern cpuop_func op_55d8_0_ff; -extern cpuop_func op_55e0_0_nf; -extern cpuop_func op_55e0_0_ff; -extern cpuop_func op_55e8_0_nf; -extern cpuop_func op_55e8_0_ff; -extern cpuop_func op_55f0_0_nf; -extern cpuop_func op_55f0_0_ff; -extern cpuop_func op_55f8_0_nf; -extern cpuop_func op_55f8_0_ff; -extern cpuop_func op_55f9_0_nf; -extern cpuop_func op_55f9_0_ff; -extern cpuop_func op_55fa_0_nf; -extern cpuop_func op_55fa_0_ff; -extern cpuop_func op_55fb_0_nf; -extern cpuop_func op_55fb_0_ff; -extern cpuop_func op_55fc_0_nf; -extern cpuop_func op_55fc_0_ff; -extern cpuop_func op_56c0_0_nf; -extern cpuop_func op_56c0_0_ff; -extern cpuop_func op_56c8_0_nf; -extern cpuop_func op_56c8_0_ff; -extern cpuop_func op_56d0_0_nf; -extern cpuop_func op_56d0_0_ff; -extern cpuop_func op_56d8_0_nf; -extern cpuop_func op_56d8_0_ff; -extern cpuop_func op_56e0_0_nf; -extern cpuop_func op_56e0_0_ff; -extern cpuop_func op_56e8_0_nf; -extern cpuop_func op_56e8_0_ff; -extern cpuop_func op_56f0_0_nf; -extern cpuop_func op_56f0_0_ff; -extern cpuop_func op_56f8_0_nf; -extern cpuop_func op_56f8_0_ff; -extern cpuop_func op_56f9_0_nf; -extern cpuop_func op_56f9_0_ff; -extern cpuop_func op_56fa_0_nf; -extern cpuop_func op_56fa_0_ff; -extern cpuop_func op_56fb_0_nf; -extern cpuop_func op_56fb_0_ff; -extern cpuop_func op_56fc_0_nf; -extern cpuop_func op_56fc_0_ff; -extern cpuop_func op_57c0_0_nf; -extern cpuop_func op_57c0_0_ff; -extern cpuop_func op_57c8_0_nf; -extern cpuop_func op_57c8_0_ff; -extern cpuop_func op_57d0_0_nf; -extern cpuop_func op_57d0_0_ff; -extern cpuop_func op_57d8_0_nf; -extern cpuop_func op_57d8_0_ff; -extern cpuop_func op_57e0_0_nf; -extern cpuop_func op_57e0_0_ff; -extern cpuop_func op_57e8_0_nf; -extern cpuop_func op_57e8_0_ff; -extern cpuop_func op_57f0_0_nf; -extern cpuop_func op_57f0_0_ff; -extern cpuop_func op_57f8_0_nf; -extern cpuop_func op_57f8_0_ff; -extern cpuop_func op_57f9_0_nf; -extern cpuop_func op_57f9_0_ff; -extern cpuop_func op_57fa_0_nf; -extern cpuop_func op_57fa_0_ff; -extern cpuop_func op_57fb_0_nf; -extern cpuop_func op_57fb_0_ff; -extern cpuop_func op_57fc_0_nf; -extern cpuop_func op_57fc_0_ff; -extern cpuop_func op_58c0_0_nf; -extern cpuop_func op_58c0_0_ff; -extern cpuop_func op_58c8_0_nf; -extern cpuop_func op_58c8_0_ff; -extern cpuop_func op_58d0_0_nf; -extern cpuop_func op_58d0_0_ff; -extern cpuop_func op_58d8_0_nf; -extern cpuop_func op_58d8_0_ff; -extern cpuop_func op_58e0_0_nf; -extern cpuop_func op_58e0_0_ff; -extern cpuop_func op_58e8_0_nf; -extern cpuop_func op_58e8_0_ff; -extern cpuop_func op_58f0_0_nf; -extern cpuop_func op_58f0_0_ff; -extern cpuop_func op_58f8_0_nf; -extern cpuop_func op_58f8_0_ff; -extern cpuop_func op_58f9_0_nf; -extern cpuop_func op_58f9_0_ff; -extern cpuop_func op_58fa_0_nf; -extern cpuop_func op_58fa_0_ff; -extern cpuop_func op_58fb_0_nf; -extern cpuop_func op_58fb_0_ff; -extern cpuop_func op_58fc_0_nf; -extern cpuop_func op_58fc_0_ff; -extern cpuop_func op_59c0_0_nf; -extern cpuop_func op_59c0_0_ff; -extern cpuop_func op_59c8_0_nf; -extern cpuop_func op_59c8_0_ff; -extern cpuop_func op_59d0_0_nf; -extern cpuop_func op_59d0_0_ff; -extern cpuop_func op_59d8_0_nf; -extern cpuop_func op_59d8_0_ff; -extern cpuop_func op_59e0_0_nf; -extern cpuop_func op_59e0_0_ff; -extern cpuop_func op_59e8_0_nf; -extern cpuop_func op_59e8_0_ff; -extern cpuop_func op_59f0_0_nf; -extern cpuop_func op_59f0_0_ff; -extern cpuop_func op_59f8_0_nf; -extern cpuop_func op_59f8_0_ff; -extern cpuop_func op_59f9_0_nf; -extern cpuop_func op_59f9_0_ff; -extern cpuop_func op_59fa_0_nf; -extern cpuop_func op_59fa_0_ff; -extern cpuop_func op_59fb_0_nf; -extern cpuop_func op_59fb_0_ff; -extern cpuop_func op_59fc_0_nf; -extern cpuop_func op_59fc_0_ff; -extern cpuop_func op_5ac0_0_nf; -extern cpuop_func op_5ac0_0_ff; -extern cpuop_func op_5ac8_0_nf; -extern cpuop_func op_5ac8_0_ff; -extern cpuop_func op_5ad0_0_nf; -extern cpuop_func op_5ad0_0_ff; -extern cpuop_func op_5ad8_0_nf; -extern cpuop_func op_5ad8_0_ff; -extern cpuop_func op_5ae0_0_nf; -extern cpuop_func op_5ae0_0_ff; -extern cpuop_func op_5ae8_0_nf; -extern cpuop_func op_5ae8_0_ff; -extern cpuop_func op_5af0_0_nf; -extern cpuop_func op_5af0_0_ff; -extern cpuop_func op_5af8_0_nf; -extern cpuop_func op_5af8_0_ff; -extern cpuop_func op_5af9_0_nf; -extern cpuop_func op_5af9_0_ff; -extern cpuop_func op_5afa_0_nf; -extern cpuop_func op_5afa_0_ff; -extern cpuop_func op_5afb_0_nf; -extern cpuop_func op_5afb_0_ff; -extern cpuop_func op_5afc_0_nf; -extern cpuop_func op_5afc_0_ff; -extern cpuop_func op_5bc0_0_nf; -extern cpuop_func op_5bc0_0_ff; -extern cpuop_func op_5bc8_0_nf; -extern cpuop_func op_5bc8_0_ff; -extern cpuop_func op_5bd0_0_nf; -extern cpuop_func op_5bd0_0_ff; -extern cpuop_func op_5bd8_0_nf; -extern cpuop_func op_5bd8_0_ff; -extern cpuop_func op_5be0_0_nf; -extern cpuop_func op_5be0_0_ff; -extern cpuop_func op_5be8_0_nf; -extern cpuop_func op_5be8_0_ff; -extern cpuop_func op_5bf0_0_nf; -extern cpuop_func op_5bf0_0_ff; -extern cpuop_func op_5bf8_0_nf; -extern cpuop_func op_5bf8_0_ff; -extern cpuop_func op_5bf9_0_nf; -extern cpuop_func op_5bf9_0_ff; -extern cpuop_func op_5bfa_0_nf; -extern cpuop_func op_5bfa_0_ff; -extern cpuop_func op_5bfb_0_nf; -extern cpuop_func op_5bfb_0_ff; -extern cpuop_func op_5bfc_0_nf; -extern cpuop_func op_5bfc_0_ff; -extern cpuop_func op_5cc0_0_nf; -extern cpuop_func op_5cc0_0_ff; -extern cpuop_func op_5cc8_0_nf; -extern cpuop_func op_5cc8_0_ff; -extern cpuop_func op_5cd0_0_nf; -extern cpuop_func op_5cd0_0_ff; -extern cpuop_func op_5cd8_0_nf; -extern cpuop_func op_5cd8_0_ff; -extern cpuop_func op_5ce0_0_nf; -extern cpuop_func op_5ce0_0_ff; -extern cpuop_func op_5ce8_0_nf; -extern cpuop_func op_5ce8_0_ff; -extern cpuop_func op_5cf0_0_nf; -extern cpuop_func op_5cf0_0_ff; -extern cpuop_func op_5cf8_0_nf; -extern cpuop_func op_5cf8_0_ff; -extern cpuop_func op_5cf9_0_nf; -extern cpuop_func op_5cf9_0_ff; -extern cpuop_func op_5cfa_0_nf; -extern cpuop_func op_5cfa_0_ff; -extern cpuop_func op_5cfb_0_nf; -extern cpuop_func op_5cfb_0_ff; -extern cpuop_func op_5cfc_0_nf; -extern cpuop_func op_5cfc_0_ff; -extern cpuop_func op_5dc0_0_nf; -extern cpuop_func op_5dc0_0_ff; -extern cpuop_func op_5dc8_0_nf; -extern cpuop_func op_5dc8_0_ff; -extern cpuop_func op_5dd0_0_nf; -extern cpuop_func op_5dd0_0_ff; -extern cpuop_func op_5dd8_0_nf; -extern cpuop_func op_5dd8_0_ff; -extern cpuop_func op_5de0_0_nf; -extern cpuop_func op_5de0_0_ff; -extern cpuop_func op_5de8_0_nf; -extern cpuop_func op_5de8_0_ff; -extern cpuop_func op_5df0_0_nf; -extern cpuop_func op_5df0_0_ff; -extern cpuop_func op_5df8_0_nf; -extern cpuop_func op_5df8_0_ff; -extern cpuop_func op_5df9_0_nf; -extern cpuop_func op_5df9_0_ff; -extern cpuop_func op_5dfa_0_nf; -extern cpuop_func op_5dfa_0_ff; -extern cpuop_func op_5dfb_0_nf; -extern cpuop_func op_5dfb_0_ff; -extern cpuop_func op_5dfc_0_nf; -extern cpuop_func op_5dfc_0_ff; -extern cpuop_func op_5ec0_0_nf; -extern cpuop_func op_5ec0_0_ff; -extern cpuop_func op_5ec8_0_nf; -extern cpuop_func op_5ec8_0_ff; -extern cpuop_func op_5ed0_0_nf; -extern cpuop_func op_5ed0_0_ff; -extern cpuop_func op_5ed8_0_nf; -extern cpuop_func op_5ed8_0_ff; -extern cpuop_func op_5ee0_0_nf; -extern cpuop_func op_5ee0_0_ff; -extern cpuop_func op_5ee8_0_nf; -extern cpuop_func op_5ee8_0_ff; -extern cpuop_func op_5ef0_0_nf; -extern cpuop_func op_5ef0_0_ff; -extern cpuop_func op_5ef8_0_nf; -extern cpuop_func op_5ef8_0_ff; -extern cpuop_func op_5ef9_0_nf; -extern cpuop_func op_5ef9_0_ff; -extern cpuop_func op_5efa_0_nf; -extern cpuop_func op_5efa_0_ff; -extern cpuop_func op_5efb_0_nf; -extern cpuop_func op_5efb_0_ff; -extern cpuop_func op_5efc_0_nf; -extern cpuop_func op_5efc_0_ff; -extern cpuop_func op_5fc0_0_nf; -extern cpuop_func op_5fc0_0_ff; -extern cpuop_func op_5fc8_0_nf; -extern cpuop_func op_5fc8_0_ff; -extern cpuop_func op_5fd0_0_nf; -extern cpuop_func op_5fd0_0_ff; -extern cpuop_func op_5fd8_0_nf; -extern cpuop_func op_5fd8_0_ff; -extern cpuop_func op_5fe0_0_nf; -extern cpuop_func op_5fe0_0_ff; -extern cpuop_func op_5fe8_0_nf; -extern cpuop_func op_5fe8_0_ff; -extern cpuop_func op_5ff0_0_nf; -extern cpuop_func op_5ff0_0_ff; -extern cpuop_func op_5ff8_0_nf; -extern cpuop_func op_5ff8_0_ff; -extern cpuop_func op_5ff9_0_nf; -extern cpuop_func op_5ff9_0_ff; -extern cpuop_func op_5ffa_0_nf; -extern cpuop_func op_5ffa_0_ff; -extern cpuop_func op_5ffb_0_nf; -extern cpuop_func op_5ffb_0_ff; -extern cpuop_func op_5ffc_0_nf; -extern cpuop_func op_5ffc_0_ff; -extern cpuop_func op_6000_0_nf; -extern cpuop_func op_6000_0_ff; -extern cpuop_func op_6001_0_nf; -extern cpuop_func op_6001_0_ff; -extern cpuop_func op_60ff_0_nf; -extern cpuop_func op_60ff_0_ff; -extern cpuop_func op_6100_0_nf; -extern cpuop_func op_6100_0_ff; -extern cpuop_func op_6101_0_nf; -extern cpuop_func op_6101_0_ff; -extern cpuop_func op_61ff_0_nf; -extern cpuop_func op_61ff_0_ff; -extern cpuop_func op_6200_0_nf; -extern cpuop_func op_6200_0_ff; -extern cpuop_func op_6201_0_nf; -extern cpuop_func op_6201_0_ff; -extern cpuop_func op_62ff_0_nf; -extern cpuop_func op_62ff_0_ff; -extern cpuop_func op_6300_0_nf; -extern cpuop_func op_6300_0_ff; -extern cpuop_func op_6301_0_nf; -extern cpuop_func op_6301_0_ff; -extern cpuop_func op_63ff_0_nf; -extern cpuop_func op_63ff_0_ff; -extern cpuop_func op_6400_0_nf; -extern cpuop_func op_6400_0_ff; -extern cpuop_func op_6401_0_nf; -extern cpuop_func op_6401_0_ff; -extern cpuop_func op_64ff_0_nf; -extern cpuop_func op_64ff_0_ff; -extern cpuop_func op_6500_0_nf; -extern cpuop_func op_6500_0_ff; -extern cpuop_func op_6501_0_nf; -extern cpuop_func op_6501_0_ff; -extern cpuop_func op_65ff_0_nf; -extern cpuop_func op_65ff_0_ff; -extern cpuop_func op_6600_0_nf; -extern cpuop_func op_6600_0_ff; -extern cpuop_func op_6601_0_nf; -extern cpuop_func op_6601_0_ff; -extern cpuop_func op_66ff_0_nf; -extern cpuop_func op_66ff_0_ff; -extern cpuop_func op_6700_0_nf; -extern cpuop_func op_6700_0_ff; -extern cpuop_func op_6701_0_nf; -extern cpuop_func op_6701_0_ff; -extern cpuop_func op_67ff_0_nf; -extern cpuop_func op_67ff_0_ff; -extern cpuop_func op_6800_0_nf; -extern cpuop_func op_6800_0_ff; -extern cpuop_func op_6801_0_nf; -extern cpuop_func op_6801_0_ff; -extern cpuop_func op_68ff_0_nf; -extern cpuop_func op_68ff_0_ff; -extern cpuop_func op_6900_0_nf; -extern cpuop_func op_6900_0_ff; -extern cpuop_func op_6901_0_nf; -extern cpuop_func op_6901_0_ff; -extern cpuop_func op_69ff_0_nf; -extern cpuop_func op_69ff_0_ff; -extern cpuop_func op_6a00_0_nf; -extern cpuop_func op_6a00_0_ff; -extern cpuop_func op_6a01_0_nf; -extern cpuop_func op_6a01_0_ff; -extern cpuop_func op_6aff_0_nf; -extern cpuop_func op_6aff_0_ff; -extern cpuop_func op_6b00_0_nf; -extern cpuop_func op_6b00_0_ff; -extern cpuop_func op_6b01_0_nf; -extern cpuop_func op_6b01_0_ff; -extern cpuop_func op_6bff_0_nf; -extern cpuop_func op_6bff_0_ff; -extern cpuop_func op_6c00_0_nf; -extern cpuop_func op_6c00_0_ff; -extern cpuop_func op_6c01_0_nf; -extern cpuop_func op_6c01_0_ff; -extern cpuop_func op_6cff_0_nf; -extern cpuop_func op_6cff_0_ff; -extern cpuop_func op_6d00_0_nf; -extern cpuop_func op_6d00_0_ff; -extern cpuop_func op_6d01_0_nf; -extern cpuop_func op_6d01_0_ff; -extern cpuop_func op_6dff_0_nf; -extern cpuop_func op_6dff_0_ff; -extern cpuop_func op_6e00_0_nf; -extern cpuop_func op_6e00_0_ff; -extern cpuop_func op_6e01_0_nf; -extern cpuop_func op_6e01_0_ff; -extern cpuop_func op_6eff_0_nf; -extern cpuop_func op_6eff_0_ff; -extern cpuop_func op_6f00_0_nf; -extern cpuop_func op_6f00_0_ff; -extern cpuop_func op_6f01_0_nf; -extern cpuop_func op_6f01_0_ff; -extern cpuop_func op_6fff_0_nf; -extern cpuop_func op_6fff_0_ff; -extern cpuop_func op_7000_0_nf; -extern cpuop_func op_7000_0_ff; -extern cpuop_func op_7100_0_nf; -extern cpuop_func op_7100_0_ff; -extern cpuop_func op_7101_0_nf; -extern cpuop_func op_7101_0_ff; -extern cpuop_func op_8000_0_nf; -extern cpuop_func op_8000_0_ff; -extern cpuop_func op_8010_0_nf; -extern cpuop_func op_8010_0_ff; -extern cpuop_func op_8018_0_nf; -extern cpuop_func op_8018_0_ff; -extern cpuop_func op_8020_0_nf; -extern cpuop_func op_8020_0_ff; -extern cpuop_func op_8028_0_nf; -extern cpuop_func op_8028_0_ff; -extern cpuop_func op_8030_0_nf; -extern cpuop_func op_8030_0_ff; -extern cpuop_func op_8038_0_nf; -extern cpuop_func op_8038_0_ff; -extern cpuop_func op_8039_0_nf; -extern cpuop_func op_8039_0_ff; -extern cpuop_func op_803a_0_nf; -extern cpuop_func op_803a_0_ff; -extern cpuop_func op_803b_0_nf; -extern cpuop_func op_803b_0_ff; -extern cpuop_func op_803c_0_nf; -extern cpuop_func op_803c_0_ff; -extern cpuop_func op_8040_0_nf; -extern cpuop_func op_8040_0_ff; -extern cpuop_func op_8050_0_nf; -extern cpuop_func op_8050_0_ff; -extern cpuop_func op_8058_0_nf; -extern cpuop_func op_8058_0_ff; -extern cpuop_func op_8060_0_nf; -extern cpuop_func op_8060_0_ff; -extern cpuop_func op_8068_0_nf; -extern cpuop_func op_8068_0_ff; -extern cpuop_func op_8070_0_nf; -extern cpuop_func op_8070_0_ff; -extern cpuop_func op_8078_0_nf; -extern cpuop_func op_8078_0_ff; -extern cpuop_func op_8079_0_nf; -extern cpuop_func op_8079_0_ff; -extern cpuop_func op_807a_0_nf; -extern cpuop_func op_807a_0_ff; -extern cpuop_func op_807b_0_nf; -extern cpuop_func op_807b_0_ff; -extern cpuop_func op_807c_0_nf; -extern cpuop_func op_807c_0_ff; -extern cpuop_func op_8080_0_nf; -extern cpuop_func op_8080_0_ff; -extern cpuop_func op_8090_0_nf; -extern cpuop_func op_8090_0_ff; -extern cpuop_func op_8098_0_nf; -extern cpuop_func op_8098_0_ff; -extern cpuop_func op_80a0_0_nf; -extern cpuop_func op_80a0_0_ff; -extern cpuop_func op_80a8_0_nf; -extern cpuop_func op_80a8_0_ff; -extern cpuop_func op_80b0_0_nf; -extern cpuop_func op_80b0_0_ff; -extern cpuop_func op_80b8_0_nf; -extern cpuop_func op_80b8_0_ff; -extern cpuop_func op_80b9_0_nf; -extern cpuop_func op_80b9_0_ff; -extern cpuop_func op_80ba_0_nf; -extern cpuop_func op_80ba_0_ff; -extern cpuop_func op_80bb_0_nf; -extern cpuop_func op_80bb_0_ff; -extern cpuop_func op_80bc_0_nf; -extern cpuop_func op_80bc_0_ff; -extern cpuop_func op_80c0_0_nf; -extern cpuop_func op_80c0_0_ff; -extern cpuop_func op_80d0_0_nf; -extern cpuop_func op_80d0_0_ff; -extern cpuop_func op_80d8_0_nf; -extern cpuop_func op_80d8_0_ff; -extern cpuop_func op_80e0_0_nf; -extern cpuop_func op_80e0_0_ff; -extern cpuop_func op_80e8_0_nf; -extern cpuop_func op_80e8_0_ff; -extern cpuop_func op_80f0_0_nf; -extern cpuop_func op_80f0_0_ff; -extern cpuop_func op_80f8_0_nf; -extern cpuop_func op_80f8_0_ff; -extern cpuop_func op_80f9_0_nf; -extern cpuop_func op_80f9_0_ff; -extern cpuop_func op_80fa_0_nf; -extern cpuop_func op_80fa_0_ff; -extern cpuop_func op_80fb_0_nf; -extern cpuop_func op_80fb_0_ff; -extern cpuop_func op_80fc_0_nf; -extern cpuop_func op_80fc_0_ff; -extern cpuop_func op_8100_0_nf; -extern cpuop_func op_8100_0_ff; -extern cpuop_func op_8108_0_nf; -extern cpuop_func op_8108_0_ff; -extern cpuop_func op_8110_0_nf; -extern cpuop_func op_8110_0_ff; -extern cpuop_func op_8118_0_nf; -extern cpuop_func op_8118_0_ff; -extern cpuop_func op_8120_0_nf; -extern cpuop_func op_8120_0_ff; -extern cpuop_func op_8128_0_nf; -extern cpuop_func op_8128_0_ff; -extern cpuop_func op_8130_0_nf; -extern cpuop_func op_8130_0_ff; -extern cpuop_func op_8138_0_nf; -extern cpuop_func op_8138_0_ff; -extern cpuop_func op_8139_0_nf; -extern cpuop_func op_8139_0_ff; -extern cpuop_func op_8140_0_nf; -extern cpuop_func op_8140_0_ff; -extern cpuop_func op_8148_0_nf; -extern cpuop_func op_8148_0_ff; -extern cpuop_func op_8150_0_nf; -extern cpuop_func op_8150_0_ff; -extern cpuop_func op_8158_0_nf; -extern cpuop_func op_8158_0_ff; -extern cpuop_func op_8160_0_nf; -extern cpuop_func op_8160_0_ff; -extern cpuop_func op_8168_0_nf; -extern cpuop_func op_8168_0_ff; -extern cpuop_func op_8170_0_nf; -extern cpuop_func op_8170_0_ff; -extern cpuop_func op_8178_0_nf; -extern cpuop_func op_8178_0_ff; -extern cpuop_func op_8179_0_nf; -extern cpuop_func op_8179_0_ff; -extern cpuop_func op_8180_0_nf; -extern cpuop_func op_8180_0_ff; -extern cpuop_func op_8188_0_nf; -extern cpuop_func op_8188_0_ff; -extern cpuop_func op_8190_0_nf; -extern cpuop_func op_8190_0_ff; -extern cpuop_func op_8198_0_nf; -extern cpuop_func op_8198_0_ff; -extern cpuop_func op_81a0_0_nf; -extern cpuop_func op_81a0_0_ff; -extern cpuop_func op_81a8_0_nf; -extern cpuop_func op_81a8_0_ff; -extern cpuop_func op_81b0_0_nf; -extern cpuop_func op_81b0_0_ff; -extern cpuop_func op_81b8_0_nf; -extern cpuop_func op_81b8_0_ff; -extern cpuop_func op_81b9_0_nf; -extern cpuop_func op_81b9_0_ff; -extern cpuop_func op_81c0_0_nf; -extern cpuop_func op_81c0_0_ff; -extern cpuop_func op_81d0_0_nf; -extern cpuop_func op_81d0_0_ff; -extern cpuop_func op_81d8_0_nf; -extern cpuop_func op_81d8_0_ff; -extern cpuop_func op_81e0_0_nf; -extern cpuop_func op_81e0_0_ff; -extern cpuop_func op_81e8_0_nf; -extern cpuop_func op_81e8_0_ff; -extern cpuop_func op_81f0_0_nf; -extern cpuop_func op_81f0_0_ff; -extern cpuop_func op_81f8_0_nf; -extern cpuop_func op_81f8_0_ff; -extern cpuop_func op_81f9_0_nf; -extern cpuop_func op_81f9_0_ff; -extern cpuop_func op_81fa_0_nf; -extern cpuop_func op_81fa_0_ff; -extern cpuop_func op_81fb_0_nf; -extern cpuop_func op_81fb_0_ff; -extern cpuop_func op_81fc_0_nf; -extern cpuop_func op_81fc_0_ff; -extern cpuop_func op_9000_0_nf; -extern cpuop_func op_9000_0_ff; -extern cpuop_func op_9010_0_nf; -extern cpuop_func op_9010_0_ff; -extern cpuop_func op_9018_0_nf; -extern cpuop_func op_9018_0_ff; -extern cpuop_func op_9020_0_nf; -extern cpuop_func op_9020_0_ff; -extern cpuop_func op_9028_0_nf; -extern cpuop_func op_9028_0_ff; -extern cpuop_func op_9030_0_nf; -extern cpuop_func op_9030_0_ff; -extern cpuop_func op_9038_0_nf; -extern cpuop_func op_9038_0_ff; -extern cpuop_func op_9039_0_nf; -extern cpuop_func op_9039_0_ff; -extern cpuop_func op_903a_0_nf; -extern cpuop_func op_903a_0_ff; -extern cpuop_func op_903b_0_nf; -extern cpuop_func op_903b_0_ff; -extern cpuop_func op_903c_0_nf; -extern cpuop_func op_903c_0_ff; -extern cpuop_func op_9040_0_nf; -extern cpuop_func op_9040_0_ff; -extern cpuop_func op_9048_0_nf; -extern cpuop_func op_9048_0_ff; -extern cpuop_func op_9050_0_nf; -extern cpuop_func op_9050_0_ff; -extern cpuop_func op_9058_0_nf; -extern cpuop_func op_9058_0_ff; -extern cpuop_func op_9060_0_nf; -extern cpuop_func op_9060_0_ff; -extern cpuop_func op_9068_0_nf; -extern cpuop_func op_9068_0_ff; -extern cpuop_func op_9070_0_nf; -extern cpuop_func op_9070_0_ff; -extern cpuop_func op_9078_0_nf; -extern cpuop_func op_9078_0_ff; -extern cpuop_func op_9079_0_nf; -extern cpuop_func op_9079_0_ff; -extern cpuop_func op_907a_0_nf; -extern cpuop_func op_907a_0_ff; -extern cpuop_func op_907b_0_nf; -extern cpuop_func op_907b_0_ff; -extern cpuop_func op_907c_0_nf; -extern cpuop_func op_907c_0_ff; -extern cpuop_func op_9080_0_nf; -extern cpuop_func op_9080_0_ff; -extern cpuop_func op_9088_0_nf; -extern cpuop_func op_9088_0_ff; -extern cpuop_func op_9090_0_nf; -extern cpuop_func op_9090_0_ff; -extern cpuop_func op_9098_0_nf; -extern cpuop_func op_9098_0_ff; -extern cpuop_func op_90a0_0_nf; -extern cpuop_func op_90a0_0_ff; -extern cpuop_func op_90a8_0_nf; -extern cpuop_func op_90a8_0_ff; -extern cpuop_func op_90b0_0_nf; -extern cpuop_func op_90b0_0_ff; -extern cpuop_func op_90b8_0_nf; -extern cpuop_func op_90b8_0_ff; -extern cpuop_func op_90b9_0_nf; -extern cpuop_func op_90b9_0_ff; -extern cpuop_func op_90ba_0_nf; -extern cpuop_func op_90ba_0_ff; -extern cpuop_func op_90bb_0_nf; -extern cpuop_func op_90bb_0_ff; -extern cpuop_func op_90bc_0_nf; -extern cpuop_func op_90bc_0_ff; -extern cpuop_func op_90c0_0_nf; -extern cpuop_func op_90c0_0_ff; -extern cpuop_func op_90c8_0_nf; -extern cpuop_func op_90c8_0_ff; -extern cpuop_func op_90d0_0_nf; -extern cpuop_func op_90d0_0_ff; -extern cpuop_func op_90d8_0_nf; -extern cpuop_func op_90d8_0_ff; -extern cpuop_func op_90e0_0_nf; -extern cpuop_func op_90e0_0_ff; -extern cpuop_func op_90e8_0_nf; -extern cpuop_func op_90e8_0_ff; -extern cpuop_func op_90f0_0_nf; -extern cpuop_func op_90f0_0_ff; -extern cpuop_func op_90f8_0_nf; -extern cpuop_func op_90f8_0_ff; -extern cpuop_func op_90f9_0_nf; -extern cpuop_func op_90f9_0_ff; -extern cpuop_func op_90fa_0_nf; -extern cpuop_func op_90fa_0_ff; -extern cpuop_func op_90fb_0_nf; -extern cpuop_func op_90fb_0_ff; -extern cpuop_func op_90fc_0_nf; -extern cpuop_func op_90fc_0_ff; -extern cpuop_func op_9100_0_nf; -extern cpuop_func op_9100_0_ff; -extern cpuop_func op_9108_0_nf; -extern cpuop_func op_9108_0_ff; -extern cpuop_func op_9110_0_nf; -extern cpuop_func op_9110_0_ff; -extern cpuop_func op_9118_0_nf; -extern cpuop_func op_9118_0_ff; -extern cpuop_func op_9120_0_nf; -extern cpuop_func op_9120_0_ff; -extern cpuop_func op_9128_0_nf; -extern cpuop_func op_9128_0_ff; -extern cpuop_func op_9130_0_nf; -extern cpuop_func op_9130_0_ff; -extern cpuop_func op_9138_0_nf; -extern cpuop_func op_9138_0_ff; -extern cpuop_func op_9139_0_nf; -extern cpuop_func op_9139_0_ff; -extern cpuop_func op_9140_0_nf; -extern cpuop_func op_9140_0_ff; -extern cpuop_func op_9148_0_nf; -extern cpuop_func op_9148_0_ff; -extern cpuop_func op_9150_0_nf; -extern cpuop_func op_9150_0_ff; -extern cpuop_func op_9158_0_nf; -extern cpuop_func op_9158_0_ff; -extern cpuop_func op_9160_0_nf; -extern cpuop_func op_9160_0_ff; -extern cpuop_func op_9168_0_nf; -extern cpuop_func op_9168_0_ff; -extern cpuop_func op_9170_0_nf; -extern cpuop_func op_9170_0_ff; -extern cpuop_func op_9178_0_nf; -extern cpuop_func op_9178_0_ff; -extern cpuop_func op_9179_0_nf; -extern cpuop_func op_9179_0_ff; -extern cpuop_func op_9180_0_nf; -extern cpuop_func op_9180_0_ff; -extern cpuop_func op_9188_0_nf; -extern cpuop_func op_9188_0_ff; -extern cpuop_func op_9190_0_nf; -extern cpuop_func op_9190_0_ff; -extern cpuop_func op_9198_0_nf; -extern cpuop_func op_9198_0_ff; -extern cpuop_func op_91a0_0_nf; -extern cpuop_func op_91a0_0_ff; -extern cpuop_func op_91a8_0_nf; -extern cpuop_func op_91a8_0_ff; -extern cpuop_func op_91b0_0_nf; -extern cpuop_func op_91b0_0_ff; -extern cpuop_func op_91b8_0_nf; -extern cpuop_func op_91b8_0_ff; -extern cpuop_func op_91b9_0_nf; -extern cpuop_func op_91b9_0_ff; -extern cpuop_func op_91c0_0_nf; -extern cpuop_func op_91c0_0_ff; -extern cpuop_func op_91c8_0_nf; -extern cpuop_func op_91c8_0_ff; -extern cpuop_func op_91d0_0_nf; -extern cpuop_func op_91d0_0_ff; -extern cpuop_func op_91d8_0_nf; -extern cpuop_func op_91d8_0_ff; -extern cpuop_func op_91e0_0_nf; -extern cpuop_func op_91e0_0_ff; -extern cpuop_func op_91e8_0_nf; -extern cpuop_func op_91e8_0_ff; -extern cpuop_func op_91f0_0_nf; -extern cpuop_func op_91f0_0_ff; -extern cpuop_func op_91f8_0_nf; -extern cpuop_func op_91f8_0_ff; -extern cpuop_func op_91f9_0_nf; -extern cpuop_func op_91f9_0_ff; -extern cpuop_func op_91fa_0_nf; -extern cpuop_func op_91fa_0_ff; -extern cpuop_func op_91fb_0_nf; -extern cpuop_func op_91fb_0_ff; -extern cpuop_func op_91fc_0_nf; -extern cpuop_func op_91fc_0_ff; -extern cpuop_func op_b000_0_nf; -extern cpuop_func op_b000_0_ff; -extern cpuop_func op_b010_0_nf; -extern cpuop_func op_b010_0_ff; -extern cpuop_func op_b018_0_nf; -extern cpuop_func op_b018_0_ff; -extern cpuop_func op_b020_0_nf; -extern cpuop_func op_b020_0_ff; -extern cpuop_func op_b028_0_nf; -extern cpuop_func op_b028_0_ff; -extern cpuop_func op_b030_0_nf; -extern cpuop_func op_b030_0_ff; -extern cpuop_func op_b038_0_nf; -extern cpuop_func op_b038_0_ff; -extern cpuop_func op_b039_0_nf; -extern cpuop_func op_b039_0_ff; -extern cpuop_func op_b03a_0_nf; -extern cpuop_func op_b03a_0_ff; -extern cpuop_func op_b03b_0_nf; -extern cpuop_func op_b03b_0_ff; -extern cpuop_func op_b03c_0_nf; -extern cpuop_func op_b03c_0_ff; -extern cpuop_func op_b040_0_nf; -extern cpuop_func op_b040_0_ff; -extern cpuop_func op_b048_0_nf; -extern cpuop_func op_b048_0_ff; -extern cpuop_func op_b050_0_nf; -extern cpuop_func op_b050_0_ff; -extern cpuop_func op_b058_0_nf; -extern cpuop_func op_b058_0_ff; -extern cpuop_func op_b060_0_nf; -extern cpuop_func op_b060_0_ff; -extern cpuop_func op_b068_0_nf; -extern cpuop_func op_b068_0_ff; -extern cpuop_func op_b070_0_nf; -extern cpuop_func op_b070_0_ff; -extern cpuop_func op_b078_0_nf; -extern cpuop_func op_b078_0_ff; -extern cpuop_func op_b079_0_nf; -extern cpuop_func op_b079_0_ff; -extern cpuop_func op_b07a_0_nf; -extern cpuop_func op_b07a_0_ff; -extern cpuop_func op_b07b_0_nf; -extern cpuop_func op_b07b_0_ff; -extern cpuop_func op_b07c_0_nf; -extern cpuop_func op_b07c_0_ff; -extern cpuop_func op_b080_0_nf; -extern cpuop_func op_b080_0_ff; -extern cpuop_func op_b088_0_nf; -extern cpuop_func op_b088_0_ff; -extern cpuop_func op_b090_0_nf; -extern cpuop_func op_b090_0_ff; -extern cpuop_func op_b098_0_nf; -extern cpuop_func op_b098_0_ff; -extern cpuop_func op_b0a0_0_nf; -extern cpuop_func op_b0a0_0_ff; -extern cpuop_func op_b0a8_0_nf; -extern cpuop_func op_b0a8_0_ff; -extern cpuop_func op_b0b0_0_nf; -extern cpuop_func op_b0b0_0_ff; -extern cpuop_func op_b0b8_0_nf; -extern cpuop_func op_b0b8_0_ff; -extern cpuop_func op_b0b9_0_nf; -extern cpuop_func op_b0b9_0_ff; -extern cpuop_func op_b0ba_0_nf; -extern cpuop_func op_b0ba_0_ff; -extern cpuop_func op_b0bb_0_nf; -extern cpuop_func op_b0bb_0_ff; -extern cpuop_func op_b0bc_0_nf; -extern cpuop_func op_b0bc_0_ff; -extern cpuop_func op_b0c0_0_nf; -extern cpuop_func op_b0c0_0_ff; -extern cpuop_func op_b0c8_0_nf; -extern cpuop_func op_b0c8_0_ff; -extern cpuop_func op_b0d0_0_nf; -extern cpuop_func op_b0d0_0_ff; -extern cpuop_func op_b0d8_0_nf; -extern cpuop_func op_b0d8_0_ff; -extern cpuop_func op_b0e0_0_nf; -extern cpuop_func op_b0e0_0_ff; -extern cpuop_func op_b0e8_0_nf; -extern cpuop_func op_b0e8_0_ff; -extern cpuop_func op_b0f0_0_nf; -extern cpuop_func op_b0f0_0_ff; -extern cpuop_func op_b0f8_0_nf; -extern cpuop_func op_b0f8_0_ff; -extern cpuop_func op_b0f9_0_nf; -extern cpuop_func op_b0f9_0_ff; -extern cpuop_func op_b0fa_0_nf; -extern cpuop_func op_b0fa_0_ff; -extern cpuop_func op_b0fb_0_nf; -extern cpuop_func op_b0fb_0_ff; -extern cpuop_func op_b0fc_0_nf; -extern cpuop_func op_b0fc_0_ff; -extern cpuop_func op_b100_0_nf; -extern cpuop_func op_b100_0_ff; -extern cpuop_func op_b108_0_nf; -extern cpuop_func op_b108_0_ff; -extern cpuop_func op_b110_0_nf; -extern cpuop_func op_b110_0_ff; -extern cpuop_func op_b118_0_nf; -extern cpuop_func op_b118_0_ff; -extern cpuop_func op_b120_0_nf; -extern cpuop_func op_b120_0_ff; -extern cpuop_func op_b128_0_nf; -extern cpuop_func op_b128_0_ff; -extern cpuop_func op_b130_0_nf; -extern cpuop_func op_b130_0_ff; -extern cpuop_func op_b138_0_nf; -extern cpuop_func op_b138_0_ff; -extern cpuop_func op_b139_0_nf; -extern cpuop_func op_b139_0_ff; -extern cpuop_func op_b140_0_nf; -extern cpuop_func op_b140_0_ff; -extern cpuop_func op_b148_0_nf; -extern cpuop_func op_b148_0_ff; -extern cpuop_func op_b150_0_nf; -extern cpuop_func op_b150_0_ff; -extern cpuop_func op_b158_0_nf; -extern cpuop_func op_b158_0_ff; -extern cpuop_func op_b160_0_nf; -extern cpuop_func op_b160_0_ff; -extern cpuop_func op_b168_0_nf; -extern cpuop_func op_b168_0_ff; -extern cpuop_func op_b170_0_nf; -extern cpuop_func op_b170_0_ff; -extern cpuop_func op_b178_0_nf; -extern cpuop_func op_b178_0_ff; -extern cpuop_func op_b179_0_nf; -extern cpuop_func op_b179_0_ff; -extern cpuop_func op_b180_0_nf; -extern cpuop_func op_b180_0_ff; -extern cpuop_func op_b188_0_nf; -extern cpuop_func op_b188_0_ff; -extern cpuop_func op_b190_0_nf; -extern cpuop_func op_b190_0_ff; -extern cpuop_func op_b198_0_nf; -extern cpuop_func op_b198_0_ff; -extern cpuop_func op_b1a0_0_nf; -extern cpuop_func op_b1a0_0_ff; -extern cpuop_func op_b1a8_0_nf; -extern cpuop_func op_b1a8_0_ff; -extern cpuop_func op_b1b0_0_nf; -extern cpuop_func op_b1b0_0_ff; -extern cpuop_func op_b1b8_0_nf; -extern cpuop_func op_b1b8_0_ff; -extern cpuop_func op_b1b9_0_nf; -extern cpuop_func op_b1b9_0_ff; -extern cpuop_func op_b1c0_0_nf; -extern cpuop_func op_b1c0_0_ff; -extern cpuop_func op_b1c8_0_nf; -extern cpuop_func op_b1c8_0_ff; -extern cpuop_func op_b1d0_0_nf; -extern cpuop_func op_b1d0_0_ff; -extern cpuop_func op_b1d8_0_nf; -extern cpuop_func op_b1d8_0_ff; -extern cpuop_func op_b1e0_0_nf; -extern cpuop_func op_b1e0_0_ff; -extern cpuop_func op_b1e8_0_nf; -extern cpuop_func op_b1e8_0_ff; -extern cpuop_func op_b1f0_0_nf; -extern cpuop_func op_b1f0_0_ff; -extern cpuop_func op_b1f8_0_nf; -extern cpuop_func op_b1f8_0_ff; -extern cpuop_func op_b1f9_0_nf; -extern cpuop_func op_b1f9_0_ff; -extern cpuop_func op_b1fa_0_nf; -extern cpuop_func op_b1fa_0_ff; -extern cpuop_func op_b1fb_0_nf; -extern cpuop_func op_b1fb_0_ff; -extern cpuop_func op_b1fc_0_nf; -extern cpuop_func op_b1fc_0_ff; -extern cpuop_func op_c000_0_nf; -extern cpuop_func op_c000_0_ff; -extern cpuop_func op_c010_0_nf; -extern cpuop_func op_c010_0_ff; -extern cpuop_func op_c018_0_nf; -extern cpuop_func op_c018_0_ff; -extern cpuop_func op_c020_0_nf; -extern cpuop_func op_c020_0_ff; -extern cpuop_func op_c028_0_nf; -extern cpuop_func op_c028_0_ff; -extern cpuop_func op_c030_0_nf; -extern cpuop_func op_c030_0_ff; -extern cpuop_func op_c038_0_nf; -extern cpuop_func op_c038_0_ff; -extern cpuop_func op_c039_0_nf; -extern cpuop_func op_c039_0_ff; -extern cpuop_func op_c03a_0_nf; -extern cpuop_func op_c03a_0_ff; -extern cpuop_func op_c03b_0_nf; -extern cpuop_func op_c03b_0_ff; -extern cpuop_func op_c03c_0_nf; -extern cpuop_func op_c03c_0_ff; -extern cpuop_func op_c040_0_nf; -extern cpuop_func op_c040_0_ff; -extern cpuop_func op_c050_0_nf; -extern cpuop_func op_c050_0_ff; -extern cpuop_func op_c058_0_nf; -extern cpuop_func op_c058_0_ff; -extern cpuop_func op_c060_0_nf; -extern cpuop_func op_c060_0_ff; -extern cpuop_func op_c068_0_nf; -extern cpuop_func op_c068_0_ff; -extern cpuop_func op_c070_0_nf; -extern cpuop_func op_c070_0_ff; -extern cpuop_func op_c078_0_nf; -extern cpuop_func op_c078_0_ff; -extern cpuop_func op_c079_0_nf; -extern cpuop_func op_c079_0_ff; -extern cpuop_func op_c07a_0_nf; -extern cpuop_func op_c07a_0_ff; -extern cpuop_func op_c07b_0_nf; -extern cpuop_func op_c07b_0_ff; -extern cpuop_func op_c07c_0_nf; -extern cpuop_func op_c07c_0_ff; -extern cpuop_func op_c080_0_nf; -extern cpuop_func op_c080_0_ff; -extern cpuop_func op_c090_0_nf; -extern cpuop_func op_c090_0_ff; -extern cpuop_func op_c098_0_nf; -extern cpuop_func op_c098_0_ff; -extern cpuop_func op_c0a0_0_nf; -extern cpuop_func op_c0a0_0_ff; -extern cpuop_func op_c0a8_0_nf; -extern cpuop_func op_c0a8_0_ff; -extern cpuop_func op_c0b0_0_nf; -extern cpuop_func op_c0b0_0_ff; -extern cpuop_func op_c0b8_0_nf; -extern cpuop_func op_c0b8_0_ff; -extern cpuop_func op_c0b9_0_nf; -extern cpuop_func op_c0b9_0_ff; -extern cpuop_func op_c0ba_0_nf; -extern cpuop_func op_c0ba_0_ff; -extern cpuop_func op_c0bb_0_nf; -extern cpuop_func op_c0bb_0_ff; -extern cpuop_func op_c0bc_0_nf; -extern cpuop_func op_c0bc_0_ff; -extern cpuop_func op_c0c0_0_nf; -extern cpuop_func op_c0c0_0_ff; -extern cpuop_func op_c0d0_0_nf; -extern cpuop_func op_c0d0_0_ff; -extern cpuop_func op_c0d8_0_nf; -extern cpuop_func op_c0d8_0_ff; -extern cpuop_func op_c0e0_0_nf; -extern cpuop_func op_c0e0_0_ff; -extern cpuop_func op_c0e8_0_nf; -extern cpuop_func op_c0e8_0_ff; -extern cpuop_func op_c0f0_0_nf; -extern cpuop_func op_c0f0_0_ff; -extern cpuop_func op_c0f8_0_nf; -extern cpuop_func op_c0f8_0_ff; -extern cpuop_func op_c0f9_0_nf; -extern cpuop_func op_c0f9_0_ff; -extern cpuop_func op_c0fa_0_nf; -extern cpuop_func op_c0fa_0_ff; -extern cpuop_func op_c0fb_0_nf; -extern cpuop_func op_c0fb_0_ff; -extern cpuop_func op_c0fc_0_nf; -extern cpuop_func op_c0fc_0_ff; -extern cpuop_func op_c100_0_nf; -extern cpuop_func op_c100_0_ff; -extern cpuop_func op_c108_0_nf; -extern cpuop_func op_c108_0_ff; -extern cpuop_func op_c110_0_nf; -extern cpuop_func op_c110_0_ff; -extern cpuop_func op_c118_0_nf; -extern cpuop_func op_c118_0_ff; -extern cpuop_func op_c120_0_nf; -extern cpuop_func op_c120_0_ff; -extern cpuop_func op_c128_0_nf; -extern cpuop_func op_c128_0_ff; -extern cpuop_func op_c130_0_nf; -extern cpuop_func op_c130_0_ff; -extern cpuop_func op_c138_0_nf; -extern cpuop_func op_c138_0_ff; -extern cpuop_func op_c139_0_nf; -extern cpuop_func op_c139_0_ff; -extern cpuop_func op_c140_0_nf; -extern cpuop_func op_c140_0_ff; -extern cpuop_func op_c148_0_nf; -extern cpuop_func op_c148_0_ff; -extern cpuop_func op_c150_0_nf; -extern cpuop_func op_c150_0_ff; -extern cpuop_func op_c158_0_nf; -extern cpuop_func op_c158_0_ff; -extern cpuop_func op_c160_0_nf; -extern cpuop_func op_c160_0_ff; -extern cpuop_func op_c168_0_nf; -extern cpuop_func op_c168_0_ff; -extern cpuop_func op_c170_0_nf; -extern cpuop_func op_c170_0_ff; -extern cpuop_func op_c178_0_nf; -extern cpuop_func op_c178_0_ff; -extern cpuop_func op_c179_0_nf; -extern cpuop_func op_c179_0_ff; -extern cpuop_func op_c188_0_nf; -extern cpuop_func op_c188_0_ff; -extern cpuop_func op_c190_0_nf; -extern cpuop_func op_c190_0_ff; -extern cpuop_func op_c198_0_nf; -extern cpuop_func op_c198_0_ff; -extern cpuop_func op_c1a0_0_nf; -extern cpuop_func op_c1a0_0_ff; -extern cpuop_func op_c1a8_0_nf; -extern cpuop_func op_c1a8_0_ff; -extern cpuop_func op_c1b0_0_nf; -extern cpuop_func op_c1b0_0_ff; -extern cpuop_func op_c1b8_0_nf; -extern cpuop_func op_c1b8_0_ff; -extern cpuop_func op_c1b9_0_nf; -extern cpuop_func op_c1b9_0_ff; -extern cpuop_func op_c1c0_0_nf; -extern cpuop_func op_c1c0_0_ff; -extern cpuop_func op_c1d0_0_nf; -extern cpuop_func op_c1d0_0_ff; -extern cpuop_func op_c1d8_0_nf; -extern cpuop_func op_c1d8_0_ff; -extern cpuop_func op_c1e0_0_nf; -extern cpuop_func op_c1e0_0_ff; -extern cpuop_func op_c1e8_0_nf; -extern cpuop_func op_c1e8_0_ff; -extern cpuop_func op_c1f0_0_nf; -extern cpuop_func op_c1f0_0_ff; -extern cpuop_func op_c1f8_0_nf; -extern cpuop_func op_c1f8_0_ff; -extern cpuop_func op_c1f9_0_nf; -extern cpuop_func op_c1f9_0_ff; -extern cpuop_func op_c1fa_0_nf; -extern cpuop_func op_c1fa_0_ff; -extern cpuop_func op_c1fb_0_nf; -extern cpuop_func op_c1fb_0_ff; -extern cpuop_func op_c1fc_0_nf; -extern cpuop_func op_c1fc_0_ff; -extern cpuop_func op_d000_0_nf; -extern cpuop_func op_d000_0_ff; -extern cpuop_func op_d010_0_nf; -extern cpuop_func op_d010_0_ff; -extern cpuop_func op_d018_0_nf; -extern cpuop_func op_d018_0_ff; -extern cpuop_func op_d020_0_nf; -extern cpuop_func op_d020_0_ff; -extern cpuop_func op_d028_0_nf; -extern cpuop_func op_d028_0_ff; -extern cpuop_func op_d030_0_nf; -extern cpuop_func op_d030_0_ff; -extern cpuop_func op_d038_0_nf; -extern cpuop_func op_d038_0_ff; -extern cpuop_func op_d039_0_nf; -extern cpuop_func op_d039_0_ff; -extern cpuop_func op_d03a_0_nf; -extern cpuop_func op_d03a_0_ff; -extern cpuop_func op_d03b_0_nf; -extern cpuop_func op_d03b_0_ff; -extern cpuop_func op_d03c_0_nf; -extern cpuop_func op_d03c_0_ff; -extern cpuop_func op_d040_0_nf; -extern cpuop_func op_d040_0_ff; -extern cpuop_func op_d048_0_nf; -extern cpuop_func op_d048_0_ff; -extern cpuop_func op_d050_0_nf; -extern cpuop_func op_d050_0_ff; -extern cpuop_func op_d058_0_nf; -extern cpuop_func op_d058_0_ff; -extern cpuop_func op_d060_0_nf; -extern cpuop_func op_d060_0_ff; -extern cpuop_func op_d068_0_nf; -extern cpuop_func op_d068_0_ff; -extern cpuop_func op_d070_0_nf; -extern cpuop_func op_d070_0_ff; -extern cpuop_func op_d078_0_nf; -extern cpuop_func op_d078_0_ff; -extern cpuop_func op_d079_0_nf; -extern cpuop_func op_d079_0_ff; -extern cpuop_func op_d07a_0_nf; -extern cpuop_func op_d07a_0_ff; -extern cpuop_func op_d07b_0_nf; -extern cpuop_func op_d07b_0_ff; -extern cpuop_func op_d07c_0_nf; -extern cpuop_func op_d07c_0_ff; -extern cpuop_func op_d080_0_nf; -extern cpuop_func op_d080_0_ff; -extern cpuop_func op_d088_0_nf; -extern cpuop_func op_d088_0_ff; -extern cpuop_func op_d090_0_nf; -extern cpuop_func op_d090_0_ff; -extern cpuop_func op_d098_0_nf; -extern cpuop_func op_d098_0_ff; -extern cpuop_func op_d0a0_0_nf; -extern cpuop_func op_d0a0_0_ff; -extern cpuop_func op_d0a8_0_nf; -extern cpuop_func op_d0a8_0_ff; -extern cpuop_func op_d0b0_0_nf; -extern cpuop_func op_d0b0_0_ff; -extern cpuop_func op_d0b8_0_nf; -extern cpuop_func op_d0b8_0_ff; -extern cpuop_func op_d0b9_0_nf; -extern cpuop_func op_d0b9_0_ff; -extern cpuop_func op_d0ba_0_nf; -extern cpuop_func op_d0ba_0_ff; -extern cpuop_func op_d0bb_0_nf; -extern cpuop_func op_d0bb_0_ff; -extern cpuop_func op_d0bc_0_nf; -extern cpuop_func op_d0bc_0_ff; -extern cpuop_func op_d0c0_0_nf; -extern cpuop_func op_d0c0_0_ff; -extern cpuop_func op_d0c8_0_nf; -extern cpuop_func op_d0c8_0_ff; -extern cpuop_func op_d0d0_0_nf; -extern cpuop_func op_d0d0_0_ff; -extern cpuop_func op_d0d8_0_nf; -extern cpuop_func op_d0d8_0_ff; -extern cpuop_func op_d0e0_0_nf; -extern cpuop_func op_d0e0_0_ff; -extern cpuop_func op_d0e8_0_nf; -extern cpuop_func op_d0e8_0_ff; -extern cpuop_func op_d0f0_0_nf; -extern cpuop_func op_d0f0_0_ff; -extern cpuop_func op_d0f8_0_nf; -extern cpuop_func op_d0f8_0_ff; -extern cpuop_func op_d0f9_0_nf; -extern cpuop_func op_d0f9_0_ff; -extern cpuop_func op_d0fa_0_nf; -extern cpuop_func op_d0fa_0_ff; -extern cpuop_func op_d0fb_0_nf; -extern cpuop_func op_d0fb_0_ff; -extern cpuop_func op_d0fc_0_nf; -extern cpuop_func op_d0fc_0_ff; -extern cpuop_func op_d100_0_nf; -extern cpuop_func op_d100_0_ff; -extern cpuop_func op_d108_0_nf; -extern cpuop_func op_d108_0_ff; -extern cpuop_func op_d110_0_nf; -extern cpuop_func op_d110_0_ff; -extern cpuop_func op_d118_0_nf; -extern cpuop_func op_d118_0_ff; -extern cpuop_func op_d120_0_nf; -extern cpuop_func op_d120_0_ff; -extern cpuop_func op_d128_0_nf; -extern cpuop_func op_d128_0_ff; -extern cpuop_func op_d130_0_nf; -extern cpuop_func op_d130_0_ff; -extern cpuop_func op_d138_0_nf; -extern cpuop_func op_d138_0_ff; -extern cpuop_func op_d139_0_nf; -extern cpuop_func op_d139_0_ff; -extern cpuop_func op_d140_0_nf; -extern cpuop_func op_d140_0_ff; -extern cpuop_func op_d148_0_nf; -extern cpuop_func op_d148_0_ff; -extern cpuop_func op_d150_0_nf; -extern cpuop_func op_d150_0_ff; -extern cpuop_func op_d158_0_nf; -extern cpuop_func op_d158_0_ff; -extern cpuop_func op_d160_0_nf; -extern cpuop_func op_d160_0_ff; -extern cpuop_func op_d168_0_nf; -extern cpuop_func op_d168_0_ff; -extern cpuop_func op_d170_0_nf; -extern cpuop_func op_d170_0_ff; -extern cpuop_func op_d178_0_nf; -extern cpuop_func op_d178_0_ff; -extern cpuop_func op_d179_0_nf; -extern cpuop_func op_d179_0_ff; -extern cpuop_func op_d180_0_nf; -extern cpuop_func op_d180_0_ff; -extern cpuop_func op_d188_0_nf; -extern cpuop_func op_d188_0_ff; -extern cpuop_func op_d190_0_nf; -extern cpuop_func op_d190_0_ff; -extern cpuop_func op_d198_0_nf; -extern cpuop_func op_d198_0_ff; -extern cpuop_func op_d1a0_0_nf; -extern cpuop_func op_d1a0_0_ff; -extern cpuop_func op_d1a8_0_nf; -extern cpuop_func op_d1a8_0_ff; -extern cpuop_func op_d1b0_0_nf; -extern cpuop_func op_d1b0_0_ff; -extern cpuop_func op_d1b8_0_nf; -extern cpuop_func op_d1b8_0_ff; -extern cpuop_func op_d1b9_0_nf; -extern cpuop_func op_d1b9_0_ff; -extern cpuop_func op_d1c0_0_nf; -extern cpuop_func op_d1c0_0_ff; -extern cpuop_func op_d1c8_0_nf; -extern cpuop_func op_d1c8_0_ff; -extern cpuop_func op_d1d0_0_nf; -extern cpuop_func op_d1d0_0_ff; -extern cpuop_func op_d1d8_0_nf; -extern cpuop_func op_d1d8_0_ff; -extern cpuop_func op_d1e0_0_nf; -extern cpuop_func op_d1e0_0_ff; -extern cpuop_func op_d1e8_0_nf; -extern cpuop_func op_d1e8_0_ff; -extern cpuop_func op_d1f0_0_nf; -extern cpuop_func op_d1f0_0_ff; -extern cpuop_func op_d1f8_0_nf; -extern cpuop_func op_d1f8_0_ff; -extern cpuop_func op_d1f9_0_nf; -extern cpuop_func op_d1f9_0_ff; -extern cpuop_func op_d1fa_0_nf; -extern cpuop_func op_d1fa_0_ff; -extern cpuop_func op_d1fb_0_nf; -extern cpuop_func op_d1fb_0_ff; -extern cpuop_func op_d1fc_0_nf; -extern cpuop_func op_d1fc_0_ff; -extern cpuop_func op_e000_0_nf; -extern cpuop_func op_e000_0_ff; -extern cpuop_func op_e008_0_nf; -extern cpuop_func op_e008_0_ff; -extern cpuop_func op_e010_0_nf; -extern cpuop_func op_e010_0_ff; -extern cpuop_func op_e018_0_nf; -extern cpuop_func op_e018_0_ff; -extern cpuop_func op_e020_0_nf; -extern cpuop_func op_e020_0_ff; -extern cpuop_func op_e028_0_nf; -extern cpuop_func op_e028_0_ff; -extern cpuop_func op_e030_0_nf; -extern cpuop_func op_e030_0_ff; -extern cpuop_func op_e038_0_nf; -extern cpuop_func op_e038_0_ff; -extern cpuop_func op_e040_0_nf; -extern cpuop_func op_e040_0_ff; -extern cpuop_func op_e048_0_nf; -extern cpuop_func op_e048_0_ff; -extern cpuop_func op_e050_0_nf; -extern cpuop_func op_e050_0_ff; -extern cpuop_func op_e058_0_nf; -extern cpuop_func op_e058_0_ff; -extern cpuop_func op_e060_0_nf; -extern cpuop_func op_e060_0_ff; -extern cpuop_func op_e068_0_nf; -extern cpuop_func op_e068_0_ff; -extern cpuop_func op_e070_0_nf; -extern cpuop_func op_e070_0_ff; -extern cpuop_func op_e078_0_nf; -extern cpuop_func op_e078_0_ff; -extern cpuop_func op_e080_0_nf; -extern cpuop_func op_e080_0_ff; -extern cpuop_func op_e088_0_nf; -extern cpuop_func op_e088_0_ff; -extern cpuop_func op_e090_0_nf; -extern cpuop_func op_e090_0_ff; -extern cpuop_func op_e098_0_nf; -extern cpuop_func op_e098_0_ff; -extern cpuop_func op_e0a0_0_nf; -extern cpuop_func op_e0a0_0_ff; -extern cpuop_func op_e0a8_0_nf; -extern cpuop_func op_e0a8_0_ff; -extern cpuop_func op_e0b0_0_nf; -extern cpuop_func op_e0b0_0_ff; -extern cpuop_func op_e0b8_0_nf; -extern cpuop_func op_e0b8_0_ff; -extern cpuop_func op_e0d0_0_nf; -extern cpuop_func op_e0d0_0_ff; -extern cpuop_func op_e0d8_0_nf; -extern cpuop_func op_e0d8_0_ff; -extern cpuop_func op_e0e0_0_nf; -extern cpuop_func op_e0e0_0_ff; -extern cpuop_func op_e0e8_0_nf; -extern cpuop_func op_e0e8_0_ff; -extern cpuop_func op_e0f0_0_nf; -extern cpuop_func op_e0f0_0_ff; -extern cpuop_func op_e0f8_0_nf; -extern cpuop_func op_e0f8_0_ff; -extern cpuop_func op_e0f9_0_nf; -extern cpuop_func op_e0f9_0_ff; -extern cpuop_func op_e100_0_nf; -extern cpuop_func op_e100_0_ff; -extern cpuop_func op_e108_0_nf; -extern cpuop_func op_e108_0_ff; -extern cpuop_func op_e110_0_nf; -extern cpuop_func op_e110_0_ff; -extern cpuop_func op_e118_0_nf; -extern cpuop_func op_e118_0_ff; -extern cpuop_func op_e120_0_nf; -extern cpuop_func op_e120_0_ff; -extern cpuop_func op_e128_0_nf; -extern cpuop_func op_e128_0_ff; -extern cpuop_func op_e130_0_nf; -extern cpuop_func op_e130_0_ff; -extern cpuop_func op_e138_0_nf; -extern cpuop_func op_e138_0_ff; -extern cpuop_func op_e140_0_nf; -extern cpuop_func op_e140_0_ff; -extern cpuop_func op_e148_0_nf; -extern cpuop_func op_e148_0_ff; -extern cpuop_func op_e150_0_nf; -extern cpuop_func op_e150_0_ff; -extern cpuop_func op_e158_0_nf; -extern cpuop_func op_e158_0_ff; -extern cpuop_func op_e160_0_nf; -extern cpuop_func op_e160_0_ff; -extern cpuop_func op_e168_0_nf; -extern cpuop_func op_e168_0_ff; -extern cpuop_func op_e170_0_nf; -extern cpuop_func op_e170_0_ff; -extern cpuop_func op_e178_0_nf; -extern cpuop_func op_e178_0_ff; -extern cpuop_func op_e180_0_nf; -extern cpuop_func op_e180_0_ff; -extern cpuop_func op_e188_0_nf; -extern cpuop_func op_e188_0_ff; -extern cpuop_func op_e190_0_nf; -extern cpuop_func op_e190_0_ff; -extern cpuop_func op_e198_0_nf; -extern cpuop_func op_e198_0_ff; -extern cpuop_func op_e1a0_0_nf; -extern cpuop_func op_e1a0_0_ff; -extern cpuop_func op_e1a8_0_nf; -extern cpuop_func op_e1a8_0_ff; -extern cpuop_func op_e1b0_0_nf; -extern cpuop_func op_e1b0_0_ff; -extern cpuop_func op_e1b8_0_nf; -extern cpuop_func op_e1b8_0_ff; -extern cpuop_func op_e1d0_0_nf; -extern cpuop_func op_e1d0_0_ff; -extern cpuop_func op_e1d8_0_nf; -extern cpuop_func op_e1d8_0_ff; -extern cpuop_func op_e1e0_0_nf; -extern cpuop_func op_e1e0_0_ff; -extern cpuop_func op_e1e8_0_nf; -extern cpuop_func op_e1e8_0_ff; -extern cpuop_func op_e1f0_0_nf; -extern cpuop_func op_e1f0_0_ff; -extern cpuop_func op_e1f8_0_nf; -extern cpuop_func op_e1f8_0_ff; -extern cpuop_func op_e1f9_0_nf; -extern cpuop_func op_e1f9_0_ff; -extern cpuop_func op_e2d0_0_nf; -extern cpuop_func op_e2d0_0_ff; -extern cpuop_func op_e2d8_0_nf; -extern cpuop_func op_e2d8_0_ff; -extern cpuop_func op_e2e0_0_nf; -extern cpuop_func op_e2e0_0_ff; -extern cpuop_func op_e2e8_0_nf; -extern cpuop_func op_e2e8_0_ff; -extern cpuop_func op_e2f0_0_nf; -extern cpuop_func op_e2f0_0_ff; -extern cpuop_func op_e2f8_0_nf; -extern cpuop_func op_e2f8_0_ff; -extern cpuop_func op_e2f9_0_nf; -extern cpuop_func op_e2f9_0_ff; -extern cpuop_func op_e3d0_0_nf; -extern cpuop_func op_e3d0_0_ff; -extern cpuop_func op_e3d8_0_nf; -extern cpuop_func op_e3d8_0_ff; -extern cpuop_func op_e3e0_0_nf; -extern cpuop_func op_e3e0_0_ff; -extern cpuop_func op_e3e8_0_nf; -extern cpuop_func op_e3e8_0_ff; -extern cpuop_func op_e3f0_0_nf; -extern cpuop_func op_e3f0_0_ff; -extern cpuop_func op_e3f8_0_nf; -extern cpuop_func op_e3f8_0_ff; -extern cpuop_func op_e3f9_0_nf; -extern cpuop_func op_e3f9_0_ff; -extern cpuop_func op_e4d0_0_nf; -extern cpuop_func op_e4d0_0_ff; -extern cpuop_func op_e4d8_0_nf; -extern cpuop_func op_e4d8_0_ff; -extern cpuop_func op_e4e0_0_nf; -extern cpuop_func op_e4e0_0_ff; -extern cpuop_func op_e4e8_0_nf; -extern cpuop_func op_e4e8_0_ff; -extern cpuop_func op_e4f0_0_nf; -extern cpuop_func op_e4f0_0_ff; -extern cpuop_func op_e4f8_0_nf; -extern cpuop_func op_e4f8_0_ff; -extern cpuop_func op_e4f9_0_nf; -extern cpuop_func op_e4f9_0_ff; -extern cpuop_func op_e5d0_0_nf; -extern cpuop_func op_e5d0_0_ff; -extern cpuop_func op_e5d8_0_nf; -extern cpuop_func op_e5d8_0_ff; -extern cpuop_func op_e5e0_0_nf; -extern cpuop_func op_e5e0_0_ff; -extern cpuop_func op_e5e8_0_nf; -extern cpuop_func op_e5e8_0_ff; -extern cpuop_func op_e5f0_0_nf; -extern cpuop_func op_e5f0_0_ff; -extern cpuop_func op_e5f8_0_nf; -extern cpuop_func op_e5f8_0_ff; -extern cpuop_func op_e5f9_0_nf; -extern cpuop_func op_e5f9_0_ff; -extern cpuop_func op_e6d0_0_nf; -extern cpuop_func op_e6d0_0_ff; -extern cpuop_func op_e6d8_0_nf; -extern cpuop_func op_e6d8_0_ff; -extern cpuop_func op_e6e0_0_nf; -extern cpuop_func op_e6e0_0_ff; -extern cpuop_func op_e6e8_0_nf; -extern cpuop_func op_e6e8_0_ff; -extern cpuop_func op_e6f0_0_nf; -extern cpuop_func op_e6f0_0_ff; -extern cpuop_func op_e6f8_0_nf; -extern cpuop_func op_e6f8_0_ff; -extern cpuop_func op_e6f9_0_nf; -extern cpuop_func op_e6f9_0_ff; -extern cpuop_func op_e7d0_0_nf; -extern cpuop_func op_e7d0_0_ff; -extern cpuop_func op_e7d8_0_nf; -extern cpuop_func op_e7d8_0_ff; -extern cpuop_func op_e7e0_0_nf; -extern cpuop_func op_e7e0_0_ff; -extern cpuop_func op_e7e8_0_nf; -extern cpuop_func op_e7e8_0_ff; -extern cpuop_func op_e7f0_0_nf; -extern cpuop_func op_e7f0_0_ff; -extern cpuop_func op_e7f8_0_nf; -extern cpuop_func op_e7f8_0_ff; -extern cpuop_func op_e7f9_0_nf; -extern cpuop_func op_e7f9_0_ff; -extern cpuop_func op_e8c0_0_nf; -extern cpuop_func op_e8c0_0_ff; -extern cpuop_func op_e8d0_0_nf; -extern cpuop_func op_e8d0_0_ff; -extern cpuop_func op_e8e8_0_nf; -extern cpuop_func op_e8e8_0_ff; -extern cpuop_func op_e8f0_0_nf; -extern cpuop_func op_e8f0_0_ff; -extern cpuop_func op_e8f8_0_nf; -extern cpuop_func op_e8f8_0_ff; -extern cpuop_func op_e8f9_0_nf; -extern cpuop_func op_e8f9_0_ff; -extern cpuop_func op_e8fa_0_nf; -extern cpuop_func op_e8fa_0_ff; -extern cpuop_func op_e8fb_0_nf; -extern cpuop_func op_e8fb_0_ff; -extern cpuop_func op_e9c0_0_nf; -extern cpuop_func op_e9c0_0_ff; -extern cpuop_func op_e9d0_0_nf; -extern cpuop_func op_e9d0_0_ff; -extern cpuop_func op_e9e8_0_nf; -extern cpuop_func op_e9e8_0_ff; -extern cpuop_func op_e9f0_0_nf; -extern cpuop_func op_e9f0_0_ff; -extern cpuop_func op_e9f8_0_nf; -extern cpuop_func op_e9f8_0_ff; -extern cpuop_func op_e9f9_0_nf; -extern cpuop_func op_e9f9_0_ff; -extern cpuop_func op_e9fa_0_nf; -extern cpuop_func op_e9fa_0_ff; -extern cpuop_func op_e9fb_0_nf; -extern cpuop_func op_e9fb_0_ff; -extern cpuop_func op_eac0_0_nf; -extern cpuop_func op_eac0_0_ff; -extern cpuop_func op_ead0_0_nf; -extern cpuop_func op_ead0_0_ff; -extern cpuop_func op_eae8_0_nf; -extern cpuop_func op_eae8_0_ff; -extern cpuop_func op_eaf0_0_nf; -extern cpuop_func op_eaf0_0_ff; -extern cpuop_func op_eaf8_0_nf; -extern cpuop_func op_eaf8_0_ff; -extern cpuop_func op_eaf9_0_nf; -extern cpuop_func op_eaf9_0_ff; -extern cpuop_func op_ebc0_0_nf; -extern cpuop_func op_ebc0_0_ff; -extern cpuop_func op_ebd0_0_nf; -extern cpuop_func op_ebd0_0_ff; -extern cpuop_func op_ebe8_0_nf; -extern cpuop_func op_ebe8_0_ff; -extern cpuop_func op_ebf0_0_nf; -extern cpuop_func op_ebf0_0_ff; -extern cpuop_func op_ebf8_0_nf; -extern cpuop_func op_ebf8_0_ff; -extern cpuop_func op_ebf9_0_nf; -extern cpuop_func op_ebf9_0_ff; -extern cpuop_func op_ebfa_0_nf; -extern cpuop_func op_ebfa_0_ff; -extern cpuop_func op_ebfb_0_nf; -extern cpuop_func op_ebfb_0_ff; -extern cpuop_func op_ecc0_0_nf; -extern cpuop_func op_ecc0_0_ff; -extern cpuop_func op_ecd0_0_nf; -extern cpuop_func op_ecd0_0_ff; -extern cpuop_func op_ece8_0_nf; -extern cpuop_func op_ece8_0_ff; -extern cpuop_func op_ecf0_0_nf; -extern cpuop_func op_ecf0_0_ff; -extern cpuop_func op_ecf8_0_nf; -extern cpuop_func op_ecf8_0_ff; -extern cpuop_func op_ecf9_0_nf; -extern cpuop_func op_ecf9_0_ff; -extern cpuop_func op_edc0_0_nf; -extern cpuop_func op_edc0_0_ff; -extern cpuop_func op_edd0_0_nf; -extern cpuop_func op_edd0_0_ff; -extern cpuop_func op_ede8_0_nf; -extern cpuop_func op_ede8_0_ff; -extern cpuop_func op_edf0_0_nf; -extern cpuop_func op_edf0_0_ff; -extern cpuop_func op_edf8_0_nf; -extern cpuop_func op_edf8_0_ff; -extern cpuop_func op_edf9_0_nf; -extern cpuop_func op_edf9_0_ff; -extern cpuop_func op_edfa_0_nf; -extern cpuop_func op_edfa_0_ff; -extern cpuop_func op_edfb_0_nf; -extern cpuop_func op_edfb_0_ff; -extern cpuop_func op_eec0_0_nf; -extern cpuop_func op_eec0_0_ff; -extern cpuop_func op_eed0_0_nf; -extern cpuop_func op_eed0_0_ff; -extern cpuop_func op_eee8_0_nf; -extern cpuop_func op_eee8_0_ff; -extern cpuop_func op_eef0_0_nf; -extern cpuop_func op_eef0_0_ff; -extern cpuop_func op_eef8_0_nf; -extern cpuop_func op_eef8_0_ff; -extern cpuop_func op_eef9_0_nf; -extern cpuop_func op_eef9_0_ff; -extern cpuop_func op_efc0_0_nf; -extern cpuop_func op_efc0_0_ff; -extern cpuop_func op_efd0_0_nf; -extern cpuop_func op_efd0_0_ff; -extern cpuop_func op_efe8_0_nf; -extern cpuop_func op_efe8_0_ff; -extern cpuop_func op_eff0_0_nf; -extern cpuop_func op_eff0_0_ff; -extern cpuop_func op_eff8_0_nf; -extern cpuop_func op_eff8_0_ff; -extern cpuop_func op_eff9_0_nf; -extern cpuop_func op_eff9_0_ff; -extern cpuop_func op_f200_0_nf; -extern cpuop_func op_f200_0_ff; -extern cpuop_func op_f208_0_nf; -extern cpuop_func op_f208_0_ff; -extern cpuop_func op_f210_0_nf; -extern cpuop_func op_f210_0_ff; -extern cpuop_func op_f218_0_nf; -extern cpuop_func op_f218_0_ff; -extern cpuop_func op_f220_0_nf; -extern cpuop_func op_f220_0_ff; -extern cpuop_func op_f228_0_nf; -extern cpuop_func op_f228_0_ff; -extern cpuop_func op_f230_0_nf; -extern cpuop_func op_f230_0_ff; -extern cpuop_func op_f238_0_nf; -extern cpuop_func op_f238_0_ff; -extern cpuop_func op_f239_0_nf; -extern cpuop_func op_f239_0_ff; -extern cpuop_func op_f23a_0_nf; -extern cpuop_func op_f23a_0_ff; -extern cpuop_func op_f23b_0_nf; -extern cpuop_func op_f23b_0_ff; -extern cpuop_func op_f23c_0_nf; -extern cpuop_func op_f23c_0_ff; -extern cpuop_func op_f240_0_nf; -extern cpuop_func op_f240_0_ff; -extern cpuop_func op_f248_0_nf; -extern cpuop_func op_f248_0_ff; -extern cpuop_func op_f250_0_nf; -extern cpuop_func op_f250_0_ff; -extern cpuop_func op_f258_0_nf; -extern cpuop_func op_f258_0_ff; -extern cpuop_func op_f260_0_nf; -extern cpuop_func op_f260_0_ff; -extern cpuop_func op_f268_0_nf; -extern cpuop_func op_f268_0_ff; -extern cpuop_func op_f270_0_nf; -extern cpuop_func op_f270_0_ff; -extern cpuop_func op_f278_0_nf; -extern cpuop_func op_f278_0_ff; -extern cpuop_func op_f279_0_nf; -extern cpuop_func op_f279_0_ff; -extern cpuop_func op_f27a_0_nf; -extern cpuop_func op_f27a_0_ff; -extern cpuop_func op_f27b_0_nf; -extern cpuop_func op_f27b_0_ff; -extern cpuop_func op_f27c_0_nf; -extern cpuop_func op_f27c_0_ff; -extern cpuop_func op_f280_0_nf; -extern cpuop_func op_f280_0_ff; -extern cpuop_func op_f2c0_0_nf; -extern cpuop_func op_f2c0_0_ff; -extern cpuop_func op_f310_0_nf; -extern cpuop_func op_f310_0_ff; -extern cpuop_func op_f320_0_nf; -extern cpuop_func op_f320_0_ff; -extern cpuop_func op_f328_0_nf; -extern cpuop_func op_f328_0_ff; -extern cpuop_func op_f330_0_nf; -extern cpuop_func op_f330_0_ff; -extern cpuop_func op_f338_0_nf; -extern cpuop_func op_f338_0_ff; -extern cpuop_func op_f339_0_nf; -extern cpuop_func op_f339_0_ff; -extern cpuop_func op_f350_0_nf; -extern cpuop_func op_f350_0_ff; -extern cpuop_func op_f358_0_nf; -extern cpuop_func op_f358_0_ff; -extern cpuop_func op_f368_0_nf; -extern cpuop_func op_f368_0_ff; -extern cpuop_func op_f370_0_nf; -extern cpuop_func op_f370_0_ff; -extern cpuop_func op_f378_0_nf; -extern cpuop_func op_f378_0_ff; -extern cpuop_func op_f379_0_nf; -extern cpuop_func op_f379_0_ff; -extern cpuop_func op_f37a_0_nf; -extern cpuop_func op_f37a_0_ff; -extern cpuop_func op_f37b_0_nf; -extern cpuop_func op_f37b_0_ff; -extern cpuop_func op_f408_0_nf; -extern cpuop_func op_f408_0_ff; -extern cpuop_func op_f410_0_nf; -extern cpuop_func op_f410_0_ff; -extern cpuop_func op_f418_0_nf; -extern cpuop_func op_f418_0_ff; -extern cpuop_func op_f419_0_nf; -extern cpuop_func op_f419_0_ff; -extern cpuop_func op_f41a_0_nf; -extern cpuop_func op_f41a_0_ff; -extern cpuop_func op_f41b_0_nf; -extern cpuop_func op_f41b_0_ff; -extern cpuop_func op_f41c_0_nf; -extern cpuop_func op_f41c_0_ff; -extern cpuop_func op_f41d_0_nf; -extern cpuop_func op_f41d_0_ff; -extern cpuop_func op_f41e_0_nf; -extern cpuop_func op_f41e_0_ff; -extern cpuop_func op_f41f_0_nf; -extern cpuop_func op_f41f_0_ff; -extern cpuop_func op_f428_0_nf; -extern cpuop_func op_f428_0_ff; -extern cpuop_func op_f430_0_nf; -extern cpuop_func op_f430_0_ff; -extern cpuop_func op_f438_0_nf; -extern cpuop_func op_f438_0_ff; -extern cpuop_func op_f439_0_nf; -extern cpuop_func op_f439_0_ff; -extern cpuop_func op_f43a_0_nf; -extern cpuop_func op_f43a_0_ff; -extern cpuop_func op_f43b_0_nf; -extern cpuop_func op_f43b_0_ff; -extern cpuop_func op_f43c_0_nf; -extern cpuop_func op_f43c_0_ff; -extern cpuop_func op_f43d_0_nf; -extern cpuop_func op_f43d_0_ff; -extern cpuop_func op_f43e_0_nf; -extern cpuop_func op_f43e_0_ff; -extern cpuop_func op_f43f_0_nf; -extern cpuop_func op_f43f_0_ff; -extern cpuop_func op_f500_0_nf; -extern cpuop_func op_f500_0_ff; -extern cpuop_func op_f600_0_nf; -extern cpuop_func op_f600_0_ff; -extern cpuop_func op_f608_0_nf; -extern cpuop_func op_f608_0_ff; -extern cpuop_func op_f610_0_nf; -extern cpuop_func op_f610_0_ff; -extern cpuop_func op_f618_0_nf; -extern cpuop_func op_f618_0_ff; -extern cpuop_func op_f620_0_nf; -extern cpuop_func op_f620_0_ff; -extern cpuop_func op_4800_1_nf; -extern cpuop_func op_4800_1_ff; -extern cpuop_func op_4810_1_nf; -extern cpuop_func op_4810_1_ff; -extern cpuop_func op_4818_1_nf; -extern cpuop_func op_4818_1_ff; -extern cpuop_func op_4820_1_nf; -extern cpuop_func op_4820_1_ff; -extern cpuop_func op_4828_1_nf; -extern cpuop_func op_4828_1_ff; -extern cpuop_func op_4830_1_nf; -extern cpuop_func op_4830_1_ff; -extern cpuop_func op_4838_1_nf; -extern cpuop_func op_4838_1_ff; -extern cpuop_func op_4839_1_nf; -extern cpuop_func op_4839_1_ff; -extern cpuop_func op_8100_1_nf; -extern cpuop_func op_8100_1_ff; -extern cpuop_func op_8108_1_nf; -extern cpuop_func op_8108_1_ff; -extern cpuop_func op_c100_1_nf; -extern cpuop_func op_c100_1_ff; -extern cpuop_func op_c108_1_nf; -extern cpuop_func op_c108_1_ff; -extern cpuop_func op_30_3_nf; -extern cpuop_func op_30_3_ff; -extern cpuop_func op_70_3_nf; -extern cpuop_func op_70_3_ff; -extern cpuop_func op_b0_3_nf; -extern cpuop_func op_b0_3_ff; -extern cpuop_func op_130_3_nf; -extern cpuop_func op_130_3_ff; -extern cpuop_func op_13b_3_nf; -extern cpuop_func op_13b_3_ff; -extern cpuop_func op_170_3_nf; -extern cpuop_func op_170_3_ff; -extern cpuop_func op_17b_3_nf; -extern cpuop_func op_17b_3_ff; -extern cpuop_func op_1b0_3_nf; -extern cpuop_func op_1b0_3_ff; -extern cpuop_func op_1bb_3_nf; -extern cpuop_func op_1bb_3_ff; -extern cpuop_func op_1f0_3_nf; -extern cpuop_func op_1f0_3_ff; -extern cpuop_func op_1fb_3_nf; -extern cpuop_func op_1fb_3_ff; -extern cpuop_func op_230_3_nf; -extern cpuop_func op_230_3_ff; -extern cpuop_func op_270_3_nf; -extern cpuop_func op_270_3_ff; -extern cpuop_func op_2b0_3_nf; -extern cpuop_func op_2b0_3_ff; -extern cpuop_func op_430_3_nf; -extern cpuop_func op_430_3_ff; -extern cpuop_func op_470_3_nf; -extern cpuop_func op_470_3_ff; -extern cpuop_func op_4b0_3_nf; -extern cpuop_func op_4b0_3_ff; -extern cpuop_func op_630_3_nf; -extern cpuop_func op_630_3_ff; -extern cpuop_func op_670_3_nf; -extern cpuop_func op_670_3_ff; -extern cpuop_func op_6b0_3_nf; -extern cpuop_func op_6b0_3_ff; -extern cpuop_func op_830_3_nf; -extern cpuop_func op_830_3_ff; -extern cpuop_func op_83b_3_nf; -extern cpuop_func op_83b_3_ff; -extern cpuop_func op_870_3_nf; -extern cpuop_func op_870_3_ff; -extern cpuop_func op_87b_3_nf; -extern cpuop_func op_87b_3_ff; -extern cpuop_func op_8b0_3_nf; -extern cpuop_func op_8b0_3_ff; -extern cpuop_func op_8bb_3_nf; -extern cpuop_func op_8bb_3_ff; -extern cpuop_func op_8f0_3_nf; -extern cpuop_func op_8f0_3_ff; -extern cpuop_func op_8fb_3_nf; -extern cpuop_func op_8fb_3_ff; -extern cpuop_func op_a30_3_nf; -extern cpuop_func op_a30_3_ff; -extern cpuop_func op_a70_3_nf; -extern cpuop_func op_a70_3_ff; -extern cpuop_func op_ab0_3_nf; -extern cpuop_func op_ab0_3_ff; -extern cpuop_func op_c30_3_nf; -extern cpuop_func op_c30_3_ff; -extern cpuop_func op_c3b_3_nf; -extern cpuop_func op_c3b_3_ff; -extern cpuop_func op_c70_3_nf; -extern cpuop_func op_c70_3_ff; -extern cpuop_func op_c7b_3_nf; -extern cpuop_func op_c7b_3_ff; -extern cpuop_func op_cb0_3_nf; -extern cpuop_func op_cb0_3_ff; -extern cpuop_func op_cbb_3_nf; -extern cpuop_func op_cbb_3_ff; -extern cpuop_func op_1030_3_nf; -extern cpuop_func op_1030_3_ff; -extern cpuop_func op_103b_3_nf; -extern cpuop_func op_103b_3_ff; -extern cpuop_func op_10b0_3_nf; -extern cpuop_func op_10b0_3_ff; -extern cpuop_func op_10bb_3_nf; -extern cpuop_func op_10bb_3_ff; -extern cpuop_func op_10f0_3_nf; -extern cpuop_func op_10f0_3_ff; -extern cpuop_func op_10fb_3_nf; -extern cpuop_func op_10fb_3_ff; -extern cpuop_func op_1130_3_nf; -extern cpuop_func op_1130_3_ff; -extern cpuop_func op_113b_3_nf; -extern cpuop_func op_113b_3_ff; -extern cpuop_func op_1170_3_nf; -extern cpuop_func op_1170_3_ff; -extern cpuop_func op_117b_3_nf; -extern cpuop_func op_117b_3_ff; -extern cpuop_func op_1180_3_nf; -extern cpuop_func op_1180_3_ff; -extern cpuop_func op_1190_3_nf; -extern cpuop_func op_1190_3_ff; -extern cpuop_func op_1198_3_nf; -extern cpuop_func op_1198_3_ff; -extern cpuop_func op_11a0_3_nf; -extern cpuop_func op_11a0_3_ff; -extern cpuop_func op_11a8_3_nf; -extern cpuop_func op_11a8_3_ff; -extern cpuop_func op_11b0_3_nf; -extern cpuop_func op_11b0_3_ff; -extern cpuop_func op_11b8_3_nf; -extern cpuop_func op_11b8_3_ff; -extern cpuop_func op_11b9_3_nf; -extern cpuop_func op_11b9_3_ff; -extern cpuop_func op_11ba_3_nf; -extern cpuop_func op_11ba_3_ff; -extern cpuop_func op_11bb_3_nf; -extern cpuop_func op_11bb_3_ff; -extern cpuop_func op_11bc_3_nf; -extern cpuop_func op_11bc_3_ff; -extern cpuop_func op_11f0_3_nf; -extern cpuop_func op_11f0_3_ff; -extern cpuop_func op_11fb_3_nf; -extern cpuop_func op_11fb_3_ff; -extern cpuop_func op_13f0_3_nf; -extern cpuop_func op_13f0_3_ff; -extern cpuop_func op_13fb_3_nf; -extern cpuop_func op_13fb_3_ff; -extern cpuop_func op_2030_3_nf; -extern cpuop_func op_2030_3_ff; -extern cpuop_func op_203b_3_nf; -extern cpuop_func op_203b_3_ff; -extern cpuop_func op_2070_3_nf; -extern cpuop_func op_2070_3_ff; -extern cpuop_func op_207b_3_nf; -extern cpuop_func op_207b_3_ff; -extern cpuop_func op_20b0_3_nf; -extern cpuop_func op_20b0_3_ff; -extern cpuop_func op_20bb_3_nf; -extern cpuop_func op_20bb_3_ff; -extern cpuop_func op_20f0_3_nf; -extern cpuop_func op_20f0_3_ff; -extern cpuop_func op_20fb_3_nf; -extern cpuop_func op_20fb_3_ff; -extern cpuop_func op_2130_3_nf; -extern cpuop_func op_2130_3_ff; -extern cpuop_func op_213b_3_nf; -extern cpuop_func op_213b_3_ff; -extern cpuop_func op_2170_3_nf; -extern cpuop_func op_2170_3_ff; -extern cpuop_func op_217b_3_nf; -extern cpuop_func op_217b_3_ff; -extern cpuop_func op_2180_3_nf; -extern cpuop_func op_2180_3_ff; -extern cpuop_func op_2188_3_nf; -extern cpuop_func op_2188_3_ff; -extern cpuop_func op_2190_3_nf; -extern cpuop_func op_2190_3_ff; -extern cpuop_func op_2198_3_nf; -extern cpuop_func op_2198_3_ff; -extern cpuop_func op_21a0_3_nf; -extern cpuop_func op_21a0_3_ff; -extern cpuop_func op_21a8_3_nf; -extern cpuop_func op_21a8_3_ff; -extern cpuop_func op_21b0_3_nf; -extern cpuop_func op_21b0_3_ff; -extern cpuop_func op_21b8_3_nf; -extern cpuop_func op_21b8_3_ff; -extern cpuop_func op_21b9_3_nf; -extern cpuop_func op_21b9_3_ff; -extern cpuop_func op_21ba_3_nf; -extern cpuop_func op_21ba_3_ff; -extern cpuop_func op_21bb_3_nf; -extern cpuop_func op_21bb_3_ff; -extern cpuop_func op_21bc_3_nf; -extern cpuop_func op_21bc_3_ff; -extern cpuop_func op_21f0_3_nf; -extern cpuop_func op_21f0_3_ff; -extern cpuop_func op_21fb_3_nf; -extern cpuop_func op_21fb_3_ff; -extern cpuop_func op_23f0_3_nf; -extern cpuop_func op_23f0_3_ff; -extern cpuop_func op_23fb_3_nf; -extern cpuop_func op_23fb_3_ff; -extern cpuop_func op_3030_3_nf; -extern cpuop_func op_3030_3_ff; -extern cpuop_func op_303b_3_nf; -extern cpuop_func op_303b_3_ff; -extern cpuop_func op_3070_3_nf; -extern cpuop_func op_3070_3_ff; -extern cpuop_func op_307b_3_nf; -extern cpuop_func op_307b_3_ff; -extern cpuop_func op_30b0_3_nf; -extern cpuop_func op_30b0_3_ff; -extern cpuop_func op_30bb_3_nf; -extern cpuop_func op_30bb_3_ff; -extern cpuop_func op_30f0_3_nf; -extern cpuop_func op_30f0_3_ff; -extern cpuop_func op_30fb_3_nf; -extern cpuop_func op_30fb_3_ff; -extern cpuop_func op_3130_3_nf; -extern cpuop_func op_3130_3_ff; -extern cpuop_func op_313b_3_nf; -extern cpuop_func op_313b_3_ff; -extern cpuop_func op_3170_3_nf; -extern cpuop_func op_3170_3_ff; -extern cpuop_func op_317b_3_nf; -extern cpuop_func op_317b_3_ff; -extern cpuop_func op_3180_3_nf; -extern cpuop_func op_3180_3_ff; -extern cpuop_func op_3188_3_nf; -extern cpuop_func op_3188_3_ff; -extern cpuop_func op_3190_3_nf; -extern cpuop_func op_3190_3_ff; -extern cpuop_func op_3198_3_nf; -extern cpuop_func op_3198_3_ff; -extern cpuop_func op_31a0_3_nf; -extern cpuop_func op_31a0_3_ff; -extern cpuop_func op_31a8_3_nf; -extern cpuop_func op_31a8_3_ff; -extern cpuop_func op_31b0_3_nf; -extern cpuop_func op_31b0_3_ff; -extern cpuop_func op_31b8_3_nf; -extern cpuop_func op_31b8_3_ff; -extern cpuop_func op_31b9_3_nf; -extern cpuop_func op_31b9_3_ff; -extern cpuop_func op_31ba_3_nf; -extern cpuop_func op_31ba_3_ff; -extern cpuop_func op_31bb_3_nf; -extern cpuop_func op_31bb_3_ff; -extern cpuop_func op_31bc_3_nf; -extern cpuop_func op_31bc_3_ff; -extern cpuop_func op_31f0_3_nf; -extern cpuop_func op_31f0_3_ff; -extern cpuop_func op_31fb_3_nf; -extern cpuop_func op_31fb_3_ff; -extern cpuop_func op_33f0_3_nf; -extern cpuop_func op_33f0_3_ff; -extern cpuop_func op_33fb_3_nf; -extern cpuop_func op_33fb_3_ff; -extern cpuop_func op_4030_3_nf; -extern cpuop_func op_4030_3_ff; -extern cpuop_func op_4070_3_nf; -extern cpuop_func op_4070_3_ff; -extern cpuop_func op_40b0_3_nf; -extern cpuop_func op_40b0_3_ff; -extern cpuop_func op_40f0_3_nf; -extern cpuop_func op_40f0_3_ff; -extern cpuop_func op_4130_3_nf; -extern cpuop_func op_4130_3_ff; -extern cpuop_func op_413b_3_nf; -extern cpuop_func op_413b_3_ff; -extern cpuop_func op_41b0_3_nf; -extern cpuop_func op_41b0_3_ff; -extern cpuop_func op_41bb_3_nf; -extern cpuop_func op_41bb_3_ff; -extern cpuop_func op_41f0_3_nf; -extern cpuop_func op_41f0_3_ff; -extern cpuop_func op_41fb_3_nf; -extern cpuop_func op_41fb_3_ff; -extern cpuop_func op_4230_3_nf; -extern cpuop_func op_4230_3_ff; -extern cpuop_func op_4270_3_nf; -extern cpuop_func op_4270_3_ff; -extern cpuop_func op_42b0_3_nf; -extern cpuop_func op_42b0_3_ff; -extern cpuop_func op_42f0_3_nf; -extern cpuop_func op_42f0_3_ff; -extern cpuop_func op_4430_3_nf; -extern cpuop_func op_4430_3_ff; -extern cpuop_func op_4470_3_nf; -extern cpuop_func op_4470_3_ff; -extern cpuop_func op_44b0_3_nf; -extern cpuop_func op_44b0_3_ff; -extern cpuop_func op_44f0_3_nf; -extern cpuop_func op_44f0_3_ff; -extern cpuop_func op_44fb_3_nf; -extern cpuop_func op_44fb_3_ff; -extern cpuop_func op_4630_3_nf; -extern cpuop_func op_4630_3_ff; -extern cpuop_func op_4670_3_nf; -extern cpuop_func op_4670_3_ff; -extern cpuop_func op_46b0_3_nf; -extern cpuop_func op_46b0_3_ff; -extern cpuop_func op_46f0_3_nf; -extern cpuop_func op_46f0_3_ff; -extern cpuop_func op_46fb_3_nf; -extern cpuop_func op_46fb_3_ff; -extern cpuop_func op_4830_3_nf; -extern cpuop_func op_4830_3_ff; -extern cpuop_func op_4870_3_nf; -extern cpuop_func op_4870_3_ff; -extern cpuop_func op_487b_3_nf; -extern cpuop_func op_487b_3_ff; -extern cpuop_func op_48b0_3_nf; -extern cpuop_func op_48b0_3_ff; -extern cpuop_func op_48f0_3_nf; -extern cpuop_func op_48f0_3_ff; -extern cpuop_func op_4a30_3_nf; -extern cpuop_func op_4a30_3_ff; -extern cpuop_func op_4a3b_3_nf; -extern cpuop_func op_4a3b_3_ff; -extern cpuop_func op_4a70_3_nf; -extern cpuop_func op_4a70_3_ff; -extern cpuop_func op_4a7b_3_nf; -extern cpuop_func op_4a7b_3_ff; -extern cpuop_func op_4ab0_3_nf; -extern cpuop_func op_4ab0_3_ff; -extern cpuop_func op_4abb_3_nf; -extern cpuop_func op_4abb_3_ff; -extern cpuop_func op_4af0_3_nf; -extern cpuop_func op_4af0_3_ff; -extern cpuop_func op_4cb0_3_nf; -extern cpuop_func op_4cb0_3_ff; -extern cpuop_func op_4cbb_3_nf; -extern cpuop_func op_4cbb_3_ff; -extern cpuop_func op_4cf0_3_nf; -extern cpuop_func op_4cf0_3_ff; -extern cpuop_func op_4cfb_3_nf; -extern cpuop_func op_4cfb_3_ff; -extern cpuop_func op_4eb0_3_nf; -extern cpuop_func op_4eb0_3_ff; -extern cpuop_func op_4ebb_3_nf; -extern cpuop_func op_4ebb_3_ff; -extern cpuop_func op_4ef0_3_nf; -extern cpuop_func op_4ef0_3_ff; -extern cpuop_func op_4efb_3_nf; -extern cpuop_func op_4efb_3_ff; -extern cpuop_func op_5030_3_nf; -extern cpuop_func op_5030_3_ff; -extern cpuop_func op_5070_3_nf; -extern cpuop_func op_5070_3_ff; -extern cpuop_func op_50b0_3_nf; -extern cpuop_func op_50b0_3_ff; -extern cpuop_func op_50f0_3_nf; -extern cpuop_func op_50f0_3_ff; -extern cpuop_func op_5130_3_nf; -extern cpuop_func op_5130_3_ff; -extern cpuop_func op_5170_3_nf; -extern cpuop_func op_5170_3_ff; -extern cpuop_func op_51b0_3_nf; -extern cpuop_func op_51b0_3_ff; -extern cpuop_func op_51f0_3_nf; -extern cpuop_func op_51f0_3_ff; -extern cpuop_func op_52f0_3_nf; -extern cpuop_func op_52f0_3_ff; -extern cpuop_func op_53f0_3_nf; -extern cpuop_func op_53f0_3_ff; -extern cpuop_func op_54f0_3_nf; -extern cpuop_func op_54f0_3_ff; -extern cpuop_func op_55f0_3_nf; -extern cpuop_func op_55f0_3_ff; -extern cpuop_func op_56f0_3_nf; -extern cpuop_func op_56f0_3_ff; -extern cpuop_func op_57f0_3_nf; -extern cpuop_func op_57f0_3_ff; -extern cpuop_func op_58f0_3_nf; -extern cpuop_func op_58f0_3_ff; -extern cpuop_func op_59f0_3_nf; -extern cpuop_func op_59f0_3_ff; -extern cpuop_func op_5af0_3_nf; -extern cpuop_func op_5af0_3_ff; -extern cpuop_func op_5bf0_3_nf; -extern cpuop_func op_5bf0_3_ff; -extern cpuop_func op_5cf0_3_nf; -extern cpuop_func op_5cf0_3_ff; -extern cpuop_func op_5df0_3_nf; -extern cpuop_func op_5df0_3_ff; -extern cpuop_func op_5ef0_3_nf; -extern cpuop_func op_5ef0_3_ff; -extern cpuop_func op_5ff0_3_nf; -extern cpuop_func op_5ff0_3_ff; -extern cpuop_func op_60ff_3_nf; -extern cpuop_func op_60ff_3_ff; -extern cpuop_func op_62ff_3_nf; -extern cpuop_func op_62ff_3_ff; -extern cpuop_func op_63ff_3_nf; -extern cpuop_func op_63ff_3_ff; -extern cpuop_func op_64ff_3_nf; -extern cpuop_func op_64ff_3_ff; -extern cpuop_func op_65ff_3_nf; -extern cpuop_func op_65ff_3_ff; -extern cpuop_func op_66ff_3_nf; -extern cpuop_func op_66ff_3_ff; -extern cpuop_func op_67ff_3_nf; -extern cpuop_func op_67ff_3_ff; -extern cpuop_func op_68ff_3_nf; -extern cpuop_func op_68ff_3_ff; -extern cpuop_func op_69ff_3_nf; -extern cpuop_func op_69ff_3_ff; -extern cpuop_func op_6aff_3_nf; -extern cpuop_func op_6aff_3_ff; -extern cpuop_func op_6bff_3_nf; -extern cpuop_func op_6bff_3_ff; -extern cpuop_func op_6cff_3_nf; -extern cpuop_func op_6cff_3_ff; -extern cpuop_func op_6dff_3_nf; -extern cpuop_func op_6dff_3_ff; -extern cpuop_func op_6eff_3_nf; -extern cpuop_func op_6eff_3_ff; -extern cpuop_func op_6fff_3_nf; -extern cpuop_func op_6fff_3_ff; -extern cpuop_func op_8030_3_nf; -extern cpuop_func op_8030_3_ff; -extern cpuop_func op_803b_3_nf; -extern cpuop_func op_803b_3_ff; -extern cpuop_func op_8070_3_nf; -extern cpuop_func op_8070_3_ff; -extern cpuop_func op_807b_3_nf; -extern cpuop_func op_807b_3_ff; -extern cpuop_func op_80b0_3_nf; -extern cpuop_func op_80b0_3_ff; -extern cpuop_func op_80bb_3_nf; -extern cpuop_func op_80bb_3_ff; -extern cpuop_func op_80f0_3_nf; -extern cpuop_func op_80f0_3_ff; -extern cpuop_func op_80fb_3_nf; -extern cpuop_func op_80fb_3_ff; -extern cpuop_func op_8130_3_nf; -extern cpuop_func op_8130_3_ff; -extern cpuop_func op_8170_3_nf; -extern cpuop_func op_8170_3_ff; -extern cpuop_func op_81b0_3_nf; -extern cpuop_func op_81b0_3_ff; -extern cpuop_func op_81f0_3_nf; -extern cpuop_func op_81f0_3_ff; -extern cpuop_func op_81fb_3_nf; -extern cpuop_func op_81fb_3_ff; -extern cpuop_func op_9030_3_nf; -extern cpuop_func op_9030_3_ff; -extern cpuop_func op_903b_3_nf; -extern cpuop_func op_903b_3_ff; -extern cpuop_func op_9070_3_nf; -extern cpuop_func op_9070_3_ff; -extern cpuop_func op_907b_3_nf; -extern cpuop_func op_907b_3_ff; -extern cpuop_func op_90b0_3_nf; -extern cpuop_func op_90b0_3_ff; -extern cpuop_func op_90bb_3_nf; -extern cpuop_func op_90bb_3_ff; -extern cpuop_func op_90f0_3_nf; -extern cpuop_func op_90f0_3_ff; -extern cpuop_func op_90fb_3_nf; -extern cpuop_func op_90fb_3_ff; -extern cpuop_func op_9130_3_nf; -extern cpuop_func op_9130_3_ff; -extern cpuop_func op_9170_3_nf; -extern cpuop_func op_9170_3_ff; -extern cpuop_func op_91b0_3_nf; -extern cpuop_func op_91b0_3_ff; -extern cpuop_func op_91f0_3_nf; -extern cpuop_func op_91f0_3_ff; -extern cpuop_func op_91fb_3_nf; -extern cpuop_func op_91fb_3_ff; -extern cpuop_func op_b030_3_nf; -extern cpuop_func op_b030_3_ff; -extern cpuop_func op_b03b_3_nf; -extern cpuop_func op_b03b_3_ff; -extern cpuop_func op_b070_3_nf; -extern cpuop_func op_b070_3_ff; -extern cpuop_func op_b07b_3_nf; -extern cpuop_func op_b07b_3_ff; -extern cpuop_func op_b0b0_3_nf; -extern cpuop_func op_b0b0_3_ff; -extern cpuop_func op_b0bb_3_nf; -extern cpuop_func op_b0bb_3_ff; -extern cpuop_func op_b0f0_3_nf; -extern cpuop_func op_b0f0_3_ff; -extern cpuop_func op_b0fb_3_nf; -extern cpuop_func op_b0fb_3_ff; -extern cpuop_func op_b130_3_nf; -extern cpuop_func op_b130_3_ff; -extern cpuop_func op_b170_3_nf; -extern cpuop_func op_b170_3_ff; -extern cpuop_func op_b1b0_3_nf; -extern cpuop_func op_b1b0_3_ff; -extern cpuop_func op_b1f0_3_nf; -extern cpuop_func op_b1f0_3_ff; -extern cpuop_func op_b1fb_3_nf; -extern cpuop_func op_b1fb_3_ff; -extern cpuop_func op_c030_3_nf; -extern cpuop_func op_c030_3_ff; -extern cpuop_func op_c03b_3_nf; -extern cpuop_func op_c03b_3_ff; -extern cpuop_func op_c070_3_nf; -extern cpuop_func op_c070_3_ff; -extern cpuop_func op_c07b_3_nf; -extern cpuop_func op_c07b_3_ff; -extern cpuop_func op_c0b0_3_nf; -extern cpuop_func op_c0b0_3_ff; -extern cpuop_func op_c0bb_3_nf; -extern cpuop_func op_c0bb_3_ff; -extern cpuop_func op_c0f0_3_nf; -extern cpuop_func op_c0f0_3_ff; -extern cpuop_func op_c0fb_3_nf; -extern cpuop_func op_c0fb_3_ff; -extern cpuop_func op_c130_3_nf; -extern cpuop_func op_c130_3_ff; -extern cpuop_func op_c170_3_nf; -extern cpuop_func op_c170_3_ff; -extern cpuop_func op_c1b0_3_nf; -extern cpuop_func op_c1b0_3_ff; -extern cpuop_func op_c1f0_3_nf; -extern cpuop_func op_c1f0_3_ff; -extern cpuop_func op_c1fb_3_nf; -extern cpuop_func op_c1fb_3_ff; -extern cpuop_func op_d030_3_nf; -extern cpuop_func op_d030_3_ff; -extern cpuop_func op_d03b_3_nf; -extern cpuop_func op_d03b_3_ff; -extern cpuop_func op_d070_3_nf; -extern cpuop_func op_d070_3_ff; -extern cpuop_func op_d07b_3_nf; -extern cpuop_func op_d07b_3_ff; -extern cpuop_func op_d0b0_3_nf; -extern cpuop_func op_d0b0_3_ff; -extern cpuop_func op_d0bb_3_nf; -extern cpuop_func op_d0bb_3_ff; -extern cpuop_func op_d0f0_3_nf; -extern cpuop_func op_d0f0_3_ff; -extern cpuop_func op_d0fb_3_nf; -extern cpuop_func op_d0fb_3_ff; -extern cpuop_func op_d130_3_nf; -extern cpuop_func op_d130_3_ff; -extern cpuop_func op_d170_3_nf; -extern cpuop_func op_d170_3_ff; -extern cpuop_func op_d1b0_3_nf; -extern cpuop_func op_d1b0_3_ff; -extern cpuop_func op_d1f0_3_nf; -extern cpuop_func op_d1f0_3_ff; -extern cpuop_func op_d1fb_3_nf; -extern cpuop_func op_d1fb_3_ff; -extern cpuop_func op_e0f0_3_nf; -extern cpuop_func op_e0f0_3_ff; -extern cpuop_func op_e1f0_3_nf; -extern cpuop_func op_e1f0_3_ff; -extern cpuop_func op_e2f0_3_nf; -extern cpuop_func op_e2f0_3_ff; -extern cpuop_func op_e3f0_3_nf; -extern cpuop_func op_e3f0_3_ff; -extern cpuop_func op_e4f0_3_nf; -extern cpuop_func op_e4f0_3_ff; -extern cpuop_func op_e5f0_3_nf; -extern cpuop_func op_e5f0_3_ff; -extern cpuop_func op_e6f0_3_nf; -extern cpuop_func op_e6f0_3_ff; -extern cpuop_func op_e7f0_3_nf; -extern cpuop_func op_e7f0_3_ff; -extern cpuop_func op_40c0_4_nf; -extern cpuop_func op_40c0_4_ff; -extern cpuop_func op_40d0_4_nf; -extern cpuop_func op_40d0_4_ff; -extern cpuop_func op_40d8_4_nf; -extern cpuop_func op_40d8_4_ff; -extern cpuop_func op_40e0_4_nf; -extern cpuop_func op_40e0_4_ff; -extern cpuop_func op_40e8_4_nf; -extern cpuop_func op_40e8_4_ff; -extern cpuop_func op_40f0_4_nf; -extern cpuop_func op_40f0_4_ff; -extern cpuop_func op_40f8_4_nf; -extern cpuop_func op_40f8_4_ff; -extern cpuop_func op_40f9_4_nf; -extern cpuop_func op_40f9_4_ff; -extern cpuop_func op_4e73_4_nf; -extern cpuop_func op_4e73_4_ff; diff --git a/BasiliskII/src/uae_cpu/defs68k.c b/BasiliskII/src/uae_cpu/defs68k.c deleted file mode 100644 index e3cfa982..00000000 --- a/BasiliskII/src/uae_cpu/defs68k.c +++ /dev/null @@ -1,185 +0,0 @@ -#include "sysdeps.h" -#include "readcpu.h" -struct instr_def defs68k[] = { -{ 60, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, 0, 16, "ORSR.B #1"}, -{ 124, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 2, { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, 4, 16, "ORSR.W #1"}, -{ 192, 8, {17,17,11,11,11,12,12,12,0,0,0,0,0,0,0,0}, 63936, 2, 0, { { 1, 1 }, { 1, 5 }, { 1, 0 }, { 1, 5 }, { 1, 0 } }, 4, 17, "CHK2.z #1,s[!Dreg,Areg,Aipi,Apdi,Immd]"}, -{ 0, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "OR.z #z,d[!Areg]"}, -{ 572, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, 0, 16, "ANDSR.B #1"}, -{ 636, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 2, { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, 4, 16, "ANDSR.W #1"}, -{ 512, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "AND.z #z,d[!Areg]"}, -{ 1024, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "SUB.z #z,d[!Areg]"}, -{ 1536, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ADD.z #z,d[!Areg]"}, -{ 1728, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 } }, 0, 16, "CALLM s[!Dreg,Areg,Aipi,Apdi,Immd]"}, -{ 1728, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 3, 16, "RTM s[Dreg,Areg]"}, -{ 2048, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 17, "BTST #1,s[!Areg]"}, -{ 2112, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 19, "BCHG #1,s[!Areg,Immd]"}, -{ 2176, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 19, "BCLR #1,s[!Areg,Immd]"}, -{ 2240, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 19, "BSET #1,s[!Areg,Immd]"}, -{ 2620, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, 0, 16, "EORSR.B #1"}, -{ 2684, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 2, { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, 4, 16, "EORSR.W #1"}, -{ 2560, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "EOR.z #z,d[!Areg]"}, -{ 3072, 8, {17,17,11,11,11,12,12,12,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 17, "CMP.z #z,s[!Areg,Immd]"}, -{ 2752, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "CAS.B #1,s[!Dreg,Areg,Immd,PC8r,PC16]"}, -{ 3264, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "CAS.W #1,s[!Dreg,Areg,Immd,PC8r,PC16]"}, -{ 3324, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 16, "CAS2.W #2"}, -{ 3584, 8, {17,17,11,11,11,12,12,12,0,0,0,0,0,0,0,0}, 65280, 2, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 19, "MOVES.z #1,s[!Dreg,Areg,Immd,PC8r,PC16]"}, -{ 3776, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "CAS.L #1,s[!Dreg,Areg,Immd,PC8r,PC16]"}, -{ 3836, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 16, "CAS2.L #2"}, -{ 256, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MVPMR.W d[Areg-Ad16],Dr"}, -{ 320, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MVPMR.L d[Areg-Ad16],Dr"}, -{ 384, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MVPRM.W Dr,d[Areg-Ad16]"}, -{ 448, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MVPRM.L Dr,d[Areg-Ad16]"}, -{ 256, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 17, "BTST Dr,s[!Areg]"}, -{ 320, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 19, "BCHG Dr,s[!Areg,Immd]"}, -{ 384, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 19, "BCLR Dr,s[!Areg,Immd]"}, -{ 448, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 0 }, { 1, 1 }, { 1, 1 } }, 0, 19, "BSET Dr,s[!Areg,Immd]"}, -{ 4096, 12, {14,14,14,13,13,13,11,11,11,12,12,12,0,0,0,0}, 61440, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 18, "MOVE.B s,d[!Areg]"}, -{ 8192, 12, {14,14,14,13,13,13,11,11,11,12,12,12,0,0,0,0}, 61440, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MOVEA.L s,d[Areg]"}, -{ 8192, 12, {14,14,14,13,13,13,11,11,11,12,12,12,0,0,0,0}, 61440, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 18, "MOVE.L s,d[!Areg]"}, -{ 12288, 12, {14,14,14,13,13,13,11,11,11,12,12,12,0,0,0,0}, 61440, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MOVEA.W s,d[Areg]"}, -{ 12288, 12, {14,14,14,13,13,13,11,11,11,12,12,12,0,0,0,0}, 61440, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 18, "MOVE.W s,d[!Areg]"}, -{ 16384, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 0, 0 }, { 1, 4 }, { 0, 0 }, { 1, 4 }, { 1, 0 } }, 0, 48, "NEGX.z d[!Areg]"}, -{ 16576, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 1, { { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 } }, 4, 16, "MVSR2.W d[!Areg]"}, -{ 16896, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 2 }, { 1, 3 }, { 1, 2 }, { 1, 2 } }, 0, 32, "CLR.z d[!Areg]"}, -{ 17088, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 1, 0, { { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 } }, 0, 16, "MVSR2.B d[!Areg]"}, -{ 17408, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 48, "NEG.z d[!Areg]"}, -{ 17600, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 16, "MV2SR.B s[!Areg]"}, -{ 17920, 8, {17,17,13,13,13,14,14,14,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 48, "NOT.z d[!Areg]"}, -{ 18112, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 2, { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, 4, 16, "MV2SR.W s[!Areg]"}, -{ 18440, 3, {15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65528, 2, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 49, "LINK.L Ar,#2"}, -{ 18432, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 0, 0 }, { 1, 5 }, { 0, 0 }, { 1, 5 }, { 1, 0 } }, 0, 48, "NBCD.B d[!Areg]"}, -{ 18504, 3, {9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65528, 2, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 16, "BKPT #k"}, -{ 18496, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 48, "SWAP.W s[Dreg]"}, -{ 18496, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 0, "PEA.L s[!Dreg,Areg,Aipi,Apdi,Immd]"}, -{ 18560, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 48, "EXT.W d[Dreg]"}, -{ 18560, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 2, "MVMLE.W #1,d[!Dreg,Areg,Aipi]"}, -{ 18624, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 48, "EXT.L d[Dreg]"}, -{ 18624, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 2, "MVMLE.L #1,d[!Dreg,Areg,Aipi]"}, -{ 18880, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 48, "EXT.B d[Dreg]"}, -{ 18944, 8, {17,17,11,11,11,12,12,12,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 16, "TST.z s"}, -{ 19136, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 48, "TAS.B d[!Areg]"}, -{ 19196, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 0, "ILLEGAL"}, -{ 19456, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "MULL.L #1,s[!Areg]"}, -{ 19520, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 } }, 4, 19, "DIVL.L #1,s[!Areg]"}, -{ 19584, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 1, "MVMEL.W #1,s[!Dreg,Areg,Apdi,Immd]"}, -{ 19648, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 1, "MVMEL.L #1,s[!Dreg,Areg,Apdi,Immd]"}, -{ 20032, 4, {8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0}, 65520, 0, 0, { { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 } }, 0, 16, "TRAP #J"}, -{ 20048, 3, {15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65528, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 49, "LINK.W Ar,#1"}, -{ 20056, 3, {15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65528, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 48, "UNLK.L Ar"}, -{ 20064, 3, {15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65528, 0, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 16, "MVR2USP.L Ar"}, -{ 20072, 3, {15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65528, 0, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 32, "MVUSP2R.L Ar"}, -{ 20080, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 0, "RESET"}, -{ 20081, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 0, "NOP"}, -{ 20082, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 2, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 4, 16, "STOP #1"}, -{ 20083, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 2, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 7, 0, "RTE"}, -{ 20084, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 3, 16, "RTD #1"}, -{ 20085, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 3, 0, "RTS"}, -{ 20086, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 } }, 4, 0, "TRAPV"}, -{ 20087, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 3, 0, "RTR"}, -{ 20090, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 1, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 16, "MOVEC2 #1"}, -{ 20091, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 1, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 16, "MOVE2C #1"}, -{ 20096, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 2, 128, "JSR.L s[!Dreg,Areg,Aipi,Apdi,Immd]"}, -{ 16640, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 5 }, { 1, 5 }, { 1, 5 } }, 4, 17, "CHK.L s[!Areg],Dr"}, -{ 16768, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 5 }, { 1, 5 }, { 1, 5 } }, 4, 17, "CHK.W s[!Areg],Dr"}, -{ 20160, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 2, 128, "JMP.L s[!Dreg,Areg,Aipi,Apdi,Immd]"}, -{ 16832, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 2, "LEA.L s[!Dreg,Areg,Aipi,Apdi,Immd],Ar"}, -{ 20544, 9, {7,7,7,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "ADDA.W #j,d[Areg]"}, -{ 20608, 9, {7,7,7,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "ADDA.L #j,d[Areg]"}, -{ 20480, 11, {7,7,7,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ADD.z #j,d[!Areg]"}, -{ 20800, 9, {7,7,7,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "SUBA.W #j,d[Areg]"}, -{ 20864, 9, {7,7,7,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "SUBA.L #j,d[Areg]"}, -{ 20736, 11, {7,7,7,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "SUB.z #j,d[!Areg]"}, -{ 20680, 7, {2,2,2,2,15,15,15,0,0,0,0,0,0,0,0,0}, 61688, 0, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 1, 49, "DBcc.W Dr,#1"}, -{ 20672, 10, {2,2,2,2,13,13,13,14,14,14,0,0,0,0,0,0}, 61632, 0, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 0, 32, "Scc.B d[!Areg]"}, -{ 20730, 4, {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0}, 61695, 2, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 4, 16, "TRAPcc #1"}, -{ 20731, 4, {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0}, 61695, 2, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 4, 16, "TRAPcc #2"}, -{ 20732, 4, {2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0}, 61695, 2, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 4, 0, "TRAPcc"}, -{ 24832, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 1, 64, "BSR.W #1"}, -{ 24832, 8, {6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 1, 64, "BSR.B #i"}, -{ 25087, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 1, 64, "BSR.L #2"}, -{ 24576, 4, {3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0}, 61695, 0, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 1, 64, "Bcc.W #1"}, -{ 24576, 12, {3,3,3,3,6,6,6,6,6,6,6,6,0,0,0,0}, 61440, 0, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 1, 64, "Bcc.B #i"}, -{ 24831, 4, {3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0}, 61695, 0, 0, { { 1, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 }, { 3, 1 } }, 1, 64, "Bcc.L #2"}, -{ 28672, 11, {15,15,15,5,5,5,5,5,5,5,5,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 18, "MOVE.L #i,Dr"}, -{ 32768, 11, {15,15,15,17,17,11,11,11,12,12,12,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "OR.z s[!Areg],Dr"}, -{ 32960, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 } }, 4, 19, "DIVU.W s[!Areg],Dr"}, -{ 33024, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 0, 0 }, { 1, 4 }, { 0, 0 }, { 1, 4 }, { 1, 0 } }, 0, 19, "SBCD.B d[Dreg],Dr"}, -{ 33024, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 0, 0 }, { 1, 4 }, { 0, 0 }, { 1, 4 }, { 1, 0 } }, 0, 19, "SBCD.B d[Areg-Apdi],Arp"}, -{ 33024, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "OR.z Dr,d[!Areg,Dreg]"}, -{ 33088, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 2, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "PACK d[Dreg],Dr"}, -{ 33088, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 2, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "PACK d[Areg-Apdi],Arp"}, -{ 33152, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 2, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "UNPK d[Dreg],Dr"}, -{ 33152, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 2, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "UNPK d[Areg-Apdi],Arp"}, -{ 33216, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 } }, 4, 19, "DIVS.W s[!Areg],Dr"}, -{ 36864, 11, {15,15,15,17,17,11,11,11,12,12,12,0,0,0,0,0}, 61696, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "SUB.z s,Dr"}, -{ 37056, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "SUBA.W s,Ar"}, -{ 37120, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 0, 0 }, { 1, 0 }, { 0, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "SUBX.z d[Dreg],Dr"}, -{ 37120, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 0, 0 }, { 1, 0 }, { 0, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "SUBX.z d[Areg-Apdi],Arp"}, -{ 37120, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "SUB.z Dr,d[!Areg,Dreg]"}, -{ 37312, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "SUBA.L s,Ar"}, -{ 45056, 11, {15,15,15,17,17,11,11,11,12,12,12,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 17, "CMP.z s,Dr"}, -{ 45248, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 17, "CMPA.W s,Ar"}, -{ 45504, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 17, "CMPA.L s,Ar"}, -{ 45312, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 17, "CMPM.z d[Areg-Aipi],ArP"}, -{ 45312, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "EOR.z Dr,d[!Areg]"}, -{ 49152, 11, {15,15,15,17,17,11,11,11,12,12,12,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "AND.z s[!Areg],Dr"}, -{ 49344, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "MULU.W s[!Areg],Dr"}, -{ 49408, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 0, 0 }, { 1, 4 }, { 0, 0 }, { 1, 4 }, { 1, 0 } }, 0, 19, "ABCD.B d[Dreg],Dr"}, -{ 49408, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 0, 0 }, { 1, 4 }, { 0, 0 }, { 1, 4 }, { 1, 0 } }, 0, 19, "ABCD.B d[Areg-Apdi],Arp"}, -{ 49408, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "AND.z Dr,d[!Areg,Dreg]"}, -{ 49472, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 51, "EXG.L Dr,d[Dreg]"}, -{ 49472, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 51, "EXG.L Ar,d[Areg]"}, -{ 49536, 9, {15,15,15,13,13,13,14,14,14,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 51, "EXG.L Dr,d[Areg]"}, -{ 49600, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "MULS.W s[!Areg],Dr"}, -{ 53248, 11, {15,15,15,17,17,11,11,11,12,12,12,0,0,0,0,0}, 61696, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ADD.z s,Dr"}, -{ 53440, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "ADDA.W s,Ar"}, -{ 53504, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 0, 0 }, { 1, 0 }, { 0, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ADDX.z d[Dreg],Dr"}, -{ 53504, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 0, 0 }, { 1, 0 }, { 0, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ADDX.z d[Areg-Apdi],Arp"}, -{ 53504, 11, {15,15,15,17,17,13,13,13,14,14,14,0,0,0,0,0}, 61696, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ADD.z Dr,d[!Areg,Dreg]"}, -{ 53696, 9, {15,15,15,11,11,11,12,12,12,0,0,0,0,0,0,0}, 61888, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 19, "ADDA.L s,Ar"}, -{ 57344, 9, {7,7,7,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ASf.z #j,DR"}, -{ 57352, 9, {7,7,7,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "LSf.z #j,DR"}, -{ 57360, 9, {7,7,7,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 0, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "ROXf.z #j,DR"}, -{ 57368, 9, {7,7,7,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "ROf.z #j,DR"}, -{ 57376, 9, {15,15,15,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ASf.z Dr,DR"}, -{ 57384, 9, {15,15,15,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "LSf.z Dr,DR"}, -{ 57392, 9, {15,15,15,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 0, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "ROXf.z Dr,DR"}, -{ 57400, 9, {15,15,15,4,17,17,16,16,16,0,0,0,0,0,0,0}, 61496, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "ROf.z Dr,DR"}, -{ 57536, 7, {4,13,13,13,14,14,14,0,0,0,0,0,0,0,0,0}, 65216, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 0 } }, 0, 19, "ASfW.W d[!Dreg,Areg]"}, -{ 58048, 7, {4,13,13,13,14,14,14,0,0,0,0,0,0,0,0,0}, 65216, 0, 0, { { 1, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "LSfW.W d[!Dreg,Areg]"}, -{ 58560, 7, {4,13,13,13,14,14,14,0,0,0,0,0,0,0,0,0}, 65216, 0, 0, { { 0, 0 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "ROXfW.W d[!Dreg,Areg]"}, -{ 59072, 7, {4,13,13,13,14,14,14,0,0,0,0,0,0,0,0,0}, 65216, 0, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 0 } }, 0, 19, "ROfW.W d[!Dreg,Areg]"}, -{ 59584, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 17, "BFTST #1,s[!Areg,Apdi,Aipi,Immd]"}, -{ 59840, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 17, "BFEXTU #1,s[!Areg,Apdi,Aipi,Immd]"}, -{ 60096, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "BFCHG #1,s[!Areg,Apdi,Aipi,Immd,PC8r,PC16]"}, -{ 60352, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 17, "BFEXTS #1,s[!Areg,Apdi,Aipi,Immd]"}, -{ 60608, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "BFCLR #1,s[!Areg,Apdi,Aipi,Immd,PC8r,PC16]"}, -{ 60864, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 17, "BFFFO #1,s[!Areg,Apdi,Aipi,Immd]"}, -{ 61120, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "BFSET #1,s[!Areg,Apdi,Aipi,Immd,PC8r,PC16]"}, -{ 61376, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 2, 0, { { 1, 1 }, { 1, 0 }, { 1, 0 }, { 1, 2 }, { 1, 2 } }, 0, 19, "BFINS #1,s[!Areg,Apdi,Aipi,Immd,PC8r,PC16]"}, -{ 61952, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 17, "FPP #1,s"}, -{ 62016, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 1, 17, "FDBcc #1,s[Areg-Dreg]"}, -{ 62016, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 17, "FScc #1,s[!Areg,Immd,PC8r,PC16]"}, -{ 62074, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 16, "FTRAPcc #1"}, -{ 62075, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 16, "FTRAPcc #2"}, -{ 62076, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 0, "FTRAPcc"}, -{ 62080, 6, {10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0}, 65472, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 1, 17, "FBcc #K,#1"}, -{ 62144, 6, {10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0}, 65472, 3, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 1, 17, "FBcc #K,#2"}, -{ 62208, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 3, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 32, "FSAVE s[!Dreg,Areg,Aipi,Immd,PC8r,PC16]"}, -{ 62272, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 3, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 16, "FRESTORE s[!Dreg,Areg,Apdi,Immd]"}, -{ 62720, 8, {5,5,5,5,5,12,12,12,0,0,0,0,0,0,0,0}, 65280, 4, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 17, "MMUOP #i,s"}, -{ 62472, 5, {19,19,15,15,15,0,0,0,0,0,0,0,0,0,0,0}, 65336, 4, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 2, "CINVL #p,Ar"}, -{ 62480, 5, {19,19,15,15,15,0,0,0,0,0,0,0,0,0,0,0}, 65336, 4, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 2, "CINVP #p,Ar"}, -{ 62488, 5, {19,19,15,15,15,0,0,0,0,0,0,0,0,0,0,0}, 65336, 4, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 0, "CINVA #p"}, -{ 62504, 5, {19,19,15,15,15,0,0,0,0,0,0,0,0,0,0,0}, 65336, 4, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 2, "CPUSHL #p,Ar"}, -{ 62512, 5, {19,19,15,15,15,0,0,0,0,0,0,0,0,0,0,0}, 65336, 4, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 2, "CPUSHP #p,Ar"}, -{ 62520, 5, {19,19,15,15,15,0,0,0,0,0,0,0,0,0,0,0}, 65336, 4, 2, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 4, 0, "CPUSHA #p"}, -{ 63008, 3, {15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65528, 4, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MOVE16 ArP,AxP"}, -{ 62976, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 4, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MOVE16 s[Dreg-Aipi],L"}, -{ 62976, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 4, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MOVE16 L,d[Areg-Aipi]"}, -{ 62976, 6, {11,11,11,12,12,12,0,0,0,0,0,0,0,0,0,0}, 65472, 4, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MOVE16 s[Aind],L"}, -{ 62976, 6, {13,13,13,14,14,14,0,0,0,0,0,0,0,0,0,0}, 65472, 4, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 0, 18, "MOVE16 L,d[Aipi-Aind]"}, -{ 28928, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 65535, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 3, 0, "EMULOP_RETURN"}, -{ 28928, 8, {18,18,18,18,18,18,18,18,0,0,0,0,0,0,0,0}, 65280, 0, 0, { { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 } }, 2, 16, "EMULOP #E"}}; -int n_defs68k = 181; diff --git a/BasiliskII/src/uae_cpu/osx_generate_files.sh b/BasiliskII/src/uae_cpu/osx_generate_files.sh deleted file mode 100755 index 3f6da3ce..00000000 --- a/BasiliskII/src/uae_cpu/osx_generate_files.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -e - -# -# osx_generate_files.sh -# -# Generates files for 68k emulation, via UAE's virtual cpu, for use on Mac OS X hosts -# - -SCRIPT_DIRNAME="$(cd $(dirname $0) && pwd)" -cd "$SCRIPT_DIRNAME" - -echo "build68k: compiling" -clang build68k.c -o build68k -I ../MacOSX/ -I ../Unix/ - -echo "build68k: running" -cat table68k | ./build68k > ./defs68k.c - -echo "gencpu: compiling" -clang gencpu.c ./defs68k.c readcpu.cpp -o gencpu -I . -I ../MacOSX/ -I ../Unix/ - -echo "gencpu: running" -./gencpu From 145ca0c210559dc67ce266f7e6df8b6391327887 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 27 Aug 2017 17:37:20 -0400 Subject: [PATCH 41/85] fixed issue #15: BasiliskII: running an autotools build breaks ability to build with Xcode --- .../src/MacOSX/BasiliskII.xcodeproj/project.pbxproj | 8 ++++---- BasiliskII/src/Unix/sysdeps.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index a881f455..68194be6 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -1237,10 +1237,10 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", - ../UNIX, + ../MacOSX, ../include, - ., ../uae_cpu, + ../UNIX, ); MACOSX_DEPLOYMENT_TARGET = 10.7; MTL_ENABLE_DEBUG_INFO = YES; @@ -1290,10 +1290,10 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", - ../UNIX, + ../MacOSX, ../include, - ., ../uae_cpu, + ../UNIX, ); MACOSX_DEPLOYMENT_TARGET = 10.7; MTL_ENABLE_DEBUG_INFO = NO; diff --git a/BasiliskII/src/Unix/sysdeps.h b/BasiliskII/src/Unix/sysdeps.h index d74a2eda..7f8abb05 100644 --- a/BasiliskII/src/Unix/sysdeps.h +++ b/BasiliskII/src/Unix/sysdeps.h @@ -25,7 +25,7 @@ #error "Your compiler is not ANSI. Get a real one." #endif -#include "config.h" +#include #include "user_strings_unix.h" #ifndef STDC_HEADERS From d5e68ceebfa899b5a78b784c543cd99acab0346d Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 27 Aug 2017 18:05:13 -0400 Subject: [PATCH 42/85] use SDL2's preferred/non-legacy means of opening, and working with, an audio device --- BasiliskII/src/SDL/audio_sdl.cpp | 47 ++++++++++++++++---------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/BasiliskII/src/SDL/audio_sdl.cpp b/BasiliskII/src/SDL/audio_sdl.cpp index bc5f30a9..7b7cb107 100644 --- a/BasiliskII/src/SDL/audio_sdl.cpp +++ b/BasiliskII/src/SDL/audio_sdl.cpp @@ -45,6 +45,8 @@ static int audio_sample_size_index = 0; static int audio_channel_count_index = 0; // Global variables +static SDL_AudioDeviceID audio_device = 0; +static SDL_AudioSpec audio_spec_obtained; static SDL_sem *audio_irq_done_sem = NULL; // Signal from interrupt to streaming thread: data block read static uint8 silence_byte; // Byte value to use to fill sound buffers with silence static uint8 *audio_mix_buf = NULL; @@ -86,40 +88,36 @@ static bool open_sdl_audio(void) audio_channel_count_index = audio_channel_counts.size() - 1; } - SDL_AudioSpec audio_spec; - SDL_zero(audio_spec); - audio_spec.freq = audio_sample_rates[audio_sample_rate_index] >> 16; - audio_spec.format = (audio_sample_sizes[audio_sample_size_index] == 8) ? AUDIO_U8 : AUDIO_S16MSB; - audio_spec.channels = audio_channel_counts[audio_channel_count_index]; - audio_spec.samples = 4096; - audio_spec.callback = stream_func; - audio_spec.userdata = NULL; + SDL_AudioSpec audio_spec_desired; + SDL_zero(audio_spec_desired); + audio_spec_desired.freq = audio_sample_rates[audio_sample_rate_index] >> 16; + audio_spec_desired.format = (audio_sample_sizes[audio_sample_size_index] == 8) ? AUDIO_U8 : AUDIO_S16MSB; + audio_spec_desired.channels = audio_channel_counts[audio_channel_count_index]; + audio_spec_desired.samples = 4096; + audio_spec_desired.callback = stream_func; + audio_spec_desired.userdata = NULL; // Open the audio device, forcing the desired format - if (SDL_OpenAudio(&audio_spec, NULL) < 0) { + SDL_zero(audio_spec_obtained); + audio_device = SDL_OpenAudioDevice(NULL, 0, &audio_spec_desired, &audio_spec_obtained, 0); + if (!audio_device) { fprintf(stderr, "WARNING: Cannot open audio: %s\n", SDL_GetError()); return false; } - - // HACK: workaround a possible bug in SDL 2.0.5 (reported via https://bugzilla.libsdl.org/show_bug.cgi?id=3710 ) - // whereby SDL does not update audio_spec.size - if (audio_spec.size == 0) { - audio_spec.size = (SDL_AUDIO_BITSIZE(audio_spec.format) / 8) * audio_spec.channels * audio_spec.samples; - } #if defined(BINCUE) - OpenAudio_bincue(audio_spec.freq, audio_spec.format, audio_spec.channels, - audio_spec.silence); + OpenAudio_bincue(audio_spec_obtained.freq, audio_spec_obtained.format, audio_spec_obtained.channels, + audio_spec_obtained.silence); #endif const char * driver_name = SDL_GetCurrentAudioDriver(); printf("Using SDL/%s audio output\n", driver_name ? driver_name : ""); - silence_byte = audio_spec.silence; - SDL_PauseAudio(0); + silence_byte = audio_spec_obtained.silence; + SDL_PauseAudioDevice(audio_device, 0); // Sound buffer size = 4096 frames - audio_frames_per_block = audio_spec.samples; - audio_mix_buf = (uint8*)malloc(audio_spec.size); + audio_frames_per_block = audio_spec_obtained.samples; + audio_mix_buf = (uint8*)malloc(audio_spec_obtained.size); return true; } @@ -168,7 +166,10 @@ void AudioInit(void) static void close_audio(void) { // Close audio device - SDL_CloseAudio(); + if (audio_device) { + SDL_CloseAudioDevice(audio_device); + audio_device = 0; + } free(audio_mix_buf); audio_mix_buf = NULL; audio_open = false; @@ -231,7 +232,7 @@ static void stream_func(void *arg, uint8 *stream, int stream_len) // Send data to audio device Mac2Host_memcpy(audio_mix_buf, ReadMacInt32(apple_stream_info + scd_buffer), work_size); memset((uint8 *)stream, silence_byte, stream_len); - SDL_MixAudio(stream, audio_mix_buf, work_size, audio_volume); + SDL_MixAudioFormat(stream, audio_mix_buf, audio_spec_obtained.format, work_size, audio_volume); D(bug("stream: data written\n")); From 1983aa1652f5eba155c2889ef32c9b71de39d352 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 27 Aug 2017 18:11:48 -0400 Subject: [PATCH 43/85] try making sure that the bincue sources use the correct, SDL2 audio device ID. Untested! --- BasiliskII/src/SDL/audio_sdl.cpp | 4 ++-- BasiliskII/src/Unix/bincue_unix.cpp | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/BasiliskII/src/SDL/audio_sdl.cpp b/BasiliskII/src/SDL/audio_sdl.cpp index 7b7cb107..767e0f38 100644 --- a/BasiliskII/src/SDL/audio_sdl.cpp +++ b/BasiliskII/src/SDL/audio_sdl.cpp @@ -45,8 +45,8 @@ static int audio_sample_size_index = 0; static int audio_channel_count_index = 0; // Global variables -static SDL_AudioDeviceID audio_device = 0; -static SDL_AudioSpec audio_spec_obtained; +SDL_AudioDeviceID audio_device = 0; +SDL_AudioSpec audio_spec_obtained; static SDL_sem *audio_irq_done_sem = NULL; // Signal from interrupt to streaming thread: data block read static uint8 silence_byte; // Byte value to use to fill sound buffers with silence static uint8 *audio_mix_buf = NULL; diff --git a/BasiliskII/src/Unix/bincue_unix.cpp b/BasiliskII/src/Unix/bincue_unix.cpp index 612cf790..156c3c8f 100644 --- a/BasiliskII/src/Unix/bincue_unix.cpp +++ b/BasiliskII/src/Unix/bincue_unix.cpp @@ -49,6 +49,8 @@ static int bincue_core_audio_callback(void); #ifdef USE_SDL_AUDIO #include #include +extern SDL_AudioDeviceID audio_device; +extern SDL_AudioSpec audio_spec_obtained; #endif #include "bincue_unix.h" @@ -664,7 +666,7 @@ bool CDPlay_bincue(void *fh, uint8 start_m, uint8 start_s, uint8 start_f, MSF msf; #ifdef USE_SDL_AUDIO - SDL_LockAudio(); + SDL_LockAudioDevice(audio_device); #endif player.audiostatus = CDROM_AUDIO_NO_STATUS; @@ -709,7 +711,7 @@ bool CDPlay_bincue(void *fh, uint8 start_m, uint8 start_s, uint8 start_f, D(bug("CDPlay_bincue: play beyond last track !\n")); #ifdef USE_SDL_AUDIO - SDL_UnlockAudio(); + SDL_UnlockAudioDevice(audio_device); #endif if (audio_enabled) { @@ -804,7 +806,7 @@ void MixAudio_bincue(uint8 *stream, int stream_len) if (audio_enabled && (player.audiostatus == CDROM_AUDIO_PLAY)) { uint8 *buf = fill_buffer(stream_len); if (buf) - SDL_MixAudio(stream, buf, stream_len, SDL_MIX_MAXVOLUME); + SDL_MixAudioFormat(stream, buf, audio_spec_obtained.format, stream_len, SDL_MIX_MAXVOLUME); } } From dbd997fa47f3507946d88a341e041b0bb1a1d81c Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Wed, 30 Aug 2017 12:17:37 -0400 Subject: [PATCH 44/85] fixed issue #20: GTK preference UI was broken in both Linux and Mac OS X --- .../src/MacOSX/BasiliskII.xcodeproj/project.pbxproj | 2 ++ BasiliskII/src/MacOSX/config.h | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index 68194be6..bf11722d 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -1227,6 +1227,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", HAVE_CONFIG_H, + "USE_XCODE=1", "DEBUG=1", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -1281,6 +1282,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", HAVE_CONFIG_H, + "USE_XCODE=1", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; diff --git a/BasiliskII/src/MacOSX/config.h b/BasiliskII/src/MacOSX/config.h index e88fee35..76393d47 100644 --- a/BasiliskII/src/MacOSX/config.h +++ b/BasiliskII/src/MacOSX/config.h @@ -1,6 +1,13 @@ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ +#if ! USE_XCODE +// HACK, dludwig@pobox.com: Unless we are building with Xcode, use the +// config.h file that Autotools generates. This is located in +// BasiliskII/src/Unix/ +#include "../Unix/config.h" +#else + /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ @@ -811,3 +818,4 @@ #define FPU_UAE 1 //#define FPU_IMPLEMENTATION 1 +#endif From bcd784d7c4dbade5c6b218e70e6508cbd6c06d84 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Fri, 1 Sep 2017 18:48:40 -0400 Subject: [PATCH 45/85] SheepShaver: make Autotools use SDL2 --- SheepShaver/src/Unix/configure.ac | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) mode change 100644 => 100755 SheepShaver/src/Unix/configure.ac diff --git a/SheepShaver/src/Unix/configure.ac b/SheepShaver/src/Unix/configure.ac old mode 100644 new mode 100755 index 11e4c10a..1ece6588 --- a/SheepShaver/src/Unix/configure.ac +++ b/SheepShaver/src/Unix/configure.ac @@ -160,7 +160,7 @@ AC_DEFUN([AC_CHECK_SDLFRAMEWORK], [ fi fi saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$SDL_FRAMEWORK/SDL.framework/Headers" + CPPFLAGS="$CPPFLAGS -I$SDL_FRAMEWORK/SDL2.framework/Headers" AC_TRY_LINK( [$2 #undef main], [], @@ -189,22 +189,22 @@ if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; then fi if [[ "x$WANT_SDL" = "xyes" ]]; then if [[ "x$WANT_SDL_FRAMEWORK" = "xyes" ]]; then - AC_CHECK_SDLFRAMEWORK(SDL, [#include ]) + AC_CHECK_SDLFRAMEWORK(SDL2, [#include ]) else ac_cv_framework_SDL=no fi if [[ "x$ac_cv_framework_SDL" = "xno" ]]; then - AC_PATH_PROG(sdl_config, "sdl-config") - if [[ -n "$sdl_config" ]]; then - sdl_cflags=`$sdl_config --cflags` + AC_PATH_PROG(sdl2_config, "sdl2-config") + if [[ -n "$sdl2_config" ]]; then + sdl2_cflags=`$sdl2_config --cflags` if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then - sdl_libs=`$sdl_config --static-libs` + sdl2_libs=`$sdl2_config --static-libs` else - sdl_libs=`$sdl_config --libs` + sdl2_libs=`$sdl2_config --libs` fi - CFLAGS="$CFLAGS $sdl_cflags" - CXXFLAGS="$CXXFLAGS $sdl_cflags" - LIBS="$LIBS $sdl_libs" + CFLAGS="$CFLAGS $sdl2_cflags" + CXXFLAGS="$CXXFLAGS $sdl2_cflags" + LIBS="$LIBS $sdl2_libs" else WANT_SDL=no WANT_SDL_VIDEO=no @@ -702,9 +702,6 @@ AC_SUBST(SLIRP_SRCS) dnl SDL overrides if [[ "x$WANT_SDL" = "xyes" ]]; then AC_DEFINE(USE_SDL, 1, [Define to enble SDL support.]) - if [[ "x$WANT_SDL_FRAMEWORK" = "xyes" ]]; then - EXTRASYSSRCS="$EXTRASYSSRCS ../SDL/SDLMain.m" - fi fi if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; then AC_DEFINE(USE_SDL_VIDEO, 1, [Define to enable SDL video graphics support.]) From cd57af779595e0e87b9a08b50a52fb2146292219 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 2 Sep 2017 10:58:53 -0400 Subject: [PATCH 46/85] Basilisk II, bug-fix: on Mac, mouse-grabbing via Ctrl+F5 wasn't changing the title of the window --- .../BasiliskII.xcodeproj/project.pbxproj | 8 ++-- BasiliskII/src/SDL/video_sdl.cpp | 38 +++++++++++++++---- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index bf11722d..cd96c0e5 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -99,13 +99,13 @@ 7539E2911F23C56F006B2DF2 /* prefs_editor_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2881F23C56F006B2DF2 /* prefs_editor_dummy.cpp */; }; 7539E2921F23C56F006B2DF2 /* scsi_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2891F23C56F006B2DF2 /* scsi_dummy.cpp */; }; 7539E2931F23C56F006B2DF2 /* serial_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E28A1F23C56F006B2DF2 /* serial_dummy.cpp */; }; - 7539E2941F23C56F006B2DF2 /* user_strings_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E28B1F23C56F006B2DF2 /* user_strings_dummy.cpp */; }; 7539E2971F23C5FD006B2DF2 /* newcpu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2961F23C5FD006B2DF2 /* newcpu.cpp */; }; 7539E29D1F23C83F006B2DF2 /* sys_darwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E29C1F23C83F006B2DF2 /* sys_darwin.cpp */; }; 7539E29F1F23C939006B2DF2 /* fpu_uae.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E29E1F23C939006B2DF2 /* fpu_uae.cpp */; }; 7539E2AB1F23CDB7006B2DF2 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 7539E2AA1F23CDB7006B2DF2 /* Info.plist */; }; 756C1B341F252FC100620917 /* utils_macosx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 756C1B331F252FC100620917 /* utils_macosx.mm */; }; 756C1B391F25306A00620917 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 756C1B381F25306A00620917 /* AppKit.framework */; }; + 757A2BF01F5AF9D6003EDB01 /* user_strings_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 757A2BEF1F5AF9D6003EDB01 /* user_strings_unix.cpp */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -368,7 +368,6 @@ 7539E2881F23C56F006B2DF2 /* prefs_editor_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = prefs_editor_dummy.cpp; sourceTree = ""; }; 7539E2891F23C56F006B2DF2 /* scsi_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = scsi_dummy.cpp; sourceTree = ""; }; 7539E28A1F23C56F006B2DF2 /* serial_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = serial_dummy.cpp; sourceTree = ""; }; - 7539E28B1F23C56F006B2DF2 /* user_strings_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = user_strings_dummy.cpp; sourceTree = ""; }; 7539E2961F23C5FD006B2DF2 /* newcpu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = newcpu.cpp; sourceTree = ""; }; 7539E29C1F23C83F006B2DF2 /* sys_darwin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sys_darwin.cpp; sourceTree = ""; }; 7539E29E1F23C939006B2DF2 /* fpu_uae.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fpu_uae.cpp; sourceTree = ""; }; @@ -376,6 +375,7 @@ 756C1B321F252FC100620917 /* utils_macosx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils_macosx.h; sourceTree = ""; }; 756C1B331F252FC100620917 /* utils_macosx.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = utils_macosx.mm; sourceTree = ""; }; 756C1B381F25306A00620917 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 757A2BEF1F5AF9D6003EDB01 /* user_strings_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = user_strings_unix.cpp; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -713,6 +713,7 @@ 7539E2311F23B32A006B2DF2 /* tinyxml2.cpp */, 7539E2321F23B32A006B2DF2 /* tinyxml2.h */, 7539E2331F23B32A006B2DF2 /* tunconfig */, + 757A2BEF1F5AF9D6003EDB01 /* user_strings_unix.cpp */, 7539E2351F23B32A006B2DF2 /* user_strings_unix.h */, ); name = Unix; @@ -760,7 +761,6 @@ 7539E2881F23C56F006B2DF2 /* prefs_editor_dummy.cpp */, 7539E2891F23C56F006B2DF2 /* scsi_dummy.cpp */, 7539E28A1F23C56F006B2DF2 /* serial_dummy.cpp */, - 7539E28B1F23C56F006B2DF2 /* user_strings_dummy.cpp */, ); name = dummy; path = ../dummy; @@ -1070,11 +1070,11 @@ 7539E12D1F23B25A006B2DF2 /* ether.cpp in Sources */, 7539E26C1F23B32A006B2DF2 /* sshpty.c in Sources */, 7539E1781F23B25A006B2DF2 /* serial.cpp in Sources */, + 757A2BF01F5AF9D6003EDB01 /* user_strings_unix.cpp in Sources */, 7539E1991F23B25A006B2DF2 /* flags.cpp in Sources */, 7539E2921F23C56F006B2DF2 /* scsi_dummy.cpp in Sources */, 7539E16F1F23B25A006B2DF2 /* prefs_items.cpp in Sources */, 7539E18E1F23B25A006B2DF2 /* sony.cpp in Sources */, - 7539E2941F23C56F006B2DF2 /* user_strings_dummy.cpp in Sources */, 7539E26F1F23B32A006B2DF2 /* timer_unix.cpp in Sources */, 7539E12E1F23B25A006B2DF2 /* extfs.cpp in Sources */, 7539E23F1F23B32A006B2DF2 /* bincue_unix.cpp in Sources */, diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index e3797e98..96c43b7b 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -1053,11 +1053,11 @@ void driver_base::restore_mouse_accel(void) // Toggle mouse grab void driver_base::toggle_mouse_grab(void) { - if (mouse_grabbed) - ungrab_mouse(); - else - grab_mouse(); - } + if (mouse_grabbed) + ungrab_mouse(); + else + grab_mouse(); +} // Grab mouse, switch to relative mouse mode void driver_base::grab_mouse(void) @@ -1905,7 +1905,7 @@ static int kc_decode(SDL_Keysym const & ks, bool key_down) case SDLK_F2: return 0x78; case SDLK_F3: return 0x63; case SDLK_F4: return 0x76; - case SDLK_F5: if (is_ctrl_down(ks)) {if (!key_down) drv->toggle_mouse_grab(); return -2;} else return 0x60; + case SDLK_F5: return 0x60; case SDLK_F6: return 0x61; case SDLK_F7: return 0x62; case SDLK_F8: return 0x64; @@ -1967,9 +1967,33 @@ static void force_complete_window_refresh() * SDL event handling */ +// possible return codes for SDL-registered event watches +enum : int { + EVENT_DROP_FROM_QUEUE = 0, + EVENT_ADD_TO_QUEUE = 1 +}; + +// Some events need to be processed in the host-app's main thread, due to +// host-OS requirements. +// +// This function is called by SDL, whenever it generates an SDL_Event. It has +// the ability to process events, and optionally, to prevent them from being +// added to SDL's event queue (and retrieve-able via SDL_PeepEvents(), etc.) static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event) { switch (event->type) { + case SDL_KEYUP: { + SDL_Keysym const & ks = event->key.keysym; + switch (ks.sym) { + case SDLK_F5: { + if (is_ctrl_down(ks)) { + drv->toggle_mouse_grab(); + return EVENT_DROP_FROM_QUEUE; + } + } break; + } + } break; + case SDL_WINDOWEVENT: { switch (event->window.event) { case SDL_WINDOWEVENT_RESIZED: { @@ -2000,7 +2024,7 @@ static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event) } break; } - return 1; // return 1 to add event to queue, 0 to drop it + return EVENT_ADD_TO_QUEUE; } From 0f8f30f6390740563accd319f95cf424cb1483b6 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 2 Sep 2017 15:36:56 -0400 Subject: [PATCH 47/85] Basilisk II, bug-fix: switching to fullscreen, via Ctrl+Enter, on a non-primary host display, could cause mouse cursor to jump to a different display This bug was observed occurring on an OSX 10.12 host. --- BasiliskII/src/SDL/video_sdl.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 96c43b7b..dd74d2d4 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -1478,10 +1478,6 @@ static void do_toggle_fullscreen(void) while (!thread_stop_ack) ; #endif - // save the mouse position - int x, y; - SDL_GetMouseState(&x, &y); - // Apply fullscreen if (sdl_window) { if (display_type == DISPLAY_SCREEN) { @@ -1507,9 +1503,6 @@ static void do_toggle_fullscreen(void) // while SetVideoMode is happening, control key up may be missed ADBKeyUp(0x36); - - // restore the mouse position - SDL_WarpMouseGlobal(x, y); // resume redraw thread toggle_fullscreen = false; From 7a36983f11088ec5b24933c582e1d63d5341e29c Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 2 Sep 2017 15:54:33 -0400 Subject: [PATCH 48/85] fixed issue #27: on OS X host, mouse can get locked to portion of fullscreen display --- BasiliskII/src/SDL/video_sdl.cpp | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index dd74d2d4..679c829c 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -169,6 +169,7 @@ static int redraw_func(void *arg); static int update_sdl_video(); static int present_sdl_video(); static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event); +static bool is_fullscreen(SDL_Window *); // From sys_unix.cpp extern void SysMountFirstFloppy(void); @@ -1059,14 +1060,24 @@ void driver_base::toggle_mouse_grab(void) grab_mouse(); } +static void update_mouse_grab() +{ + if (mouse_grabbed || is_fullscreen(sdl_window)) { + SDL_SetRelativeMouseMode(SDL_TRUE); + } else { + SDL_SetRelativeMouseMode(SDL_FALSE); + } +} + // Grab mouse, switch to relative mouse mode void driver_base::grab_mouse(void) { if (!mouse_grabbed) { - set_grab_mode(true); + mouse_grabbed = true; + update_mouse_grab(); set_window_name(STR_WINDOW_TITLE_GRABBED); disable_mouse_accel(); - ADBSetRelMouseMode(mouse_grabbed = true); + ADBSetRelMouseMode(true); } } @@ -1074,10 +1085,11 @@ void driver_base::grab_mouse(void) void driver_base::ungrab_mouse(void) { if (mouse_grabbed) { - set_grab_mode(false); + mouse_grabbed = false; + update_mouse_grab(); set_window_name(STR_WINDOW_TITLE); restore_mouse_accel(); - ADBSetRelMouseMode(mouse_grabbed = false); + ADBSetRelMouseMode(false); } } @@ -1518,7 +1530,7 @@ static void do_toggle_fullscreen(void) /* * Execute video VBL routine */ - + static bool is_fullscreen(SDL_Window * window) { #ifdef __MACOSX__ @@ -1758,6 +1770,7 @@ void video_set_cursor(void) if (visible) { int x, y; SDL_GetMouseState(&x, &y); + printf("WarpMouse to {%d,%d} via video_set_cursor\n", x, y); SDL_WarpMouseGlobal(x, y); } } @@ -2006,11 +2019,10 @@ static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event) // fixes an issue on OSX hosts whereby a fullscreen window // can, in some cases, be dragged around. // ( https://github.com/DavidLudwig/macemu/issues/19 ) - if (is_fullscreen(sdl_window)) { - SDL_SetRelativeMouseMode(SDL_TRUE); - } else { - SDL_SetRelativeMouseMode(SDL_FALSE); - } + // + // Calling update_mouse_grab() will lead to SDL_SetRelativeMouseMode() + // being called, as appropriate. + update_mouse_grab(); } } break; } From 573ffee8b1698426f3817ddd3f32a6999b345d0f Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 4 Sep 2017 11:41:26 -0400 Subject: [PATCH 49/85] fixed issue #31, "on multi-monitor OS X host: cursor can get locked to fullscreen display for guest OS" --- BasiliskII/src/MacOSX/utils_macosx.mm | 5 +++++ BasiliskII/src/SDL/video_sdl.cpp | 24 +++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/BasiliskII/src/MacOSX/utils_macosx.mm b/BasiliskII/src/MacOSX/utils_macosx.mm index c047e275..b1004038 100644 --- a/BasiliskII/src/MacOSX/utils_macosx.mm +++ b/BasiliskII/src/MacOSX/utils_macosx.mm @@ -56,3 +56,8 @@ bool is_fullscreen_osx(SDL_Window * window) const NSWindowStyleMask styleMask = [wmInfo.info.cocoa.window styleMask]; return (styleMask & NSWindowStyleMaskFullScreen) != 0; } + +void set_menu_bar_visible_osx(bool visible) +{ + [NSMenu setMenuBarVisible:(visible ? YES : NO)]; +} diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 679c829c..26a14829 100755 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -1062,7 +1062,7 @@ void driver_base::toggle_mouse_grab(void) static void update_mouse_grab() { - if (mouse_grabbed || is_fullscreen(sdl_window)) { + if (mouse_grabbed) { SDL_SetRelativeMouseMode(SDL_TRUE); } else { SDL_SetRelativeMouseMode(SDL_FALSE); @@ -1978,7 +1978,7 @@ enum : int { EVENT_DROP_FROM_QUEUE = 0, EVENT_ADD_TO_QUEUE = 1 }; - + // Some events need to be processed in the host-app's main thread, due to // host-OS requirements. // @@ -2014,15 +2014,17 @@ static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event) (display_type == DISPLAY_SCREEN && !is_full); if (adjust_fullscreen) { do_toggle_fullscreen(); - - // Utilizing SDL2's 'relative mouse mode', when in fullscreen, - // fixes an issue on OSX hosts whereby a fullscreen window - // can, in some cases, be dragged around. - // ( https://github.com/DavidLudwig/macemu/issues/19 ) - // - // Calling update_mouse_grab() will lead to SDL_SetRelativeMouseMode() - // being called, as appropriate. - update_mouse_grab(); + +#if __MACOSX__ + // HACK-FIX: on OSX hosts, make sure that the OSX menu + // bar does not show up in fullscreen mode, when the + // cursor is near the top of the screen, lest the + // guest OS' menu bar be obscured. + if (is_full) { + extern void set_menu_bar_visible_osx(bool); + set_menu_bar_visible_osx(false); + } +#endif } } break; } From 22eaa317a860e354980a5b8534db513b2723d980 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 4 Sep 2017 12:13:50 -0400 Subject: [PATCH 50/85] reverted to SDL 1.x compatible audio APIs (which still work in SDL2) --- BasiliskII/src/SDL/audio_sdl.cpp | 47 ++++++++++++++--------------- BasiliskII/src/Unix/bincue_unix.cpp | 8 ++--- 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/BasiliskII/src/SDL/audio_sdl.cpp b/BasiliskII/src/SDL/audio_sdl.cpp index 767e0f38..130afe6b 100644 --- a/BasiliskII/src/SDL/audio_sdl.cpp +++ b/BasiliskII/src/SDL/audio_sdl.cpp @@ -45,8 +45,6 @@ static int audio_sample_size_index = 0; static int audio_channel_count_index = 0; // Global variables -SDL_AudioDeviceID audio_device = 0; -SDL_AudioSpec audio_spec_obtained; static SDL_sem *audio_irq_done_sem = NULL; // Signal from interrupt to streaming thread: data block read static uint8 silence_byte; // Byte value to use to fill sound buffers with silence static uint8 *audio_mix_buf = NULL; @@ -88,36 +86,40 @@ static bool open_sdl_audio(void) audio_channel_count_index = audio_channel_counts.size() - 1; } - SDL_AudioSpec audio_spec_desired; - SDL_zero(audio_spec_desired); - audio_spec_desired.freq = audio_sample_rates[audio_sample_rate_index] >> 16; - audio_spec_desired.format = (audio_sample_sizes[audio_sample_size_index] == 8) ? AUDIO_U8 : AUDIO_S16MSB; - audio_spec_desired.channels = audio_channel_counts[audio_channel_count_index]; - audio_spec_desired.samples = 4096; - audio_spec_desired.callback = stream_func; - audio_spec_desired.userdata = NULL; + SDL_AudioSpec audio_spec; + SDL_zero(audio_spec); + audio_spec.freq = audio_sample_rates[audio_sample_rate_index] >> 16; + audio_spec.format = (audio_sample_sizes[audio_sample_size_index] == 8) ? AUDIO_U8 : AUDIO_S16MSB; + audio_spec.channels = audio_channel_counts[audio_channel_count_index]; + audio_spec.samples = 4096; + audio_spec.callback = stream_func; + audio_spec.userdata = NULL; // Open the audio device, forcing the desired format - SDL_zero(audio_spec_obtained); - audio_device = SDL_OpenAudioDevice(NULL, 0, &audio_spec_desired, &audio_spec_obtained, 0); - if (!audio_device) { + if (SDL_OpenAudio(&audio_spec, NULL) < 0) { fprintf(stderr, "WARNING: Cannot open audio: %s\n", SDL_GetError()); return false; } + + // HACK: workaround a bug in SDL pre-2.0.6 (reported via https://bugzilla.libsdl.org/show_bug.cgi?id=3710 ) + // whereby SDL does not update audio_spec.size + if (audio_spec.size == 0) { + audio_spec.size = (SDL_AUDIO_BITSIZE(audio_spec.format) / 8) * audio_spec.channels * audio_spec.samples; + } #if defined(BINCUE) - OpenAudio_bincue(audio_spec_obtained.freq, audio_spec_obtained.format, audio_spec_obtained.channels, - audio_spec_obtained.silence); + OpenAudio_bincue(audio_spec.freq, audio_spec.format, audio_spec.channels, + audio_spec.silence); #endif const char * driver_name = SDL_GetCurrentAudioDriver(); printf("Using SDL/%s audio output\n", driver_name ? driver_name : ""); - silence_byte = audio_spec_obtained.silence; - SDL_PauseAudioDevice(audio_device, 0); + silence_byte = audio_spec.silence; + SDL_PauseAudio(0); // Sound buffer size = 4096 frames - audio_frames_per_block = audio_spec_obtained.samples; - audio_mix_buf = (uint8*)malloc(audio_spec_obtained.size); + audio_frames_per_block = audio_spec.samples; + audio_mix_buf = (uint8*)malloc(audio_spec.size); return true; } @@ -166,10 +168,7 @@ void AudioInit(void) static void close_audio(void) { // Close audio device - if (audio_device) { - SDL_CloseAudioDevice(audio_device); - audio_device = 0; - } + SDL_CloseAudio(); free(audio_mix_buf); audio_mix_buf = NULL; audio_open = false; @@ -232,7 +231,7 @@ static void stream_func(void *arg, uint8 *stream, int stream_len) // Send data to audio device Mac2Host_memcpy(audio_mix_buf, ReadMacInt32(apple_stream_info + scd_buffer), work_size); memset((uint8 *)stream, silence_byte, stream_len); - SDL_MixAudioFormat(stream, audio_mix_buf, audio_spec_obtained.format, work_size, audio_volume); + SDL_MixAudio(stream, audio_mix_buf, work_size, audio_volume); D(bug("stream: data written\n")); diff --git a/BasiliskII/src/Unix/bincue_unix.cpp b/BasiliskII/src/Unix/bincue_unix.cpp index 156c3c8f..612cf790 100644 --- a/BasiliskII/src/Unix/bincue_unix.cpp +++ b/BasiliskII/src/Unix/bincue_unix.cpp @@ -49,8 +49,6 @@ static int bincue_core_audio_callback(void); #ifdef USE_SDL_AUDIO #include #include -extern SDL_AudioDeviceID audio_device; -extern SDL_AudioSpec audio_spec_obtained; #endif #include "bincue_unix.h" @@ -666,7 +664,7 @@ bool CDPlay_bincue(void *fh, uint8 start_m, uint8 start_s, uint8 start_f, MSF msf; #ifdef USE_SDL_AUDIO - SDL_LockAudioDevice(audio_device); + SDL_LockAudio(); #endif player.audiostatus = CDROM_AUDIO_NO_STATUS; @@ -711,7 +709,7 @@ bool CDPlay_bincue(void *fh, uint8 start_m, uint8 start_s, uint8 start_f, D(bug("CDPlay_bincue: play beyond last track !\n")); #ifdef USE_SDL_AUDIO - SDL_UnlockAudioDevice(audio_device); + SDL_UnlockAudio(); #endif if (audio_enabled) { @@ -806,7 +804,7 @@ void MixAudio_bincue(uint8 *stream, int stream_len) if (audio_enabled && (player.audiostatus == CDROM_AUDIO_PLAY)) { uint8 *buf = fill_buffer(stream_len); if (buf) - SDL_MixAudioFormat(stream, buf, audio_spec_obtained.format, stream_len, SDL_MIX_MAXVOLUME); + SDL_MixAudio(stream, buf, stream_len, SDL_MIX_MAXVOLUME); } } From f8682679c23d90d55797f5a9702e09c619b1994f Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 4 Sep 2017 12:18:52 -0400 Subject: [PATCH 51/85] moved SDL2 video code to video_sdl2.cpp; restored SDL1 implementation of video_sdl.cpp --- .../BasiliskII.xcodeproj/project.pbxproj | 8 +- BasiliskII/src/SDL/video_sdl.cpp | 631 +--- BasiliskII/src/SDL/video_sdl2.cpp | 2601 +++++++++++++++++ 3 files changed, 2752 insertions(+), 488 deletions(-) mode change 100755 => 100644 BasiliskII/src/SDL/video_sdl.cpp create mode 100755 BasiliskII/src/SDL/video_sdl2.cpp diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index cd96c0e5..232f5f5e 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -51,7 +51,6 @@ 7539E1731F23B25A006B2DF2 /* scsi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0701F23B25A006B2DF2 /* scsi.cpp */; }; 7539E1741F23B25A006B2DF2 /* audio_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0721F23B25A006B2DF2 /* audio_sdl.cpp */; }; 7539E1751F23B25A006B2DF2 /* keycodes in Resources */ = {isa = PBXBuildFile; fileRef = 7539E0731F23B25A006B2DF2 /* keycodes */; }; - 7539E1771F23B25A006B2DF2 /* video_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0761F23B25A006B2DF2 /* video_sdl.cpp */; }; 7539E1781F23B25A006B2DF2 /* serial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0771F23B25A006B2DF2 /* serial.cpp */; }; 7539E18D1F23B25A006B2DF2 /* slot_rom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0A21F23B25A006B2DF2 /* slot_rom.cpp */; }; 7539E18E1F23B25A006B2DF2 /* sony.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E0A31F23B25A006B2DF2 /* sony.cpp */; }; @@ -106,6 +105,7 @@ 756C1B341F252FC100620917 /* utils_macosx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 756C1B331F252FC100620917 /* utils_macosx.mm */; }; 756C1B391F25306A00620917 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 756C1B381F25306A00620917 /* AppKit.framework */; }; 757A2BF01F5AF9D6003EDB01 /* user_strings_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 757A2BEF1F5AF9D6003EDB01 /* user_strings_unix.cpp */; }; + 75CBCF751F5DB3AD00830063 /* video_sdl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75CBCF741F5DB3AD00830063 /* video_sdl2.cpp */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -288,7 +288,6 @@ 7539E0701F23B25A006B2DF2 /* scsi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = scsi.cpp; path = ../scsi.cpp; sourceTree = ""; }; 7539E0721F23B25A006B2DF2 /* audio_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audio_sdl.cpp; sourceTree = ""; }; 7539E0731F23B25A006B2DF2 /* keycodes */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = keycodes; sourceTree = ""; }; - 7539E0761F23B25A006B2DF2 /* video_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = video_sdl.cpp; sourceTree = ""; }; 7539E0771F23B25A006B2DF2 /* serial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = serial.cpp; path = ../serial.cpp; sourceTree = ""; }; 7539E0A21F23B25A006B2DF2 /* slot_rom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = slot_rom.cpp; path = ../slot_rom.cpp; sourceTree = ""; }; 7539E0A31F23B25A006B2DF2 /* sony.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sony.cpp; path = ../sony.cpp; sourceTree = ""; }; @@ -376,6 +375,7 @@ 756C1B331F252FC100620917 /* utils_macosx.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = utils_macosx.mm; sourceTree = ""; }; 756C1B381F25306A00620917 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 757A2BEF1F5AF9D6003EDB01 /* user_strings_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = user_strings_unix.cpp; sourceTree = ""; }; + 75CBCF741F5DB3AD00830063 /* video_sdl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = video_sdl2.cpp; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -584,7 +584,7 @@ 752F27001F242BAF001032B4 /* prefs_sdl.cpp */, 7539E0721F23B25A006B2DF2 /* audio_sdl.cpp */, 7539E0731F23B25A006B2DF2 /* keycodes */, - 7539E0761F23B25A006B2DF2 /* video_sdl.cpp */, + 75CBCF741F5DB3AD00830063 /* video_sdl2.cpp */, ); name = SDL; path = ../SDL; @@ -1038,7 +1038,6 @@ 7539E1A01F23B25A006B2DF2 /* memory.cpp in Sources */, 753253351F53688D0024025B /* readcpu.cpp in Sources */, 7539E1741F23B25A006B2DF2 /* audio_sdl.cpp in Sources */, - 7539E1771F23B25A006B2DF2 /* video_sdl.cpp in Sources */, 753252EE1F535DD10024025B /* defs68k.c in Sources */, 7539E29F1F23C939006B2DF2 /* fpu_uae.cpp in Sources */, 7539E1E21F23B25A006B2DF2 /* video.cpp in Sources */, @@ -1056,6 +1055,7 @@ 7539E1901F23B25A006B2DF2 /* basilisk_glue.cpp in Sources */, 7539E2801F23C4CA006B2DF2 /* main_unix.cpp in Sources */, 7539E1E11F23B25A006B2DF2 /* user_strings.cpp in Sources */, + 75CBCF751F5DB3AD00830063 /* video_sdl2.cpp in Sources */, 752F27011F242BAF001032B4 /* prefs_sdl.cpp in Sources */, 7539E2971F23C5FD006B2DF2 /* newcpu.cpp in Sources */, 7539E12A1F23B25A006B2DF2 /* vm_alloc.cpp in Sources */, diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp old mode 100755 new mode 100644 index 26a14829..798ed8e8 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -51,7 +51,7 @@ #include /* alloca() */ #endif -#include +#include "cpu_emulation.h" #include "main.h" #include "adb.h" #include "macos_util.h" @@ -87,8 +87,6 @@ static int display_type = DISPLAY_WINDOW; // See enum above // Constants #ifdef WIN32 const char KEYCODE_FILE_NAME[] = "BasiliskII_keycodes"; -#elif __MACOSX__ -const char KEYCODE_FILE_NAME[] = "BasiliskII_keycodes"; #else const char KEYCODE_FILE_NAME[] = DATADIR "/keycodes"; #endif @@ -129,18 +127,12 @@ static bool use_keycodes = false; // Flag: Use keycodes rather than keysyms static int keycode_table[256]; // X keycode -> Mac keycode translation table // SDL variables -SDL_Window * sdl_window = NULL; // Wraps an OS-native window -static SDL_Surface * host_surface = NULL; // Surface in host-OS display format -static SDL_Surface * guest_surface = NULL; // Surface in guest-OS display format -static SDL_Renderer * sdl_renderer = NULL; // Handle to SDL2 renderer -static SDL_threadID sdl_renderer_thread_id = 0; // Thread ID where the SDL_renderer was created, and SDL_renderer ops should run (for compatibility w/ d3d9) -static SDL_Texture * sdl_texture = NULL; // Handle to a GPU texture, with which to draw guest_surface to static int screen_depth; // Depth of current screen -static SDL_Cursor *sdl_cursor = NULL; // Copy of Mac cursor -static SDL_Palette *sdl_palette = NULL; // Color palette to be used as CLUT and gamma table +static SDL_Cursor *sdl_cursor; // Copy of Mac cursor +static SDL_Color sdl_palette[256]; // Color palette to be used as CLUT and gamma table static bool sdl_palette_changed = false; // Flag: Palette changed, redraw thread must set new colors static bool toggle_fullscreen = false; -static bool did_add_event_watch = false; +static const int sdl_eventmask = SDL_MOUSEEVENTMASK | SDL_KEYEVENTMASK | SDL_VIDEOEXPOSEMASK | SDL_QUITMASK | SDL_ACTIVEEVENTMASK; static bool mouse_grabbed = false; @@ -166,10 +158,6 @@ static void (*video_refresh)(void); // Prototypes static int redraw_func(void *arg); -static int update_sdl_video(); -static int present_sdl_video(); -static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event); -static bool is_fullscreen(SDL_Window *); // From sys_unix.cpp extern void SysMountFirstFloppy(void); @@ -181,7 +169,7 @@ extern void SysMountFirstFloppy(void); #ifdef ENABLE_VOSF #define SDL_VIDEO_LOCK_VOSF_SURFACE(SURFACE) do { \ - if (sdl_window && SDL_GetWindowFlags(sdl_window) & (SDL_WINDOW_FULLSCREEN)) \ + if ((SURFACE)->flags & (SDL_HWSURFACE | SDL_FULLSCREEN)) \ the_host_buffer = (uint8 *)(SURFACE)->pixels; \ } while (0) #else @@ -207,9 +195,6 @@ extern void SysMountFirstFloppy(void); static void *vm_acquire_framebuffer(uint32 size) { -#if __MACOSX__ - return calloc(1, size); -#else // always try to reallocate framebuffer at the same address static void *fb = VM_MAP_FAILED; if (fb != VM_MAP_FAILED) { @@ -223,16 +208,11 @@ static void *vm_acquire_framebuffer(uint32 size) if (fb == VM_MAP_FAILED) fb = vm_acquire(size, VM_MAP_DEFAULT | VM_MAP_32BIT); return fb; -#endif } static inline void vm_release_framebuffer(void *fb, uint32 size) { -#if __MACOSX__ - free(fb); -#else vm_release(fb, size); -#endif } static inline int get_customized_color_depth(int default_depth) @@ -438,15 +418,25 @@ static int sdl_depth_of_video_depth(int video_depth) // Get screen dimensions static void sdl_display_dimensions(int &width, int &height) { - SDL_DisplayMode desktop_mode; - const int display_index = 0; // TODO: try supporting multiple displays - if (SDL_GetDesktopDisplayMode(display_index, &desktop_mode) != 0) { - // TODO: report a warning, here? - width = height = 0; - return; + static int max_width, max_height; + if (max_width == 0 && max_height == 0) { + max_width = 640 ; max_height = 480; + SDL_Rect **modes = SDL_ListModes(NULL, SDL_FULLSCREEN | SDL_HWSURFACE); + if (modes && modes != (SDL_Rect **)-1) { + // It turns out that on some implementations, and contrary to the documentation, + // the returned list is not sorted from largest to smallest (e.g. Windows) + for (int i = 0; modes[i] != NULL; i++) { + const int w = modes[i]->w; + const int h = modes[i]->h; + if (w > max_width && h > max_height) { + max_width = w; + max_height = h; + } + } + } } - width = desktop_mode.w; - height = desktop_mode.h; + width = max_width; + height = max_height; } static inline int sdl_display_width(void) @@ -476,8 +466,10 @@ static bool has_mode(int type, int width, int height, int depth) if (width > sdl_display_width() || height > sdl_display_height()) return false; - // Whatever size it is, beyond what we've checked, we'll scale to/from as appropriate. - return true; + // Rely on SDL capabilities + return SDL_VideoModeOK(width, height, + sdl_depth_of_video_depth(depth), + SDL_HWSURFACE | (type == DISPLAY_SCREEN ? SDL_FULLSCREEN : 0)) != 0; } // Add mode to list of supported modes @@ -530,20 +522,18 @@ static void set_mac_frame_buffer(SDL_monitor_desc &monitor, int depth, bool nati // Set window name and class static void set_window_name(int name) { - if (!sdl_window) { - return; + const SDL_VideoInfo *vi = SDL_GetVideoInfo(); + if (vi && vi->wm_available) { + const char *str = GetString(name); + SDL_WM_SetCaption(str, str); } - const char *str = GetString(name); - SDL_SetWindowTitle(sdl_window, str); } // Set mouse grab mode -static void set_grab_mode(bool grab) +static SDL_GrabMode set_grab_mode(SDL_GrabMode mode) { - if (!sdl_window) { - return; - } - SDL_SetWindowGrab(sdl_window, grab ? SDL_TRUE : SDL_FALSE); + const SDL_VideoInfo *vi = SDL_GetVideoInfo(); + return (vi && vi->wm_available ? SDL_WM_GrabInput(mode) : SDL_GRAB_OFF); } // Migrate preferences items (XXX to be handled in MigratePrefs()) @@ -647,256 +637,11 @@ driver_base::driver_base(SDL_monitor_desc &m) the_buffer_copy = NULL; } -static void delete_sdl_video_surfaces() -{ - if (sdl_texture) { - SDL_DestroyTexture(sdl_texture); - sdl_texture = NULL; - } - - if (host_surface) { - if (host_surface == guest_surface) { - guest_surface = NULL; - } - - SDL_FreeSurface(host_surface); - host_surface = NULL; - } - - if (guest_surface) { - SDL_FreeSurface(guest_surface); - guest_surface = NULL; - } -} - -static void delete_sdl_video_window() -{ - if (sdl_renderer) { - SDL_DestroyRenderer(sdl_renderer); - sdl_renderer = NULL; - } - - if (sdl_window) { - SDL_DestroyWindow(sdl_window); - sdl_window = NULL; - } -} - -static void shutdown_sdl_video() -{ - delete_sdl_video_surfaces(); - delete_sdl_video_window(); -} - -static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags) -{ - if (guest_surface) { - delete_sdl_video_surfaces(); - } - - int window_width = width; - int window_height = height; - Uint32 window_flags = 0; - const int window_flags_to_monitor = SDL_WINDOW_FULLSCREEN; - - if (flags & SDL_WINDOW_FULLSCREEN) { - SDL_DisplayMode desktop_mode; - if (SDL_GetDesktopDisplayMode(0, &desktop_mode) != 0) { - shutdown_sdl_video(); - return NULL; - } - window_flags |= SDL_WINDOW_FULLSCREEN_DESKTOP; - window_width = desktop_mode.w; - window_height = desktop_mode.h; - } - - if (sdl_window) { - int old_window_width, old_window_height, old_window_flags; - SDL_GetWindowSize(sdl_window, &old_window_width, &old_window_height); - old_window_flags = SDL_GetWindowFlags(sdl_window); - if (old_window_width != window_width || - old_window_height != window_height || - (old_window_flags & window_flags_to_monitor) != (window_flags & window_flags_to_monitor)) - { - delete_sdl_video_window(); - } - } - - // Apply anti-aliasing, if and when appropriate (usually in fullscreen) - SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); - - // Always use a resize-able window. This helps allow SDL to manage - // transitions involving fullscreen to or from windowed-mode. - window_flags |= SDL_WINDOW_RESIZABLE; - - if (!sdl_window) { - sdl_window = SDL_CreateWindow( - "Basilisk II", - SDL_WINDOWPOS_UNDEFINED, - SDL_WINDOWPOS_UNDEFINED, - window_width, - window_height, - window_flags); - if (!sdl_window) { - shutdown_sdl_video(); - return NULL; - } - } - - // Some SDL events (regarding some native-window events), need processing - // as they are generated. SDL2 has a facility, SDL_AddEventWatch(), which - // allows events to be processed as they are generated. - if (!did_add_event_watch) { - SDL_AddEventWatch(&on_sdl_event_generated, NULL); - did_add_event_watch = true; - } - - if (!sdl_renderer) { - sdl_renderer = SDL_CreateRenderer(sdl_window, -1, SDL_RENDERER_ACCELERATED); - if (!sdl_renderer) { - shutdown_sdl_video(); - return NULL; - } - sdl_renderer_thread_id = SDL_ThreadID(); - } - - SDL_assert(sdl_texture == NULL); - sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_STREAMING, width, height); - if (!sdl_texture) { - shutdown_sdl_video(); - return NULL; - } - - SDL_assert(guest_surface == NULL); - SDL_assert(host_surface == NULL); - switch (bpp) { - case 8: - guest_surface = SDL_CreateRGBSurface(0, width, height, 8, 0, 0, 0, 0); - break; - case 16: - guest_surface = SDL_CreateRGBSurface(0, width, height, 16, 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000); - break; - case 32: - guest_surface = SDL_CreateRGBSurface(0, width, height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); - host_surface = guest_surface; - break; - default: - printf("WARNING: An unsupported bpp of %d was used\n", bpp); - break; - } - if (!guest_surface) { - shutdown_sdl_video(); - return NULL; - } - - if (!host_surface) { - Uint32 texture_format; - if (SDL_QueryTexture(sdl_texture, &texture_format, NULL, NULL, NULL) != 0) { - printf("ERROR: Unable to get the SDL texture's pixel format: %s\n", SDL_GetError()); - shutdown_sdl_video(); - return NULL; - } - - int bpp; - Uint32 Rmask, Gmask, Bmask, Amask; - if (!SDL_PixelFormatEnumToMasks(texture_format, &bpp, &Rmask, &Gmask, &Bmask, &Amask)) { - printf("ERROR: Unable to determine format for host SDL_surface: %s\n", SDL_GetError()); - shutdown_sdl_video(); - return NULL; - } - - host_surface = SDL_CreateRGBSurface(0, width, height, bpp, Rmask, Gmask, Bmask, Amask); - if (!host_surface) { - printf("ERROR: Unable to create host SDL_surface: %s\n", SDL_GetError()); - shutdown_sdl_video(); - return NULL; - } - } - - if (SDL_RenderSetLogicalSize(sdl_renderer, width, height) != 0) { - printf("ERROR: Unable to set SDL rendeer's logical size (to %dx%d): %s\n", - width, height, SDL_GetError()); - shutdown_sdl_video(); - return NULL; - } - - return guest_surface; -} - -static int present_sdl_video() -{ - if (!sdl_renderer || !sdl_texture || !guest_surface) { - printf("WARNING: A video mode does not appear to have been set.\n"); - return -1; - } - - // Some systems, such as D3D9, can fail if and when they are used across - // certain operations. To address this, only utilize SDL_Renderer in a - // single thread, preferably the main thread. - // - // This was added as part of a fix for https://github.com/DavidLudwig/macemu/issues/21 - // "BasiliskII, Win32: resizing a window does not stretch " - SDL_assert(SDL_ThreadID() == sdl_renderer_thread_id); - - // Make sure the display's internal (to SDL, possibly the OS) buffer gets - // cleared. Not doing so can, if and when letterboxing is applied (whereby - // colored bars are drawn on the screen's sides to help with aspect-ratio - // correction), the colored bars can be an unknown color. - SDL_SetRenderDrawColor(sdl_renderer, 0, 0, 0, 0); // Use black - SDL_RenderClear(sdl_renderer); // Clear the display - - if (host_surface != guest_surface && - host_surface != NULL && - guest_surface != NULL) - { - SDL_Rect destRect = {0, 0, host_surface->w, host_surface->h}; - if (SDL_BlitSurface(guest_surface, NULL, host_surface, &destRect) != 0) { - return -1; - } - } - - if (SDL_UpdateTexture(sdl_texture, NULL, host_surface->pixels, host_surface->pitch) != 0) { - return -1; - } - - SDL_Rect src_rect = {0, 0, host_surface->w, host_surface->h}; - if (SDL_RenderCopy(sdl_renderer, sdl_texture, &src_rect, NULL) != 0) { - return -1; - } - - SDL_RenderPresent(sdl_renderer); - - return 0; -} - -static int update_sdl_video() -{ - // HACK, dludwig@pobox.com: for now, just update the whole screen, via - // VideoInterrupt(), which gets called on the main thread. - // - // TODO: make sure SDL_Renderer resources get displayed, if and when - // MacsBug is running (and VideoInterrupt() might not get called) - // - // TODO: cache rects to update, then use rects in present_sdl_video() - return 0; -} - -static int update_sdl_video(SDL_Surface *s, int x, int y, int w, int h) -{ - // HACK, dludwig@pobox.com: for now, just update the whole screen, via - // VideoInterrupt(), which gets called on the main thread. - // - // TODO: make sure SDL_Renderer resources get displayed, if and when - // MacsBug is running (and VideoInterrupt() might not get called) - // - // TODO: cache rects to update, then use rects in present_sdl_video() - return 0; -} - void driver_base::set_video_mode(int flags) { int depth = sdl_depth_of_video_depth(VIDEO_MODE_DEPTH); - if ((s = init_sdl_video(VIDEO_MODE_X, VIDEO_MODE_Y, depth, flags)) == NULL) + if ((s = SDL_SetVideoMode(VIDEO_MODE_X, VIDEO_MODE_Y, depth, + SDL_HWSURFACE | flags)) == NULL) return; #ifdef ENABLE_VOSF the_host_buffer = (uint8 *)s->pixels; @@ -905,7 +650,7 @@ void driver_base::set_video_mode(int flags) void driver_base::init() { - set_video_mode(display_type == DISPLAY_SCREEN ? SDL_WINDOW_FULLSCREEN : 0); + set_video_mode(display_type == DISPLAY_SCREEN ? SDL_FULLSCREEN : 0); int aligned_height = (VIDEO_MODE_Y + 15) & ~15; #ifdef ENABLE_VOSF @@ -992,14 +737,8 @@ driver_base::~driver_base() ungrab_mouse(); restore_mouse_accel(); - // HACK: Just delete instances of SDL_Surface and SDL_Texture, rather - // than also the SDL_Window and SDL_Renderer. This fixes a bug whereby - // OSX hosts, when in fullscreen, will, on a guest OS resolution change, - // do a series of switches (using OSX's "Spaces" feature) to and from - // the Basilisk II desktop, - delete_sdl_video_surfaces(); // This deletes instances of SDL_Surface and SDL_Texture - //shutdown_sdl_video(); // This deletes SDL_Window, SDL_Renderer, in addition to - // instances of SDL_Surface and SDL_Texture. + if (s) + SDL_FreeSurface(s); // the_buffer shall always be mapped through vm_acquire_framebuffer() if (the_buffer != VM_MAP_FAILED) { @@ -1036,9 +775,8 @@ void driver_base::update_palette(void) { const VIDEO_MODE &mode = monitor.get_current_mode(); - if ((int)VIDEO_MODE_DEPTH <= VIDEO_DEPTH_8BIT) { - SDL_SetSurfacePalette(s, sdl_palette); - } + if ((int)VIDEO_MODE_DEPTH <= VIDEO_DEPTH_8BIT) + SDL_SetPalette(s, SDL_PHYSPAL, sdl_palette, 0, 256); } // Disable mouse acceleration @@ -1060,24 +798,16 @@ void driver_base::toggle_mouse_grab(void) grab_mouse(); } -static void update_mouse_grab() -{ - if (mouse_grabbed) { - SDL_SetRelativeMouseMode(SDL_TRUE); - } else { - SDL_SetRelativeMouseMode(SDL_FALSE); - } -} - // Grab mouse, switch to relative mouse mode void driver_base::grab_mouse(void) { if (!mouse_grabbed) { - mouse_grabbed = true; - update_mouse_grab(); - set_window_name(STR_WINDOW_TITLE_GRABBED); - disable_mouse_accel(); - ADBSetRelMouseMode(true); + SDL_GrabMode new_mode = set_grab_mode(SDL_GRAB_ON); + if (new_mode == SDL_GRAB_ON) { + set_window_name(STR_WINDOW_TITLE_GRABBED); + disable_mouse_accel(); + ADBSetRelMouseMode(mouse_grabbed = true); + } } } @@ -1085,11 +815,12 @@ void driver_base::grab_mouse(void) void driver_base::ungrab_mouse(void) { if (mouse_grabbed) { - mouse_grabbed = false; - update_mouse_grab(); - set_window_name(STR_WINDOW_TITLE); - restore_mouse_accel(); - ADBSetRelMouseMode(false); + SDL_GrabMode new_mode = set_grab_mode(SDL_GRAB_OFF); + if (new_mode == SDL_GRAB_OFF) { + set_window_name(STR_WINDOW_TITLE); + restore_mouse_accel(); + ADBSetRelMouseMode(mouse_grabbed = false); + } } } @@ -1120,7 +851,8 @@ static void keycode_init(void) keycode_table[i] = -1; // Search for server vendor string, then read keycodes - const char * video_driver = SDL_GetCurrentVideoDriver(); + char video_driver[256]; + SDL_VideoDriverName(video_driver, sizeof(video_driver)); bool video_driver_found = false; char line[256]; int n_keys = 0; @@ -1153,7 +885,7 @@ static void keycode_init(void) static const char sdl_str[] = "sdl"; if (strncmp(line, sdl_str, sizeof(sdl_str) - 1) == 0) { char *p = line + sizeof(sdl_str); - if (video_driver && strstr(video_driver, p) == video_driver) + if (strstr(video_driver, p) == video_driver) video_driver_found = true; } } @@ -1166,12 +898,12 @@ static void keycode_init(void) // Vendor not found? Then display warning if (!video_driver_found) { char str[256]; - snprintf(str, sizeof(str), GetString(STR_KEYCODE_VENDOR_WARN), video_driver ? video_driver : "", kc_path ? kc_path : KEYCODE_FILE_NAME); + snprintf(str, sizeof(str), GetString(STR_KEYCODE_VENDOR_WARN), video_driver, kc_path ? kc_path : KEYCODE_FILE_NAME); WarningAlert(str); return; } - D(bug("Using SDL/%s keycodes table, %d key mappings\n", video_driver ? video_driver : "", n_keys)); + D(bug("Using SDL/%s keycodes table, %d key mappings\n", video_driver, n_keys)); } } @@ -1212,7 +944,7 @@ bool SDL_monitor_desc::video_open(void) // Start redraw/input thread #ifndef USE_CPU_EMUL_SERVICES redraw_thread_cancel = false; - redraw_thread_active = ((redraw_thread = SDL_CreateThread(redraw_func, "Redraw Thread", NULL)) != NULL); + redraw_thread_active = ((redraw_thread = SDL_CreateThread(redraw_func, NULL)) != NULL); if (!redraw_thread_active) { printf("FATAL: cannot create redraw thread\n"); return false; @@ -1290,11 +1022,7 @@ bool VideoInit(bool classic) default_height = sdl_display_height(); // Mac screen depth follows X depth - screen_depth = 32; - SDL_DisplayMode desktop_mode; - if (SDL_GetDesktopDisplayMode(0, &desktop_mode) == 0) { - screen_depth = SDL_BITSPERPIXEL(desktop_mode.format); - } + screen_depth = SDL_GetVideoInfo()->vfmt->BitsPerPixel; int default_depth; switch (screen_depth) { case 8: @@ -1351,6 +1079,8 @@ bool VideoInit(bool classic) const int h = video_modes[i].h; if (i > 0 && (w >= default_width || h >= default_height)) continue; + if (w == 512 && h == 384) + continue; for (int d = VIDEO_DEPTH_1BIT; d <= default_depth; d++) add_mode(display_type, w, h, video_modes[i].resolution_id, TrivialBytesPerRow(w, (video_depth)d), d); } @@ -1490,18 +1220,18 @@ static void do_toggle_fullscreen(void) while (!thread_stop_ack) ; #endif - // Apply fullscreen - if (sdl_window) { - if (display_type == DISPLAY_SCREEN) { - display_type = DISPLAY_WINDOW; - SDL_SetWindowFullscreen(sdl_window, 0); - } else { - display_type = DISPLAY_SCREEN; - SDL_SetWindowFullscreen(sdl_window, SDL_WINDOW_FULLSCREEN_DESKTOP); - } - } + // save the mouse position + int x, y; + SDL_GetMouseState(&x, &y); + + // save the screen contents + SDL_Surface *tmp_surface = SDL_ConvertSurface(drv->s, drv->s->format, + drv->s->flags); // switch modes + display_type = (display_type == DISPLAY_SCREEN) ? DISPLAY_WINDOW + : DISPLAY_SCREEN; + drv->set_video_mode(display_type == DISPLAY_SCREEN ? SDL_FULLSCREEN : 0); drv->adapt_to_video_mode(); // reset the palette @@ -1510,12 +1240,20 @@ static void do_toggle_fullscreen(void) #endif drv->update_palette(); + // restore the screen contents + SDL_BlitSurface(tmp_surface, NULL, drv->s, NULL); + SDL_FreeSurface(tmp_surface); + SDL_UpdateRect(drv->s, 0, 0, 0, 0); + // reset the video refresh handler VideoRefreshInit(); // while SetVideoMode is happening, control key up may be missed ADBKeyUp(0x36); - + + // restore the mouse position + SDL_WarpMouse(x, y); + // resume redraw thread toggle_fullscreen = false; #ifndef USE_CPU_EMUL_SERVICES @@ -1531,26 +1269,6 @@ static void do_toggle_fullscreen(void) * Execute video VBL routine */ -static bool is_fullscreen(SDL_Window * window) -{ -#ifdef __MACOSX__ - // On OSX, SDL, at least as of 2.0.5 (and possibly beyond), does not always - // report changes to fullscreen via the SDL_WINDOW_FULLSCREEN flag. - // (Example: https://bugzilla.libsdl.org/show_bug.cgi?id=3766 , which - // involves fullscreen/windowed toggles via window-manager UI controls). - // Until it does, or adds a facility to do so, we'll use a platform-specific - // code path to detect fullscreen changes. - extern bool is_fullscreen_osx(SDL_Window * window); - return is_fullscreen_osx(sdl_window); -#else - if (!window) { - return false; - } - const Uint32 sdl_window_flags = SDL_GetWindowFlags(sdl_window); - return (sdl_window_flags & SDL_WINDOW_FULLSCREEN) != 0; -#endif -} - #ifdef SHEEPSHAVER void VideoVBL(void) { @@ -1560,8 +1278,6 @@ void VideoVBL(void) if (toggle_fullscreen) do_toggle_fullscreen(); - - present_sdl_video(); // Temporarily give up frame buffer lock (this is the point where // we are suspended when the user presses Ctrl-Tab) @@ -1585,8 +1301,6 @@ void VideoInterrupt(void) if (toggle_fullscreen) do_toggle_fullscreen(); - present_sdl_video(); - // Temporarily give up frame buffer lock (this is the point where // we are suspended when the user presses Ctrl-Tab) UNLOCK_FRAME_BUFFER; @@ -1627,12 +1341,7 @@ void SDL_monitor_desc::set_palette(uint8 *pal, int num_in) // Convert colors to XColor array int num_out = 256; bool stretch = false; - - if (!sdl_palette) { - sdl_palette = SDL_AllocPalette(num_out); - } - - SDL_Color *p = sdl_palette->colors; + SDL_Color *p = sdl_palette; for (int i=0; ir = pal[c*3 + 0] * 0x0101; @@ -1735,7 +1444,25 @@ bool video_can_change_cursor(void) if (display_type != DISPLAY_WINDOW) return false; +#if defined(__APPLE__) + static char driver[] = "Quartz?"; + static int quartzok = -1; + + if (quartzok < 0) { + if (SDL_VideoDriverName(driver, sizeof driver) == NULL || strncmp(driver, "Quartz", sizeof driver)) + quartzok = true; + else { + // Quartz driver bug prevents cursor changing in SDL 1.2.11 to 1.2.14. + const SDL_version *vp = SDL_Linked_Version(); + int version = SDL_VERSIONNUM(vp->major, vp->minor, vp->patch); + quartzok = (version <= SDL_VERSIONNUM(1, 2, 10) || version >= SDL_VERSIONNUM(1, 2, 15)); + } + } + + return quartzok; +#else return true; +#endif } #endif @@ -1770,8 +1497,7 @@ void video_set_cursor(void) if (visible) { int x, y; SDL_GetMouseState(&x, &y); - printf("WarpMouse to {%d,%d} via video_set_cursor\n", x, y); - SDL_WarpMouseGlobal(x, y); + SDL_WarpMouse(x, y); } } } @@ -1787,25 +1513,27 @@ void video_set_cursor(void) static bool is_modifier_key(SDL_KeyboardEvent const & e) { switch (e.keysym.sym) { - case SDLK_NUMLOCKCLEAR: + case SDLK_NUMLOCK: case SDLK_CAPSLOCK: - case SDLK_SCROLLLOCK: + case SDLK_SCROLLOCK: case SDLK_RSHIFT: case SDLK_LSHIFT: case SDLK_RCTRL: case SDLK_LCTRL: case SDLK_RALT: case SDLK_LALT: - case SDLK_RGUI: - case SDLK_LGUI: + case SDLK_RMETA: + case SDLK_LMETA: + case SDLK_LSUPER: + case SDLK_RSUPER: case SDLK_MODE: - case SDLK_APPLICATION: + case SDLK_COMPOSE: return true; } return false; } -static bool is_ctrl_down(SDL_Keysym const & ks) +static bool is_ctrl_down(SDL_keysym const & ks) { return ctrl_down || (ks.mod & KMOD_CTRL); } @@ -1816,7 +1544,7 @@ static bool is_ctrl_down(SDL_Keysym const & ks) * and -2 if the key was recognized as a hotkey */ -static int kc_decode(SDL_Keysym const & ks, bool key_down) +static int kc_decode(SDL_keysym const & ks, bool key_down) { switch (ks.sym) { case SDLK_a: return 0x00; @@ -1888,17 +1616,19 @@ static int kc_decode(SDL_Keysym const & ks, bool key_down) #if (defined(__APPLE__) && defined(__MACH__)) case SDLK_LALT: return 0x3a; case SDLK_RALT: return 0x3a; - case SDLK_LGUI: return 0x37; - case SDLK_RGUI: return 0x37; + case SDLK_LMETA: return 0x37; + case SDLK_RMETA: return 0x37; #else case SDLK_LALT: return 0x37; case SDLK_RALT: return 0x37; - case SDLK_LGUI: return 0x3a; - case SDLK_RGUI: return 0x3a; + case SDLK_LMETA: return 0x3a; + case SDLK_RMETA: return 0x3a; #endif + case SDLK_LSUPER: return 0x3a; // "Windows" key + case SDLK_RSUPER: return 0x3a; case SDLK_MENU: return 0x32; case SDLK_CAPSLOCK: return 0x39; - case SDLK_NUMLOCKCLEAR: return 0x47; + case SDLK_NUMLOCK: return 0x47; case SDLK_UP: return 0x3e; case SDLK_DOWN: return 0x3d; @@ -1911,7 +1641,7 @@ static int kc_decode(SDL_Keysym const & ks, bool key_down) case SDLK_F2: return 0x78; case SDLK_F3: return 0x63; case SDLK_F4: return 0x76; - case SDLK_F5: return 0x60; + case SDLK_F5: if (is_ctrl_down(ks)) {if (!key_down) drv->toggle_mouse_grab(); return -2;} else return 0x60; case SDLK_F6: return 0x61; case SDLK_F7: return 0x62; case SDLK_F8: return 0x64; @@ -1920,20 +1650,20 @@ static int kc_decode(SDL_Keysym const & ks, bool key_down) case SDLK_F11: return 0x67; case SDLK_F12: return 0x6f; - case SDLK_PRINTSCREEN: return 0x69; - case SDLK_SCROLLLOCK: return 0x6b; + case SDLK_PRINT: return 0x69; + case SDLK_SCROLLOCK: return 0x6b; case SDLK_PAUSE: return 0x71; - case SDLK_KP_0: return 0x52; - case SDLK_KP_1: return 0x53; - case SDLK_KP_2: return 0x54; - case SDLK_KP_3: return 0x55; - case SDLK_KP_4: return 0x56; - case SDLK_KP_5: return 0x57; - case SDLK_KP_6: return 0x58; - case SDLK_KP_7: return 0x59; - case SDLK_KP_8: return 0x5b; - case SDLK_KP_9: return 0x5c; + case SDLK_KP0: return 0x52; + case SDLK_KP1: return 0x53; + case SDLK_KP2: return 0x54; + case SDLK_KP3: return 0x55; + case SDLK_KP4: return 0x56; + case SDLK_KP5: return 0x57; + case SDLK_KP6: return 0x58; + case SDLK_KP7: return 0x59; + case SDLK_KP8: return 0x5b; + case SDLK_KP9: return 0x5c; case SDLK_KP_PERIOD: return 0x41; case SDLK_KP_PLUS: return 0x45; case SDLK_KP_MINUS: return 0x4e; @@ -1973,78 +1703,15 @@ static void force_complete_window_refresh() * SDL event handling */ -// possible return codes for SDL-registered event watches -enum : int { - EVENT_DROP_FROM_QUEUE = 0, - EVENT_ADD_TO_QUEUE = 1 -}; - -// Some events need to be processed in the host-app's main thread, due to -// host-OS requirements. -// -// This function is called by SDL, whenever it generates an SDL_Event. It has -// the ability to process events, and optionally, to prevent them from being -// added to SDL's event queue (and retrieve-able via SDL_PeepEvents(), etc.) -static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event) -{ - switch (event->type) { - case SDL_KEYUP: { - SDL_Keysym const & ks = event->key.keysym; - switch (ks.sym) { - case SDLK_F5: { - if (is_ctrl_down(ks)) { - drv->toggle_mouse_grab(); - return EVENT_DROP_FROM_QUEUE; - } - } break; - } - } break; - - case SDL_WINDOWEVENT: { - switch (event->window.event) { - case SDL_WINDOWEVENT_RESIZED: { - // Handle changes of fullscreen. This is done here, in - // on_sdl_event_generated() and not the main SDL_Event-processing - // loop, in order to perform this change on the main thread. - // (Some os'es UI APIs, such as OSX's NSWindow, are not - // thread-safe.) - const bool is_full = is_fullscreen(sdl_window); - const bool adjust_fullscreen = \ - (display_type == DISPLAY_WINDOW && is_full) || - (display_type == DISPLAY_SCREEN && !is_full); - if (adjust_fullscreen) { - do_toggle_fullscreen(); - -#if __MACOSX__ - // HACK-FIX: on OSX hosts, make sure that the OSX menu - // bar does not show up in fullscreen mode, when the - // cursor is near the top of the screen, lest the - // guest OS' menu bar be obscured. - if (is_full) { - extern void set_menu_bar_visible_osx(bool); - set_menu_bar_visible_osx(false); - } -#endif - } - } break; - } - } break; - } - - return EVENT_ADD_TO_QUEUE; -} - - static void handle_events(void) { SDL_Event events[10]; const int n_max_events = sizeof(events) / sizeof(events[0]); int n_events; - while ((n_events = SDL_PeepEvents(events, n_max_events, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT)) > 0) { + while ((n_events = SDL_PeepEvents(events, n_max_events, SDL_GETEVENT, sdl_eventmask)) > 0) { for (int i = 0; i < n_events; i++) { - SDL_Event & event = events[i]; - + SDL_Event const & event = events[i]; switch (event.type) { // Mouse button @@ -2143,28 +1810,24 @@ static void handle_events(void) } break; } - - case SDL_WINDOWEVENT: { - switch (event.window.event) { - // Hidden parts exposed, force complete refresh of window - case SDL_WINDOWEVENT_EXPOSED: - force_complete_window_refresh(); - break; - - // Force a complete window refresh when activating, to avoid redraw artifacts otherwise. - case SDL_WINDOWEVENT_RESTORED: - force_complete_window_refresh(); - break; - - } + + // Hidden parts exposed, force complete refresh of window + case SDL_VIDEOEXPOSE: + force_complete_window_refresh(); break; - } // Window "close" widget clicked case SDL_QUIT: ADBKeyDown(0x7f); // Power key ADBKeyUp(0x7f); break; + + // Application activate/deactivate + case SDL_ACTIVEEVENT: + // Force a complete window refresh when activating, to avoid redraw artifacts otherwise. + if (event.active.gain && (event.active.state & SDL_APPACTIVE)) + force_complete_window_refresh(); + break; } } } @@ -2261,7 +1924,7 @@ static void update_display_static(driver_base *drv) SDL_UnlockSurface(drv->s); // Refresh display - update_sdl_video(drv->s, x1, y1, wide, high); + SDL_UpdateRect(drv->s, x1, y1, wide, high); } } else { @@ -2317,7 +1980,7 @@ static void update_display_static(driver_base *drv) SDL_UnlockSurface(drv->s); // Refresh display - update_sdl_video(drv->s, x1, y1, wide, high); + SDL_UpdateRect(drv->s, x1, y1, wide, high); } } } @@ -2380,8 +2043,8 @@ static void update_display_static_bbox(driver_base *drv) // Refresh display if (nr_boxes) - update_sdl_video(); - } + SDL_UpdateRects(drv->s, nr_boxes, boxes); +} // We suggest the compiler to inline the next two functions so that it diff --git a/BasiliskII/src/SDL/video_sdl2.cpp b/BasiliskII/src/SDL/video_sdl2.cpp new file mode 100755 index 00000000..26a14829 --- /dev/null +++ b/BasiliskII/src/SDL/video_sdl2.cpp @@ -0,0 +1,2601 @@ +/* + * video_sdl.cpp - Video/graphics emulation, SDL specific stuff + * + * Basilisk II (C) 1997-2008 Christian Bauer + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* + * NOTES: + * The Ctrl key works like a qualifier for special actions: + * Ctrl-Tab = suspend DGA mode (TODO) + * Ctrl-Esc = emergency quit + * Ctrl-F1 = mount floppy + * Ctrl-F5 = grab mouse (in windowed mode) + * + * FIXMEs and TODOs: + * - Windows requires an extra mouse event to update the actual cursor image? + * - Ctr-Tab for suspend/resume but how? SDL does not support that for non-Linux + * - Ctrl-Fn doesn't generate SDL_KEYDOWN events (SDL bug?) + * - Mouse acceleration, there is no API in SDL yet for that + * - Gamma tables support is likely to be broken here + * - Events processing is bound to the general emulation thread as SDL requires + * to PumpEvents() within the same thread as the one that called SetVideoMode(). + * Besides, there can't seem to be a way to call SetVideoMode() from a child thread. + * - Backport hw cursor acceleration to Basilisk II? + * - Factor out code + */ + +#include "sysdeps.h" + +#include +#include +#include +#include +#include + +#ifdef WIN32 +#include /* alloca() */ +#endif + +#include +#include "main.h" +#include "adb.h" +#include "macos_util.h" +#include "prefs.h" +#include "user_strings.h" +#include "video.h" +#include "video_defs.h" +#include "video_blit.h" +#include "vm_alloc.h" + +#define DEBUG 0 +#include "debug.h" + +// Supported video modes +using std::vector; +static vector VideoModes; + +// Display types +#ifdef SHEEPSHAVER +enum { + DISPLAY_WINDOW = DIS_WINDOW, // windowed display + DISPLAY_SCREEN = DIS_SCREEN // fullscreen display +}; +extern int display_type; // See enum above +#else +enum { + DISPLAY_WINDOW, // windowed display + DISPLAY_SCREEN // fullscreen display +}; +static int display_type = DISPLAY_WINDOW; // See enum above +#endif + +// Constants +#ifdef WIN32 +const char KEYCODE_FILE_NAME[] = "BasiliskII_keycodes"; +#elif __MACOSX__ +const char KEYCODE_FILE_NAME[] = "BasiliskII_keycodes"; +#else +const char KEYCODE_FILE_NAME[] = DATADIR "/keycodes"; +#endif + + +// Global variables +static uint32 frame_skip; // Prefs items +static int16 mouse_wheel_mode; +static int16 mouse_wheel_lines; + +static uint8 *the_buffer = NULL; // Mac frame buffer (where MacOS draws into) +static uint8 *the_buffer_copy = NULL; // Copy of Mac frame buffer (for refreshed modes) +static uint32 the_buffer_size; // Size of allocated the_buffer + +static bool redraw_thread_active = false; // Flag: Redraw thread installed +#ifndef USE_CPU_EMUL_SERVICES +static volatile bool redraw_thread_cancel; // Flag: Cancel Redraw thread +static SDL_Thread *redraw_thread = NULL; // Redraw thread +static volatile bool thread_stop_req = false; +static volatile bool thread_stop_ack = false; // Acknowledge for thread_stop_req +#endif + +#ifdef ENABLE_VOSF +static bool use_vosf = false; // Flag: VOSF enabled +#else +static const bool use_vosf = false; // VOSF not possible +#endif + +static bool ctrl_down = false; // Flag: Ctrl key pressed +static bool caps_on = false; // Flag: Caps Lock on +static bool quit_full_screen = false; // Flag: DGA close requested from redraw thread +static bool emerg_quit = false; // Flag: Ctrl-Esc pressed, emergency quit requested from MacOS thread +static bool emul_suspended = false; // Flag: Emulator suspended + +static bool classic_mode = false; // Flag: Classic Mac video mode + +static bool use_keycodes = false; // Flag: Use keycodes rather than keysyms +static int keycode_table[256]; // X keycode -> Mac keycode translation table + +// SDL variables +SDL_Window * sdl_window = NULL; // Wraps an OS-native window +static SDL_Surface * host_surface = NULL; // Surface in host-OS display format +static SDL_Surface * guest_surface = NULL; // Surface in guest-OS display format +static SDL_Renderer * sdl_renderer = NULL; // Handle to SDL2 renderer +static SDL_threadID sdl_renderer_thread_id = 0; // Thread ID where the SDL_renderer was created, and SDL_renderer ops should run (for compatibility w/ d3d9) +static SDL_Texture * sdl_texture = NULL; // Handle to a GPU texture, with which to draw guest_surface to +static int screen_depth; // Depth of current screen +static SDL_Cursor *sdl_cursor = NULL; // Copy of Mac cursor +static SDL_Palette *sdl_palette = NULL; // Color palette to be used as CLUT and gamma table +static bool sdl_palette_changed = false; // Flag: Palette changed, redraw thread must set new colors +static bool toggle_fullscreen = false; +static bool did_add_event_watch = false; + +static bool mouse_grabbed = false; + +// Mutex to protect SDL events +static SDL_mutex *sdl_events_lock = NULL; +#define LOCK_EVENTS SDL_LockMutex(sdl_events_lock) +#define UNLOCK_EVENTS SDL_UnlockMutex(sdl_events_lock) + +// Mutex to protect palette +static SDL_mutex *sdl_palette_lock = NULL; +#define LOCK_PALETTE SDL_LockMutex(sdl_palette_lock) +#define UNLOCK_PALETTE SDL_UnlockMutex(sdl_palette_lock) + +// Mutex to protect frame buffer +static SDL_mutex *frame_buffer_lock = NULL; +#define LOCK_FRAME_BUFFER SDL_LockMutex(frame_buffer_lock) +#define UNLOCK_FRAME_BUFFER SDL_UnlockMutex(frame_buffer_lock) + +// Video refresh function +static void VideoRefreshInit(void); +static void (*video_refresh)(void); + + +// Prototypes +static int redraw_func(void *arg); +static int update_sdl_video(); +static int present_sdl_video(); +static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event); +static bool is_fullscreen(SDL_Window *); + +// From sys_unix.cpp +extern void SysMountFirstFloppy(void); + + +/* + * SDL surface locking glue + */ + +#ifdef ENABLE_VOSF +#define SDL_VIDEO_LOCK_VOSF_SURFACE(SURFACE) do { \ + if (sdl_window && SDL_GetWindowFlags(sdl_window) & (SDL_WINDOW_FULLSCREEN)) \ + the_host_buffer = (uint8 *)(SURFACE)->pixels; \ +} while (0) +#else +#define SDL_VIDEO_LOCK_VOSF_SURFACE(SURFACE) +#endif + +#define SDL_VIDEO_LOCK_SURFACE(SURFACE) do { \ + if (SDL_MUSTLOCK(SURFACE)) { \ + SDL_LockSurface(SURFACE); \ + SDL_VIDEO_LOCK_VOSF_SURFACE(SURFACE); \ + } \ +} while (0) + +#define SDL_VIDEO_UNLOCK_SURFACE(SURFACE) do { \ + if (SDL_MUSTLOCK(SURFACE)) \ + SDL_UnlockSurface(SURFACE); \ +} while (0) + + +/* + * Framebuffer allocation routines + */ + +static void *vm_acquire_framebuffer(uint32 size) +{ +#if __MACOSX__ + return calloc(1, size); +#else + // always try to reallocate framebuffer at the same address + static void *fb = VM_MAP_FAILED; + if (fb != VM_MAP_FAILED) { + if (vm_acquire_fixed(fb, size) < 0) { +#ifndef SHEEPSHAVER + printf("FATAL: Could not reallocate framebuffer at previous address\n"); +#endif + fb = VM_MAP_FAILED; + } + } + if (fb == VM_MAP_FAILED) + fb = vm_acquire(size, VM_MAP_DEFAULT | VM_MAP_32BIT); + return fb; +#endif +} + +static inline void vm_release_framebuffer(void *fb, uint32 size) +{ +#if __MACOSX__ + free(fb); +#else + vm_release(fb, size); +#endif +} + +static inline int get_customized_color_depth(int default_depth) +{ + int display_color_depth = PrefsFindInt32("displaycolordepth"); + + D(bug("Get displaycolordepth %d\n", display_color_depth)); + + if(0 == display_color_depth) + return default_depth; + else{ + switch (display_color_depth) { + case 8: + return VIDEO_DEPTH_8BIT; + case 15: case 16: + return VIDEO_DEPTH_16BIT; + case 24: case 32: + return VIDEO_DEPTH_32BIT; + default: + return default_depth; + } + } +} + +/* + * Windows message handler + */ + +#ifdef WIN32 +#include +static WNDPROC sdl_window_proc = NULL; // Window proc used by SDL + +extern void SysMediaArrived(void); +extern void SysMediaRemoved(void); +extern HWND GetMainWindowHandle(void); + +static LRESULT CALLBACK windows_message_handler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) { + case WM_DEVICECHANGE: + if (wParam == DBT_DEVICEREMOVECOMPLETE) { + DEV_BROADCAST_HDR *p = (DEV_BROADCAST_HDR *)lParam; + if (p->dbch_devicetype == DBT_DEVTYP_VOLUME) + SysMediaRemoved(); + } + else if (wParam == DBT_DEVICEARRIVAL) { + DEV_BROADCAST_HDR *p = (DEV_BROADCAST_HDR *)lParam; + if (p->dbch_devicetype == DBT_DEVTYP_VOLUME) + SysMediaArrived(); + } + return 0; + + default: + if (sdl_window_proc) + return CallWindowProc(sdl_window_proc, hwnd, msg, wParam, lParam); + } + + return DefWindowProc(hwnd, msg, wParam, lParam); +} +#endif + + +/* + * SheepShaver glue + */ + +#ifdef SHEEPSHAVER +// Color depth modes type +typedef int video_depth; + +// 1, 2, 4 and 8 bit depths use a color palette +static inline bool IsDirectMode(VIDEO_MODE const & mode) +{ + return IsDirectMode(mode.viAppleMode); +} + +// Abstract base class representing one (possibly virtual) monitor +// ("monitor" = rectangular display with a contiguous frame buffer) +class monitor_desc { +public: + monitor_desc(const vector &available_modes, video_depth default_depth, uint32 default_id) {} + virtual ~monitor_desc() {} + + // Get current Mac frame buffer base address + uint32 get_mac_frame_base(void) const {return screen_base;} + + // Set Mac frame buffer base address (called from switch_to_mode()) + void set_mac_frame_base(uint32 base) {screen_base = base;} + + // Get current video mode + const VIDEO_MODE &get_current_mode(void) const {return VModes[cur_mode];} + + // Called by the video driver to switch the video mode on this display + // (must call set_mac_frame_base()) + virtual void switch_to_current_mode(void) = 0; + + // Called by the video driver to set the color palette (in indexed modes) + // or the gamma table (in direct modes) + virtual void set_palette(uint8 *pal, int num) = 0; +}; + +// Vector of pointers to available monitor descriptions, filled by VideoInit() +static vector VideoMonitors; + +// Find Apple mode matching best specified dimensions +static int find_apple_resolution(int xsize, int ysize) +{ + if (xsize == 640 && ysize == 480) + return APPLE_640x480; + if (xsize == 800 && ysize == 600) + return APPLE_800x600; + if (xsize == 1024 && ysize == 768) + return APPLE_1024x768; + if (xsize == 1152 && ysize == 768) + return APPLE_1152x768; + if (xsize == 1152 && ysize == 900) + return APPLE_1152x900; + if (xsize == 1280 && ysize == 1024) + return APPLE_1280x1024; + if (xsize == 1600 && ysize == 1200) + return APPLE_1600x1200; + return APPLE_CUSTOM; +} + +// Display error alert +static void ErrorAlert(int error) +{ + ErrorAlert(GetString(error)); +} +#endif + + +/* + * monitor_desc subclass for SDL display + */ + +class SDL_monitor_desc : public monitor_desc { +public: + SDL_monitor_desc(const vector &available_modes, video_depth default_depth, uint32 default_id) : monitor_desc(available_modes, default_depth, default_id) {} + ~SDL_monitor_desc() {} + + virtual void switch_to_current_mode(void); + virtual void set_palette(uint8 *pal, int num); + + bool video_open(void); + void video_close(void); +}; + + +/* + * Utility functions + */ + +// Find palette size for given color depth +static int palette_size(int mode) +{ + switch (mode) { + case VIDEO_DEPTH_1BIT: return 2; + case VIDEO_DEPTH_2BIT: return 4; + case VIDEO_DEPTH_4BIT: return 16; + case VIDEO_DEPTH_8BIT: return 256; + case VIDEO_DEPTH_16BIT: return 32; + case VIDEO_DEPTH_32BIT: return 256; + default: return 0; + } +} + +// Map video_mode depth ID to numerical depth value +static int mac_depth_of_video_depth(int video_depth) +{ + int depth = -1; + switch (video_depth) { + case VIDEO_DEPTH_1BIT: + depth = 1; + break; + case VIDEO_DEPTH_2BIT: + depth = 2; + break; + case VIDEO_DEPTH_4BIT: + depth = 4; + break; + case VIDEO_DEPTH_8BIT: + depth = 8; + break; + case VIDEO_DEPTH_16BIT: + depth = 16; + break; + case VIDEO_DEPTH_32BIT: + depth = 32; + break; + default: + abort(); + } + return depth; +} + +// Map video_mode depth ID to SDL screen depth +static int sdl_depth_of_video_depth(int video_depth) +{ + return (video_depth <= VIDEO_DEPTH_8BIT) ? 8 : mac_depth_of_video_depth(video_depth); +} + +// Get screen dimensions +static void sdl_display_dimensions(int &width, int &height) +{ + SDL_DisplayMode desktop_mode; + const int display_index = 0; // TODO: try supporting multiple displays + if (SDL_GetDesktopDisplayMode(display_index, &desktop_mode) != 0) { + // TODO: report a warning, here? + width = height = 0; + return; + } + width = desktop_mode.w; + height = desktop_mode.h; +} + +static inline int sdl_display_width(void) +{ + int width, height; + sdl_display_dimensions(width, height); + return width; +} + +static inline int sdl_display_height(void) +{ + int width, height; + sdl_display_dimensions(width, height); + return height; +} + +// Check wether specified mode is available +static bool has_mode(int type, int width, int height, int depth) +{ +#ifdef SHEEPSHAVER + // Filter out Classic resolutions + if (width == 512 && height == 384) + return false; +#endif + + // Filter out out-of-bounds resolutions + if (width > sdl_display_width() || height > sdl_display_height()) + return false; + + // Whatever size it is, beyond what we've checked, we'll scale to/from as appropriate. + return true; +} + +// Add mode to list of supported modes +static void add_mode(int type, int width, int height, int resolution_id, int bytes_per_row, int depth) +{ + // Filter out unsupported modes + if (!has_mode(type, width, height, depth)) + return; + + // Fill in VideoMode entry + VIDEO_MODE mode; +#ifdef SHEEPSHAVER + resolution_id = find_apple_resolution(width, height); + mode.viType = type; +#endif + VIDEO_MODE_X = width; + VIDEO_MODE_Y = height; + VIDEO_MODE_RESOLUTION = resolution_id; + VIDEO_MODE_ROW_BYTES = bytes_per_row; + VIDEO_MODE_DEPTH = (video_depth)depth; + VideoModes.push_back(mode); +} + +// Set Mac frame layout and base address (uses the_buffer/MacFrameBaseMac) +static void set_mac_frame_buffer(SDL_monitor_desc &monitor, int depth, bool native_byte_order) +{ +#if !REAL_ADDRESSING && !DIRECT_ADDRESSING + int layout = FLAYOUT_DIRECT; + if (depth == VIDEO_DEPTH_16BIT) + layout = (screen_depth == 15) ? FLAYOUT_HOST_555 : FLAYOUT_HOST_565; + else if (depth == VIDEO_DEPTH_32BIT) + layout = (screen_depth == 24) ? FLAYOUT_HOST_888 : FLAYOUT_DIRECT; + if (native_byte_order) + MacFrameLayout = layout; + else + MacFrameLayout = FLAYOUT_DIRECT; + monitor.set_mac_frame_base(MacFrameBaseMac); + + // Set variables used by UAE memory banking + const VIDEO_MODE &mode = monitor.get_current_mode(); + MacFrameBaseHost = the_buffer; + MacFrameSize = VIDEO_MODE_ROW_BYTES * VIDEO_MODE_Y; + InitFrameBufferMapping(); +#else + monitor.set_mac_frame_base(Host2MacAddr(the_buffer)); +#endif + D(bug("monitor.mac_frame_base = %08x\n", monitor.get_mac_frame_base())); +} + +// Set window name and class +static void set_window_name(int name) +{ + if (!sdl_window) { + return; + } + const char *str = GetString(name); + SDL_SetWindowTitle(sdl_window, str); +} + +// Set mouse grab mode +static void set_grab_mode(bool grab) +{ + if (!sdl_window) { + return; + } + SDL_SetWindowGrab(sdl_window, grab ? SDL_TRUE : SDL_FALSE); +} + +// Migrate preferences items (XXX to be handled in MigratePrefs()) +static void migrate_screen_prefs(void) +{ +#ifdef SHEEPSHAVER + // Look-up priorities are: "screen", "screenmodes", "windowmodes". + if (PrefsFindString("screen")) + return; + + uint32 window_modes = PrefsFindInt32("windowmodes"); + uint32 screen_modes = PrefsFindInt32("screenmodes"); + int width = 0, height = 0; + if (screen_modes) { + static const struct { + int id; + int width; + int height; + } + modes[] = { + { 1, 640, 480 }, + { 2, 800, 600 }, + { 4, 1024, 768 }, + { 64, 1152, 768 }, + { 8, 1152, 900 }, + { 16, 1280, 1024 }, + { 32, 1600, 1200 }, + { 0, } + }; + for (int i = 0; modes[i].id != 0; i++) { + if (screen_modes & modes[i].id) { + if (width < modes[i].width && height < modes[i].height) { + width = modes[i].width; + height = modes[i].height; + } + } + } + } else { + if (window_modes & 1) + width = 640, height = 480; + if (window_modes & 2) + width = 800, height = 600; + } + if (width && height) { + char str[32]; + sprintf(str, "%s/%d/%d", screen_modes ? "dga" : "win", width, height); + PrefsReplaceString("screen", str); + } +#endif +} + + +/* + * Display "driver" classes + */ + +class driver_base { +public: + driver_base(SDL_monitor_desc &m); + ~driver_base(); + + void init(); // One-time init + void set_video_mode(int flags); + void adapt_to_video_mode(); + + void update_palette(void); + void suspend(void) {} + void resume(void) {} + void toggle_mouse_grab(void); + void mouse_moved(int x, int y) { ADBMouseMoved(x, y); } + + void disable_mouse_accel(void); + void restore_mouse_accel(void); + + void grab_mouse(void); + void ungrab_mouse(void); + +public: + SDL_monitor_desc &monitor; // Associated video monitor + const VIDEO_MODE &mode; // Video mode handled by the driver + + bool init_ok; // Initialization succeeded (we can't use exceptions because of -fomit-frame-pointer) + SDL_Surface *s; // The surface we draw into +}; + +#ifdef ENABLE_VOSF +static void update_display_window_vosf(driver_base *drv); +#endif +static void update_display_static(driver_base *drv); + +static driver_base *drv = NULL; // Pointer to currently used driver object + +#ifdef ENABLE_VOSF +# include "video_vosf.h" +#endif + +driver_base::driver_base(SDL_monitor_desc &m) + : monitor(m), mode(m.get_current_mode()), init_ok(false), s(NULL) +{ + the_buffer = NULL; + the_buffer_copy = NULL; +} + +static void delete_sdl_video_surfaces() +{ + if (sdl_texture) { + SDL_DestroyTexture(sdl_texture); + sdl_texture = NULL; + } + + if (host_surface) { + if (host_surface == guest_surface) { + guest_surface = NULL; + } + + SDL_FreeSurface(host_surface); + host_surface = NULL; + } + + if (guest_surface) { + SDL_FreeSurface(guest_surface); + guest_surface = NULL; + } +} + +static void delete_sdl_video_window() +{ + if (sdl_renderer) { + SDL_DestroyRenderer(sdl_renderer); + sdl_renderer = NULL; + } + + if (sdl_window) { + SDL_DestroyWindow(sdl_window); + sdl_window = NULL; + } +} + +static void shutdown_sdl_video() +{ + delete_sdl_video_surfaces(); + delete_sdl_video_window(); +} + +static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags) +{ + if (guest_surface) { + delete_sdl_video_surfaces(); + } + + int window_width = width; + int window_height = height; + Uint32 window_flags = 0; + const int window_flags_to_monitor = SDL_WINDOW_FULLSCREEN; + + if (flags & SDL_WINDOW_FULLSCREEN) { + SDL_DisplayMode desktop_mode; + if (SDL_GetDesktopDisplayMode(0, &desktop_mode) != 0) { + shutdown_sdl_video(); + return NULL; + } + window_flags |= SDL_WINDOW_FULLSCREEN_DESKTOP; + window_width = desktop_mode.w; + window_height = desktop_mode.h; + } + + if (sdl_window) { + int old_window_width, old_window_height, old_window_flags; + SDL_GetWindowSize(sdl_window, &old_window_width, &old_window_height); + old_window_flags = SDL_GetWindowFlags(sdl_window); + if (old_window_width != window_width || + old_window_height != window_height || + (old_window_flags & window_flags_to_monitor) != (window_flags & window_flags_to_monitor)) + { + delete_sdl_video_window(); + } + } + + // Apply anti-aliasing, if and when appropriate (usually in fullscreen) + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); + + // Always use a resize-able window. This helps allow SDL to manage + // transitions involving fullscreen to or from windowed-mode. + window_flags |= SDL_WINDOW_RESIZABLE; + + if (!sdl_window) { + sdl_window = SDL_CreateWindow( + "Basilisk II", + SDL_WINDOWPOS_UNDEFINED, + SDL_WINDOWPOS_UNDEFINED, + window_width, + window_height, + window_flags); + if (!sdl_window) { + shutdown_sdl_video(); + return NULL; + } + } + + // Some SDL events (regarding some native-window events), need processing + // as they are generated. SDL2 has a facility, SDL_AddEventWatch(), which + // allows events to be processed as they are generated. + if (!did_add_event_watch) { + SDL_AddEventWatch(&on_sdl_event_generated, NULL); + did_add_event_watch = true; + } + + if (!sdl_renderer) { + sdl_renderer = SDL_CreateRenderer(sdl_window, -1, SDL_RENDERER_ACCELERATED); + if (!sdl_renderer) { + shutdown_sdl_video(); + return NULL; + } + sdl_renderer_thread_id = SDL_ThreadID(); + } + + SDL_assert(sdl_texture == NULL); + sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_STREAMING, width, height); + if (!sdl_texture) { + shutdown_sdl_video(); + return NULL; + } + + SDL_assert(guest_surface == NULL); + SDL_assert(host_surface == NULL); + switch (bpp) { + case 8: + guest_surface = SDL_CreateRGBSurface(0, width, height, 8, 0, 0, 0, 0); + break; + case 16: + guest_surface = SDL_CreateRGBSurface(0, width, height, 16, 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000); + break; + case 32: + guest_surface = SDL_CreateRGBSurface(0, width, height, 32, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000); + host_surface = guest_surface; + break; + default: + printf("WARNING: An unsupported bpp of %d was used\n", bpp); + break; + } + if (!guest_surface) { + shutdown_sdl_video(); + return NULL; + } + + if (!host_surface) { + Uint32 texture_format; + if (SDL_QueryTexture(sdl_texture, &texture_format, NULL, NULL, NULL) != 0) { + printf("ERROR: Unable to get the SDL texture's pixel format: %s\n", SDL_GetError()); + shutdown_sdl_video(); + return NULL; + } + + int bpp; + Uint32 Rmask, Gmask, Bmask, Amask; + if (!SDL_PixelFormatEnumToMasks(texture_format, &bpp, &Rmask, &Gmask, &Bmask, &Amask)) { + printf("ERROR: Unable to determine format for host SDL_surface: %s\n", SDL_GetError()); + shutdown_sdl_video(); + return NULL; + } + + host_surface = SDL_CreateRGBSurface(0, width, height, bpp, Rmask, Gmask, Bmask, Amask); + if (!host_surface) { + printf("ERROR: Unable to create host SDL_surface: %s\n", SDL_GetError()); + shutdown_sdl_video(); + return NULL; + } + } + + if (SDL_RenderSetLogicalSize(sdl_renderer, width, height) != 0) { + printf("ERROR: Unable to set SDL rendeer's logical size (to %dx%d): %s\n", + width, height, SDL_GetError()); + shutdown_sdl_video(); + return NULL; + } + + return guest_surface; +} + +static int present_sdl_video() +{ + if (!sdl_renderer || !sdl_texture || !guest_surface) { + printf("WARNING: A video mode does not appear to have been set.\n"); + return -1; + } + + // Some systems, such as D3D9, can fail if and when they are used across + // certain operations. To address this, only utilize SDL_Renderer in a + // single thread, preferably the main thread. + // + // This was added as part of a fix for https://github.com/DavidLudwig/macemu/issues/21 + // "BasiliskII, Win32: resizing a window does not stretch " + SDL_assert(SDL_ThreadID() == sdl_renderer_thread_id); + + // Make sure the display's internal (to SDL, possibly the OS) buffer gets + // cleared. Not doing so can, if and when letterboxing is applied (whereby + // colored bars are drawn on the screen's sides to help with aspect-ratio + // correction), the colored bars can be an unknown color. + SDL_SetRenderDrawColor(sdl_renderer, 0, 0, 0, 0); // Use black + SDL_RenderClear(sdl_renderer); // Clear the display + + if (host_surface != guest_surface && + host_surface != NULL && + guest_surface != NULL) + { + SDL_Rect destRect = {0, 0, host_surface->w, host_surface->h}; + if (SDL_BlitSurface(guest_surface, NULL, host_surface, &destRect) != 0) { + return -1; + } + } + + if (SDL_UpdateTexture(sdl_texture, NULL, host_surface->pixels, host_surface->pitch) != 0) { + return -1; + } + + SDL_Rect src_rect = {0, 0, host_surface->w, host_surface->h}; + if (SDL_RenderCopy(sdl_renderer, sdl_texture, &src_rect, NULL) != 0) { + return -1; + } + + SDL_RenderPresent(sdl_renderer); + + return 0; +} + +static int update_sdl_video() +{ + // HACK, dludwig@pobox.com: for now, just update the whole screen, via + // VideoInterrupt(), which gets called on the main thread. + // + // TODO: make sure SDL_Renderer resources get displayed, if and when + // MacsBug is running (and VideoInterrupt() might not get called) + // + // TODO: cache rects to update, then use rects in present_sdl_video() + return 0; +} + +static int update_sdl_video(SDL_Surface *s, int x, int y, int w, int h) +{ + // HACK, dludwig@pobox.com: for now, just update the whole screen, via + // VideoInterrupt(), which gets called on the main thread. + // + // TODO: make sure SDL_Renderer resources get displayed, if and when + // MacsBug is running (and VideoInterrupt() might not get called) + // + // TODO: cache rects to update, then use rects in present_sdl_video() + return 0; +} + +void driver_base::set_video_mode(int flags) +{ + int depth = sdl_depth_of_video_depth(VIDEO_MODE_DEPTH); + if ((s = init_sdl_video(VIDEO_MODE_X, VIDEO_MODE_Y, depth, flags)) == NULL) + return; +#ifdef ENABLE_VOSF + the_host_buffer = (uint8 *)s->pixels; +#endif +} + +void driver_base::init() +{ + set_video_mode(display_type == DISPLAY_SCREEN ? SDL_WINDOW_FULLSCREEN : 0); + int aligned_height = (VIDEO_MODE_Y + 15) & ~15; + +#ifdef ENABLE_VOSF + use_vosf = true; + // Allocate memory for frame buffer (SIZE is extended to page-boundary) + the_buffer_size = page_extend((aligned_height + 2) * s->pitch); + the_buffer = (uint8 *)vm_acquire_framebuffer(the_buffer_size); + the_buffer_copy = (uint8 *)malloc(the_buffer_size); + D(bug("the_buffer = %p, the_buffer_copy = %p, the_host_buffer = %p\n", the_buffer, the_buffer_copy, the_host_buffer)); + + // Check whether we can initialize the VOSF subsystem and it's profitable + if (!video_vosf_init(monitor)) { + WarningAlert(GetString(STR_VOSF_INIT_ERR)); + use_vosf = false; + } + else if (!video_vosf_profitable()) { + video_vosf_exit(); + printf("VOSF acceleration is not profitable on this platform, disabling it\n"); + use_vosf = false; + } + if (!use_vosf) { + free(the_buffer_copy); + vm_release(the_buffer, the_buffer_size); + the_host_buffer = NULL; + } +#endif + if (!use_vosf) { + // Allocate memory for frame buffer + the_buffer_size = (aligned_height + 2) * s->pitch; + the_buffer_copy = (uint8 *)calloc(1, the_buffer_size); + the_buffer = (uint8 *)vm_acquire_framebuffer(the_buffer_size); + D(bug("the_buffer = %p, the_buffer_copy = %p\n", the_buffer, the_buffer_copy)); + } + + // Set frame buffer base + set_mac_frame_buffer(monitor, VIDEO_MODE_DEPTH, true); + + adapt_to_video_mode(); +} + +void driver_base::adapt_to_video_mode() { + ADBSetRelMouseMode(mouse_grabbed); + + // Init blitting routines + SDL_PixelFormat *f = s->format; + VisualFormat visualFormat; + visualFormat.depth = sdl_depth_of_video_depth(VIDEO_MODE_DEPTH); + visualFormat.Rmask = f->Rmask; + visualFormat.Gmask = f->Gmask; + visualFormat.Bmask = f->Bmask; + Screen_blitter_init(visualFormat, true, mac_depth_of_video_depth(VIDEO_MODE_DEPTH)); + + // Load gray ramp to 8->16/32 expand map + if (!IsDirectMode(mode)) + for (int i=0; i<256; i++) + ExpandMap[i] = SDL_MapRGB(f, i, i, i); + + + bool hardware_cursor = false; +#ifdef SHEEPSHAVER + hardware_cursor = video_can_change_cursor(); + if (hardware_cursor) { + // Create cursor + if ((sdl_cursor = SDL_CreateCursor(MacCursor + 4, MacCursor + 36, 16, 16, 0, 0)) != NULL) { + SDL_SetCursor(sdl_cursor); + } + } + // Tell the video driver there's a change in cursor type + if (private_data) + private_data->cursorHardware = hardware_cursor; +#endif + // Hide cursor + SDL_ShowCursor(hardware_cursor); + + // Set window name/class + set_window_name(mouse_grabbed ? STR_WINDOW_TITLE_GRABBED : STR_WINDOW_TITLE); + + // Everything went well + init_ok = true; +} + +driver_base::~driver_base() +{ + ungrab_mouse(); + restore_mouse_accel(); + + // HACK: Just delete instances of SDL_Surface and SDL_Texture, rather + // than also the SDL_Window and SDL_Renderer. This fixes a bug whereby + // OSX hosts, when in fullscreen, will, on a guest OS resolution change, + // do a series of switches (using OSX's "Spaces" feature) to and from + // the Basilisk II desktop, + delete_sdl_video_surfaces(); // This deletes instances of SDL_Surface and SDL_Texture + //shutdown_sdl_video(); // This deletes SDL_Window, SDL_Renderer, in addition to + // instances of SDL_Surface and SDL_Texture. + + // the_buffer shall always be mapped through vm_acquire_framebuffer() + if (the_buffer != VM_MAP_FAILED) { + D(bug(" releasing the_buffer at %p (%d bytes)\n", the_buffer, the_buffer_size)); + vm_release_framebuffer(the_buffer, the_buffer_size); + the_buffer = NULL; + } + + // Free frame buffer(s) + if (!use_vosf) { + if (the_buffer_copy) { + free(the_buffer_copy); + the_buffer_copy = NULL; + } + } +#ifdef ENABLE_VOSF + else { + if (the_buffer_copy) { + D(bug(" freeing the_buffer_copy at %p\n", the_buffer_copy)); + free(the_buffer_copy); + the_buffer_copy = NULL; + } + + // Deinitialize VOSF + video_vosf_exit(); + } +#endif + + SDL_ShowCursor(1); +} + +// Palette has changed +void driver_base::update_palette(void) +{ + const VIDEO_MODE &mode = monitor.get_current_mode(); + + if ((int)VIDEO_MODE_DEPTH <= VIDEO_DEPTH_8BIT) { + SDL_SetSurfacePalette(s, sdl_palette); + } +} + +// Disable mouse acceleration +void driver_base::disable_mouse_accel(void) +{ +} + +// Restore mouse acceleration to original value +void driver_base::restore_mouse_accel(void) +{ +} + +// Toggle mouse grab +void driver_base::toggle_mouse_grab(void) +{ + if (mouse_grabbed) + ungrab_mouse(); + else + grab_mouse(); +} + +static void update_mouse_grab() +{ + if (mouse_grabbed) { + SDL_SetRelativeMouseMode(SDL_TRUE); + } else { + SDL_SetRelativeMouseMode(SDL_FALSE); + } +} + +// Grab mouse, switch to relative mouse mode +void driver_base::grab_mouse(void) +{ + if (!mouse_grabbed) { + mouse_grabbed = true; + update_mouse_grab(); + set_window_name(STR_WINDOW_TITLE_GRABBED); + disable_mouse_accel(); + ADBSetRelMouseMode(true); + } +} + +// Ungrab mouse, switch to absolute mouse mode +void driver_base::ungrab_mouse(void) +{ + if (mouse_grabbed) { + mouse_grabbed = false; + update_mouse_grab(); + set_window_name(STR_WINDOW_TITLE); + restore_mouse_accel(); + ADBSetRelMouseMode(false); + } +} + +/* + * Initialization + */ + +// Init keycode translation table +static void keycode_init(void) +{ + bool use_kc = PrefsFindBool("keycodes"); + if (use_kc) { + + // Get keycode file path from preferences + const char *kc_path = PrefsFindString("keycodefile"); + + // Open keycode table + FILE *f = fopen(kc_path ? kc_path : KEYCODE_FILE_NAME, "r"); + if (f == NULL) { + char str[256]; + snprintf(str, sizeof(str), GetString(STR_KEYCODE_FILE_WARN), kc_path ? kc_path : KEYCODE_FILE_NAME, strerror(errno)); + WarningAlert(str); + return; + } + + // Default translation table + for (int i=0; i<256; i++) + keycode_table[i] = -1; + + // Search for server vendor string, then read keycodes + const char * video_driver = SDL_GetCurrentVideoDriver(); + bool video_driver_found = false; + char line[256]; + int n_keys = 0; + while (fgets(line, sizeof(line) - 1, f)) { + // Read line + int len = strlen(line); + if (len == 0) + continue; + line[len-1] = 0; + + // Comments begin with "#" or ";" + if (line[0] == '#' || line[0] == ';' || line[0] == 0) + continue; + + if (video_driver_found) { + // Skip aliases as long as we have read keycodes yet + // Otherwise, it's another mapping and we have to stop + static const char sdl_str[] = "sdl"; + if (strncmp(line, sdl_str, sizeof(sdl_str) - 1) == 0 && n_keys == 0) + continue; + + // Read keycode + int x_code, mac_code; + if (sscanf(line, "%d %d", &x_code, &mac_code) == 2) + keycode_table[x_code & 0xff] = mac_code, n_keys++; + else + break; + } else { + // Search for SDL video driver string + static const char sdl_str[] = "sdl"; + if (strncmp(line, sdl_str, sizeof(sdl_str) - 1) == 0) { + char *p = line + sizeof(sdl_str); + if (video_driver && strstr(video_driver, p) == video_driver) + video_driver_found = true; + } + } + } + + // Keycode file completely read + fclose(f); + use_keycodes = video_driver_found; + + // Vendor not found? Then display warning + if (!video_driver_found) { + char str[256]; + snprintf(str, sizeof(str), GetString(STR_KEYCODE_VENDOR_WARN), video_driver ? video_driver : "", kc_path ? kc_path : KEYCODE_FILE_NAME); + WarningAlert(str); + return; + } + + D(bug("Using SDL/%s keycodes table, %d key mappings\n", video_driver ? video_driver : "", n_keys)); + } +} + +// Open display for current mode +bool SDL_monitor_desc::video_open(void) +{ + D(bug("video_open()\n")); +#if DEBUG + const VIDEO_MODE &mode = get_current_mode(); + D(bug("Current video mode:\n")); + D(bug(" %dx%d (ID %02x), %d bpp\n", VIDEO_MODE_X, VIDEO_MODE_Y, VIDEO_MODE_RESOLUTION, 1 << (VIDEO_MODE_DEPTH & 0x0f))); +#endif + + // Create display driver object of requested type + drv = new(std::nothrow) driver_base(*this); + if (drv == NULL) + return false; + drv->init(); + if (!drv->init_ok) { + delete drv; + drv = NULL; + return false; + } + +#ifdef WIN32 + // Chain in a new message handler for WM_DEVICECHANGE + HWND the_window = GetMainWindowHandle(); + sdl_window_proc = (WNDPROC)GetWindowLongPtr(the_window, GWLP_WNDPROC); + SetWindowLongPtr(the_window, GWLP_WNDPROC, (LONG_PTR)windows_message_handler); +#endif + + // Initialize VideoRefresh function + VideoRefreshInit(); + + // Lock down frame buffer + LOCK_FRAME_BUFFER; + + // Start redraw/input thread +#ifndef USE_CPU_EMUL_SERVICES + redraw_thread_cancel = false; + redraw_thread_active = ((redraw_thread = SDL_CreateThread(redraw_func, "Redraw Thread", NULL)) != NULL); + if (!redraw_thread_active) { + printf("FATAL: cannot create redraw thread\n"); + return false; + } +#else + redraw_thread_active = true; +#endif + return true; +} + +#ifdef SHEEPSHAVER +bool VideoInit(void) +{ + const bool classic = false; +#else +bool VideoInit(bool classic) +{ +#endif + classic_mode = classic; + +#ifdef ENABLE_VOSF + // Zero the mainBuffer structure + mainBuffer.dirtyPages = NULL; + mainBuffer.pageInfo = NULL; +#endif + + // Create Mutexes + if ((sdl_events_lock = SDL_CreateMutex()) == NULL) + return false; + if ((sdl_palette_lock = SDL_CreateMutex()) == NULL) + return false; + if ((frame_buffer_lock = SDL_CreateMutex()) == NULL) + return false; + + // Init keycode translation + keycode_init(); + + // Read prefs + frame_skip = PrefsFindInt32("frameskip"); + mouse_wheel_mode = PrefsFindInt32("mousewheelmode"); + mouse_wheel_lines = PrefsFindInt32("mousewheellines"); + + // Get screen mode from preferences + migrate_screen_prefs(); + const char *mode_str = NULL; + if (classic_mode) + mode_str = "win/512/342"; + else + mode_str = PrefsFindString("screen"); + + // Determine display type and default dimensions + int default_width, default_height; + if (classic) { + default_width = 512; + default_height = 384; + } + else { + default_width = 640; + default_height = 480; + } + display_type = DISPLAY_WINDOW; + if (mode_str) { + if (sscanf(mode_str, "win/%d/%d", &default_width, &default_height) == 2) + display_type = DISPLAY_WINDOW; + else if (sscanf(mode_str, "dga/%d/%d", &default_width, &default_height) == 2) + display_type = DISPLAY_SCREEN; + } + if (default_width <= 0) + default_width = sdl_display_width(); + else if (default_width > sdl_display_width()) + default_width = sdl_display_width(); + if (default_height <= 0) + default_height = sdl_display_height(); + else if (default_height > sdl_display_height()) + default_height = sdl_display_height(); + + // Mac screen depth follows X depth + screen_depth = 32; + SDL_DisplayMode desktop_mode; + if (SDL_GetDesktopDisplayMode(0, &desktop_mode) == 0) { + screen_depth = SDL_BITSPERPIXEL(desktop_mode.format); + } + int default_depth; + switch (screen_depth) { + case 8: + default_depth = VIDEO_DEPTH_8BIT; + break; + case 15: case 16: + default_depth = VIDEO_DEPTH_16BIT; + break; + case 24: case 32: + default_depth = VIDEO_DEPTH_32BIT; + break; + default: + default_depth = VIDEO_DEPTH_1BIT; + break; + } + + // Initialize list of video modes to try + struct { + int w; + int h; + int resolution_id; + } + video_modes[] = { + { -1, -1, 0x80 }, + { 512, 384, 0x80 }, + { 640, 480, 0x81 }, + { 800, 600, 0x82 }, + { 1024, 768, 0x83 }, + { 1152, 870, 0x84 }, + { 1280, 1024, 0x85 }, + { 1600, 1200, 0x86 }, + { 0, } + }; + video_modes[0].w = default_width; + video_modes[0].h = default_height; + + // Construct list of supported modes + if (display_type == DISPLAY_WINDOW) { + if (classic) + add_mode(display_type, 512, 342, 0x80, 64, VIDEO_DEPTH_1BIT); + else { + for (int i = 0; video_modes[i].w != 0; i++) { + const int w = video_modes[i].w; + const int h = video_modes[i].h; + if (i > 0 && (w >= default_width || h >= default_height)) + continue; + for (int d = VIDEO_DEPTH_1BIT; d <= default_depth; d++) + add_mode(display_type, w, h, video_modes[i].resolution_id, TrivialBytesPerRow(w, (video_depth)d), d); + } + } + } else if (display_type == DISPLAY_SCREEN) { + for (int i = 0; video_modes[i].w != 0; i++) { + const int w = video_modes[i].w; + const int h = video_modes[i].h; + if (i > 0 && (w >= default_width || h >= default_height)) + continue; + for (int d = VIDEO_DEPTH_1BIT; d <= default_depth; d++) + add_mode(display_type, w, h, video_modes[i].resolution_id, TrivialBytesPerRow(w, (video_depth)d), d); + } + } + + if (VideoModes.empty()) { + ErrorAlert(STR_NO_XVISUAL_ERR); + return false; + } + + // Find requested default mode with specified dimensions + uint32 default_id; + std::vector::const_iterator i, end = VideoModes.end(); + for (i = VideoModes.begin(); i != end; ++i) { + const VIDEO_MODE & mode = (*i); + if (VIDEO_MODE_X == default_width && VIDEO_MODE_Y == default_height && VIDEO_MODE_DEPTH == default_depth) { + default_id = VIDEO_MODE_RESOLUTION; +#ifdef SHEEPSHAVER + std::vector::const_iterator begin = VideoModes.begin(); + cur_mode = distance(begin, i); +#endif + break; + } + } + if (i == end) { // not found, use first available mode + const VIDEO_MODE & mode = VideoModes[0]; + default_depth = VIDEO_MODE_DEPTH; + default_id = VIDEO_MODE_RESOLUTION; +#ifdef SHEEPSHAVER + cur_mode = 0; +#endif + } + +#ifdef SHEEPSHAVER + for (int i = 0; i < VideoModes.size(); i++) + VModes[i] = VideoModes[i]; + VideoInfo *p = &VModes[VideoModes.size()]; + p->viType = DIS_INVALID; // End marker + p->viRowBytes = 0; + p->viXsize = p->viYsize = 0; + p->viAppleMode = 0; + p->viAppleID = 0; +#endif + +#if DEBUG + D(bug("Available video modes:\n")); + for (i = VideoModes.begin(); i != end; ++i) { + const VIDEO_MODE & mode = (*i); + int bits = 1 << VIDEO_MODE_DEPTH; + if (bits == 16) + bits = 15; + else if (bits == 32) + bits = 24; + D(bug(" %dx%d (ID %02x), %d colors\n", VIDEO_MODE_X, VIDEO_MODE_Y, VIDEO_MODE_RESOLUTION, 1 << bits)); + } +#endif + + int color_depth = get_customized_color_depth(default_depth); + + D(bug("Return get_customized_color_depth %d\n", color_depth)); + + // Create SDL_monitor_desc for this (the only) display + SDL_monitor_desc *monitor = new SDL_monitor_desc(VideoModes, (video_depth)color_depth, default_id); + VideoMonitors.push_back(monitor); + + // Open display + return monitor->video_open(); +} + + +/* + * Deinitialization + */ + +// Close display +void SDL_monitor_desc::video_close(void) +{ + D(bug("video_close()\n")); + +#ifdef WIN32 + // Remove message handler for WM_DEVICECHANGE + HWND the_window = GetMainWindowHandle(); + SetWindowLongPtr(the_window, GWLP_WNDPROC, (LONG_PTR)sdl_window_proc); +#endif + + // Stop redraw thread +#ifndef USE_CPU_EMUL_SERVICES + if (redraw_thread_active) { + redraw_thread_cancel = true; + SDL_WaitThread(redraw_thread, NULL); + } +#endif + redraw_thread_active = false; + + // Unlock frame buffer + UNLOCK_FRAME_BUFFER; + D(bug(" frame buffer unlocked\n")); + + // Close display + delete drv; + drv = NULL; +} + +void VideoExit(void) +{ + // Close displays + vector::iterator i, end = VideoMonitors.end(); + for (i = VideoMonitors.begin(); i != end; ++i) + dynamic_cast(*i)->video_close(); + + // Destroy locks + if (frame_buffer_lock) + SDL_DestroyMutex(frame_buffer_lock); + if (sdl_palette_lock) + SDL_DestroyMutex(sdl_palette_lock); + if (sdl_events_lock) + SDL_DestroyMutex(sdl_events_lock); +} + + +/* + * Close down full-screen mode (if bringing up error alerts is unsafe while in full-screen mode) + */ + +void VideoQuitFullScreen(void) +{ + D(bug("VideoQuitFullScreen()\n")); + quit_full_screen = true; +} + +static void do_toggle_fullscreen(void) +{ +#ifndef USE_CPU_EMUL_SERVICES + // pause redraw thread + thread_stop_ack = false; + thread_stop_req = true; + while (!thread_stop_ack) ; +#endif + + // Apply fullscreen + if (sdl_window) { + if (display_type == DISPLAY_SCREEN) { + display_type = DISPLAY_WINDOW; + SDL_SetWindowFullscreen(sdl_window, 0); + } else { + display_type = DISPLAY_SCREEN; + SDL_SetWindowFullscreen(sdl_window, SDL_WINDOW_FULLSCREEN_DESKTOP); + } + } + + // switch modes + drv->adapt_to_video_mode(); + + // reset the palette +#ifdef SHEEPSHAVER + video_set_palette(); +#endif + drv->update_palette(); + + // reset the video refresh handler + VideoRefreshInit(); + + // while SetVideoMode is happening, control key up may be missed + ADBKeyUp(0x36); + + // resume redraw thread + toggle_fullscreen = false; +#ifndef USE_CPU_EMUL_SERVICES + thread_stop_req = false; +#endif +} + +/* + * Mac VBL interrupt + */ + +/* + * Execute video VBL routine + */ + +static bool is_fullscreen(SDL_Window * window) +{ +#ifdef __MACOSX__ + // On OSX, SDL, at least as of 2.0.5 (and possibly beyond), does not always + // report changes to fullscreen via the SDL_WINDOW_FULLSCREEN flag. + // (Example: https://bugzilla.libsdl.org/show_bug.cgi?id=3766 , which + // involves fullscreen/windowed toggles via window-manager UI controls). + // Until it does, or adds a facility to do so, we'll use a platform-specific + // code path to detect fullscreen changes. + extern bool is_fullscreen_osx(SDL_Window * window); + return is_fullscreen_osx(sdl_window); +#else + if (!window) { + return false; + } + const Uint32 sdl_window_flags = SDL_GetWindowFlags(sdl_window); + return (sdl_window_flags & SDL_WINDOW_FULLSCREEN) != 0; +#endif +} + +#ifdef SHEEPSHAVER +void VideoVBL(void) +{ + // Emergency quit requested? Then quit + if (emerg_quit) + QuitEmulator(); + + if (toggle_fullscreen) + do_toggle_fullscreen(); + + present_sdl_video(); + + // Temporarily give up frame buffer lock (this is the point where + // we are suspended when the user presses Ctrl-Tab) + UNLOCK_FRAME_BUFFER; + LOCK_FRAME_BUFFER; + + // Execute video VBL + if (private_data != NULL && private_data->interruptsEnabled) + VSLDoInterruptService(private_data->vslServiceID); +} +#else +void VideoInterrupt(void) +{ + // We must fill in the events queue in the same thread that did call SDL_SetVideoMode() + SDL_PumpEvents(); + + // Emergency quit requested? Then quit + if (emerg_quit) + QuitEmulator(); + + if (toggle_fullscreen) + do_toggle_fullscreen(); + + present_sdl_video(); + + // Temporarily give up frame buffer lock (this is the point where + // we are suspended when the user presses Ctrl-Tab) + UNLOCK_FRAME_BUFFER; + LOCK_FRAME_BUFFER; +} +#endif + + +/* + * Set palette + */ + +#ifdef SHEEPSHAVER +void video_set_palette(void) +{ + monitor_desc * monitor = VideoMonitors[0]; + int n_colors = palette_size(monitor->get_current_mode().viAppleMode); + uint8 pal[256 * 3]; + for (int c = 0; c < n_colors; c++) { + pal[c*3 + 0] = mac_pal[c].red; + pal[c*3 + 1] = mac_pal[c].green; + pal[c*3 + 2] = mac_pal[c].blue; + } + monitor->set_palette(pal, n_colors); +} +#endif + +void SDL_monitor_desc::set_palette(uint8 *pal, int num_in) +{ + const VIDEO_MODE &mode = get_current_mode(); + + // FIXME: how can we handle the gamma ramp? + if ((int)VIDEO_MODE_DEPTH > VIDEO_DEPTH_8BIT) + return; + + LOCK_PALETTE; + + // Convert colors to XColor array + int num_out = 256; + bool stretch = false; + + if (!sdl_palette) { + sdl_palette = SDL_AllocPalette(num_out); + } + + SDL_Color *p = sdl_palette->colors; + for (int i=0; ir = pal[c*3 + 0] * 0x0101; + p->g = pal[c*3 + 1] * 0x0101; + p->b = pal[c*3 + 2] * 0x0101; + p++; + } + + // Recalculate pixel color expansion map + if (!IsDirectMode(mode)) { + for (int i=0; i<256; i++) { + int c = i & (num_in-1); // If there are less than 256 colors, we repeat the first entries (this makes color expansion easier) + ExpandMap[i] = SDL_MapRGB(drv->s->format, pal[c*3+0], pal[c*3+1], pal[c*3+2]); + } + +#ifdef ENABLE_VOSF + if (use_vosf) { + // We have to redraw everything because the interpretation of pixel values changed + LOCK_VOSF; + PFLAG_SET_ALL; + UNLOCK_VOSF; + memset(the_buffer_copy, 0, VIDEO_MODE_ROW_BYTES * VIDEO_MODE_Y); + } +#endif + } + + // Tell redraw thread to change palette + sdl_palette_changed = true; + + UNLOCK_PALETTE; +} + + +/* + * Switch video mode + */ + +#ifdef SHEEPSHAVER +int16 video_mode_change(VidLocals *csSave, uint32 ParamPtr) +{ + /* return if no mode change */ + if ((csSave->saveData == ReadMacInt32(ParamPtr + csData)) && + (csSave->saveMode == ReadMacInt16(ParamPtr + csMode))) return noErr; + + /* first find video mode in table */ + for (int i=0; VModes[i].viType != DIS_INVALID; i++) { + if ((ReadMacInt16(ParamPtr + csMode) == VModes[i].viAppleMode) && + (ReadMacInt32(ParamPtr + csData) == VModes[i].viAppleID)) { + csSave->saveMode = ReadMacInt16(ParamPtr + csMode); + csSave->saveData = ReadMacInt32(ParamPtr + csData); + csSave->savePage = ReadMacInt16(ParamPtr + csPage); + + // Disable interrupts and pause redraw thread + DisableInterrupt(); + thread_stop_ack = false; + thread_stop_req = true; + while (!thread_stop_ack) ; + + cur_mode = i; + monitor_desc *monitor = VideoMonitors[0]; + monitor->switch_to_current_mode(); + + WriteMacInt32(ParamPtr + csBaseAddr, screen_base); + csSave->saveBaseAddr=screen_base; + csSave->saveData=VModes[cur_mode].viAppleID;/* First mode ... */ + csSave->saveMode=VModes[cur_mode].viAppleMode; + + // Enable interrupts and resume redraw thread + thread_stop_req = false; + EnableInterrupt(); + return noErr; + } + } + return paramErr; +} +#endif + +void SDL_monitor_desc::switch_to_current_mode(void) +{ + // Close and reopen display + LOCK_EVENTS; + video_close(); + video_open(); + UNLOCK_EVENTS; + + if (drv == NULL) { + ErrorAlert(STR_OPEN_WINDOW_ERR); + QuitEmulator(); + } +} + + +/* + * Can we set the MacOS cursor image into the window? + */ + +#ifdef SHEEPSHAVER +bool video_can_change_cursor(void) +{ + if (display_type != DISPLAY_WINDOW) + return false; + + return true; +} +#endif + + +/* + * Set cursor image for window + */ + +#ifdef SHEEPSHAVER +void video_set_cursor(void) +{ + // Set new cursor image if it was changed + if (sdl_cursor) { + SDL_FreeCursor(sdl_cursor); + sdl_cursor = SDL_CreateCursor(MacCursor + 4, MacCursor + 36, 16, 16, MacCursor[2], MacCursor[3]); + if (sdl_cursor) { + SDL_ShowCursor(private_data == NULL || private_data->cursorVisible); + SDL_SetCursor(sdl_cursor); + + // XXX Windows apparently needs an extra mouse event to + // make the new cursor image visible. + // On Mac, if mouse is grabbed, SDL_ShowCursor() recenters the + // mouse, we have to put it back. + bool move = false; +#ifdef WIN32 + move = true; +#elif defined(__APPLE__) + move = mouse_grabbed; +#endif + if (move) { + int visible = SDL_ShowCursor(-1); + if (visible) { + int x, y; + SDL_GetMouseState(&x, &y); + printf("WarpMouse to {%d,%d} via video_set_cursor\n", x, y); + SDL_WarpMouseGlobal(x, y); + } + } + } + } +} +#endif + + +/* + * Keyboard-related utilify functions + */ + +static bool is_modifier_key(SDL_KeyboardEvent const & e) +{ + switch (e.keysym.sym) { + case SDLK_NUMLOCKCLEAR: + case SDLK_CAPSLOCK: + case SDLK_SCROLLLOCK: + case SDLK_RSHIFT: + case SDLK_LSHIFT: + case SDLK_RCTRL: + case SDLK_LCTRL: + case SDLK_RALT: + case SDLK_LALT: + case SDLK_RGUI: + case SDLK_LGUI: + case SDLK_MODE: + case SDLK_APPLICATION: + return true; + } + return false; +} + +static bool is_ctrl_down(SDL_Keysym const & ks) +{ + return ctrl_down || (ks.mod & KMOD_CTRL); +} + + +/* + * Translate key event to Mac keycode, returns -1 if no keycode was found + * and -2 if the key was recognized as a hotkey + */ + +static int kc_decode(SDL_Keysym const & ks, bool key_down) +{ + switch (ks.sym) { + case SDLK_a: return 0x00; + case SDLK_b: return 0x0b; + case SDLK_c: return 0x08; + case SDLK_d: return 0x02; + case SDLK_e: return 0x0e; + case SDLK_f: return 0x03; + case SDLK_g: return 0x05; + case SDLK_h: return 0x04; + case SDLK_i: return 0x22; + case SDLK_j: return 0x26; + case SDLK_k: return 0x28; + case SDLK_l: return 0x25; + case SDLK_m: return 0x2e; + case SDLK_n: return 0x2d; + case SDLK_o: return 0x1f; + case SDLK_p: return 0x23; + case SDLK_q: return 0x0c; + case SDLK_r: return 0x0f; + case SDLK_s: return 0x01; + case SDLK_t: return 0x11; + case SDLK_u: return 0x20; + case SDLK_v: return 0x09; + case SDLK_w: return 0x0d; + case SDLK_x: return 0x07; + case SDLK_y: return 0x10; + case SDLK_z: return 0x06; + + case SDLK_1: case SDLK_EXCLAIM: return 0x12; + case SDLK_2: case SDLK_AT: return 0x13; + case SDLK_3: case SDLK_HASH: return 0x14; + case SDLK_4: case SDLK_DOLLAR: return 0x15; + case SDLK_5: return 0x17; + case SDLK_6: return 0x16; + case SDLK_7: return 0x1a; + case SDLK_8: return 0x1c; + case SDLK_9: return 0x19; + case SDLK_0: return 0x1d; + + case SDLK_BACKQUOTE: return 0x0a; + case SDLK_MINUS: case SDLK_UNDERSCORE: return 0x1b; + case SDLK_EQUALS: case SDLK_PLUS: return 0x18; + case SDLK_LEFTBRACKET: return 0x21; + case SDLK_RIGHTBRACKET: return 0x1e; + case SDLK_BACKSLASH: return 0x2a; + case SDLK_SEMICOLON: case SDLK_COLON: return 0x29; + case SDLK_QUOTE: case SDLK_QUOTEDBL: return 0x27; + case SDLK_COMMA: case SDLK_LESS: return 0x2b; + case SDLK_PERIOD: case SDLK_GREATER: return 0x2f; + case SDLK_SLASH: case SDLK_QUESTION: return 0x2c; + + case SDLK_TAB: if (is_ctrl_down(ks)) {if (!key_down) drv->suspend(); return -2;} else return 0x30; + case SDLK_RETURN: if (is_ctrl_down(ks)) {if (!key_down) toggle_fullscreen = true; return -2;} else return 0x24; + case SDLK_SPACE: return 0x31; + case SDLK_BACKSPACE: return 0x33; + + case SDLK_DELETE: return 0x75; + case SDLK_INSERT: return 0x72; + case SDLK_HOME: case SDLK_HELP: return 0x73; + case SDLK_END: return 0x77; + case SDLK_PAGEUP: return 0x74; + case SDLK_PAGEDOWN: return 0x79; + + case SDLK_LCTRL: return 0x36; + case SDLK_RCTRL: return 0x36; + case SDLK_LSHIFT: return 0x38; + case SDLK_RSHIFT: return 0x38; +#if (defined(__APPLE__) && defined(__MACH__)) + case SDLK_LALT: return 0x3a; + case SDLK_RALT: return 0x3a; + case SDLK_LGUI: return 0x37; + case SDLK_RGUI: return 0x37; +#else + case SDLK_LALT: return 0x37; + case SDLK_RALT: return 0x37; + case SDLK_LGUI: return 0x3a; + case SDLK_RGUI: return 0x3a; +#endif + case SDLK_MENU: return 0x32; + case SDLK_CAPSLOCK: return 0x39; + case SDLK_NUMLOCKCLEAR: return 0x47; + + case SDLK_UP: return 0x3e; + case SDLK_DOWN: return 0x3d; + case SDLK_LEFT: return 0x3b; + case SDLK_RIGHT: return 0x3c; + + case SDLK_ESCAPE: if (is_ctrl_down(ks)) {if (!key_down) { quit_full_screen = true; emerg_quit = true; } return -2;} else return 0x35; + + case SDLK_F1: if (is_ctrl_down(ks)) {if (!key_down) SysMountFirstFloppy(); return -2;} else return 0x7a; + case SDLK_F2: return 0x78; + case SDLK_F3: return 0x63; + case SDLK_F4: return 0x76; + case SDLK_F5: return 0x60; + case SDLK_F6: return 0x61; + case SDLK_F7: return 0x62; + case SDLK_F8: return 0x64; + case SDLK_F9: return 0x65; + case SDLK_F10: return 0x6d; + case SDLK_F11: return 0x67; + case SDLK_F12: return 0x6f; + + case SDLK_PRINTSCREEN: return 0x69; + case SDLK_SCROLLLOCK: return 0x6b; + case SDLK_PAUSE: return 0x71; + + case SDLK_KP_0: return 0x52; + case SDLK_KP_1: return 0x53; + case SDLK_KP_2: return 0x54; + case SDLK_KP_3: return 0x55; + case SDLK_KP_4: return 0x56; + case SDLK_KP_5: return 0x57; + case SDLK_KP_6: return 0x58; + case SDLK_KP_7: return 0x59; + case SDLK_KP_8: return 0x5b; + case SDLK_KP_9: return 0x5c; + case SDLK_KP_PERIOD: return 0x41; + case SDLK_KP_PLUS: return 0x45; + case SDLK_KP_MINUS: return 0x4e; + case SDLK_KP_MULTIPLY: return 0x43; + case SDLK_KP_DIVIDE: return 0x4b; + case SDLK_KP_ENTER: return 0x4c; + case SDLK_KP_EQUALS: return 0x51; + } + D(bug("Unhandled SDL keysym: %d\n", ks.sym)); + return -1; +} + +static int event2keycode(SDL_KeyboardEvent const &ev, bool key_down) +{ + return kc_decode(ev.keysym, key_down); +} + +static void force_complete_window_refresh() +{ + if (display_type == DISPLAY_WINDOW) { +#ifdef ENABLE_VOSF + if (use_vosf) { // VOSF refresh + LOCK_VOSF; + PFLAG_SET_ALL; + UNLOCK_VOSF; + } +#endif + // Ensure each byte of the_buffer_copy differs from the_buffer to force a full update. + const VIDEO_MODE &mode = VideoMonitors[0]->get_current_mode(); + const int len = VIDEO_MODE_ROW_BYTES * VIDEO_MODE_Y; + for (int i = 0; i < len; i++) + the_buffer_copy[i] = !the_buffer[i]; + } +} + +/* + * SDL event handling + */ + +// possible return codes for SDL-registered event watches +enum : int { + EVENT_DROP_FROM_QUEUE = 0, + EVENT_ADD_TO_QUEUE = 1 +}; + +// Some events need to be processed in the host-app's main thread, due to +// host-OS requirements. +// +// This function is called by SDL, whenever it generates an SDL_Event. It has +// the ability to process events, and optionally, to prevent them from being +// added to SDL's event queue (and retrieve-able via SDL_PeepEvents(), etc.) +static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event) +{ + switch (event->type) { + case SDL_KEYUP: { + SDL_Keysym const & ks = event->key.keysym; + switch (ks.sym) { + case SDLK_F5: { + if (is_ctrl_down(ks)) { + drv->toggle_mouse_grab(); + return EVENT_DROP_FROM_QUEUE; + } + } break; + } + } break; + + case SDL_WINDOWEVENT: { + switch (event->window.event) { + case SDL_WINDOWEVENT_RESIZED: { + // Handle changes of fullscreen. This is done here, in + // on_sdl_event_generated() and not the main SDL_Event-processing + // loop, in order to perform this change on the main thread. + // (Some os'es UI APIs, such as OSX's NSWindow, are not + // thread-safe.) + const bool is_full = is_fullscreen(sdl_window); + const bool adjust_fullscreen = \ + (display_type == DISPLAY_WINDOW && is_full) || + (display_type == DISPLAY_SCREEN && !is_full); + if (adjust_fullscreen) { + do_toggle_fullscreen(); + +#if __MACOSX__ + // HACK-FIX: on OSX hosts, make sure that the OSX menu + // bar does not show up in fullscreen mode, when the + // cursor is near the top of the screen, lest the + // guest OS' menu bar be obscured. + if (is_full) { + extern void set_menu_bar_visible_osx(bool); + set_menu_bar_visible_osx(false); + } +#endif + } + } break; + } + } break; + } + + return EVENT_ADD_TO_QUEUE; +} + + +static void handle_events(void) +{ + SDL_Event events[10]; + const int n_max_events = sizeof(events) / sizeof(events[0]); + int n_events; + + while ((n_events = SDL_PeepEvents(events, n_max_events, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT)) > 0) { + for (int i = 0; i < n_events; i++) { + SDL_Event & event = events[i]; + + switch (event.type) { + + // Mouse button + case SDL_MOUSEBUTTONDOWN: { + unsigned int button = event.button.button; + if (button == SDL_BUTTON_LEFT) + ADBMouseDown(0); + else if (button == SDL_BUTTON_RIGHT) + ADBMouseDown(1); + else if (button == SDL_BUTTON_MIDDLE) + ADBMouseDown(2); + else if (button < 6) { // Wheel mouse + if (mouse_wheel_mode == 0) { + int key = (button == 5) ? 0x79 : 0x74; // Page up/down + ADBKeyDown(key); + ADBKeyUp(key); + } else { + int key = (button == 5) ? 0x3d : 0x3e; // Cursor up/down + for(int i=0; imouse_moved(event.motion.xrel, event.motion.yrel); + } else { + drv->mouse_moved(event.motion.x, event.motion.y); + } + break; + + // Keyboard + case SDL_KEYDOWN: { + int code = -1; + if (use_keycodes && !is_modifier_key(event.key)) { + if (event2keycode(event.key, true) != -2) // This is called to process the hotkeys + code = keycode_table[event.key.keysym.scancode & 0xff]; + } else + code = event2keycode(event.key, true); + if (code >= 0) { + if (!emul_suspended) { + if (code == 0x39) { // Caps Lock pressed + if (caps_on) { + ADBKeyUp(code); + caps_on = false; + } else { + ADBKeyDown(code); + caps_on = true; + } + } else + ADBKeyDown(code); + if (code == 0x36) + ctrl_down = true; + } else { + if (code == 0x31) + drv->resume(); // Space wakes us up + } + } + break; + } + case SDL_KEYUP: { + int code = -1; + if (use_keycodes && !is_modifier_key(event.key)) { + if (event2keycode(event.key, false) != -2) // This is called to process the hotkeys + code = keycode_table[event.key.keysym.scancode & 0xff]; + } else + code = event2keycode(event.key, false); + if (code >= 0) { + if (code == 0x39) { // Caps Lock released + if (caps_on) { + ADBKeyUp(code); + caps_on = false; + } else { + ADBKeyDown(code); + caps_on = true; + } + } else + ADBKeyUp(code); + if (code == 0x36) + ctrl_down = false; + } + break; + } + + case SDL_WINDOWEVENT: { + switch (event.window.event) { + // Hidden parts exposed, force complete refresh of window + case SDL_WINDOWEVENT_EXPOSED: + force_complete_window_refresh(); + break; + + // Force a complete window refresh when activating, to avoid redraw artifacts otherwise. + case SDL_WINDOWEVENT_RESTORED: + force_complete_window_refresh(); + break; + + } + break; + } + + // Window "close" widget clicked + case SDL_QUIT: + ADBKeyDown(0x7f); // Power key + ADBKeyUp(0x7f); + break; + } + } + } +} + + +/* + * Window display update + */ + +// Static display update (fixed frame rate, but incremental) +static void update_display_static(driver_base *drv) +{ + // Incremental update code + int wide = 0, high = 0; + uint32 x1, x2, y1, y2; + const VIDEO_MODE &mode = drv->mode; + int bytes_per_row = VIDEO_MODE_ROW_BYTES; + uint8 *p, *p2; + + // Check for first line from top and first line from bottom that have changed + y1 = 0; + for (uint32 j = 0; j < VIDEO_MODE_Y; j++) { + if (memcmp(&the_buffer[j * bytes_per_row], &the_buffer_copy[j * bytes_per_row], bytes_per_row)) { + y1 = j; + break; + } + } + y2 = y1 - 1; + for (uint32 j = VIDEO_MODE_Y; j-- > y1; ) { + if (memcmp(&the_buffer[j * bytes_per_row], &the_buffer_copy[j * bytes_per_row], bytes_per_row)) { + y2 = j; + break; + } + } + high = y2 - y1 + 1; + + // Check for first column from left and first column from right that have changed + if (high) { + if (VIDEO_MODE_DEPTH < VIDEO_DEPTH_8BIT) { + const int src_bytes_per_row = bytes_per_row; + const int dst_bytes_per_row = drv->s->pitch; + const int pixels_per_byte = VIDEO_MODE_X / src_bytes_per_row; + + x1 = VIDEO_MODE_X / pixels_per_byte; + for (uint32 j = y1; j <= y2; j++) { + p = &the_buffer[j * bytes_per_row]; + p2 = &the_buffer_copy[j * bytes_per_row]; + for (uint32 i = 0; i < x1; i++) { + if (*p != *p2) { + x1 = i; + break; + } + p++; p2++; + } + } + x2 = x1; + for (uint32 j = y1; j <= y2; j++) { + p = &the_buffer[j * bytes_per_row]; + p2 = &the_buffer_copy[j * bytes_per_row]; + p += bytes_per_row; + p2 += bytes_per_row; + for (uint32 i = (VIDEO_MODE_X / pixels_per_byte); i > x2; i--) { + p--; p2--; + if (*p != *p2) { + x2 = i; + break; + } + } + } + x1 *= pixels_per_byte; + x2 *= pixels_per_byte; + wide = (x2 - x1 + pixels_per_byte - 1) & -pixels_per_byte; + + // Update copy of the_buffer + if (high && wide) { + + // Lock surface, if required + if (SDL_MUSTLOCK(drv->s)) + SDL_LockSurface(drv->s); + + // Blit to screen surface + int si = y1 * src_bytes_per_row + (x1 / pixels_per_byte); + int di = y1 * dst_bytes_per_row + x1; + for (uint32 j = y1; j <= y2; j++) { + memcpy(the_buffer_copy + si, the_buffer + si, wide / pixels_per_byte); + Screen_blit((uint8 *)drv->s->pixels + di, the_buffer + si, wide / pixels_per_byte); + si += src_bytes_per_row; + di += dst_bytes_per_row; + } + + // Unlock surface, if required + if (SDL_MUSTLOCK(drv->s)) + SDL_UnlockSurface(drv->s); + + // Refresh display + update_sdl_video(drv->s, x1, y1, wide, high); + } + + } else { + const int bytes_per_pixel = VIDEO_MODE_ROW_BYTES / VIDEO_MODE_X; + const int dst_bytes_per_row = drv->s->pitch; + + x1 = VIDEO_MODE_X; + for (uint32 j = y1; j <= y2; j++) { + p = &the_buffer[j * bytes_per_row]; + p2 = &the_buffer_copy[j * bytes_per_row]; + for (uint32 i = 0; i < x1 * bytes_per_pixel; i++) { + if (*p != *p2) { + x1 = i / bytes_per_pixel; + break; + } + p++; p2++; + } + } + x2 = x1; + for (uint32 j = y1; j <= y2; j++) { + p = &the_buffer[j * bytes_per_row]; + p2 = &the_buffer_copy[j * bytes_per_row]; + p += bytes_per_row; + p2 += bytes_per_row; + for (uint32 i = VIDEO_MODE_X * bytes_per_pixel; i > x2 * bytes_per_pixel; i--) { + p--; + p2--; + if (*p != *p2) { + x2 = i / bytes_per_pixel; + break; + } + } + } + wide = x2 - x1; + + // Update copy of the_buffer + if (high && wide) { + + // Lock surface, if required + if (SDL_MUSTLOCK(drv->s)) + SDL_LockSurface(drv->s); + + // Blit to screen surface + for (uint32 j = y1; j <= y2; j++) { + uint32 i = j * bytes_per_row + x1 * bytes_per_pixel; + int dst_i = j * dst_bytes_per_row + x1 * bytes_per_pixel; + memcpy(the_buffer_copy + i, the_buffer + i, bytes_per_pixel * wide); + Screen_blit((uint8 *)drv->s->pixels + dst_i, the_buffer + i, bytes_per_pixel * wide); + } + + // Unlock surface, if required + if (SDL_MUSTLOCK(drv->s)) + SDL_UnlockSurface(drv->s); + + // Refresh display + update_sdl_video(drv->s, x1, y1, wide, high); + } + } + } +} + +// Static display update (fixed frame rate, bounding boxes based) +// XXX use NQD bounding boxes to help detect dirty areas? +static void update_display_static_bbox(driver_base *drv) +{ + const VIDEO_MODE &mode = drv->mode; + + // Allocate bounding boxes for SDL_UpdateRects() + const uint32 N_PIXELS = 64; + const uint32 n_x_boxes = (VIDEO_MODE_X + N_PIXELS - 1) / N_PIXELS; + const uint32 n_y_boxes = (VIDEO_MODE_Y + N_PIXELS - 1) / N_PIXELS; + SDL_Rect *boxes = (SDL_Rect *)alloca(sizeof(SDL_Rect) * n_x_boxes * n_y_boxes); + uint32 nr_boxes = 0; + + // Lock surface, if required + if (SDL_MUSTLOCK(drv->s)) + SDL_LockSurface(drv->s); + + // Update the surface from Mac screen + const uint32 bytes_per_row = VIDEO_MODE_ROW_BYTES; + const uint32 bytes_per_pixel = bytes_per_row / VIDEO_MODE_X; + const uint32 dst_bytes_per_row = drv->s->pitch; + for (uint32 y = 0; y < VIDEO_MODE_Y; y += N_PIXELS) { + uint32 h = N_PIXELS; + if (h > VIDEO_MODE_Y - y) + h = VIDEO_MODE_Y - y; + for (uint32 x = 0; x < VIDEO_MODE_X; x += N_PIXELS) { + uint32 w = N_PIXELS; + if (w > VIDEO_MODE_X - x) + w = VIDEO_MODE_X - x; + const int xs = w * bytes_per_pixel; + const int xb = x * bytes_per_pixel; + bool dirty = false; + for (uint32 j = y; j < (y + h); j++) { + const uint32 yb = j * bytes_per_row; + const uint32 dst_yb = j * dst_bytes_per_row; + if (memcmp(&the_buffer[yb + xb], &the_buffer_copy[yb + xb], xs) != 0) { + memcpy(&the_buffer_copy[yb + xb], &the_buffer[yb + xb], xs); + Screen_blit((uint8 *)drv->s->pixels + dst_yb + xb, the_buffer + yb + xb, xs); + dirty = true; + } + } + if (dirty) { + boxes[nr_boxes].x = x; + boxes[nr_boxes].y = y; + boxes[nr_boxes].w = w; + boxes[nr_boxes].h = h; + nr_boxes++; + } + } + } + + // Unlock surface, if required + if (SDL_MUSTLOCK(drv->s)) + SDL_UnlockSurface(drv->s); + + // Refresh display + if (nr_boxes) + update_sdl_video(); + } + + +// We suggest the compiler to inline the next two functions so that it +// may specialise the code according to the current screen depth and +// display type. A clever compiler would do that job by itself though... + +// NOTE: update_display_vosf is inlined too + +static inline void possibly_quit_dga_mode() +{ + // Quit DGA mode if requested (something terrible has happened and we + // want to give control back to the user) + if (quit_full_screen) { + quit_full_screen = false; + delete drv; + drv = NULL; + } +} + +static inline void possibly_ungrab_mouse() +{ + // Ungrab mouse if requested (something terrible has happened and we + // want to give control back to the user) + if (quit_full_screen) { + quit_full_screen = false; + if (drv) + drv->ungrab_mouse(); + } +} + +static inline void handle_palette_changes(void) +{ + LOCK_PALETTE; + + if (sdl_palette_changed) { + sdl_palette_changed = false; + drv->update_palette(); + } + + UNLOCK_PALETTE; +} + +static void video_refresh_window_static(void); + +static void video_refresh_dga(void) +{ + // Quit DGA mode if requested + possibly_quit_dga_mode(); + video_refresh_window_static(); +} + +#ifdef ENABLE_VOSF +#if REAL_ADDRESSING || DIRECT_ADDRESSING +static void video_refresh_dga_vosf(void) +{ + // Quit DGA mode if requested + possibly_quit_dga_mode(); + + // Update display (VOSF variant) + static uint32 tick_counter = 0; + if (++tick_counter >= frame_skip) { + tick_counter = 0; + if (mainBuffer.dirty) { + LOCK_VOSF; + update_display_dga_vosf(drv); + UNLOCK_VOSF; + } + } +} +#endif + +static void video_refresh_window_vosf(void) +{ + // Ungrab mouse if requested + possibly_ungrab_mouse(); + + // Update display (VOSF variant) + static uint32 tick_counter = 0; + if (++tick_counter >= frame_skip) { + tick_counter = 0; + if (mainBuffer.dirty) { + LOCK_VOSF; + update_display_window_vosf(drv); + UNLOCK_VOSF; + } + } +} +#endif // def ENABLE_VOSF + +static void video_refresh_window_static(void) +{ + // Ungrab mouse if requested + possibly_ungrab_mouse(); + + // Update display (static variant) + static uint32 tick_counter = 0; + if (++tick_counter >= frame_skip) { + tick_counter = 0; + const VIDEO_MODE &mode = drv->mode; + if ((int)VIDEO_MODE_DEPTH >= VIDEO_DEPTH_8BIT) + update_display_static_bbox(drv); + else + update_display_static(drv); + } +} + + +/* + * Thread for screen refresh, input handling etc. + */ + +static void VideoRefreshInit(void) +{ + // TODO: set up specialised 8bpp VideoRefresh handlers ? + if (display_type == DISPLAY_SCREEN) { +#if ENABLE_VOSF && (REAL_ADDRESSING || DIRECT_ADDRESSING) + if (use_vosf) + video_refresh = video_refresh_dga_vosf; + else +#endif + video_refresh = video_refresh_dga; + } + else { +#ifdef ENABLE_VOSF + if (use_vosf) + video_refresh = video_refresh_window_vosf; + else +#endif + video_refresh = video_refresh_window_static; + } +} + +static inline void do_video_refresh(void) +{ + // Handle SDL events + handle_events(); + + // Update display + video_refresh(); + + + // Set new palette if it was changed + handle_palette_changes(); +} + +// This function is called on non-threaded platforms from a timer interrupt +void VideoRefresh(void) +{ + // We need to check redraw_thread_active to inhibit refreshed during + // mode changes on non-threaded platforms + if (!redraw_thread_active) + return; + + // Process pending events and update display + do_video_refresh(); +} + +const int VIDEO_REFRESH_HZ = 60; +const int VIDEO_REFRESH_DELAY = 1000000 / VIDEO_REFRESH_HZ; + +#ifndef USE_CPU_EMUL_SERVICES +static int redraw_func(void *arg) +{ + uint64 start = GetTicks_usec(); + int64 ticks = 0; + uint64 next = GetTicks_usec() + VIDEO_REFRESH_DELAY; + + while (!redraw_thread_cancel) { + + // Wait + next += VIDEO_REFRESH_DELAY; + int32 delay = int32(next - GetTicks_usec()); + if (delay > 0) + Delay_usec(delay); + else if (delay < -VIDEO_REFRESH_DELAY) + next = GetTicks_usec(); + ticks++; + + // Pause if requested (during video mode switches) + if (thread_stop_req) { + thread_stop_ack = true; + continue; + } + + // Process pending events and update display + do_video_refresh(); + } + + uint64 end = GetTicks_usec(); + D(bug("%lld refreshes in %lld usec = %f refreshes/sec\n", ticks, end - start, ticks * 1000000.0 / (end - start))); + return 0; +} +#endif + + +/* + * Record dirty area from NQD + */ + +#ifdef SHEEPSHAVER +void video_set_dirty_area(int x, int y, int w, int h) +{ +#ifdef ENABLE_VOSF + const VIDEO_MODE &mode = drv->mode; + const unsigned screen_width = VIDEO_MODE_X; + const unsigned screen_height = VIDEO_MODE_Y; + const unsigned bytes_per_row = VIDEO_MODE_ROW_BYTES; + + if (use_vosf) { + vosf_set_dirty_area(x, y, w, h, screen_width, screen_height, bytes_per_row); + return; + } +#endif + + // XXX handle dirty bounding boxes for non-VOSF modes +} +#endif From a646f6dc3f70fbc6d172de0d012f090412acf1a2 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 4 Sep 2017 12:28:25 -0400 Subject: [PATCH 52/85] added compile-time checks for SDL version, when compiling video_sdl*.cpp --- BasiliskII/src/SDL/video_sdl.cpp | 4 ++++ BasiliskII/src/SDL/video_sdl2.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 798ed8e8..9b6f787f 100644 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -42,6 +42,8 @@ #include "sysdeps.h" #include +#if (SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0)) + #include #include #include @@ -2262,3 +2264,5 @@ void video_set_dirty_area(int x, int y, int w, int h) // XXX handle dirty bounding boxes for non-VOSF modes } #endif + +#endif // ends: SDL version check diff --git a/BasiliskII/src/SDL/video_sdl2.cpp b/BasiliskII/src/SDL/video_sdl2.cpp index 26a14829..b0101389 100755 --- a/BasiliskII/src/SDL/video_sdl2.cpp +++ b/BasiliskII/src/SDL/video_sdl2.cpp @@ -42,6 +42,8 @@ #include "sysdeps.h" #include +#if SDL_VERSION_ATLEAST(2,0,0) + #include #include #include @@ -2599,3 +2601,5 @@ void video_set_dirty_area(int x, int y, int w, int h) // XXX handle dirty bounding boxes for non-VOSF modes } #endif + +#endif // ends: SDL version check From 8940880794d87e3f545a49ad13de928c9850f3dd Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 4 Sep 2017 12:44:34 -0400 Subject: [PATCH 53/85] make build scripts reference both video_sdl.cpp and video_sdl2.cpp --- .../BasiliskII.xcodeproj/project.pbxproj | 4 ++ BasiliskII/src/Unix/configure.ac | 2 +- BasiliskII/src/Windows/BasiliskII.vcxproj | 49 ++++++++++--------- .../src/Windows/BasiliskII.vcxproj.filters | 3 ++ BasiliskII/src/Windows/Makefile.in | 2 +- .../SheepShaver.xcodeproj/project.pbxproj | 4 ++ .../project.pbxproj | 4 ++ SheepShaver/src/Unix/configure.ac | 2 +- SheepShaver/src/Windows/Makefile.in | 2 +- 9 files changed, 44 insertions(+), 28 deletions(-) diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index 232f5f5e..916f1ad8 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -106,6 +106,7 @@ 756C1B391F25306A00620917 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 756C1B381F25306A00620917 /* AppKit.framework */; }; 757A2BF01F5AF9D6003EDB01 /* user_strings_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 757A2BEF1F5AF9D6003EDB01 /* user_strings_unix.cpp */; }; 75CBCF751F5DB3AD00830063 /* video_sdl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75CBCF741F5DB3AD00830063 /* video_sdl2.cpp */; }; + 75CBCF771F5DB65E00830063 /* video_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75CBCF761F5DB65E00830063 /* video_sdl.cpp */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -376,6 +377,7 @@ 756C1B381F25306A00620917 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 757A2BEF1F5AF9D6003EDB01 /* user_strings_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = user_strings_unix.cpp; sourceTree = ""; }; 75CBCF741F5DB3AD00830063 /* video_sdl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = video_sdl2.cpp; sourceTree = ""; }; + 75CBCF761F5DB65E00830063 /* video_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = video_sdl.cpp; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -584,6 +586,7 @@ 752F27001F242BAF001032B4 /* prefs_sdl.cpp */, 7539E0721F23B25A006B2DF2 /* audio_sdl.cpp */, 7539E0731F23B25A006B2DF2 /* keycodes */, + 75CBCF761F5DB65E00830063 /* video_sdl.cpp */, 75CBCF741F5DB3AD00830063 /* video_sdl2.cpp */, ); name = SDL; @@ -1052,6 +1055,7 @@ 7539E1721F23B25A006B2DF2 /* rsrc_patches.cpp in Sources */, 7539E2931F23C56F006B2DF2 /* serial_dummy.cpp in Sources */, 7539E1981F23B25A006B2DF2 /* exceptions.cpp in Sources */, + 75CBCF771F5DB65E00830063 /* video_sdl.cpp in Sources */, 7539E1901F23B25A006B2DF2 /* basilisk_glue.cpp in Sources */, 7539E2801F23C4CA006B2DF2 /* main_unix.cpp in Sources */, 7539E1E11F23B25A006B2DF2 /* user_strings.cpp in Sources */, diff --git a/BasiliskII/src/Unix/configure.ac b/BasiliskII/src/Unix/configure.ac index 8e7b59f9..d9f54b13 100755 --- a/BasiliskII/src/Unix/configure.ac +++ b/BasiliskII/src/Unix/configure.ac @@ -813,7 +813,7 @@ if [[ "x$WANT_SDL" = "xyes" ]]; then fi if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; then AC_DEFINE(USE_SDL_VIDEO, 1, [Define to enable SDL video graphics support]) - VIDEOSRCS="../SDL/video_sdl.cpp" + VIDEOSRCS="../SDL/video_sdl.cpp ../SDL/video_sdl2.cpp" KEYCODES="../SDL/keycodes" if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then AC_MSG_CHECKING([whether __LP64__ is defined]) diff --git a/BasiliskII/src/Windows/BasiliskII.vcxproj b/BasiliskII/src/Windows/BasiliskII.vcxproj index ef01b7ed..b3a3a3ff 100644 --- a/BasiliskII/src/Windows/BasiliskII.vcxproj +++ b/BasiliskII/src/Windows/BasiliskII.vcxproj @@ -56,6 +56,7 @@ + @@ -417,9 +418,9 @@ WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - cd ..\uae_cpu -"$(ToolsDir)gencpu" -"$(ToolsDir)gencomp" + cd ..\uae_cpu +"$(ToolsDir)gencpu" +"$(ToolsDir)gencomp" @@ -453,9 +454,9 @@ WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - cd ..\uae_cpu -"$(ToolsDir)gencpu" -"$(ToolsDir)gencomp" + cd ..\uae_cpu +"$(ToolsDir)gencpu" +"$(ToolsDir)gencomp" @@ -486,9 +487,9 @@ WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - cd ..\uae_cpu -"$(ToolsDir)gencpu" -"$(ToolsDir)gencomp" + cd ..\uae_cpu +"$(ToolsDir)gencpu" +"$(ToolsDir)gencomp" @@ -522,9 +523,9 @@ WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - cd ..\uae_cpu -"$(ToolsDir)gencpu" -"$(ToolsDir)gencomp" + cd ..\uae_cpu +"$(ToolsDir)gencpu" +"$(ToolsDir)gencomp" @@ -559,9 +560,9 @@ WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - cd ..\uae_cpu -"$(ToolsDir)gencpu" -"$(ToolsDir)gencomp" + cd ..\uae_cpu +"$(ToolsDir)gencpu" +"$(ToolsDir)gencomp" @@ -599,9 +600,9 @@ WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - cd ..\uae_cpu -"$(ToolsDir)gencpu" -"$(ToolsDir)gencomp" + cd ..\uae_cpu +"$(ToolsDir)gencpu" +"$(ToolsDir)gencomp" @@ -636,9 +637,9 @@ WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - cd ..\uae_cpu -"$(ToolsDir)gencpu" -"$(ToolsDir)gencomp" + cd ..\uae_cpu +"$(ToolsDir)gencpu" +"$(ToolsDir)gencomp" @@ -676,9 +677,9 @@ WS2_32.lib;IPHlpApi.lib;%(AdditionalDependencies) - cd ..\uae_cpu -"$(ToolsDir)gencpu" -"$(ToolsDir)gencomp" + cd ..\uae_cpu +"$(ToolsDir)gencpu" +"$(ToolsDir)gencomp" diff --git a/BasiliskII/src/Windows/BasiliskII.vcxproj.filters b/BasiliskII/src/Windows/BasiliskII.vcxproj.filters index 50eae3d1..2d460b26 100644 --- a/BasiliskII/src/Windows/BasiliskII.vcxproj.filters +++ b/BasiliskII/src/Windows/BasiliskII.vcxproj.filters @@ -270,6 +270,9 @@ Source Files + + Source Files + Source Files diff --git a/BasiliskII/src/Windows/Makefile.in b/BasiliskII/src/Windows/Makefile.in index dfa59a60..d5a5dd5f 100755 --- a/BasiliskII/src/Windows/Makefile.in +++ b/BasiliskII/src/Windows/Makefile.in @@ -63,7 +63,7 @@ SRCS = ../main.cpp main_windows.cpp ../prefs.cpp ../prefs_items.cpp prefs_window ../emul_op.cpp ../macos_util.cpp ../xpram.cpp xpram_windows.cpp ../timer.cpp \ timer_windows.cpp ../adb.cpp ../serial.cpp serial_windows.cpp \ ../ether.cpp ether_windows.cpp ../sony.cpp ../disk.cpp ../cdrom.cpp \ - ../scsi.cpp ../dummy/scsi_dummy.cpp ../video.cpp ../SDL/video_sdl.cpp \ + ../scsi.cpp ../dummy/scsi_dummy.cpp ../video.cpp ../SDL/video_sdl.cpp ../SDL/video_sdl2.cpp \ video_blit.cpp ../audio.cpp ../SDL/audio_sdl.cpp clip_windows.cpp \ ../extfs.cpp extfs_windows.cpp ../user_strings.cpp user_strings_windows.cpp \ vm_alloc.cpp sigsegv.cpp posix_emu.cpp util_windows.cpp \ diff --git a/SheepShaver/src/MacOSX/SheepShaver.xcodeproj/project.pbxproj b/SheepShaver/src/MacOSX/SheepShaver.xcodeproj/project.pbxproj index b27d0f7d..bfba46ee 100644 --- a/SheepShaver/src/MacOSX/SheepShaver.xcodeproj/project.pbxproj +++ b/SheepShaver/src/MacOSX/SheepShaver.xcodeproj/project.pbxproj @@ -129,6 +129,7 @@ 08CD42DC14B7B85B009CA2A2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08CD42DB14B7B85B009CA2A2 /* Cocoa.framework */; }; 08CD42E814B7B8AA009CA2A2 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08CD42E714B7B8AA009CA2A2 /* Carbon.framework */; }; 08D93A16159FE174003B04EC /* clip_macosx64.mm in Sources */ = {isa = PBXBuildFile; fileRef = 08D93A15159FE174003B04EC /* clip_macosx64.mm */; }; + 75CBCF7B1F5DB82B00830063 /* video_sdl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75CBCF7A1F5DB82B00830063 /* video_sdl2.cpp */; }; A7B1921418C35D4700791D8D /* DiskType.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B1921318C35D4700791D8D /* DiskType.m */; }; /* End PBXBuildFile section */ @@ -450,6 +451,7 @@ 08CD42DB14B7B85B009CA2A2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 08CD42E714B7B8AA009CA2A2 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 08D93A15159FE174003B04EC /* clip_macosx64.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = clip_macosx64.mm; sourceTree = ""; }; + 75CBCF7A1F5DB82B00830063 /* video_sdl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = video_sdl2.cpp; path = ../../../BasiliskII/src/SDL/video_sdl2.cpp; sourceTree = ""; }; A7B1921218C35D4700791D8D /* DiskType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiskType.h; sourceTree = ""; }; A7B1921318C35D4700791D8D /* DiskType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DiskType.m; sourceTree = ""; }; /* End PBXFileReference section */ @@ -845,6 +847,7 @@ 0856CE9214A99EF0000B1711 /* SDLMain.h */, 0856CE9314A99EF0000B1711 /* SDLMain.m */, 0856CE9414A99EF0000B1711 /* video_sdl.cpp */, + 75CBCF7A1F5DB82B00830063 /* video_sdl2.cpp */, ); name = SDL; path = ../SDL; @@ -1411,6 +1414,7 @@ 0856D02514A99EF0000B1711 /* extfs_macosx.cpp in Sources */, 0856D05014A99EF1000B1711 /* prefs_macosx.mm in Sources */, 0856D05A14A99EF1000B1711 /* sys_darwin.cpp in Sources */, + 75CBCF7B1F5DB82B00830063 /* video_sdl2.cpp in Sources */, 0856D05B14A99EF1000B1711 /* main.cpp in Sources */, 0856D05C14A99EF1000B1711 /* name_registry.cpp in Sources */, 0856D05D14A99EF1000B1711 /* prefs_items.cpp in Sources */, diff --git a/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj b/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj index 61a7539c..811ef728 100644 --- a/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj +++ b/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj @@ -104,6 +104,7 @@ 08E877521E0640E800A90A2C /* clip_macosx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0856CE2C14A99EF0000B1711 /* clip_macosx.cpp */; }; 7539EDF51F50C40100454E81 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7539EDE91F50C3D600454E81 /* SDL2.framework */; }; 7539EDF61F50C40100454E81 /* SDL2.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 7539EDE91F50C3D600454E81 /* SDL2.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 75CBCF7E1F5DB94C00830063 /* video_sdl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75CBCF7D1F5DB94C00830063 /* video_sdl2.cpp */; }; A7B1921418C35D4700791D8D /* DiskType.m in Sources */ = {isa = PBXBuildFile; fileRef = A7B1921318C35D4700791D8D /* DiskType.m */; }; /* End PBXBuildFile section */ @@ -409,6 +410,7 @@ 08CD42E714B7B8AA009CA2A2 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 08D93A15159FE174003B04EC /* clip_macosx64.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = clip_macosx64.mm; sourceTree = ""; }; 7539EDE11F50C3D600454E81 /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../../../external/SDL/Xcode/SDL/SDL.xcodeproj; sourceTree = ""; }; + 75CBCF7D1F5DB94C00830063 /* video_sdl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = video_sdl2.cpp; path = ../../../BasiliskII/src/SDL/video_sdl2.cpp; sourceTree = ""; }; A7B1921218C35D4700791D8D /* DiskType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiskType.h; sourceTree = ""; }; A7B1921318C35D4700791D8D /* DiskType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DiskType.m; sourceTree = ""; }; /* End PBXFileReference section */ @@ -769,6 +771,7 @@ 0856CE9014A99EF0000B1711 /* audio_sdl.cpp */, 0856CE9114A99EF0000B1711 /* keycodes */, 0856CE9414A99EF0000B1711 /* video_sdl.cpp */, + 75CBCF7D1F5DB94C00830063 /* video_sdl2.cpp */, ); name = SDL; path = ../SDL; @@ -1174,6 +1177,7 @@ 0856D00914A99EF0000B1711 /* macos_util.cpp in Sources */, 0856D02514A99EF0000B1711 /* extfs_macosx.cpp in Sources */, 0856D05014A99EF1000B1711 /* prefs_macosx.mm in Sources */, + 75CBCF7E1F5DB94C00830063 /* video_sdl2.cpp in Sources */, 0856D05A14A99EF1000B1711 /* sys_darwin.cpp in Sources */, 0856D05B14A99EF1000B1711 /* main.cpp in Sources */, 0856D05C14A99EF1000B1711 /* name_registry.cpp in Sources */, diff --git a/SheepShaver/src/Unix/configure.ac b/SheepShaver/src/Unix/configure.ac index 1ece6588..341575c4 100755 --- a/SheepShaver/src/Unix/configure.ac +++ b/SheepShaver/src/Unix/configure.ac @@ -705,7 +705,7 @@ if [[ "x$WANT_SDL" = "xyes" ]]; then fi if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; then AC_DEFINE(USE_SDL_VIDEO, 1, [Define to enable SDL video graphics support.]) - VIDEOSRCS="../SDL/video_sdl.cpp" + VIDEOSRCS="../SDL/video_sdl.cpp ../SDL/video_sdl2.cpp" KEYCODES="../SDL/keycodes" if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then AC_MSG_CHECKING([whether __LP64__ is defined]) diff --git a/SheepShaver/src/Windows/Makefile.in b/SheepShaver/src/Windows/Makefile.in index edd28f59..76617aed 100755 --- a/SheepShaver/src/Windows/Makefile.in +++ b/SheepShaver/src/Windows/Makefile.in @@ -65,7 +65,7 @@ SRCS = ../main.cpp main_windows.cpp ../prefs.cpp ../prefs_items.cpp prefs_window ../rom_patches.cpp ../rsrc_patches.cpp ../emul_op.cpp ../name_registry.cpp \ ../macos_util.cpp ../timer.cpp timer_windows.cpp ../xpram.cpp xpram_windows.cpp \ ../adb.cpp ../sony.cpp ../disk.cpp ../cdrom.cpp ../scsi.cpp ../dummy/scsi_dummy.cpp \ - ../gfxaccel.cpp ../video.cpp ../SDL/video_sdl.cpp video_blit.cpp \ + ../gfxaccel.cpp ../video.cpp ../SDL/video_sdl.cpp ../SDL/video_sdl2.cpp video_blit.cpp \ ../audio.cpp ../SDL/audio_sdl.cpp ../ether.cpp ether_windows.cpp \ ../thunks.cpp ../serial.cpp serial_windows.cpp ../extfs.cpp extfs_windows.cpp \ about_window_windows.cpp ../user_strings.cpp user_strings_windows.cpp \ From 68ee5f23f9c989cedb0d65dc84f9118ccb284f8b Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Mon, 4 Sep 2017 12:49:54 -0400 Subject: [PATCH 54/85] make video_sdl*.cpp's header-comments refer to the versions of SDL that they target --- BasiliskII/src/SDL/video_sdl.cpp | 2 +- BasiliskII/src/SDL/video_sdl2.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 9b6f787f..c0090d23 100644 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -1,5 +1,5 @@ /* - * video_sdl.cpp - Video/graphics emulation, SDL specific stuff + * video_sdl.cpp - Video/graphics emulation, SDL 1.x specific stuff * * Basilisk II (C) 1997-2008 Christian Bauer * diff --git a/BasiliskII/src/SDL/video_sdl2.cpp b/BasiliskII/src/SDL/video_sdl2.cpp index b0101389..aa57ff6a 100755 --- a/BasiliskII/src/SDL/video_sdl2.cpp +++ b/BasiliskII/src/SDL/video_sdl2.cpp @@ -1,5 +1,5 @@ /* - * video_sdl.cpp - Video/graphics emulation, SDL specific stuff + * video_sdl2.cpp - Video/graphics emulation, SDL 2.x specific stuff * * Basilisk II (C) 1997-2008 Christian Bauer * From 1c0e8655dcefad632a8c0d93a94ca271070f38de Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Fri, 8 Sep 2017 23:43:01 +0000 Subject: [PATCH 55/85] for non-OSX hosts, make GNU Autotools revert to using SDL 1.x, if SDL 2.x can't be found --- BasiliskII/src/CrossPlatform/video_vosf.h | 15 ++++++++----- BasiliskII/src/SDL/audio_sdl.cpp | 10 ++++++++- BasiliskII/src/SDL/video_sdl.cpp | 10 +++++++++ BasiliskII/src/SDL/video_sdl2.cpp | 14 ++++++++++-- BasiliskII/src/Unix/configure.ac | 27 +++++++++++++++++------ 5 files changed, 60 insertions(+), 16 deletions(-) diff --git a/BasiliskII/src/CrossPlatform/video_vosf.h b/BasiliskII/src/CrossPlatform/video_vosf.h index fc89e125..f99b44bf 100644 --- a/BasiliskII/src/CrossPlatform/video_vosf.h +++ b/BasiliskII/src/CrossPlatform/video_vosf.h @@ -30,6 +30,12 @@ #include "util_windows.h" #endif +// Import SDL-backend-specific functions +#ifdef USE_SDL_VIDEO +extern void update_sdl_video(SDL_Surface *screen, Sint32 x, Sint32 y, Sint32 w, Sint32 h); +extern void update_sdl_video(SDL_Surface *screen, int numrects, SDL_Rect *rects); +#endif + // Glue for SDL and X11 support #ifdef TEST_VOSF_PERFORMANCE #define MONITOR_INIT /* nothing */ @@ -514,8 +520,7 @@ static void update_display_window_vosf(VIDEO_DRV_WIN_INIT) VIDEO_DRV_UNLOCK_PIXELS; #ifdef USE_SDL_VIDEO - //SDL_UpdateRect(drv->s, 0, y1, VIDEO_MODE_X, height); - update_sdl_video(); + update_sdl_video(drv->s, 0, y1, VIDEO_MODE_X, height); #else if (VIDEO_DRV_HAVE_SHM) XShmPutImage(x_display, VIDEO_DRV_WINDOW, VIDEO_DRV_GC, VIDEO_DRV_IMAGE, 0, y1, 0, y1, VIDEO_MODE_X, height, 0); @@ -559,8 +564,7 @@ static void update_display_dga_vosf(VIDEO_DRV_DGA_INIT) i2 += scr_bytes_per_row; } #ifdef USE_SDL_VIDEO - //SDL_UpdateRect(drv->s, 0, 0, VIDEO_MODE_X, VIDEO_MODE_Y); - update_sdl_video(); + update_sdl_video(drv->s, 0, 0, VIDEO_MODE_X, VIDEO_MODE_Y); #endif VIDEO_DRV_UNLOCK_PIXELS; return; @@ -666,8 +670,7 @@ static void update_display_dga_vosf(VIDEO_DRV_DGA_INIT) #endif } #ifdef USE_SDL_VIDEO - //SDL_UpdateRects(drv->s, bbi, bb); - update_sdl_video(); + update_sdl_video(drv->s, bbi, bb); #endif VIDEO_DRV_UNLOCK_PIXELS; } diff --git a/BasiliskII/src/SDL/audio_sdl.cpp b/BasiliskII/src/SDL/audio_sdl.cpp index 130afe6b..6bff36c3 100644 --- a/BasiliskII/src/SDL/audio_sdl.cpp +++ b/BasiliskII/src/SDL/audio_sdl.cpp @@ -28,6 +28,7 @@ #include #include +#include #define DEBUG 0 #include "debug.h" @@ -87,7 +88,7 @@ static bool open_sdl_audio(void) } SDL_AudioSpec audio_spec; - SDL_zero(audio_spec); + memset(&audio_spec, 0, sizeof(audio_spec)); audio_spec.freq = audio_sample_rates[audio_sample_rate_index] >> 16; audio_spec.format = (audio_sample_sizes[audio_sample_size_index] == 8) ? AUDIO_U8 : AUDIO_S16MSB; audio_spec.channels = audio_channel_counts[audio_channel_count_index]; @@ -101,18 +102,25 @@ static bool open_sdl_audio(void) return false; } +#if SDL_VERSION_ATLEAST(2,0,0) // HACK: workaround a bug in SDL pre-2.0.6 (reported via https://bugzilla.libsdl.org/show_bug.cgi?id=3710 ) // whereby SDL does not update audio_spec.size if (audio_spec.size == 0) { audio_spec.size = (SDL_AUDIO_BITSIZE(audio_spec.format) / 8) * audio_spec.channels * audio_spec.samples; } +#endif #if defined(BINCUE) OpenAudio_bincue(audio_spec.freq, audio_spec.format, audio_spec.channels, audio_spec.silence); #endif +#if SDL_VERSION_ATLEAST(2,0,0) const char * driver_name = SDL_GetCurrentAudioDriver(); +#else + char driver_name[32]; + SDL_AudioDriverName(driver_name, sizeof(driver_name) - 1); +#endif printf("Using SDL/%s audio output\n", driver_name ? driver_name : ""); silence_byte = audio_spec.silence; SDL_PauseAudio(0); diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index c0090d23..03e4c5b7 100644 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -587,6 +587,16 @@ static void migrate_screen_prefs(void) #endif } +void update_sdl_video(SDL_Surface *screen, Sint32 x, Sint32 y, Sint32 w, Sint32 h) +{ + SDL_UpdateRect(screen, x, y, w, h); +} + +void update_sdl_video(SDL_Surface *screen, int numrects, SDL_Rect *rects) +{ + SDL_UpdateRects(screen, numrects, rects); +} + /* * Display "driver" classes diff --git a/BasiliskII/src/SDL/video_sdl2.cpp b/BasiliskII/src/SDL/video_sdl2.cpp index aa57ff6a..d597101c 100755 --- a/BasiliskII/src/SDL/video_sdl2.cpp +++ b/BasiliskII/src/SDL/video_sdl2.cpp @@ -883,7 +883,18 @@ static int update_sdl_video() return 0; } -static int update_sdl_video(SDL_Surface *s, int x, int y, int w, int h) +void update_sdl_video(SDL_Surface *s, Sint32 x, Sint32 y, Sint32 w, Sint32 h) +{ + // HACK, dludwig@pobox.com: for now, just update the whole screen, via + // VideoInterrupt(), which gets called on the main thread. + // + // TODO: make sure SDL_Renderer resources get displayed, if and when + // MacsBug is running (and VideoInterrupt() might not get called) + // + // TODO: cache rects to update, then use rects in present_sdl_video() +} + +void update_sdl_video(SDL_Surface *s, int numrects, SDL_Rect *rects) { // HACK, dludwig@pobox.com: for now, just update the whole screen, via // VideoInterrupt(), which gets called on the main thread. @@ -892,7 +903,6 @@ static int update_sdl_video(SDL_Surface *s, int x, int y, int w, int h) // MacsBug is running (and VideoInterrupt() might not get called) // // TODO: cache rects to update, then use rects in present_sdl_video() - return 0; } void driver_base::set_video_mode(int flags) diff --git a/BasiliskII/src/Unix/configure.ac b/BasiliskII/src/Unix/configure.ac index d9f54b13..d1f90841 100755 --- a/BasiliskII/src/Unix/configure.ac +++ b/BasiliskII/src/Unix/configure.ac @@ -300,13 +300,26 @@ if [[ "x$WANT_SDL" = "xyes" ]]; then ac_cv_framework_SDL=no fi if [[ "x$ac_cv_framework_SDL" = "xno" ]]; then - PKG_CHECK_MODULES([sdl2], [sdl2 >= 2.0], [ - CFLAGS="$CFLAGS $sdl2_CFLAGS" - CXXFLAGS="$CXXFLAGS $sdl2_CFLAGS" - LIBS="$LIBS $sdl2_LIBS" - ], [ - WANT_SDL=no - ]) + WANT_SDL_VERSION_MAJOR=2 + if [[ "x$WANT_SDL_VERSION_MAJOR" = "x2" ]]; then + PKG_CHECK_MODULES([sdl2], [sdl2 >= 2.0], [ + CFLAGS="$CFLAGS $sdl2_CFLAGS" + CXXFLAGS="$CXXFLAGS $sdl2_CFLAGS" + LIBS="$LIBS $sdl2_LIBS" + ], [ + WANT_SDL_VERSION_MAJOR=1 + ]) + fi + if [[ "x$WANT_SDL_VERSION_MAJOR" = "x1" ]]; then + PKG_CHECK_MODULES([sdl], [sdl >= 1.2], [ + CFLAGS="$CFLAGS $sdl_CFLAGS" + CXXFLAGS="$CXXFLAGS $sdl_CFLAGS" + LIBS="$LIBS $sdl_LIBS" + ], [ + WANT_SDL=no + WANT_SDL_VERSION_MAJOR= + ]) + fi fi SDL_SUPPORT=`echo "$SDL_SUPPORT" | sed -e "s/^ //"` else From 20ad70cb3553ee2ecf08add31ee8619053ef55f5 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 9 Sep 2017 01:09:13 +0000 Subject: [PATCH 56/85] unset the executable bit from video_sdl2.cpp --- BasiliskII/src/SDL/video_sdl2.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 BasiliskII/src/SDL/video_sdl2.cpp diff --git a/BasiliskII/src/SDL/video_sdl2.cpp b/BasiliskII/src/SDL/video_sdl2.cpp old mode 100755 new mode 100644 From cbda5759bbc4da638beea3183736a6aaad4514a4 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 9 Sep 2017 15:15:28 +0000 Subject: [PATCH 57/85] added --with-sdl1 option to configure scripts, to force the use of SDL 1.x, over SDL 2.x --- BasiliskII/src/Unix/configure.ac | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/BasiliskII/src/Unix/configure.ac b/BasiliskII/src/Unix/configure.ac index d1f90841..8b360a38 100755 --- a/BasiliskII/src/Unix/configure.ac +++ b/BasiliskII/src/Unix/configure.ac @@ -36,6 +36,7 @@ AC_ARG_ENABLE(sdl-video, [ --enable-sdl-video use SDL for video graphi AC_ARG_ENABLE(sdl-audio, [ --enable-sdl-audio use SDL for audio [default=no]], [WANT_SDL_AUDIO=$enableval], [WANT_SDL_AUDIO=no]) AC_ARG_ENABLE(sdl-framework, [ --enable-sdl-framework use SDL framework [default=no]], [WANT_SDL_FRAMEWORK=$enableval], [WANT_SDL_FRAMEWORK=no]) AC_ARG_ENABLE(sdl-framework-prefix, [ --enable-sdl-framework-prefix=PFX default=/Library/Frameworks], [SDL_FRAMEWORK="$enableval"], [SDL_FRAMEWORK=/Library/Frameworks]) +AC_ARG_WITH(sdl1, [ --with-sdl1 use SDL 1.x, rather than SDL 2.x [default=no]], [WANT_SDL_VERSION_MAJOR=1], []) dnl JIT compiler options. AC_ARG_ENABLE(jit-compiler, [ --enable-jit-compiler enable JIT compiler [default=no]], [WANT_JIT=$enableval], [WANT_JIT=no]) @@ -300,7 +301,16 @@ if [[ "x$WANT_SDL" = "xyes" ]]; then ac_cv_framework_SDL=no fi if [[ "x$ac_cv_framework_SDL" = "xno" ]]; then - WANT_SDL_VERSION_MAJOR=2 + dnl use PKG_PROG_PKG_CONFIG to declare PKG_CONFIG variables. Otherwise, + dnl PKG_* macros may fail, without much explanation. The lack of this + dnl was causing --with-sdl1 to fail, as SDL 1.x could not be detected, + dnl as the 2nd call to PKG_CHECK_MODULES would fail, as $PKG_CONFIG + dnl never got defined (bizarrely-enough). -- dludwig@pobox.com + PKG_PROG_PKG_CONFIG + + if [[ "x$WANT_SDL_VERSION_MAJOR" = "x" ]]; then + WANT_SDL_VERSION_MAJOR=2 + fi if [[ "x$WANT_SDL_VERSION_MAJOR" = "x2" ]]; then PKG_CHECK_MODULES([sdl2], [sdl2 >= 2.0], [ CFLAGS="$CFLAGS $sdl2_CFLAGS" @@ -1849,6 +1859,7 @@ echo echo Mac OS X GUI ........................... : $WANT_MACOSX_GUI echo Mac OS X Sound ......................... : $WANT_MACOSX_SOUND echo SDL support ............................ : $SDL_SUPPORT +echo SDL major-version ...................... : $WANT_SDL_VERSION_MAJOR echo BINCUE support ......................... : $have_bincue echo LIBVHD support ......................... : $have_libvhd echo XFree86 DGA support .................... : $WANT_XF86_DGA From 1eb824a04eec1bd947454eeea528edf07f08b955 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 9 Sep 2017 16:48:30 +0000 Subject: [PATCH 58/85] added pref, "sdlrender", which can force a specific, SDL2 renderer (software can be faster in some cases, such as on VirtualBox hosts) --- BasiliskII/src/SDL/prefs_sdl.cpp | 1 + BasiliskII/src/SDL/video_sdl2.cpp | 16 +++++++++++++++- BasiliskII/src/Unix/prefs_unix.cpp | 3 +++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/BasiliskII/src/SDL/prefs_sdl.cpp b/BasiliskII/src/SDL/prefs_sdl.cpp index c9d99816..8150d709 100644 --- a/BasiliskII/src/SDL/prefs_sdl.cpp +++ b/BasiliskII/src/SDL/prefs_sdl.cpp @@ -31,6 +31,7 @@ // Platform-specific preferences items prefs_desc platform_prefs_items[] = { {"idlewait", TYPE_BOOLEAN, false, "sleep when idle"}, + {"sdlrender", TYPE_STRING, false, "SDL_Renderer driver (\"auto\", \"software\" (may be faster), etc.)"}, {NULL, TYPE_END, false} // End of list }; diff --git a/BasiliskII/src/SDL/video_sdl2.cpp b/BasiliskII/src/SDL/video_sdl2.cpp index d597101c..cbdce061 100644 --- a/BasiliskII/src/SDL/video_sdl2.cpp +++ b/BasiliskII/src/SDL/video_sdl2.cpp @@ -754,12 +754,26 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags } if (!sdl_renderer) { - sdl_renderer = SDL_CreateRenderer(sdl_window, -1, SDL_RENDERER_ACCELERATED); + const char *render_driver = PrefsFindString("sdlrender"); + if (render_driver) { + if (SDL_strcmp(render_driver, "auto") == 0) { + SDL_SetHint(SDL_HINT_RENDER_DRIVER, ""); + } else { + SDL_SetHint(SDL_HINT_RENDER_DRIVER, render_driver); + } + } + + sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0); if (!sdl_renderer) { shutdown_sdl_video(); return NULL; } sdl_renderer_thread_id = SDL_ThreadID(); + + SDL_RendererInfo info; + memset(&info, 0, sizeof(info)); + SDL_GetRendererInfo(sdl_renderer, &info); + printf("Using SDL_Renderer driver: %s\n", (info.name ? info.name : "(null)")); } SDL_assert(sdl_texture == NULL); diff --git a/BasiliskII/src/Unix/prefs_unix.cpp b/BasiliskII/src/Unix/prefs_unix.cpp index a92cd640..4ab21b6a 100644 --- a/BasiliskII/src/Unix/prefs_unix.cpp +++ b/BasiliskII/src/Unix/prefs_unix.cpp @@ -42,6 +42,9 @@ prefs_desc platform_prefs_items[] = { {"ignoresegv", TYPE_BOOLEAN, false, "ignore illegal memory accesses"}, #endif {"idlewait", TYPE_BOOLEAN, false, "sleep when idle"}, +#ifdef USE_SDL_VIDEO + {"sdlrender", TYPE_STRING, false, "SDL_Renderer driver (\"auto\", \"software\" (may be faster), etc.)"}, +#endif {NULL, TYPE_END, false, NULL} // End of list }; From 78e3cbc8cbb37144bbfebc0403c6cd762ae7cbfc Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sat, 9 Sep 2017 16:49:09 +0000 Subject: [PATCH 59/85] fixed compile-time warnings in video_sdl2.cpp --- BasiliskII/src/SDL/video_sdl2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl2.cpp b/BasiliskII/src/SDL/video_sdl2.cpp index cbdce061..8db972b1 100644 --- a/BasiliskII/src/SDL/video_sdl2.cpp +++ b/BasiliskII/src/SDL/video_sdl2.cpp @@ -1007,7 +1007,7 @@ void driver_base::adapt_to_video_mode() { SDL_ShowCursor(hardware_cursor); // Set window name/class - set_window_name(mouse_grabbed ? STR_WINDOW_TITLE_GRABBED : STR_WINDOW_TITLE); + set_window_name(mouse_grabbed ? (int)STR_WINDOW_TITLE_GRABBED : (int)STR_WINDOW_TITLE); // Everything went well init_ok = true; @@ -2000,7 +2000,7 @@ static void force_complete_window_refresh() */ // possible return codes for SDL-registered event watches -enum : int { +enum { EVENT_DROP_FROM_QUEUE = 0, EVENT_ADD_TO_QUEUE = 1 }; @@ -2230,7 +2230,7 @@ static void update_display_static(driver_base *drv) // Check for first column from left and first column from right that have changed if (high) { - if (VIDEO_MODE_DEPTH < VIDEO_DEPTH_8BIT) { + if ((int)VIDEO_MODE_DEPTH < (int)VIDEO_DEPTH_8BIT) { const int src_bytes_per_row = bytes_per_row; const int dst_bytes_per_row = drv->s->pitch; const int pixels_per_byte = VIDEO_MODE_X / src_bytes_per_row; From 252890ebd070e6056227dd0323e4295edecb6391 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 10 Sep 2017 10:19:17 -0400 Subject: [PATCH 60/85] BasiliskII: misc fixes when building on OSX, via Autotools --- BasiliskII/src/MacOSX/utils_macosx.mm | 6 + BasiliskII/src/SDL/SDLMain.h | 16 ++ BasiliskII/src/SDL/SDLMain.m | 384 ++++++++++++++++++++++++++ BasiliskII/src/Unix/configure.ac | 48 +++- 4 files changed, 439 insertions(+), 15 deletions(-) create mode 100644 BasiliskII/src/SDL/SDLMain.h create mode 100644 BasiliskII/src/SDL/SDLMain.m diff --git a/BasiliskII/src/MacOSX/utils_macosx.mm b/BasiliskII/src/MacOSX/utils_macosx.mm index b1004038..e5683341 100644 --- a/BasiliskII/src/MacOSX/utils_macosx.mm +++ b/BasiliskII/src/MacOSX/utils_macosx.mm @@ -20,7 +20,11 @@ #include #include "utils_macosx.h" +#include + +#if SDL_VERSION_ATLEAST(2,0,0) #include +#endif // This is used from video_sdl.cpp. void NSAutoReleasePool_wrap(void (*fn)(void)) @@ -41,6 +45,7 @@ void disable_SDL2_macosx_menu_bar_keyboard_shortcuts() { } } +#if SDL_VERSION_ATLEAST(2,0,0) bool is_fullscreen_osx(SDL_Window * window) { if (!window) { @@ -56,6 +61,7 @@ bool is_fullscreen_osx(SDL_Window * window) const NSWindowStyleMask styleMask = [wmInfo.info.cocoa.window styleMask]; return (styleMask & NSWindowStyleMaskFullScreen) != 0; } +#endif void set_menu_bar_visible_osx(bool visible) { diff --git a/BasiliskII/src/SDL/SDLMain.h b/BasiliskII/src/SDL/SDLMain.h new file mode 100644 index 00000000..c56d90cb --- /dev/null +++ b/BasiliskII/src/SDL/SDLMain.h @@ -0,0 +1,16 @@ +/* SDLMain.m - main entry point for our Cocoa-ized SDL app + Initial Version: Darrell Walisser + Non-NIB-Code & other changes: Max Horn + + Feel free to customize this file to suit your needs +*/ + +#ifndef _SDLMain_h_ +#define _SDLMain_h_ + +#import + +@interface SDLMain : NSObject +@end + +#endif /* _SDLMain_h_ */ diff --git a/BasiliskII/src/SDL/SDLMain.m b/BasiliskII/src/SDL/SDLMain.m new file mode 100644 index 00000000..811e05e1 --- /dev/null +++ b/BasiliskII/src/SDL/SDLMain.m @@ -0,0 +1,384 @@ +/* SDLMain.m - main entry point for our Cocoa-ized SDL app + Initial Version: Darrell Walisser + Non-NIB-Code & other changes: Max Horn + + Feel free to customize this file to suit your needs +*/ + +#include "SDL.h" +#if (SDL_COMPILEDVERSION < SDL_VERSIONNUM(2, 0, 0)) // SDLMain.m is not needed in SDL 2.x + +#include "SDLMain.h" +#include /* for MAXPATHLEN */ +#include + +/* For some reaon, Apple removed setAppleMenu from the headers in 10.4, + but the method still is there and works. To avoid warnings, we declare + it ourselves here. */ +@interface NSApplication(SDL_Missing_Methods) +- (void)setAppleMenu:(NSMenu *)menu; +@end + +/* Use this flag to determine whether we use SDLMain.nib or not */ +#define SDL_USE_NIB_FILE 0 + +/* Use this flag to determine whether we use CPS (docking) or not */ +#define SDL_USE_CPS 1 +#ifdef SDL_USE_CPS +/* Portions of CPS.h */ +typedef struct CPSProcessSerNum +{ + UInt32 lo; + UInt32 hi; +} CPSProcessSerNum; + +extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn); +extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5); +extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn); + +#endif /* SDL_USE_CPS */ + +static int gArgc; +static char **gArgv; +static BOOL gFinderLaunch; +static BOOL gCalledAppMainline = FALSE; + +static NSString *getApplicationName(void) +{ + const NSDictionary *dict; + NSString *appName = 0; + + /* Determine the application name */ + dict = (const NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle()); + if (dict) + appName = [dict objectForKey: @"CFBundleName"]; + + if (![appName length]) + appName = [[NSProcessInfo processInfo] processName]; + + return appName; +} + +#if SDL_USE_NIB_FILE +/* A helper category for NSString */ +@interface NSString (ReplaceSubString) +- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString; +@end +#endif + +@interface NSApplication (SDLApplication) +@end + +@implementation NSApplication (SDLApplication) +/* Invoked from the Quit menu item */ +- (void)terminate:(id)sender +{ + /* Post a SDL_QUIT event */ + SDL_Event event; + event.type = SDL_QUIT; + SDL_PushEvent(&event); +} +@end + +/* The main class of the application, the application's delegate */ +@implementation SDLMain + +/* Set the working directory to the .app's parent directory */ +- (void) setupWorkingDirectory:(BOOL)shouldChdir +{ + if (shouldChdir) + { + char parentdir[MAXPATHLEN]; + CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); + CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url); + if (CFURLGetFileSystemRepresentation(url2, 1, (UInt8 *)parentdir, MAXPATHLEN)) { + chdir(parentdir); /* chdir to the binary app's parent */ + } + CFRelease(url); + CFRelease(url2); + } +} + +#if SDL_USE_NIB_FILE + +/* Fix menu to contain the real app name instead of "SDL App" */ +- (void)fixMenu:(NSMenu *)aMenu withAppName:(NSString *)appName +{ + NSRange aRange; + NSEnumerator *enumerator; + NSMenuItem *menuItem; + + aRange = [[aMenu title] rangeOfString:@"SDL App"]; + if (aRange.length != 0) + [aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]]; + + enumerator = [[aMenu itemArray] objectEnumerator]; + while ((menuItem = [enumerator nextObject])) + { + aRange = [[menuItem title] rangeOfString:@"SDL App"]; + if (aRange.length != 0) + [menuItem setTitle: [[menuItem title] stringByReplacingRange:aRange with:appName]]; + if ([menuItem hasSubmenu]) + [self fixMenu:[menuItem submenu] withAppName:appName]; + } +} + +#else + +static void setApplicationMenu(void) +{ + /* warning: this code is very odd */ + NSMenu *appleMenu; + NSMenuItem *menuItem; + NSString *title; + NSString *appName; + + appName = getApplicationName(); + appleMenu = [[NSMenu alloc] initWithTitle:@""]; + + /* Add menu items */ + title = [@"About " stringByAppendingString:appName]; + [appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""]; + + [appleMenu addItem:[NSMenuItem separatorItem]]; + + title = [@"Hide " stringByAppendingString:appName]; + [appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"]; + + menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"]; + [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)]; + + [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""]; + + [appleMenu addItem:[NSMenuItem separatorItem]]; + + title = [@"Quit " stringByAppendingString:appName]; + [appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"]; + + + /* Put menu into the menubar */ + menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]; + [menuItem setSubmenu:appleMenu]; + [[NSApp mainMenu] addItem:menuItem]; + + /* Tell the application object that this is now the application menu */ + [NSApp setAppleMenu:appleMenu]; + + /* Finally give up our references to the objects */ + [appleMenu release]; + [menuItem release]; +} + +/* Create a window menu */ +static void setupWindowMenu(void) +{ + NSMenu *windowMenu; + NSMenuItem *windowMenuItem; + NSMenuItem *menuItem; + + windowMenu = [[NSMenu alloc] initWithTitle:@"Window"]; + + /* "Minimize" item */ + menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"]; + [windowMenu addItem:menuItem]; + [menuItem release]; + + /* Put menu into the menubar */ + windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""]; + [windowMenuItem setSubmenu:windowMenu]; + [[NSApp mainMenu] addItem:windowMenuItem]; + + /* Tell the application object that this is now the window menu */ + [NSApp setWindowsMenu:windowMenu]; + + /* Finally give up our references to the objects */ + [windowMenu release]; + [windowMenuItem release]; +} + +/* Replacement for NSApplicationMain */ +static void CustomApplicationMain (int argc, char **argv) +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + SDLMain *sdlMain; + + /* Ensure the application object is initialised */ + [NSApplication sharedApplication]; + +#ifdef SDL_USE_CPS + { + CPSProcessSerNum PSN; + /* Tell the dock about us */ + if (!CPSGetCurrentProcess(&PSN)) + if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103)) + if (!CPSSetFrontProcess(&PSN)) + [NSApplication sharedApplication]; + } +#endif /* SDL_USE_CPS */ + + /* Set up the menubar */ + [NSApp setMainMenu:[[[NSMenu alloc] init] autorelease]]; + setApplicationMenu(); + setupWindowMenu(); + + /* Create SDLMain and make it the app delegate */ + sdlMain = [[SDLMain alloc] init]; + [NSApp setDelegate:sdlMain]; + + /* Start the main event loop */ + [NSApp run]; + + [sdlMain release]; + [pool release]; +} + +#endif + + +/* + * Catch document open requests...this lets us notice files when the app + * was launched by double-clicking a document, or when a document was + * dragged/dropped on the app's icon. You need to have a + * CFBundleDocumentsType section in your Info.plist to get this message, + * apparently. + * + * Files are added to gArgv, so to the app, they'll look like command line + * arguments. Previously, apps launched from the finder had nothing but + * an argv[0]. + * + * This message may be received multiple times to open several docs on launch. + * + * This message is ignored once the app's mainline has been called. + */ +- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename +{ + const char *temparg; + size_t arglen; + char *arg; + char **newargv; + + if (!gFinderLaunch) /* MacOS is passing command line args. */ + return FALSE; + + if (gCalledAppMainline) /* app has started, ignore this document. */ + return FALSE; + + temparg = [filename UTF8String]; + arglen = SDL_strlen(temparg) + 1; + arg = (char *) SDL_malloc(arglen); + if (arg == NULL) + return FALSE; + + newargv = (char **) realloc(gArgv, sizeof (char *) * (gArgc + 2)); + if (newargv == NULL) + { + SDL_free(arg); + return FALSE; + } + gArgv = newargv; + + SDL_strlcpy(arg, temparg, arglen); + gArgv[gArgc++] = arg; + gArgv[gArgc] = NULL; + return TRUE; +} + + +/* Called when the internal event loop has just started running */ +- (void) applicationDidFinishLaunching: (NSNotification *) note +{ + int status; + + /* Set the working directory to the .app's parent directory */ + [self setupWorkingDirectory:gFinderLaunch]; + +#if SDL_USE_NIB_FILE + /* Set the main menu to contain the real app name instead of "SDL App" */ + [self fixMenu:[NSApp mainMenu] withAppName:getApplicationName()]; +#endif + + /* Hand off to main application code */ + gCalledAppMainline = TRUE; + status = SDL_main (gArgc, gArgv); + + /* We're done, thank you for playing */ + exit(status); +} +@end + + +@implementation NSString (ReplaceSubString) + +- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString +{ + unsigned int bufferSize; + unsigned int selfLen = [self length]; + unsigned int aStringLen = [aString length]; + unichar *buffer; + NSRange localRange; + NSString *result; + + bufferSize = selfLen + aStringLen - aRange.length; + buffer = (unichar *)NSAllocateMemoryPages(bufferSize*sizeof(unichar)); + + /* Get first part into buffer */ + localRange.location = 0; + localRange.length = aRange.location; + [self getCharacters:buffer range:localRange]; + + /* Get middle part into buffer */ + localRange.location = 0; + localRange.length = aStringLen; + [aString getCharacters:(buffer+aRange.location) range:localRange]; + + /* Get last part into buffer */ + localRange.location = aRange.location + aRange.length; + localRange.length = selfLen - localRange.location; + [self getCharacters:(buffer+aRange.location+aStringLen) range:localRange]; + + /* Build output string */ + result = [NSString stringWithCharacters:buffer length:bufferSize]; + + NSDeallocateMemoryPages(buffer, bufferSize); + + return result; +} + +@end + + + +#ifdef main +# undef main +#endif + + +/* Main entry point to executable - should *not* be SDL_main! */ +int main (int argc, char **argv) +{ + /* Copy the arguments into a global variable */ + /* This is passed if we are launched by double-clicking */ + if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) { + gArgv = (char **) SDL_malloc(sizeof (char *) * 2); + gArgv[0] = argv[0]; + gArgv[1] = NULL; + gArgc = 1; + gFinderLaunch = YES; + } else { + int i; + gArgc = argc; + gArgv = (char **) SDL_malloc(sizeof (char *) * (argc+1)); + for (i = 0; i <= argc; i++) + gArgv[i] = argv[i]; + gFinderLaunch = NO; + } + +#if SDL_USE_NIB_FILE + NSApplicationMain (argc, argv); +#else + CustomApplicationMain (argc, argv); +#endif + return 0; +} + +#endif // ends: SDL version check diff --git a/BasiliskII/src/Unix/configure.ac b/BasiliskII/src/Unix/configure.ac index 8b360a38..edabef2f 100755 --- a/BasiliskII/src/Unix/configure.ac +++ b/BasiliskII/src/Unix/configure.ac @@ -251,7 +251,7 @@ AC_CHECK_LIB(rt, timer_create) AC_CHECK_LIB(rt, shm_open) AC_CHECK_LIB(m, cos) -dnl AC_CHECK_SDLFRAMEWORK($1=NAME, $2=INCLUDES) +dnl AC_CHECK_SDLFRAMEWORK($1=NAME, $2=INCLUDES, $3=ACTION_IF_SUCCESSFUL, $4=ACTION_IF_UNSUCCESSFUL) dnl AC_TRY_LINK uses main() but SDL needs main to take args, dnl therefore main is undefined with #undef. dnl Framework can be in an custom location. @@ -261,18 +261,16 @@ AC_DEFUN([AC_CHECK_SDLFRAMEWORK], [ ac_Framework, [ saved_LIBS="$LIBS" LIBS="$LIBS -framework $1" - if [[ "x$SDL_FRAMEWORK" != "x/Library/Frameworks" ]]; then - if [[ "x$SDL_FRAMEWORK" != "x/System/Library/Frameworks" ]]; then - LIBS="$saved_LIBS -F$SDL_FRAMEWORK -framework $1" - fi + if [[ "x$SDL_FRAMEWORK" != "x/System/Library/Frameworks" ]]; then + LIBS="$saved_LIBS -F$SDL_FRAMEWORK -framework $1" fi saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$SDL_FRAMEWORK/SDL2.framework/Headers" + CPPFLAGS="$CPPFLAGS -I$SDL_FRAMEWORK/$1.framework/Headers" AC_TRY_LINK( [$2 #undef main], [], - [AS_VAR_SET(ac_Framework, yes)], [AS_VAR_SET(ac_Framework, no); -LIBS="$saved_LIBS"; CPPFLAGS="$saved_CPPFLAGS"] + [AS_VAR_SET(ac_Framework, yes); $3], [AS_VAR_SET(ac_Framework, no); +LIBS="$saved_LIBS"; CPPFLAGS="$saved_CPPFLAGS"; $4] ) ]) AS_IF([test AS_VAR_GET(ac_Framework) = yes], @@ -296,11 +294,32 @@ if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; then fi if [[ "x$WANT_SDL" = "xyes" ]]; then if [[ "x$WANT_SDL_FRAMEWORK" = "xyes" ]]; then - AC_CHECK_SDLFRAMEWORK(SDL2, [#include ]) + TEMP_WANT_SDL_VERSION_MAJOR=$WANT_SDL_VERSION_MAJOR + if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x" ]]; then + TEMP_WANT_SDL_VERSION_MAJOR=2 + fi + + if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x2" ]]; then + AC_CHECK_SDLFRAMEWORK(SDL2, [#include ], [ + WANT_SDL_VERSION_MAJOR=2 + ], [ + TEMP_WANT_SDL_VERSION_MAJOR=1 + ]) + fi + if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x1" ]]; then + AC_CHECK_SDLFRAMEWORK(SDL, [#include ], [ + WANT_SDL_VERSION_MAJOR=1 + ]) + fi else ac_cv_framework_SDL=no fi if [[ "x$ac_cv_framework_SDL" = "xno" ]]; then + TEMP_WANT_SDL_VERSION_MAJOR=$WANT_SDL_VERSION_MAJOR + if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x" ]]; then + TEMP_WANT_SDL_VERSION_MAJOR=2 + fi + dnl use PKG_PROG_PKG_CONFIG to declare PKG_CONFIG variables. Otherwise, dnl PKG_* macros may fail, without much explanation. The lack of this dnl was causing --with-sdl1 to fail, as SDL 1.x could not be detected, @@ -308,23 +327,22 @@ if [[ "x$WANT_SDL" = "xyes" ]]; then dnl never got defined (bizarrely-enough). -- dludwig@pobox.com PKG_PROG_PKG_CONFIG - if [[ "x$WANT_SDL_VERSION_MAJOR" = "x" ]]; then - WANT_SDL_VERSION_MAJOR=2 - fi - if [[ "x$WANT_SDL_VERSION_MAJOR" = "x2" ]]; then + if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x2" ]]; then PKG_CHECK_MODULES([sdl2], [sdl2 >= 2.0], [ CFLAGS="$CFLAGS $sdl2_CFLAGS" CXXFLAGS="$CXXFLAGS $sdl2_CFLAGS" LIBS="$LIBS $sdl2_LIBS" + WANT_SDL_VERSION_MAJOR=2 ], [ - WANT_SDL_VERSION_MAJOR=1 + TEMP_WANT_SDL_VERSION_MAJOR=1 ]) fi - if [[ "x$WANT_SDL_VERSION_MAJOR" = "x1" ]]; then + if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x1" ]]; then PKG_CHECK_MODULES([sdl], [sdl >= 1.2], [ CFLAGS="$CFLAGS $sdl_CFLAGS" CXXFLAGS="$CXXFLAGS $sdl_CFLAGS" LIBS="$LIBS $sdl_LIBS" + WANT_SDL_VERSION_MAJOR=1 ], [ WANT_SDL=no WANT_SDL_VERSION_MAJOR= From 83096e1ca70608edadcca5e0f81a203d97b78504 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 10 Sep 2017 10:48:56 -0400 Subject: [PATCH 61/85] SheepShaver: added --with-sdl1 to configure script --- SheepShaver/src/Unix/configure.ac | 83 +++++++++++++++++++++++-------- 1 file changed, 61 insertions(+), 22 deletions(-) diff --git a/SheepShaver/src/Unix/configure.ac b/SheepShaver/src/Unix/configure.ac index 341575c4..4663f90d 100755 --- a/SheepShaver/src/Unix/configure.ac +++ b/SheepShaver/src/Unix/configure.ac @@ -72,6 +72,7 @@ AC_ARG_ENABLE(sdl-video, [ --enable-sdl-video use SDL for video graphic AC_ARG_ENABLE(sdl-audio, [ --enable-sdl-audio use SDL for audio [default=no]], [WANT_SDL_AUDIO=$enableval], [WANT_SDL_AUDIO=no]) AC_ARG_ENABLE(sdl-framework, [ --enable-sdl-framework use SDL framework [default=no]], [WANT_SDL_FRAMEWORK=$enableval], [WANT_SDL_FRAMEWORK=no]) AC_ARG_ENABLE(sdl-framework-prefix, [ --enable-sdl-framework-prefix=PFX default=/Library/Frameworks], [SDL_FRAMEWORK="$enableval"], [SDL_FRAMEWORK=/Library/Frameworks]) +AC_ARG_WITH(sdl1, [ --with-sdl1 use SDL 1.x, rather than SDL 2.x [default=no]], [WANT_SDL_VERSION_MAJOR=1], []) dnl Checks for programs. AC_PROG_CC @@ -144,7 +145,7 @@ dnl Checks for libraries. AC_CHECK_LIB(posix4, sem_init) AC_CHECK_LIB(m, cos) -dnl AC_CHECK_SDLFRAMEWORK($1=NAME, $2=INCLUDES) +dnl AC_CHECK_SDLFRAMEWORK($1=NAME, $2=INCLUDES, $3=ACTION_IF_SUCCESSFUL, $4=ACTION_IF_UNSUCCESSFUL) dnl AC_TRY_LINK uses main() but SDL needs main to take args, dnl therefore main is undefined with #undef. dnl Framework can be in an custom location. @@ -154,18 +155,16 @@ AC_DEFUN([AC_CHECK_SDLFRAMEWORK], [ ac_Framework, [ saved_LIBS="$LIBS" LIBS="$LIBS -framework $1" - if [[ "x$SDL_FRAMEWORK" != "x/Library/Frameworks" ]]; then - if [[ "x$SDL_FRAMEWORK" != "x/System/Library/Frameworks" ]]; then - LIBS="$saved_LIBS -F$SDL_FRAMEWORK -framework $1" - fi + if [[ "x$SDL_FRAMEWORK" != "x/System/Library/Frameworks" ]]; then + LIBS="$saved_LIBS -F$SDL_FRAMEWORK -framework $1" fi saved_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -I$SDL_FRAMEWORK/SDL2.framework/Headers" + CPPFLAGS="$CPPFLAGS -I$SDL_FRAMEWORK/$1.framework/Headers" AC_TRY_LINK( [$2 #undef main], [], - [AS_VAR_SET(ac_Framework, yes)], [AS_VAR_SET(ac_Framework, no); -LIBS="$saved_LIBS"; CPPFLAGS="$saved_CPPFLAGS"] + [AS_VAR_SET(ac_Framework, yes); $3], [AS_VAR_SET(ac_Framework, no); +LIBS="$saved_LIBS"; CPPFLAGS="$saved_CPPFLAGS"; $4] ) ]) AS_IF([test AS_VAR_GET(ac_Framework) = yes], @@ -189,26 +188,65 @@ if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; then fi if [[ "x$WANT_SDL" = "xyes" ]]; then if [[ "x$WANT_SDL_FRAMEWORK" = "xyes" ]]; then - AC_CHECK_SDLFRAMEWORK(SDL2, [#include ]) + TEMP_WANT_SDL_VERSION_MAJOR=$WANT_SDL_VERSION_MAJOR + if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x" ]]; then + TEMP_WANT_SDL_VERSION_MAJOR=2 + fi + if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x2" ]]; then + AC_CHECK_SDLFRAMEWORK(SDL2, [#include ], [ + WANT_SDL_VERSION_MAJOR=2 + ], [ + TEMP_WANT_SDL_VERSION_MAJOR=1 + ]) + fi + if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x1" ]]; then + AC_CHECK_SDLFRAMEWORK(SDL, [#include ], [ + WANT_SDL_VERSION_MAJOR=1 + ]) + fi else ac_cv_framework_SDL=no fi if [[ "x$ac_cv_framework_SDL" = "xno" ]]; then - AC_PATH_PROG(sdl2_config, "sdl2-config") - if [[ -n "$sdl2_config" ]]; then - sdl2_cflags=`$sdl2_config --cflags` - if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then - sdl2_libs=`$sdl2_config --static-libs` + TEMP_WANT_SDL_VERSION_MAJOR=$WANT_SDL_VERSION_MAJOR + if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x" ]]; then + TEMP_WANT_SDL_VERSION_MAJOR=2 + fi + if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x2" ]]; then + AC_PATH_PROG(sdl2_config, "sdl2-config") + if [[ -n "$sdl2_config" ]]; then + sdl2_cflags=`$sdl2_config --cflags` + if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then + sdl2_libs=`$sdl2_config --static-libs` + else + sdl2_libs=`$sdl2_config --libs` + fi + CFLAGS="$CFLAGS $sdl2_cflags" + CXXFLAGS="$CXXFLAGS $sdl2_cflags" + LIBS="$LIBS $sdl2_libs" + WANT_SDL_VERSION_MAJOR=2 else - sdl2_libs=`$sdl2_config --libs` + TEMP_WANT_SDL_VERSION_MAJOR=1 + fi + fi + if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x1" ]]; then + AC_PATH_PROG(sdl_config, "sdl-config") + if [[ -n "$sdl_config" ]]; then + sdl_cflags=`$sdl_config --cflags` + if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then + sdl_libs=`$sdl_config --static-libs` + else + sdl_libs=`$sdl_config --libs` + fi + CFLAGS="$CFLAGS $sdl_cflags" + CXXFLAGS="$CXXFLAGS $sdl_cflags" + LIBS="$LIBS $sdl_libs" + WANT_SDL_VERSION_MAJOR=1 + else + WANT_SDL=no + WANT_SDL_VIDEO=no + WANT_SDL_AUDIO=no fi - CFLAGS="$CFLAGS $sdl2_cflags" - CXXFLAGS="$CXXFLAGS $sdl2_cflags" - LIBS="$LIBS $sdl2_libs" - else - WANT_SDL=no - WANT_SDL_VIDEO=no - WANT_SDL_AUDIO=no fi fi SDL_SUPPORT=`echo "$SDL_SUPPORT" | sed -e "s/^ //"` @@ -1667,6 +1705,7 @@ echo echo SheepShaver configuration summary: echo echo SDL support ...................... : $SDL_SUPPORT +echo SDL major-version ................ : $WANT_SDL_VERSION_MAJOR echo BINCUE support ................... : $have_bincue echo LIBVHD support ................... : $have_libvhd echo FBDev DGA support ................ : $WANT_FBDEV_DGA From 1b08f2e9d36cd92abaac732f96da275ac8b97e7d Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 10 Sep 2017 10:49:26 -0400 Subject: [PATCH 62/85] BasiliskII: minor formatting tweak to configure.ac --- BasiliskII/src/Unix/configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/BasiliskII/src/Unix/configure.ac b/BasiliskII/src/Unix/configure.ac index edabef2f..ff200e12 100755 --- a/BasiliskII/src/Unix/configure.ac +++ b/BasiliskII/src/Unix/configure.ac @@ -298,7 +298,6 @@ if [[ "x$WANT_SDL" = "xyes" ]]; then if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x" ]]; then TEMP_WANT_SDL_VERSION_MAJOR=2 fi - if [[ "x$TEMP_WANT_SDL_VERSION_MAJOR" = "x2" ]]; then AC_CHECK_SDLFRAMEWORK(SDL2, [#include ], [ WANT_SDL_VERSION_MAJOR=2 From 449936e461ac15325453cf09c892d41c8e0fec24 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 10 Sep 2017 15:19:50 +0000 Subject: [PATCH 63/85] SheepShaver: added --sdlrender option, when on Unix --- SheepShaver/src/Unix/prefs_unix.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SheepShaver/src/Unix/prefs_unix.cpp b/SheepShaver/src/Unix/prefs_unix.cpp index 7f89a107..2a81e7bd 100644 --- a/SheepShaver/src/Unix/prefs_unix.cpp +++ b/SheepShaver/src/Unix/prefs_unix.cpp @@ -41,6 +41,9 @@ prefs_desc platform_prefs_items[] = { {"ignoresegv", TYPE_BOOLEAN, false, "ignore illegal memory accesses"}, #endif {"idlewait", TYPE_BOOLEAN, false, "sleep when idle"}, +#ifdef USE_SDL_VIDEO + {"sdlrender", TYPE_STRING, false, "SDL_Renderer driver (\"auto\", \"software\" (may be faster), etc.)"}, +#endif {NULL, TYPE_END, false, NULL} // End of list }; From 50986dcf467f793aec7e3ec2005d1f0c7b64758e Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Sun, 10 Sep 2017 14:34:13 -0400 Subject: [PATCH 64/85] Perf: make SDL2 use an ARGB8888 texture, which is natively supported via some GPUs + drivers, such as on OSX. This can remove an extraneous pixel-format conversion. --- BasiliskII/src/SDL/video_sdl2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BasiliskII/src/SDL/video_sdl2.cpp b/BasiliskII/src/SDL/video_sdl2.cpp index 8db972b1..e1e7ea52 100644 --- a/BasiliskII/src/SDL/video_sdl2.cpp +++ b/BasiliskII/src/SDL/video_sdl2.cpp @@ -777,7 +777,7 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags } SDL_assert(sdl_texture == NULL); - sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_RGB888, SDL_TEXTUREACCESS_STREAMING, width, height); + sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, width, height); if (!sdl_texture) { shutdown_sdl_video(); return NULL; From ef26204e6d6b19378d27ef0baf91adeac729d671 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Tue, 12 Sep 2017 17:31:05 -0400 Subject: [PATCH 65/85] Perf: make SDL2 backend update less pixels, when updating internal textures and surface(s) --- BasiliskII/src/SDL/video_sdl2.cpp | 99 +++++++++++++++++-------------- 1 file changed, 54 insertions(+), 45 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl2.cpp b/BasiliskII/src/SDL/video_sdl2.cpp index e1e7ea52..5c7d5cf8 100644 --- a/BasiliskII/src/SDL/video_sdl2.cpp +++ b/BasiliskII/src/SDL/video_sdl2.cpp @@ -137,6 +137,8 @@ static SDL_Surface * guest_surface = NULL; // Surface in guest-OS display form static SDL_Renderer * sdl_renderer = NULL; // Handle to SDL2 renderer static SDL_threadID sdl_renderer_thread_id = 0; // Thread ID where the SDL_renderer was created, and SDL_renderer ops should run (for compatibility w/ d3d9) static SDL_Texture * sdl_texture = NULL; // Handle to a GPU texture, with which to draw guest_surface to +static SDL_Rect sdl_update_video_rect = {0,0,0,0}; // Union of all rects to update, when updating sdl_texture +static SDL_mutex * sdl_update_video_mutex = NULL; // Mutex to protect sdl_update_video_rect static int screen_depth; // Depth of current screen static SDL_Cursor *sdl_cursor = NULL; // Copy of Mac cursor static SDL_Palette *sdl_palette = NULL; // Color palette to be used as CLUT and gamma table @@ -168,7 +170,6 @@ static void (*video_refresh)(void); // Prototypes static int redraw_func(void *arg); -static int update_sdl_video(); static int present_sdl_video(); static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event); static bool is_fullscreen(SDL_Window *); @@ -775,6 +776,10 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags SDL_GetRendererInfo(sdl_renderer, &info); printf("Using SDL_Renderer driver: %s\n", (info.name ? info.name : "(null)")); } + + if (!sdl_update_video_mutex) { + sdl_update_video_mutex = SDL_CreateMutex(); + } SDL_assert(sdl_texture == NULL); sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, width, height); @@ -782,6 +787,7 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags shutdown_sdl_video(); return NULL; } + sdl_update_video_rect = {0,0,0,0}; SDL_assert(guest_surface == NULL); SDL_assert(host_surface == NULL); @@ -861,62 +867,65 @@ static int present_sdl_video() SDL_SetRenderDrawColor(sdl_renderer, 0, 0, 0, 0); // Use black SDL_RenderClear(sdl_renderer); // Clear the display - if (host_surface != guest_surface && + // We're about to work with sdl_update_video_rect, so stop other threads from + // modifying it! + SDL_LockMutex(sdl_update_video_mutex); + + // Convert from the guest OS' pixel format, to the host OS' texture, if necessary. + if (host_surface != guest_surface && host_surface != NULL && guest_surface != NULL) { - SDL_Rect destRect = {0, 0, host_surface->w, host_surface->h}; - if (SDL_BlitSurface(guest_surface, NULL, host_surface, &destRect) != 0) { + SDL_Rect destRect = sdl_update_video_rect; + if (SDL_BlitSurface(guest_surface, &sdl_update_video_rect, host_surface, &destRect) != 0) { + SDL_UnlockMutex(sdl_update_video_mutex); return -1; } } - - if (SDL_UpdateTexture(sdl_texture, NULL, host_surface->pixels, host_surface->pitch) != 0) { - return -1; - } - - SDL_Rect src_rect = {0, 0, host_surface->w, host_surface->h}; - if (SDL_RenderCopy(sdl_renderer, sdl_texture, &src_rect, NULL) != 0) { + + // Update the host OS' texture + void * srcPixels = (void *)((uint8_t *)host_surface->pixels + + sdl_update_video_rect.y * host_surface->pitch + + sdl_update_video_rect.x * host_surface->format->BytesPerPixel); + + if (SDL_UpdateTexture(sdl_texture, &sdl_update_video_rect, srcPixels, host_surface->pitch) != 0) { + SDL_UnlockMutex(sdl_update_video_mutex); + return -1; + } + + // We are done working with pixels in host_surface. Reset sdl_update_video_rect, then let + // other threads modify it, as-needed. + sdl_update_video_rect = {0,0,0,0}; + SDL_UnlockMutex(sdl_update_video_mutex); + + // Copy the texture to the display + if (SDL_RenderCopy(sdl_renderer, sdl_texture, NULL, NULL) != 0) { return -1; } + // Update the display SDL_RenderPresent(sdl_renderer); - - return 0; -} - -static int update_sdl_video() -{ - // HACK, dludwig@pobox.com: for now, just update the whole screen, via - // VideoInterrupt(), which gets called on the main thread. - // - // TODO: make sure SDL_Renderer resources get displayed, if and when - // MacsBug is running (and VideoInterrupt() might not get called) - // - // TODO: cache rects to update, then use rects in present_sdl_video() - return 0; -} - -void update_sdl_video(SDL_Surface *s, Sint32 x, Sint32 y, Sint32 w, Sint32 h) -{ - // HACK, dludwig@pobox.com: for now, just update the whole screen, via - // VideoInterrupt(), which gets called on the main thread. - // - // TODO: make sure SDL_Renderer resources get displayed, if and when - // MacsBug is running (and VideoInterrupt() might not get called) - // - // TODO: cache rects to update, then use rects in present_sdl_video() + + // Indicate success to the caller! + return 0; } void update_sdl_video(SDL_Surface *s, int numrects, SDL_Rect *rects) { - // HACK, dludwig@pobox.com: for now, just update the whole screen, via - // VideoInterrupt(), which gets called on the main thread. - // - // TODO: make sure SDL_Renderer resources get displayed, if and when - // MacsBug is running (and VideoInterrupt() might not get called) - // - // TODO: cache rects to update, then use rects in present_sdl_video() + // TODO: make sure SDL_Renderer resources get displayed, if and when + // MacsBug is running (and VideoInterrupt() might not get called) + + SDL_LockMutex(sdl_update_video_mutex); + for (int i = 0; i < numrects; ++i) { + SDL_UnionRect(&sdl_update_video_rect, &rects[i], &sdl_update_video_rect); + } + SDL_UnlockMutex(sdl_update_video_mutex); +} + +void update_sdl_video(SDL_Surface *s, Sint32 x, Sint32 y, Sint32 w, Sint32 h) +{ + SDL_Rect temp = {x, y, w, h}; + update_sdl_video(s, 1, &temp); } void driver_base::set_video_mode(int flags) @@ -2406,8 +2415,8 @@ static void update_display_static_bbox(driver_base *drv) // Refresh display if (nr_boxes) - update_sdl_video(); - } + update_sdl_video(drv->s, nr_boxes, boxes); +} // We suggest the compiler to inline the next two functions so that it From 4e5e3377f1cfead70e31170a644f1158fe7d35ce Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Tue, 12 Sep 2017 18:35:24 -0400 Subject: [PATCH 66/85] Perf: re-enable VOSF on Xcode-made, OSX-host builds --- .../src/MacOSX/BasiliskII.xcodeproj/project.pbxproj | 2 ++ BasiliskII/src/MacOSX/config.h | 1 + BasiliskII/src/SDL/video_sdl2.cpp | 12 ++---------- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index 916f1ad8..8ff0df48 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -1316,6 +1316,7 @@ "$(inherited)", "$(LOCAL_LIBRARY_DIR)/Frameworks", ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.basiliskii.BasiliskII; @@ -1332,6 +1333,7 @@ "$(inherited)", "$(LOCAL_LIBRARY_DIR)/Frameworks", ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.basiliskii.BasiliskII; diff --git a/BasiliskII/src/MacOSX/config.h b/BasiliskII/src/MacOSX/config.h index 76393d47..5dbc78ab 100644 --- a/BasiliskII/src/MacOSX/config.h +++ b/BasiliskII/src/MacOSX/config.h @@ -43,6 +43,7 @@ /* Define if using video enabled on SEGV signals. */ /* #undef ENABLE_VOSF */ +#define ENABLE_VOSF 1 /* Define if using XFree86 DGA extension. */ /* #undef ENABLE_XF86_DGA */ diff --git a/BasiliskII/src/SDL/video_sdl2.cpp b/BasiliskII/src/SDL/video_sdl2.cpp index 5c7d5cf8..43b6263e 100644 --- a/BasiliskII/src/SDL/video_sdl2.cpp +++ b/BasiliskII/src/SDL/video_sdl2.cpp @@ -210,9 +210,6 @@ extern void SysMountFirstFloppy(void); static void *vm_acquire_framebuffer(uint32 size) { -#if __MACOSX__ - return calloc(1, size); -#else // always try to reallocate framebuffer at the same address static void *fb = VM_MAP_FAILED; if (fb != VM_MAP_FAILED) { @@ -226,16 +223,11 @@ static void *vm_acquire_framebuffer(uint32 size) if (fb == VM_MAP_FAILED) fb = vm_acquire(size, VM_MAP_DEFAULT | VM_MAP_32BIT); return fb; -#endif } static inline void vm_release_framebuffer(void *fb, uint32 size) { -#if __MACOSX__ - free(fb); -#else vm_release(fb, size); -#endif } static inline int get_customized_color_depth(int default_depth) @@ -696,7 +688,7 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags if (guest_surface) { delete_sdl_video_surfaces(); } - + int window_width = width; int window_height = height; Uint32 window_flags = 0; @@ -961,7 +953,7 @@ void driver_base::init() printf("VOSF acceleration is not profitable on this platform, disabling it\n"); use_vosf = false; } - if (!use_vosf) { + if (!use_vosf) { free(the_buffer_copy); vm_release(the_buffer, the_buffer_size); the_host_buffer = NULL; From 7a52abd378f88ed50b40b65e5ecda4eaf15a13f5 Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Tue, 12 Sep 2017 22:15:46 -0400 Subject: [PATCH 67/85] bug-fix: video_sdl2.cpp would not compile in pre-C++11 --- BasiliskII/src/SDL/video_sdl2.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/BasiliskII/src/SDL/video_sdl2.cpp b/BasiliskII/src/SDL/video_sdl2.cpp index 43b6263e..3c7177e6 100644 --- a/BasiliskII/src/SDL/video_sdl2.cpp +++ b/BasiliskII/src/SDL/video_sdl2.cpp @@ -779,7 +779,10 @@ static SDL_Surface * init_sdl_video(int width, int height, int bpp, Uint32 flags shutdown_sdl_video(); return NULL; } - sdl_update_video_rect = {0,0,0,0}; + sdl_update_video_rect.x = 0; + sdl_update_video_rect.y = 0; + sdl_update_video_rect.w = 0; + sdl_update_video_rect.h = 0; SDL_assert(guest_surface == NULL); SDL_assert(host_surface == NULL); @@ -887,7 +890,10 @@ static int present_sdl_video() // We are done working with pixels in host_surface. Reset sdl_update_video_rect, then let // other threads modify it, as-needed. - sdl_update_video_rect = {0,0,0,0}; + sdl_update_video_rect.x = 0; + sdl_update_video_rect.y = 0; + sdl_update_video_rect.w = 0; + sdl_update_video_rect.h = 0; SDL_UnlockMutex(sdl_update_video_mutex); // Copy the texture to the display From 54ea054993a555af1b9dbc4b86d38d60d2540e3e Mon Sep 17 00:00:00 2001 From: jvernet Date: Tue, 3 Oct 2017 21:32:48 +0200 Subject: [PATCH 68/85] XCode 9 Project --- BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index 8ff0df48..aaa57a80 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -1201,6 +1201,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -1258,6 +1259,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -1310,6 +1312,7 @@ 7539DFC71F23B17E006B2DF2 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COMBINE_HIDPI_IMAGES = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -1319,6 +1322,7 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.7; PRODUCT_BUNDLE_IDENTIFIER = com.basiliskii.BasiliskII; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -1327,6 +1331,7 @@ 7539DFC81F23B17E006B2DF2 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COMBINE_HIDPI_IMAGES = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -1336,6 +1341,7 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.7; PRODUCT_BUNDLE_IDENTIFIER = com.basiliskii.BasiliskII; PRODUCT_NAME = "$(TARGET_NAME)"; }; From 1316b64bb7f9d954f2384e96cb54efbf3cef6abf Mon Sep 17 00:00:00 2001 From: jvernet Date: Tue, 3 Oct 2017 21:37:24 +0200 Subject: [PATCH 69/85] Some Warning removed and 64bits --- BasiliskII/src/MacOSX/sys_darwin.cpp | 6 +++--- BasiliskII/src/Unix/sysdeps.h | 2 +- BasiliskII/src/Unix/timer_unix.cpp | 2 +- BasiliskII/src/include/version.h | 4 ++-- BasiliskII/src/timer.cpp | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/BasiliskII/src/MacOSX/sys_darwin.cpp b/BasiliskII/src/MacOSX/sys_darwin.cpp index 5a798e70..46e6cb5c 100644 --- a/BasiliskII/src/MacOSX/sys_darwin.cpp +++ b/BasiliskII/src/MacOSX/sys_darwin.cpp @@ -256,10 +256,10 @@ void DarwinAddFloppyPrefs(void) } // Iterate through each floppy - while ( nextFloppy = IOIteratorNext(allFloppies)) + while ( (nextFloppy = IOIteratorNext(allFloppies))) { char bsdPath[MAXPATHLEN]; - long size; + long size = 0; Boolean gotSize = FALSE; CFTypeRef sizeAsCFNumber = IORegistryEntryCreateCFProperty(nextFloppy, @@ -333,7 +333,7 @@ void DarwinAddSerialPrefs(void) } // Iterate through each modem - while ( nextModem = IOIteratorNext(allModems)) + while ( (nextModem = IOIteratorNext(allModems))) { char bsdPath[MAXPATHLEN]; CFTypeRef bsdPathAsCFString = diff --git a/BasiliskII/src/Unix/sysdeps.h b/BasiliskII/src/Unix/sysdeps.h index 7f8abb05..b6cfea45 100644 --- a/BasiliskII/src/Unix/sysdeps.h +++ b/BasiliskII/src/Unix/sysdeps.h @@ -219,7 +219,7 @@ typedef uae_u32 uaecptr; /* Timing functions */ extern uint64 GetTicks_usec(void); -extern void Delay_usec(uint32 usec); +extern void Delay_usec(uint64 usec); /* Spinlocks */ #ifdef __GNUC__ diff --git a/BasiliskII/src/Unix/timer_unix.cpp b/BasiliskII/src/Unix/timer_unix.cpp index 6a5dd449..f00420e2 100644 --- a/BasiliskII/src/Unix/timer_unix.cpp +++ b/BasiliskII/src/Unix/timer_unix.cpp @@ -264,7 +264,7 @@ uint64 GetTicks_usec(void) #define USE_COND_TIMEDWAIT #endif -void Delay_usec(uint32 usec) +void Delay_usec(uint64 usec) { int was_error; diff --git a/BasiliskII/src/include/version.h b/BasiliskII/src/include/version.h index 44819c70..79ba3196 100644 --- a/BasiliskII/src/include/version.h +++ b/BasiliskII/src/include/version.h @@ -22,8 +22,8 @@ #define VERSION_H const int VERSION_MAJOR = 1; -const int VERSION_MINOR = 0; +const int VERSION_MINOR = 1; -#define VERSION_STRING "Basilisk II V1.0" +#define VERSION_STRING "Basilisk II V1.0 SDL2" #endif diff --git a/BasiliskII/src/timer.cpp b/BasiliskII/src/timer.cpp index 1383d8ee..316d8d38 100644 --- a/BasiliskII/src/timer.cpp +++ b/BasiliskII/src/timer.cpp @@ -173,7 +173,7 @@ void TimerReset(void) int16 InsTime(uint32 tm, uint16 trap) { D(bug("InsTime %08lx, trap %04x\n", tm, trap)); - WriteMacInt16(tm + qType, ReadMacInt16(tm + qType) & 0x1fff | (trap << 4) & 0x6000); + WriteMacInt16(tm + qType, (ReadMacInt16(tm + qType) & 0x1fff) | ((trap << 4) & 0x6000)); if (find_desc(tm) >= 0) printf("WARNING: InsTime(): Task re-inserted\n"); else { From 34765ae7407aeece5d8746015f66c0b844c0cd0a Mon Sep 17 00:00:00 2001 From: jvernet Date: Tue, 3 Oct 2017 21:39:30 +0200 Subject: [PATCH 70/85] Added pref items {"keycodes", {"keycodefile", {"mousewheelmode", {"mousewheellines" to have again international keyboard --- BasiliskII/src/prefs_items.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BasiliskII/src/prefs_items.cpp b/BasiliskII/src/prefs_items.cpp index 834dfc7d..6da364b0 100644 --- a/BasiliskII/src/prefs_items.cpp +++ b/BasiliskII/src/prefs_items.cpp @@ -68,6 +68,10 @@ prefs_desc common_prefs_items[] = { {"jitinline", TYPE_BOOLEAN, false, "enable translation through constant jumps"}, {"jitblacklist", TYPE_STRING, false, "blacklist opcodes from translation"}, {"keyboardtype", TYPE_INT32, false, "hardware keyboard type"}, + {"keycodes",TYPE_BOOLEAN,false,"use raw keycode"}, + {"keycodefile",TYPE_STRING,"Keycode file"}, + {"mousewheelmode",TYPE_BOOLEAN,"Use WheelMode"}, + {"mousewheellines",TYPE_INT32,"wheel line nb"}, {NULL, TYPE_END, false, NULL} // End of list }; From 7b8beab25a738ced449f7568ea571e3516f870d1 Mon Sep 17 00:00:00 2001 From: jvernet Date: Tue, 3 Oct 2017 21:41:12 +0200 Subject: [PATCH 71/85] Basilisk Macbook Keycode French Macbook Keycode file --- BasiliskII/src/MacOSX/BasiliskII_keycodes | 576 ++++++++++++++++++++++ 1 file changed, 576 insertions(+) create mode 100644 BasiliskII/src/MacOSX/BasiliskII_keycodes diff --git a/BasiliskII/src/MacOSX/BasiliskII_keycodes b/BasiliskII/src/MacOSX/BasiliskII_keycodes new file mode 100644 index 00000000..cfdc7f5f --- /dev/null +++ b/BasiliskII/src/MacOSX/BasiliskII_keycodes @@ -0,0 +1,576 @@ +# /usr/share/BasiliskII/keycodes +# +# Basilisk II (C) 1997-2005 Christian Bauer +# +# This file is used to translate the (server-specific) scancodes to +# Mac keycodes depending on the window server being used. +# +# The format of this file is as follows: +# +# sdl +# +# +# +# ... +# sdl +# +# +# ... +# +# The "driver string" must match the first part of the SDL driver vendor +# description as reported by SDL_VideoDriverName(). If a match is found, +# the keycode translation table is constructed from the following +# lines. Each line contains an SDL scancode followed by its associated +# Mac keycode. Both keycodes have to be given in decimal. Lines +# beginning with "#" or ";" are treated as comments and ignored. +# + +# +# Cocoa French Keyboard +# + +sdl cocoa +41 53 # Esc +58 122 # F1 +59 120 # F2 +60 99 # F3 +61 118 # F4 +62 96 # F5 +63 97 # F6 +64 98 # F7 +65 100 # F8 +66 101 # F9 +67 109 # F10 +68 103 # F11 +69 111 # F12 +70 105 # F13/PrintScrn +71 107 # F14/Scroll Lock +72 113 # F15/Pause +53 10 # ` +30 18 # 1 +31 19 # 2 +32 20 # 3 +33 21 # 4 +34 23 # 5 +35 22 # 6 +36 26 # 7 +37 28 # 8 +38 25 # 9 +39 29 # 0 +45 27 # - +46 24 # = +42 51 # Backspace +73 114 # Help/Insert +74 115 # Home +75 116 # Page Up +83 71 # Num Lock +81 81 # KP = +84 75 # KP / +85 67 # KP * +43 48 # Tab +20 12 # Q +26 13 # W +8 14 # E +21 15 # R +23 17 # T +28 16 # Y +24 32 # U +12 34 # I +18 31 # O +19 35 # P +47 33 # [ +48 30 # ] +40 36 # Return +76 117 # Delete +77 119 # End +78 121 # Page Down +95 89 # KP 7 +96 91 # KP 8 +97 92 # KP 9 +86 78 # KP - +130 57 # Caps Lock +4 0 # A +22 1 # S +7 2 # D +9 3 # F +10 5 # G +11 4 # H +13 38 # J +14 40 # K +15 37 # L +51 41 # ; +52 39 # ' +49 42 # \ +92 86 # KP 4 +93 87 # KP 5 +94 88 # KP 6 +87 69 # KP + +56 56 # Shift +100 50 # International SDL_NONUSBACKSLASH +29 6 # Z +27 7 # X +6 8 # C +25 9 # V +5 11 # B +17 45 # N +16 46 # M +54 43 # , +55 47 # . +56 44 # / +82 62 # Cursor Up +80 59 # Cursor Left +81 61 # Cursor Down +79 60 # Cursor Right +83 83 # KP 1 +84 84 # KP 2 +85 85 # KP 3 +76 76 # KP Enter +228 54 # Ctrl +226 58 # Option +227 55 # Command +224 54 # Ctrl Left +230 58 # Right Alt->option +231 55 # Right cmd +44 49 # Space +82 82 # KP 0 +65 65 # KP . + +# +# X11 server +# +sdl x11 +sdl dga +9 53 # Esc +67 122 # F1 +68 120 # F2 +69 99 # F3 +70 118 # F4 +71 96 # F5 +72 97 # F6 +73 98 # F7 +74 100 # F8 +75 101 # F9 +76 109 # F10 +95 103 # F11 +96 111 # F12 +111 105 # PrintScrn +78 107 # Scroll Lock +110 113 # Pause +49 10 # ` +10 18 # 1 +11 19 # 2 +12 20 # 3 +13 21 # 4 +14 23 # 5 +15 22 # 6 +16 26 # 7 +17 28 # 8 +18 25 # 9 +19 29 # 0 +20 27 # - +21 24 # = +22 51 # Backspace +106 114 # Insert +97 115 # Home +99 116 # Page Up +77 71 # Num Lock +112 75 # KP / +63 67 # KP * +82 78 # KP - +23 48 # Tab +24 12 # Q +25 13 # W +26 14 # E +27 15 # R +28 17 # T +29 16 # Y +30 32 # U +31 34 # I +32 31 # O +33 35 # P +34 33 # [ +35 30 # ] +36 36 # Return +107 117 # Delete +103 119 # End +105 121 # Page Down +79 89 # KP 7 +80 91 # KP 8 +81 92 # KP 9 +86 69 # KP + +66 57 # Caps Lock +38 0 # A +39 1 # S +40 2 # D +41 3 # F +42 5 # G +43 4 # H +44 38 # J +45 40 # K +46 37 # L +47 41 # ; +48 39 # ' +83 86 # KP 4 +84 87 # KP 5 +85 88 # KP 6 +50 56 # Shift Left +94 50 # International +52 6 # Z +53 7 # X +54 8 # C +55 9 # V +56 11 # B +57 45 # N +58 46 # M +59 43 # , +60 47 # . +61 44 # / +62 56 # Shift Right +51 42 # \ +98 62 # Cursor Up +87 83 # KP 1 +88 84 # KP 2 +89 85 # KP 3 +108 76 # KP Enter +37 54 # Ctrl Left +115 58 # Logo Left (-> Option) +64 55 # Alt Left (-> Command) +65 49 # Space +113 55 # Alt Right (-> Command) +116 58 # Logo Right (-> Option) +117 50 # Menu (-> International) +109 54 # Ctrl Right +100 59 # Cursor Left +104 61 # Cursor Down +102 60 # Cursor Right +90 82 # KP 0 +91 65 # KP . + +# +# Linux Framebuffer Console +# +sdl fbcon +1 53 # Esc +59 122 # F1 +60 120 # F2 +61 99 # F3 +62 118 # F4 +63 96 # F5 +64 97 # F6 +65 98 # F7 +66 100 # F8 +67 101 # F9 +68 109 # F10 +87 103 # F11 +88 111 # F12 +99 105 # PrintScrn +70 107 # Scroll Lock +119 113 # Pause +41 10 # ` +2 18 # 1 +3 19 # 2 +4 20 # 3 +5 21 # 4 +6 23 # 5 +7 22 # 6 +8 26 # 7 +9 28 # 8 +10 25 # 9 +11 29 # 0 +12 27 # - +13 24 # = +14 51 # Backspace +110 114 # Insert +102 115 # Home +104 116 # Page Up +69 71 # Num Lock +98 75 # KP / +55 67 # KP * +74 78 # KP - +15 48 # Tab +16 12 # Q +17 13 # W +18 14 # E +19 15 # R +20 17 # T +21 16 # Y +22 32 # U +23 34 # I +24 31 # O +25 35 # P +26 33 # [ +27 30 # ] +28 36 # Return +111 117 # Delete +107 119 # End +109 121 # Page Down +71 89 # KP 7 +72 91 # KP 8 +73 92 # KP 9 +78 69 # KP + +58 57 # Caps Lock +30 0 # A +31 1 # S +32 2 # D +33 3 # F +34 5 # G +35 4 # H +36 38 # J +37 40 # K +38 37 # L +39 41 # ; +40 39 # ' +75 86 # KP 4 +76 87 # KP 5 +77 88 # KP 6 +42 56 # Shift Left +86 50 # International +44 6 # Z +45 7 # X +46 8 # C +47 9 # V +48 11 # B +49 45 # N +50 46 # M +51 43 # , +52 47 # . +53 44 # / +54 56 # Shift Right +43 42 # \ +103 62 # Cursor Up +79 83 # KP 1 +80 84 # KP 2 +81 85 # KP 3 +96 76 # KP Enter +29 54 # Ctrl Left +125 58 # Logo Left (-> Option) +56 55 # Alt Left (-> Command) +57 49 # Space +100 55 # Alt Right (-> Command) +126 58 # Logo Right (-> Option) +97 54 # Ctrl Right +105 59 # Cursor Left +108 61 # Cursor Down +106 60 # Cursor Right +82 82 # KP 0 +83 65 # KP . + +# +# Quartz (1:1 translation actually) +# +sdl Quartz +41 53 # Esc +58 122 # F1 +59 120 # F2 +60 99 # F3 +61 118 # F4 +62 96 # F5 +63 97 # F6 +64 98 # F7 +65 100 # F8 +66 101 # F9 +67 109 # F10 +68 103 # F11 +69 111 # F12 +70 105 # F13/PrintScrn +71 107 # F14/Scroll Lock +72 113 # F15/Pause +52 10 # ` +30 18 # 1 +31 19 # 2 +32 20 # 3 +33 21 # 4 +34 23 # 5 +35 22 # 6 +36 26 # 7 +37 28 # 8 +38 25 # 9 +39 29 # 0 +45 27 # - +24 24 # = +42 51 # Backspace +114 114 # Help/Insert +74 115 # Home +75 116 # Page Up +83 71 # Num Lock +81 81 # KP = +84 75 # KP / +85 67 # KP * +48 48 # Tab +20 12 # Q +26 13 # W +8 14 # E +21 15 # R +23 17 # T +28 16 # Y +24 32 # U +12 34 # I +18 31 # O +19 35 # P +47 33 # [ +48 30 # ] +40 36 # Return +117 117 # Delete +119 119 # End +121 121 # Page Down +95 89 # KP 7 +96 91 # KP 8 +97 92 # KP 9 +86 78 # KP - +57 57 # Caps Lock +4 0 # A +22 1 # S +7 2 # D +9 3 # F +10 5 # G +11 4 # H +13 38 # J +14 40 # K +15 37 # L +51 41 # ; +52 39 # ' +49 42 # \ +92 86 # KP 4 +93 87 # KP 5 +94 88 # KP 6 +87 69 # KP + +56 56 # Shift +100 50 # International SDL_NONUSBACKSLASH +29 6 # Z +27 7 # X +6 8 # C +25 9 # V +5 11 # B +17 45 # N +16 46 # M +54 43 # , +55 47 # . +56 44 # / +126 62 # Cursor Up +123 59 # Cursor Left +125 61 # Cursor Down +124 60 # Cursor Right +83 83 # KP 1 +84 84 # KP 2 +85 85 # KP 3 +76 76 # KP Enter +228 54 # Ctrl +226 58 # Option +227 55 # Command +224 54 # Ctrl Left +230 58 # Right Alt->option +231 55 # Right cmd +44 49 # Space +82 82 # KP 0 +65 65 # KP . + +# +# Windows +# +sdl windib +sdl directx +1 53 # Esc +59 122 # F1 +60 120 # F2 +61 99 # F3 +62 118 # F4 +63 96 # F5 +64 97 # F6 +65 98 # F7 +66 100 # F8 +67 101 # F9 +68 109 # F10 +87 103 # F11 +88 111 # F12 +183 105 # PrintScrn +70 107 # Scroll Lock +197 113 # Pause +41 10 # ` +2 18 # 1 +3 19 # 2 +4 20 # 3 +5 21 # 4 +6 23 # 5 +7 22 # 6 +8 26 # 7 +9 28 # 8 +10 25 # 9 +11 29 # 0 +12 27 # - +13 24 # = +14 51 # Backspace +210 114 # Insert +199 115 # Home +75 116 # Page Up +69 71 # Num Lock +181 75 # KP / +55 67 # KP * +74 78 # KP - +15 48 # Tab +16 12 # Q +17 13 # W +18 14 # E +19 15 # R +20 17 # T +21 16 # Y +22 32 # U +23 34 # I +24 31 # O +25 35 # P +26 33 # [ +27 30 # ] +28 36 # Return +211 117 # Delete +207 119 # End +209 121 # Page Down +71 89 # KP 7 +72 91 # KP 8 +73 92 # KP 9 +78 69 # KP + +58 57 # Caps Lock +30 0 # A +31 1 # S +32 2 # D +33 3 # F +34 5 # G +35 4 # H +36 38 # J +37 40 # K +38 37 # L +39 41 # ; +40 39 # ' +75 86 # KP 4 +76 87 # KP 5 +77 88 # KP 6 +225 56 # Shift Left +100 50 # International +44 6 # Z +45 7 # X +46 8 # C +47 9 # V +48 11 # B +49 45 # N +50 46 # M +51 43 # , +52 47 # . +53 44 # / +229 56 # Shift Right +43 42 # \ +200 62 # Cursor Up +79 83 # KP 1 +80 84 # KP 2 +81 85 # KP 3 +156 76 # KP Enter +224 54 # Ctrl Left +227 58 # Logo Left (-> Option) +226 55 # Alt Left (-> Command) +57 49 # Space +230 55 # Alt Right (-> Command) +231 58 # Logo Right (-> Option) +221 50 # Menu (-> International) +157 54 # Ctrl Right +80 59 # Cursor Left +81 61 # Cursor Down +79 60 # Cursor Right +98 82 # KP 0 +99 65 # KP . From 000ec0f135c7509a13b3c2bacd26f9ce27503c80 Mon Sep 17 00:00:00 2001 From: jvernet Date: Tue, 3 Oct 2017 22:33:01 +0200 Subject: [PATCH 72/85] 64 bits slirp ? --- BasiliskII/src/slirp/tcp_input.c | 6 +++++- BasiliskII/src/slirp/udp.c | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/BasiliskII/src/slirp/tcp_input.c b/BasiliskII/src/slirp/tcp_input.c index 032e5378..5c06f16f 100644 --- a/BasiliskII/src/slirp/tcp_input.c +++ b/BasiliskII/src/slirp/tcp_input.c @@ -292,7 +292,11 @@ void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) * Checksum extended TCP header and data. */ tlen = ((struct ip *)ti)->ip_len; - ti->ti_next = ti->ti_prev = 0; + //ti->ti_next = ti->ti_prev = 0; + + tcpiphdr2qlink(ti)->next = tcpiphdr2qlink(ti)->prev = 0; + memset(&ti->ti_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr)); + ti->ti_x1 = 0; ti->ti_len = htons((u_int16_t)tlen); len = sizeof(struct ip) + tlen; diff --git a/BasiliskII/src/slirp/udp.c b/BasiliskII/src/slirp/udp.c index deedb1e7..9d805ff3 100644 --- a/BasiliskII/src/slirp/udp.c +++ b/BasiliskII/src/slirp/udp.c @@ -272,7 +272,10 @@ int udp_output2(struct socket *so, struct mbuf *m, * and addresses and length put into network format. */ ui = mtod(m, struct udpiphdr *); - ui->ui_next = ui->ui_prev = 0; + //ui->ui_next = ui->ui_prev = 0; + + memset(&ui->ui_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr)); + ui->ui_x1 = 0; ui->ui_pr = IPPROTO_UDP; ui->ui_len = htons((u_short) (m->m_len - sizeof(struct ip))); /* + sizeof (struct udphdr)); */ From 4682bb80a1afd69e365a0e448fcba7dd68f8c242 Mon Sep 17 00:00:00 2001 From: jvernet Date: Tue, 3 Oct 2017 22:34:56 +0200 Subject: [PATCH 73/85] SLIRP 0.9.1 --- BasiliskII/src/slirp/COPYRIGHT | 5 +- BasiliskII/src/slirp/bootp.c | 48 +- BasiliskII/src/slirp/bootp.h | 10 +- BasiliskII/src/slirp/cksum.c | 20 +- BasiliskII/src/slirp/debug.c | 142 ++-- BasiliskII/src/slirp/debug.h | 16 +- BasiliskII/src/slirp/icmp_var.h | 8 +- BasiliskII/src/slirp/if.c | 99 +-- BasiliskII/src/slirp/if.h | 37 +- BasiliskII/src/slirp/ip.h | 52 +- BasiliskII/src/slirp/ip_icmp.c | 84 ++- BasiliskII/src/slirp/ip_icmp.h | 22 +- BasiliskII/src/slirp/ip_input.c | 101 +-- BasiliskII/src/slirp/ip_output.c | 51 +- BasiliskII/src/slirp/libslirp.h | 24 +- BasiliskII/src/slirp/main.h | 5 +- BasiliskII/src/slirp/mbuf.c | 95 +-- BasiliskII/src/slirp/mbuf.h | 33 +- BasiliskII/src/slirp/misc.c | 375 ++++++---- BasiliskII/src/slirp/misc.h | 48 +- BasiliskII/src/slirp/sbuf.c | 64 +- BasiliskII/src/slirp/sbuf.h | 17 +- BasiliskII/src/slirp/slirp.c | 302 ++++---- BasiliskII/src/slirp/slirp.h | 178 +++-- BasiliskII/src/slirp/slirp_config.h | 85 ++- BasiliskII/src/slirp/socket.c | 224 +++--- BasiliskII/src/slirp/socket.h | 47 +- BasiliskII/src/slirp/tcp.h | 24 +- BasiliskII/src/slirp/tcp_input.c | 1036 +++++++++++++-------------- BasiliskII/src/slirp/tcp_output.c | 118 +-- BasiliskII/src/slirp/tcp_subr.c | 418 ++++++----- BasiliskII/src/slirp/tcp_timer.c | 73 +- BasiliskII/src/slirp/tcp_timer.h | 19 +- BasiliskII/src/slirp/tcp_var.h | 9 +- BasiliskII/src/slirp/tcpip.h | 6 +- BasiliskII/src/slirp/tftp.c | 149 +++- BasiliskII/src/slirp/tftp.h | 15 +- BasiliskII/src/slirp/udp.c | 209 +++--- BasiliskII/src/slirp/udp.h | 37 +- 39 files changed, 2299 insertions(+), 2006 deletions(-) diff --git a/BasiliskII/src/slirp/COPYRIGHT b/BasiliskII/src/slirp/COPYRIGHT index b7d6568e..3f331ee0 100644 --- a/BasiliskII/src/slirp/COPYRIGHT +++ b/BasiliskII/src/slirp/COPYRIGHT @@ -16,7 +16,7 @@ The copyright terms and conditions: ---BEGIN--- Copyright (c) 1995,1996 Danny Gasparovski. All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -25,6 +25,9 @@ The copyright terms and conditions: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + This product includes software developed by Danny Gasparovski. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY diff --git a/BasiliskII/src/slirp/bootp.c b/BasiliskII/src/slirp/bootp.c index a51b80c9..3ae3db20 100644 --- a/BasiliskII/src/slirp/bootp.c +++ b/BasiliskII/src/slirp/bootp.c @@ -1,8 +1,8 @@ /* * QEMU BOOTP/DHCP server - * + * * Copyright (c) 2004 Fabrice Bellard - * + * * 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 @@ -38,8 +38,17 @@ typedef struct { BOOTPClient bootp_clients[NB_ADDR]; +const char *bootp_filename; + static const uint8_t rfc1533_cookie[] = { RFC1533_COOKIE }; +#ifdef DEBUG +#define dprintf(fmt, args...) \ +if (slirp_debug & DBG_CALL) { fprintf(dfd, fmt, ## args); fflush(dfd); } +#else +#define dprintf(fmt, args...) +#endif + static BOOTPClient *get_new_addr(struct in_addr *paddr) { BOOTPClient *bc; @@ -80,7 +89,7 @@ static void dhcp_decode(const uint8_t *buf, int size, const uint8_t *p, *p_end; int len, tag; - *pmsg_type = 0; + *pmsg_type = 0; p = buf; p_end = buf + size; @@ -92,7 +101,7 @@ static void dhcp_decode(const uint8_t *buf, int size, while (p < p_end) { tag = p[0]; if (tag == RFC1533_PAD) { - p++; + p++; } else if (tag == RFC1533_END) { break; } else { @@ -100,6 +109,7 @@ static void dhcp_decode(const uint8_t *buf, int size, if (p >= p_end) break; len = *p++; + dprintf("dhcp: tag=0x%02x len=%d\n", tag, len); switch(tag) { case RFC2132_MSG_TYPE: @@ -126,19 +136,20 @@ static void bootp_reply(struct bootp_t *bp) /* extract exact DHCP msg type */ dhcp_decode(bp->bp_vend, DHCP_OPT_LEN, &dhcp_msg_type); - + dprintf("bootp packet op=%d msgtype=%d\n", bp->bp_op, dhcp_msg_type); + if (dhcp_msg_type == 0) dhcp_msg_type = DHCPREQUEST; /* Force reply for old BOOTP clients */ - - if (dhcp_msg_type != DHCPDISCOVER && + + if (dhcp_msg_type != DHCPDISCOVER && dhcp_msg_type != DHCPREQUEST) return; /* XXX: this is a hack to get the client mac address */ memcpy(client_ethaddr, bp->bp_hwaddr, 6); - + if ((m = m_get()) == NULL) return; - m->m_data += if_maxlinkhdr; + m->m_data += IF_MAXLINKHDR; rbp = (struct bootp_t *)m->m_data; m->m_data += sizeof(struct udpiphdr); memset(rbp, 0, sizeof(struct bootp_t)); @@ -146,8 +157,10 @@ static void bootp_reply(struct bootp_t *bp) if (dhcp_msg_type == DHCPDISCOVER) { new_addr: bc = get_new_addr(&daddr.sin_addr); - if (!bc) + if (!bc) { + dprintf("no address left\n"); return; + } memcpy(bc->macaddr, client_ethaddr, 6); } else { bc = find_addr(&daddr.sin_addr, bp->bp_hwaddr); @@ -158,6 +171,11 @@ static void bootp_reply(struct bootp_t *bp) } } + if (bootp_filename) + snprintf(rbp->bp_file, sizeof(rbp->bp_file), "%s", bootp_filename); + + dprintf("offered addr=%08x\n", ntohl(daddr.sin_addr.s_addr)); + saddr.sin_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_ALIAS); saddr.sin_port = htons(BOOTP_SERVER); @@ -185,7 +203,7 @@ static void bootp_reply(struct bootp_t *bp) *q++ = 1; *q++ = DHCPACK; } - + if (dhcp_msg_type == DHCPDISCOVER || dhcp_msg_type == DHCPREQUEST) { *q++ = RFC2132_SRV_ID; @@ -199,12 +217,12 @@ static void bootp_reply(struct bootp_t *bp) *q++ = 0xff; *q++ = 0xff; *q++ = 0x00; - + *q++ = RFC1533_GATEWAY; *q++ = 4; memcpy(q, &saddr.sin_addr, 4); q += 4; - + *q++ = RFC1533_DNS; *q++ = 4; dns_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_DNS); @@ -226,8 +244,8 @@ static void bootp_reply(struct bootp_t *bp) } } *q++ = RFC1533_END; - - m->m_len = sizeof(struct bootp_t) - + + m->m_len = sizeof(struct bootp_t) - sizeof(struct ip) - sizeof(struct udphdr); udp_output2(NULL, m, &saddr, &daddr, IPTOS_LOWDELAY); } diff --git a/BasiliskII/src/slirp/bootp.h b/BasiliskII/src/slirp/bootp.h index 54a86ca2..e48f53f3 100644 --- a/BasiliskII/src/slirp/bootp.h +++ b/BasiliskII/src/slirp/bootp.h @@ -90,10 +90,6 @@ #define BOOTP_VENDOR_LEN 64 #define DHCP_OPT_LEN 312 -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(1) -#endif - struct bootp_t { struct ip ip; struct udphdr udp; @@ -112,10 +108,6 @@ struct bootp_t { uint8_t bp_sname[64]; uint8_t bp_file[128]; uint8_t bp_vend[DHCP_OPT_LEN]; -} PACKED__; - -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) -#endif +}; void bootp_input(struct mbuf *m); diff --git a/BasiliskII/src/slirp/cksum.c b/BasiliskII/src/slirp/cksum.c index 66d3f230..b98373b5 100644 --- a/BasiliskII/src/slirp/cksum.c +++ b/BasiliskII/src/slirp/cksum.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -37,7 +41,7 @@ * * This routine is very heavily used in the network * code and should be modified for each CPU to be as fast as possible. - * + * * XXX Since we will never span more than 1 mbuf, we can optimise this */ @@ -59,13 +63,13 @@ int cksum(struct mbuf *m, int len) u_int16_t s[2]; u_int32_t l; } l_util; - + if (m->m_len == 0) goto cont; w = mtod(m, u_int16_t *); - + mlen = m->m_len; - + if (len < mlen) mlen = len; len -= mlen; @@ -103,7 +107,7 @@ int cksum(struct mbuf *m, int len) while ((mlen -= 2) >= 0) { sum += *w++; } - + if (byte_swapped) { REDUCE; sum <<= 8; @@ -113,11 +117,11 @@ int cksum(struct mbuf *m, int len) sum += s_util.s; mlen = 0; } else - + mlen = -1; } else if (mlen == -1) s_util.c[0] = *(u_int8_t *)w; - + cont: #ifdef DEBUG if (len) { diff --git a/BasiliskII/src/slirp/debug.c b/BasiliskII/src/slirp/debug.c index 916b9a8e..7c8581d6 100644 --- a/BasiliskII/src/slirp/debug.c +++ b/BasiliskII/src/slirp/debug.c @@ -1,8 +1,8 @@ /* * Copyright (c) 1995 Danny Gasparovski. * Portions copyright (c) 2000 Kelly Price. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -16,8 +16,11 @@ int dostats = 0; #endif int slirp_debug = 0; -/* Carry over one item from main.c so that the tty's restored. +extern char *strerror _P((int)); + +/* Carry over one item from main.c so that the tty's restored. * Only done when the tty being used is /dev/tty --RedWolf */ +#ifndef CONFIG_QEMU extern struct termios slirp_tty_settings; extern int slirp_tty_restore; @@ -30,7 +33,7 @@ debug_init(file, dbg) /* Close the old debugging file */ if (dfd) fclose(dfd); - + dfd = fopen(file,"w"); if (dfd != NULL) { #if 0 @@ -56,7 +59,7 @@ dump_packet(dat, n) { u_char *pptr = (u_char *)dat; int j,k; - + n /= 16; n++; DEBUG_MISC((dfd, "PACKET DUMPED: \n")); @@ -68,28 +71,30 @@ dump_packet(dat, n) } } #endif +#endif +#ifdef LOG_ENABLED #if 0 /* * Statistic routines - * + * * These will print statistics to the screen, the debug file (dfd), or * a buffer, depending on "type", so that the stats can be sent over * the link as well. */ -void +static void ttystats(ttyp) struct ttys *ttyp; { struct slirp_ifstats *is = &ttyp->ifstats; char buff[512]; - + lprint(" \r\n"); - - if (if_comp & IF_COMPRESS) + + if (IF_COMP & IF_COMPRESS) strcpy(buff, "on"); - else if (if_comp & IF_NOCOMPRESS) + else if (IF_COMP & IF_NOCOMPRESS) strcpy(buff, "off"); else strcpy(buff, "off (for now)"); @@ -117,20 +122,20 @@ ttystats(ttyp) lprint(" %6d bad input packets\r\n", is->in_mbad); } -void -allttystats() +static void +allttystats(void) { struct ttys *ttyp; - + for (ttyp = ttys; ttyp; ttyp = ttyp->next) ttystats(ttyp); } #endif -void -ipstats() +static void +ipstats(void) { - lprint(" \r\n"); + lprint(" \r\n"); lprint("IP stats:\r\n"); lprint(" %6d total packets received (%d were unaligned)\r\n", @@ -151,14 +156,14 @@ ipstats() lprint(" %6d total packets delivered\r\n", ipstat.ips_delivered); } -#if 0 -void -vjstats() +#ifndef CONFIG_QEMU +static void +vjstats(void) { lprint(" \r\n"); - + lprint("VJ compression stats:\r\n"); - + lprint(" %6d outbound packets (%d compressed)\r\n", comp_s.sls_packets, comp_s.sls_compressed); lprint(" %6d searches for connection stats (%d misses)\r\n", @@ -170,13 +175,13 @@ vjstats() } #endif -void -tcpstats() +static void +tcpstats(void) { lprint(" \r\n"); lprint("TCP stats:\r\n"); - + lprint(" %6d packets sent\r\n", tcpstat.tcps_sndtotal); lprint(" %6d data packets (%d bytes)\r\n", tcpstat.tcps_sndpack, tcpstat.tcps_sndbyte); @@ -189,8 +194,8 @@ tcpstats() lprint(" %6d window update packets\r\n", tcpstat.tcps_sndwinup); lprint(" %6d control (SYN/FIN/RST) packets\r\n", tcpstat.tcps_sndctrl); lprint(" %6d times tcp_output did nothing\r\n", tcpstat.tcps_didnuttin); - - lprint(" %6d packets received\r\n", tcpstat.tcps_rcvtotal); + + lprint(" %6d packets received\r\n", tcpstat.tcps_rcvtotal); lprint(" %6d acks (for %d bytes)\r\n", tcpstat.tcps_rcvackpack, tcpstat.tcps_rcvackbyte); lprint(" %6d duplicate acks\r\n", tcpstat.tcps_rcvdupack); @@ -199,7 +204,7 @@ tcpstats() tcpstat.tcps_rcvpack, tcpstat.tcps_rcvbyte); lprint(" %6d completely duplicate packets (%d bytes)\r\n", tcpstat.tcps_rcvduppack, tcpstat.tcps_rcvdupbyte); - + lprint(" %6d packets with some duplicate data (%d bytes duped)\r\n", tcpstat.tcps_rcvpartduppack, tcpstat.tcps_rcvpartdupbyte); lprint(" %6d out-of-order packets (%d bytes)\r\n", @@ -212,7 +217,7 @@ tcpstats() lprint(" %6d discarded for bad checksums\r\n", tcpstat.tcps_rcvbadsum); lprint(" %6d discarded for bad header offset fields\r\n", tcpstat.tcps_rcvbadoff); - + lprint(" %6d connection requests\r\n", tcpstat.tcps_connattempt); lprint(" %6d connection accepts\r\n", tcpstat.tcps_accepts); lprint(" %6d connections established (including accepts)\r\n", tcpstat.tcps_connects); @@ -231,15 +236,15 @@ tcpstats() lprint(" %6d correct ACK header predictions\r\n", tcpstat.tcps_predack); lprint(" %6d correct data packet header predictions\n", tcpstat.tcps_preddat); lprint(" %6d TCP cache misses\r\n", tcpstat.tcps_socachemiss); - - + + /* lprint(" Packets received too short: %d\r\n", tcpstat.tcps_rcvshort); */ /* lprint(" Segments dropped due to PAWS: %d\r\n", tcpstat.tcps_pawsdrop); */ } -void -udpstats() +static void +udpstats(void) { lprint(" \r\n"); @@ -252,8 +257,8 @@ udpstats() lprint(" %6d datagrams sent\r\n", udpstat.udps_opackets); } -void -icmpstats() +static void +icmpstats(void) { lprint(" \r\n"); lprint("ICMP stats:\r\n"); @@ -265,23 +270,23 @@ icmpstats() lprint(" %6d ICMP packets sent in reply\r\n", icmpstat.icps_reflect); } -void -mbufstats() +static void +mbufstats(void) { struct mbuf *m; int i; - + lprint(" \r\n"); - + lprint("Mbuf stats:\r\n"); lprint(" %6d mbufs allocated (%d max)\r\n", mbuf_alloced, mbuf_max); - + i = 0; for (m = m_freelist.m_next; m != &m_freelist; m = m->m_next) i++; lprint(" %6d mbufs on free list\r\n", i); - + i = 0; for (m = m_usedlist.m_next; m != &m_usedlist; m = m->m_next) i++; @@ -289,59 +294,55 @@ mbufstats() lprint(" %6d mbufs queued as packets\r\n\r\n", if_queued); } -void -sockstats() +static void +sockstats(void) { - char addr[INET_ADDRSTRLEN]; char buff[256]; int n; struct socket *so; lprint(" \r\n"); - + lprint( "Proto[state] Sock Local Address, Port Remote Address, Port RecvQ SendQ\r\n"); - + for (so = tcb.so_next; so != &tcb; so = so->so_next) { - + n = sprintf(buff, "tcp[%s]", so->so_tcpcb?tcpstates[so->so_tcpcb->t_state]:"NONE"); while (n < 17) buff[n++] = ' '; buff[17] = 0; lprint("%s %3d %15s %5d ", buff, so->s, - inet_ntop(AF_INET, &so->so_laddr, addr, sizeof(addr)), - ntohs(so->so_lport)); + inet_ntoa(so->so_laddr), ntohs(so->so_lport)); lprint("%15s %5d %5d %5d\r\n", - inet_ntop(AF_INET, &so->so_faddr, addr, sizeof(addr)), - ntohs(so->so_fport), + inet_ntoa(so->so_faddr), ntohs(so->so_fport), so->so_rcv.sb_cc, so->so_snd.sb_cc); } - + for (so = udb.so_next; so != &udb; so = so->so_next) { - + n = sprintf(buff, "udp[%d sec]", (so->so_expire - curtime) / 1000); while (n < 17) buff[n++] = ' '; buff[17] = 0; lprint("%s %3d %15s %5d ", buff, so->s, - inet_ntop(AF_INET, &so->so_laddr, addr, sizeof(addr)), - ntohs(so->so_lport)); + inet_ntoa(so->so_laddr), ntohs(so->so_lport)); lprint("%15s %5d %5d %5d\r\n", - inet_ntop(AF_INET, &so->so_faddr, addr, sizeof(addr)), - ntohs(so->so_fport), + inet_ntoa(so->so_faddr), ntohs(so->so_fport), so->so_rcv.sb_cc, so->so_snd.sb_cc); } } +#endif -#if 0 +#ifndef CONFIG_QEMU void slirp_exit(exit_status) int exit_status; { struct ttys *ttyp; - + DEBUG_CALL("slirp_exit"); DEBUG_ARG("exit_status = %d", exit_status); @@ -350,7 +351,7 @@ slirp_exit(exit_status) if (!dfd) debug_init("slirp_stats", 0xf); lprint_arg = (char **)&dfd; - + ipstats(); tcpstats(); udpstats(); @@ -360,20 +361,35 @@ slirp_exit(exit_status) allttystats(); vjstats(); } - + for (ttyp = ttys; ttyp; ttyp = ttyp->next) tty_detached(ttyp, 1); - + if (slirp_forked) { /* Menendez time */ if (kill(getppid(), SIGQUIT) < 0) lprint("Couldn't kill parent process %ld!\n", (long) getppid()); } - + /* Restore the terminal if we gotta */ if(slirp_tty_restore) tcsetattr(0,TCSANOW, &slirp_tty_settings); /* NOW DAMMIT! */ exit(exit_status); } #endif + +void +slirp_stats(void) +{ +#ifdef LOG_ENABLED + ipstats(); + tcpstats(); + udpstats(); + icmpstats(); + mbufstats(); + sockstats(); +#else + lprint("SLIRP statistics code not compiled.\n"); +#endif +} diff --git a/BasiliskII/src/slirp/debug.h b/BasiliskII/src/slirp/debug.h index c5d42195..8a523b2e 100644 --- a/BasiliskII/src/slirp/debug.h +++ b/BasiliskII/src/slirp/debug.h @@ -1,7 +1,7 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -36,15 +36,5 @@ extern int slirp_debug; #endif -void debug_init(char *, int); -//void ttystats(struct ttys *); -void allttystats(void); -void ipstats(void); -void vjstats(void); -void tcpstats(void); -void udpstats(void); -void icmpstats(void); -void mbufstats(void); -void sockstats(void); -void slirp_exit(int); +void debug_init _P((char *, int)); diff --git a/BasiliskII/src/slirp/icmp_var.h b/BasiliskII/src/slirp/icmp_var.h index 9af222fb..cd865b79 100644 --- a/BasiliskII/src/slirp/icmp_var.h +++ b/BasiliskII/src/slirp/icmp_var.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -60,6 +64,8 @@ struct icmpstat { { "stats", CTLTYPE_STRUCT }, \ } +#ifdef LOG_ENABLED extern struct icmpstat icmpstat; +#endif #endif diff --git a/BasiliskII/src/slirp/if.c b/BasiliskII/src/slirp/if.c index 9185dcf6..67a7b6ff 100644 --- a/BasiliskII/src/slirp/if.c +++ b/BasiliskII/src/slirp/if.c @@ -7,12 +7,7 @@ #include -size_t if_mtu, if_mru; -int if_comp; -int if_maxlinkhdr; -int if_queued = 0; /* Number of packets queued so far */ -int if_thresh = 10; /* Number of packets queued before we start sending - * (to prevent allocing too many mbufs) */ +int if_queued = 0; /* Number of packets queued so far */ struct mbuf if_fastq; /* fast queue (for interactive data) */ struct mbuf if_batchq; /* queue for non-interactive data */ @@ -41,23 +36,6 @@ ifs_remque(ifm) void if_init() { -#if 0 - /* - * Set if_maxlinkhdr to 48 because it's 40 bytes for TCP/IP, - * and 8 bytes for PPP, but need to have it on an 8byte boundary - */ -#ifdef USE_PPP - if_maxlinkhdr = 48; -#else - if_maxlinkhdr = 40; -#endif -#else - /* 2 for alignment, 14 for ethernet, 40 for TCP/IP */ - if_maxlinkhdr = 2 + 14 + 40; -#endif - if_mtu = 1500; - if_mru = 1500; - if_comp = IF_AUTOCOMP; if_fastq.ifq_next = if_fastq.ifq_prev = &if_fastq; if_batchq.ifq_next = if_batchq.ifq_prev = &if_batchq; // sl_compress_init(&comp_s); @@ -77,12 +55,12 @@ writen(fd, bptr, n) { int ret; int total; - + /* This should succeed most of the time */ ret = send(fd, bptr, n,0); if (ret == n || ret <= 0) return ret; - + /* Didn't write everything, go into the loop */ total = ret; while (n > total) { @@ -97,7 +75,7 @@ writen(fd, bptr, n) /* * if_input - read() the tty, do "top level" processing (ie: check for any escapes), * and pass onto (*ttyp->if_input) - * + * * XXXXX Any zeros arriving by themselves are NOT placed into the arriving packet. */ #define INBUFF_SIZE 2048 /* XXX */ @@ -107,17 +85,16 @@ if_input(ttyp) { u_char if_inbuff[INBUFF_SIZE]; int if_n; - + DEBUG_CALL("if_input"); DEBUG_ARG("ttyp = %lx", (long)ttyp); - + if_n = recv(ttyp->fd, (char *)if_inbuff, INBUFF_SIZE,0); - + DEBUG_MISC((dfd, " read %d bytes\n", if_n)); - + if (if_n <= 0) { - int error = WSAGetLastError(); - if (if_n == 0 || (error != WSAEINTR && error != EAGAIN)) { + if (if_n == 0 || (errno != EINTR && errno != EAGAIN)) { if (ttyp->up) link_up--; tty_detached(ttyp, 0); @@ -139,19 +116,19 @@ if_input(ttyp) } } ttyp->ones = ttyp->zeros = 0; - + (*ttyp->if_input)(ttyp, if_inbuff, if_n); } -#endif - +#endif + /* * if_output: Queue packet into an output queue. - * There are 2 output queue's, if_fastq and if_batchq. + * There are 2 output queue's, if_fastq and if_batchq. * Each output queue is a doubly linked list of double linked lists * of mbufs, each list belonging to one "session" (socket). This * way, we can output packets fairly by sending one packet from each * session, instead of all the packets from one session, then all packets - * from the next session, etc. Packets on the if_fastq get absolute + * from the next session, etc. Packets on the if_fastq get absolute * priority, but if one session hogs the link, it gets "downgraded" * to the batchq until it runs out of packets, then it'll return * to the fastq (eg. if the user does an ls -alR in a telnet session, @@ -164,11 +141,11 @@ if_output(so, ifm) { struct mbuf *ifq; int on_fastq = 1; - + DEBUG_CALL("if_output"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("ifm = %lx", (long)ifm); - + /* * First remove the mbuf from m_usedlist, * since we're gonna use m_next and m_prev ourselves @@ -178,9 +155,9 @@ if_output(so, ifm) remque(ifm); ifm->m_flags &= ~M_USEDLIST; } - + /* - * See if there's already a batchq list for this session. + * See if there's already a batchq list for this session. * This can include an interactive session, which should go on fastq, * but gets too greedy... hence it'll be downgraded from fastq to batchq. * We mustn't put this packet back on the fastq (or we'll send it out of order) @@ -194,7 +171,7 @@ if_output(so, ifm) goto diddit; } } - + /* No match, check which queue to put it on */ if (so && (so->so_iptos & IPTOS_LOWDELAY)) { ifq = if_fastq.ifq_prev; @@ -210,15 +187,15 @@ if_output(so, ifm) } } else ifq = if_batchq.ifq_prev; - + /* Create a new doubly linked list for this session */ ifm->ifq_so = so; ifs_init(ifm); insque(ifm, ifq); - + diddit: ++if_queued; - + if (so) { /* Update *_queued */ so->so_queued++; @@ -230,12 +207,12 @@ diddit: * have been sent over the link * (XXX These are arbitrary numbers, probably not optimal..) */ - if (on_fastq && ((so->so_nqueued >= 6) && + if (on_fastq && ((so->so_nqueued >= 6) && (so->so_nqueued - so->so_queued) >= 3)) { - + /* Remove from current queue... */ remque(ifm->ifs_next); - + /* ...And insert in the new. That'll teach ya! */ insque(ifm->ifs_next, &if_batchq); } @@ -268,16 +245,16 @@ void if_start(void) { struct mbuf *ifm, *ifqt; - + DEBUG_CALL("if_start"); - + if (if_queued == 0) return; /* Nothing to do */ - + again: - /* check if we can really output */ - if (!slirp_can_output()) - return; + /* check if we can really output */ + if (!slirp_can_output()) + return; /* * See which queue to get next packet from @@ -291,7 +268,7 @@ if_start(void) ifm = next_m; else ifm = if_batchq.ifq_next; - + /* Set which packet to send on next iteration */ next_m = ifm->ifq_next; } @@ -299,24 +276,24 @@ if_start(void) ifqt = ifm->ifq_prev; remque(ifm); --if_queued; - + /* If there are more packets for this session, re-queue them */ if (ifm->ifs_next != /* ifm->ifs_prev != */ ifm) { insque(ifm->ifs_next, ifqt); ifs_remque(ifm); } - + /* Update so_queued */ if (ifm->ifq_so) { if (--ifm->ifq_so->so_queued == 0) /* If there's no more queued, reset nqueued */ ifm->ifq_so->so_nqueued = 0; } - - /* Encapsulate the packet for sending */ - if_encap((uint8_t*)ifm->m_data, ifm->m_len); - m_free(ifm); + /* Encapsulate the packet for sending */ + if_encap(ifm->m_data, ifm->m_len); + + m_free(ifm); if (if_queued) goto again; diff --git a/BasiliskII/src/slirp/if.h b/BasiliskII/src/slirp/if.h index a2564ab1..bed7152f 100644 --- a/BasiliskII/src/slirp/if.h +++ b/BasiliskII/src/slirp/if.h @@ -1,7 +1,7 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -13,15 +13,26 @@ #define IF_AUTOCOMP 0x04 /* Autodetect (default) */ #define IF_NOCIDCOMP 0x08 /* CID compression */ -/* Needed for FreeBSD */ -#undef if_mtu -extern size_t if_mtu; -extern size_t if_mru; /* MTU and MRU */ -extern int if_comp; /* Flags for compression */ -extern int if_maxlinkhdr; +#define IF_MTU 1500 +#define IF_MRU 1500 +#define IF_COMP IF_AUTOCOMP /* Flags for compression */ + +#if 0 +/* + * Set if_maxlinkhdr to 48 because it's 40 bytes for TCP/IP, + * and 8 bytes for PPP, but need to have it on an 8byte boundary + */ +#ifdef USE_PPP +#define IF_MAXLINKHDR 48 +#else +#define IF_MAXLINKHDR 40 +#endif +#else + /* 2 for alignment, 14 for ethernet, 40 for TCP/IP */ +#define IF_MAXLINKHDR (2 + 14 + 40) +#endif + extern int if_queued; /* Number of packets queued so far */ -extern int if_thresh; /* Number of packets queued before we start sending - * (to prevent allocing too many mbufs) */ extern struct mbuf if_fastq; /* fast queue (for interactive data) */ extern struct mbuf if_batchq; /* queue for non-interactive data */ @@ -29,6 +40,7 @@ extern struct mbuf *next_m; #define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm)) +#ifdef LOG_ENABLED /* Interface statistics */ struct slirp_ifstats { u_int out_pkts; /* Output packets */ @@ -39,12 +51,13 @@ struct slirp_ifstats { u_int in_bytes; /* Input bytes */ u_int in_errpkts; /* Input Error Packets */ u_int in_errbytes; /* Input Error Bytes */ - + u_int bytes_saved; /* Number of bytes that compression "saved" */ /* ie: number of bytes that didn't need to be sent over the link * because of compression */ - + u_int in_mbad; /* Bad incoming packets */ }; +#endif #endif diff --git a/BasiliskII/src/slirp/ip.h b/BasiliskII/src/slirp/ip.h index e0c7de96..a8cdb0d3 100644 --- a/BasiliskII/src/slirp/ip.h +++ b/BasiliskII/src/slirp/ip.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -72,16 +76,12 @@ typedef u_int32_t n_long; /* long as received from the net */ /* * Structure of an internet header, naked of options. */ -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(1) -#endif - struct ip { #ifdef WORDS_BIGENDIAN - u_char ip_v:4, /* version */ + u_int ip_v:4, /* version */ ip_hl:4; /* header length */ #else - u_char ip_hl:4, /* header length */ + u_int ip_hl:4, /* header length */ ip_v:4; /* version */ #endif u_int8_t ip_tos; /* type of service */ @@ -95,11 +95,7 @@ struct ip { u_int8_t ip_p; /* protocol */ u_int16_t ip_sum; /* checksum */ struct in_addr ip_src,ip_dst; /* source and dest address */ -} PACKED__; - -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) -#endif +}; #define IP_MAXPACKET 65535 /* maximum packet size */ @@ -143,19 +139,15 @@ struct ip { /* * Time stamp option structure. */ -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(1) -#endif - struct ip_timestamp { u_int8_t ipt_code; /* IPOPT_TS */ u_int8_t ipt_len; /* size of structure (variable) */ u_int8_t ipt_ptr; /* index of current entry */ #ifdef WORDS_BIGENDIAN - u_char ipt_oflw:4, /* overflow counter */ + u_int ipt_oflw:4, /* overflow counter */ ipt_flg:4; /* flags, see below */ #else - u_char ipt_flg:4, /* flags, see below */ + u_int ipt_flg:4, /* flags, see below */ ipt_oflw:4; /* overflow counter */ #endif union ipt_timestamp { @@ -165,11 +157,7 @@ struct ip_timestamp { n_long ipt_time; } ipt_ta[1]; } ipt_timestamp; -} PACKED__; - -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) -#endif +}; /* flag bits for ipt_flg */ #define IPOPT_TS_TSONLY 0 /* timestamps only */ @@ -216,10 +204,6 @@ typedef caddr32_t ipasfragp_32; /* * Overlay for ip header used by other protocols (tcp, udp). */ -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(1) -#endif - struct ipovly { caddr32_t ih_next, ih_prev; /* for protocol sequence q's */ u_int8_t ih_x1; /* (unused) */ @@ -227,11 +211,7 @@ struct ipovly { u_int16_t ih_len; /* protocol length */ struct in_addr ih_src; /* source internet address */ struct in_addr ih_dst; /* destination internet address */ -} PACKED__; - -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) -#endif +}; /* * Ip reassembly queue structure. Each fragment @@ -257,10 +237,10 @@ struct ipq { */ struct ipasfrag { #ifdef WORDS_BIGENDIAN - u_char ip_v:4, + u_int ip_v:4, ip_hl:4; #else - u_char ip_hl:4, + u_int ip_hl:4, ip_v:4; #endif /* BUG : u_int changed to u_int8_t. @@ -292,6 +272,7 @@ struct ipoption { int8_t ipopt_list[MAX_IPOPTLEN]; /* options proper */ }; +#ifdef LOG_ENABLED /* * Structure attached to inpcb.ip_moptions and * passed to ip_output when IP multicast options are in use. @@ -326,8 +307,9 @@ struct ipstat { }; extern struct ipstat ipstat; +#endif + extern struct ipq ipq; /* ip reass. queue */ extern u_int16_t ip_id; /* ip packet ctr, for ids */ -extern int ip_defttl; /* default IP ttl */ #endif diff --git a/BasiliskII/src/slirp/ip_icmp.c b/BasiliskII/src/slirp/ip_icmp.c index 55376a8b..d1da0a2f 100644 --- a/BasiliskII/src/slirp/ip_icmp.c +++ b/BasiliskII/src/slirp/ip_icmp.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -33,14 +37,16 @@ #include "slirp.h" #include "ip_icmp.h" +#ifdef LOG_ENABLED struct icmpstat icmpstat; +#endif /* The message sent when emulating PING */ -/* Be nice and tell them it's just a psuedo-ping packet */ -char icmp_ping_msg[] = "This is a psuedo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n"; +/* Be nice and tell them it's just a pseudo-ping packet */ +const char icmp_ping_msg[] = "This is a pseudo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n"; /* list of actions for icmp_error() on RX of an icmp message */ -static int icmp_flush[19] = { +static const int icmp_flush[19] = { /* ECHO REPLY (0) */ 0, 1, 1, @@ -59,7 +65,7 @@ static int icmp_flush[19] = { /* INFO (15) */ 0, /* INFO REPLY (16) */ 0, /* ADDR MASK (17) */ 0, -/* ADDR MASK REPLY (18) */ 0 +/* ADDR MASK REPLY (18) */ 0 }; /* @@ -74,19 +80,19 @@ icmp_input(m, hlen) register struct ip *ip=mtod(m, struct ip *); int icmplen=ip->ip_len; /* int code; */ - + DEBUG_CALL("icmp_input"); DEBUG_ARG("m = %lx", (long )m); - DEBUG_ARG("m_len = %zu", m->m_len); + DEBUG_ARG("m_len = %d", m->m_len); + + STAT(icmpstat.icps_received++); - icmpstat.icps_received++; - /* * Locate icmp structure in mbuf, and check * that its not corrupted and of at least minimum length. */ if (icmplen < ICMP_MINLEN) { /* min 8 bytes payload */ - icmpstat.icps_tooshort++; + STAT(icmpstat.icps_tooshort++); freeit: m_freem(m); goto end_error; @@ -96,12 +102,12 @@ icmp_input(m, hlen) m->m_data += hlen; icp = mtod(m, struct icmp *); if (cksum(m, icmplen)) { - icmpstat.icps_checksum++; + STAT(icmpstat.icps_checksum++); goto freeit; } m->m_len += hlen; m->m_data -= hlen; - + /* icmpstat.icps_inhist[icp->icmp_type]++; */ /* code = icp->icmp_code; */ @@ -117,7 +123,7 @@ icmp_input(m, hlen) struct sockaddr_in addr; if ((so = socreate()) == NULL) goto freeit; if(udp_attach(so) == -1) { - DEBUG_MISC((dfd,"icmp_input udp_attach errno = %d-%s\n", + DEBUG_MISC((dfd,"icmp_input udp_attach errno = %d-%s\n", errno,strerror(errno))); sofree(so); m_free(m); @@ -131,7 +137,7 @@ icmp_input(m, hlen) so->so_iptos = ip->ip_tos; so->so_type = IPPROTO_ICMP; so->so_state = SS_ISFCONNECTED; - + /* Send the packet */ addr.sin_family = AF_INET; if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) { @@ -153,7 +159,7 @@ icmp_input(m, hlen) (struct sockaddr *)&addr, sizeof(addr)) == -1) { DEBUG_MISC((dfd,"icmp_input udp sendto tx errno = %d-%s\n", errno,strerror(errno))); - icmp_error(m, ICMP_UNREACH,ICMP_UNREACH_NET, 0,strerror(errno)); + icmp_error(m, ICMP_UNREACH,ICMP_UNREACH_NET, 0,strerror(errno)); udp_detach(so); } } /* if ip->ip_dst.s_addr == alias_addr.s_addr */ @@ -166,12 +172,12 @@ icmp_input(m, hlen) case ICMP_TSTAMP: case ICMP_MASKREQ: case ICMP_REDIRECT: - icmpstat.icps_notsupp++; + STAT(icmpstat.icps_notsupp++); m_freem(m); break; - + default: - icmpstat.icps_badtype++; + STAT(icmpstat.icps_badtype++); m_freem(m); } /* swith */ @@ -195,18 +201,18 @@ end_error: * mbuf *msrc is used as a template, but is NOT m_free()'d. * It is reported as the bad ip packet. The header should * be fully correct and in host byte order. - * ICMP fragmentation is illegal. All machines must accept 576 bytes in one + * ICMP fragmentation is illegal. All machines must accept 576 bytes in one * packet. The maximum payload is 576-20(ip hdr)-8(icmp hdr)=548 */ #define ICMP_MAXDATALEN (IP_MSS-28) void -icmp_error( - struct mbuf *msrc, - u_char type, - u_char code, - int minsize, - char *message) +icmp_error(msrc, type, code, minsize, message) + struct mbuf *msrc; + u_char type; + u_char code; + int minsize; + char *message; { unsigned hlen, shlen, s_ip_len; register struct ip *ip; @@ -215,17 +221,17 @@ icmp_error( DEBUG_CALL("icmp_error"); DEBUG_ARG("msrc = %lx", (long )msrc); - DEBUG_ARG("msrc_len = %zu", msrc->m_len); + DEBUG_ARG("msrc_len = %d", msrc->m_len); if(type!=ICMP_UNREACH && type!=ICMP_TIMXCEED) goto end_error; /* check msrc */ if(!msrc) goto end_error; ip = mtod(msrc, struct ip *); -#if DEBUG - { char bufa[INET_ADDRSTRLEN], bufb[INET_ADDRSTRLEN]; - inet_ntop(AF_INET, &ip->ip_src, bufa, sizeof(bufa)); - inet_ntop(AF_INET, &ip->ip_dst, bufb, sizeof(bufb)); +#if DEBUG + { char bufa[20], bufb[20]; + strcpy(bufa, inet_ntoa(ip->ip_src)); + strcpy(bufb, inet_ntoa(ip->ip_dst)); DEBUG_MISC((dfd, " %.16s to %.16s\n", bufa, bufb)); } #endif @@ -244,7 +250,7 @@ icmp_error( /* make a copy */ if(!(m=m_get())) goto end_error; /* get mbuf */ - { u_int new_m_size; + { int new_m_size; new_m_size=sizeof(struct ip )+ICMP_MINLEN+msrc->m_len+ICMP_MAXDATALEN; if(new_m_size>m->m_size) m_inc(m, new_m_size); } @@ -254,9 +260,9 @@ icmp_error( /* make the header of the reply packet */ ip = mtod(m, struct ip *); hlen= sizeof(struct ip ); /* no options in reply */ - + /* fill in icmp */ - m->m_data += hlen; + m->m_data += hlen; m->m_len -= hlen; icp = mtod(m, struct icmp *); @@ -265,7 +271,7 @@ icmp_error( else if(s_ip_len>ICMP_MAXDATALEN) /* maximum size */ s_ip_len=ICMP_MAXDATALEN; - m->m_len=ICMP_MINLEN+s_ip_len; /* 8 bytes ICMP header */ + m->m_len=ICMP_MINLEN+s_ip_len; /* 8 bytes ICMP header */ /* min. size = 8+sizeof(struct ip)+8 */ @@ -299,8 +305,8 @@ icmp_error( /* fill in ip */ ip->ip_hl = hlen >> 2; - ip->ip_len = (u_int16_t)m->m_len; - + ip->ip_len = m->m_len; + ip->ip_tos=((ip->ip_tos & 0x1E) | 0xC0); /* high priority for errors */ ip->ip_ttl = MAXTTL; @@ -309,8 +315,8 @@ icmp_error( ip->ip_src = alias_addr; (void ) ip_output((struct socket *)NULL, m); - - icmpstat.icps_reflect++; + + STAT(icmpstat.icps_reflect++); end_error: return; @@ -367,5 +373,5 @@ icmp_reflect(m) (void ) ip_output((struct socket *)NULL, m); - icmpstat.icps_reflect++; + STAT(icmpstat.icps_reflect++); } diff --git a/BasiliskII/src/slirp/ip_icmp.h b/BasiliskII/src/slirp/ip_icmp.h index 683dc87f..8c9b5a1b 100644 --- a/BasiliskII/src/slirp/ip_icmp.h +++ b/BasiliskII/src/slirp/ip_icmp.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -43,10 +47,6 @@ typedef u_int32_t n_time; /* * Structure of an icmp header. */ -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(1) -#endif - struct icmp { u_char icmp_type; /* type of message, see below */ u_char icmp_code; /* type sub code */ @@ -92,11 +92,7 @@ struct icmp { #define icmp_ip icmp_dun.id_ip.idi_ip #define icmp_mask icmp_dun.id_mask #define icmp_data icmp_dun.id_data -} PACKED__; - -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) -#endif +}; /* * Lower bounds on packet lengths for various types. @@ -161,8 +157,8 @@ struct icmp { (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) -void icmp_input(struct mbuf *, int); -void icmp_error(struct mbuf *, u_char, u_char, int, char *); -void icmp_reflect(struct mbuf *); +void icmp_input _P((struct mbuf *, int)); +void icmp_error _P((struct mbuf *, u_char, u_char, int, char *)); +void icmp_reflect _P((struct mbuf *)); #endif diff --git a/BasiliskII/src/slirp/ip_input.c b/BasiliskII/src/slirp/ip_input.c index cac8493b..b0468402 100644 --- a/BasiliskII/src/slirp/ip_input.c +++ b/BasiliskII/src/slirp/ip_input.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -33,7 +37,7 @@ /* * Changes and additions relating to SLiRP are * Copyright (c) 1995 Danny Gasparovski. - * + * * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -41,10 +45,19 @@ #include #include "ip_icmp.h" -int ip_defttl; +#ifdef LOG_ENABLED struct ipstat ipstat; +#endif + struct ipq ipq; +static struct ip *ip_reass(register struct ipasfrag *ip, + register struct ipq *fp); +static void ip_freef(struct ipq *fp); +static void ip_enq(register struct ipasfrag *p, + register struct ipasfrag *prev); +static void ip_deq(register struct ipasfrag *p); + /* * IP initialization: fill in IP protocol switch table. * All protocols not implemented in kernel go to raw IP protocol handler. @@ -56,7 +69,6 @@ ip_init() ip_id = tt.tv_sec & 0xffff; udp_init(); tcp_init(); - ip_defttl = IPDEFTTL; } /* @@ -68,38 +80,38 @@ ip_input(m) struct mbuf *m; { register struct ip *ip; - u_int hlen; - + int hlen; + DEBUG_CALL("ip_input"); DEBUG_ARG("m = %lx", (long)m); - DEBUG_ARG("m_len = %zu", m->m_len); + DEBUG_ARG("m_len = %d", m->m_len); + + STAT(ipstat.ips_total++); - ipstat.ips_total++; - if (m->m_len < sizeof (struct ip)) { - ipstat.ips_toosmall++; + STAT(ipstat.ips_toosmall++); return; } - + ip = mtod(m, struct ip *); - + if (ip->ip_v != IPVERSION) { - ipstat.ips_badvers++; + STAT(ipstat.ips_badvers++); goto bad; } hlen = ip->ip_hl << 2; if (hlenm->m_len) {/* min header length */ - ipstat.ips_badhlen++; /* or packet too short */ + STAT(ipstat.ips_badhlen++); /* or packet too short */ goto bad; } /* keep ip header intact for ICMP reply - * ip->ip_sum = cksum(m, hlen); - * if (ip->ip_sum) { + * ip->ip_sum = cksum(m, hlen); + * if (ip->ip_sum) { */ if(cksum(m,hlen)) { - ipstat.ips_badsum++; + STAT(ipstat.ips_badsum++); goto bad; } @@ -108,7 +120,7 @@ ip_input(m) */ NTOHS(ip->ip_len); if (ip->ip_len < hlen) { - ipstat.ips_badlen++; + STAT(ipstat.ips_badlen++); goto bad; } NTOHS(ip->ip_id); @@ -121,7 +133,7 @@ ip_input(m) * Drop packet if shorter than we expect. */ if (m->m_len < ip->ip_len) { - ipstat.ips_tooshort++; + STAT(ipstat.ips_tooshort++); goto bad; } /* Should drop packet if mbuf too long? hmmm... */ @@ -150,7 +162,7 @@ ip_input(m) * (We could look in the reassembly queue to see * if the packet was previously fragmented, * but it's not worth the time; just let them time out.) - * + * * XXX This should fail, don't fragment yet */ if (ip->ip_off &~ IP_DF) { @@ -177,7 +189,7 @@ ip_input(m) ip->ip_len -= hlen; if (ip->ip_off & IP_MF) ((struct ipasfrag *)ip)->ipf_mff |= 1; - else + else ((struct ipasfrag *)ip)->ipf_mff &= ~1; ip->ip_off <<= 3; @@ -188,11 +200,11 @@ ip_input(m) * attempt reassembly; if it succeeds, proceed. */ if (((struct ipasfrag *)ip)->ipf_mff & 1 || ip->ip_off) { - ipstat.ips_fragments++; + STAT(ipstat.ips_fragments++); ip = ip_reass((struct ipasfrag *)ip, fp); if (ip == 0) return; - ipstat.ips_reassembled++; + STAT(ipstat.ips_reassembled++); m = dtom(ip); } else if (fp) @@ -204,7 +216,7 @@ ip_input(m) /* * Switch out to protocol's input routine. */ - ipstat.ips_delivered++; + STAT(ipstat.ips_delivered++); switch (ip->ip_p) { case IPPROTO_TCP: tcp_input(m, hlen, (struct socket *)NULL); @@ -216,7 +228,7 @@ ip_input(m) icmp_input(m, hlen); break; default: - ipstat.ips_noproto++; + STAT(ipstat.ips_noproto++); m_free(m); } return; @@ -231,16 +243,14 @@ bad: * reassembly of this datagram already exists, then it * is given as fp; otherwise have to make a chain. */ -struct ip * -ip_reass(ip, fp) - register struct ipasfrag *ip; - register struct ipq *fp; +static struct ip * +ip_reass(register struct ipasfrag *ip, register struct ipq *fp) { register struct mbuf *m = dtom(ip); register struct ipasfrag *q; int hlen = ip->ip_hl << 2; int i, next; - + DEBUG_CALL("ip_reass"); DEBUG_ARG("ip = %lx", (long)ip); DEBUG_ARG("fp = %lx", (long)fp); @@ -271,7 +281,7 @@ ip_reass(ip, fp) q = (struct ipasfrag *)fp; goto insert; } - + /* * Find a segment which begins after this one does. */ @@ -365,7 +375,7 @@ insert: ip = (struct ipasfrag *)(m->m_ext + delta); } - /* DEBUG_ARG("ip = %lx", (long)ip); + /* DEBUG_ARG("ip = %lx", (long)ip); * ip=(struct ipasfrag *)m->m_data; */ ip->ip_len = next; @@ -381,7 +391,7 @@ insert: return ((struct ip *)ip); dropfrag: - ipstat.ips_fragdropped++; + STAT(ipstat.ips_fragdropped++); m_freem(m); return (0); } @@ -390,9 +400,8 @@ dropfrag: * Free a fragment reassembly header and all * associated datagrams. */ -void -ip_freef(fp) - struct ipq *fp; +static void +ip_freef(struct ipq *fp) { register struct ipasfrag *q, *p; @@ -410,9 +419,8 @@ ip_freef(fp) * Put an ip fragment on a reassembly chain. * Like insque, but pointers in middle of structure. */ -void -ip_enq(p, prev) - register struct ipasfrag *p, *prev; +static void +ip_enq(register struct ipasfrag *p, register struct ipasfrag *prev) { DEBUG_CALL("ip_enq"); DEBUG_ARG("prev = %lx", (long)prev); @@ -425,9 +433,8 @@ ip_enq(p, prev) /* * To ip_enq as remque is to insque. */ -void -ip_deq(p) - register struct ipasfrag *p; +static void +ip_deq(register struct ipasfrag *p) { ((struct ipasfrag *)(p->ipf_prev))->ipf_next = p->ipf_next; ((struct ipasfrag *)(p->ipf_next))->ipf_prev = p->ipf_prev; @@ -442,9 +449,9 @@ void ip_slowtimo() { register struct ipq *fp; - + DEBUG_CALL("ip_slowtimo"); - + fp = (struct ipq *) ipq.next; if (fp == 0) return; @@ -453,7 +460,7 @@ ip_slowtimo() --fp->ipq_ttl; fp = (struct ipq *) fp->next; if (((struct ipq *)(fp->prev))->ipq_ttl == 0) { - ipstat.ips_fragtimeout++; + STAT(ipstat.ips_fragtimeout++); ip_freef((struct ipq *) fp->prev); } } @@ -660,7 +667,7 @@ bad: /* Not yet */ icmp_error(m, type, code, 0, 0); - ipstat.ips_badoptions++; + STAT(ipstat.ips_badoptions++); return (1); } @@ -688,6 +695,6 @@ ip_stripoptions(m, mopt) i = m->m_len - (sizeof (struct ip) + olen); memcpy(opts, opts + olen, (unsigned)i); m->m_len -= olen; - + ip->ip_hl = sizeof(struct ip) >> 2; } diff --git a/BasiliskII/src/slirp/ip_output.c b/BasiliskII/src/slirp/ip_output.c index fb9a9420..a8a6067b 100644 --- a/BasiliskII/src/slirp/ip_output.c +++ b/BasiliskII/src/slirp/ip_output.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -42,6 +46,10 @@ u_int16_t ip_id; +/* Number of packets queued before we start sending + * (to prevent allocing too many mbufs) */ +#define IF_THRESH 10 + /* * IP output. The packet in mbuf chain m contains a skeletal IP * header (with len, off, ttl, proto, tos, src, dst). @@ -55,14 +63,13 @@ ip_output(so, m0) { register struct ip *ip; register struct mbuf *m = m0; - register u_int hlen = sizeof(struct ip); - u_int len, off; - int error = 0; + register int hlen = sizeof(struct ip ); + int len, off, error = 0; DEBUG_CALL("ip_output"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("m0 = %lx", (long)m0); - + /* We do no options */ /* if (opt) { * m = ip_insertoptions(m, opt, &len); @@ -77,23 +84,23 @@ ip_output(so, m0) ip->ip_off &= IP_DF; ip->ip_id = htons(ip_id++); ip->ip_hl = hlen >> 2; - ipstat.ips_localout++; + STAT(ipstat.ips_localout++); /* * Verify that we have any chance at all of being able to queue * the packet or packet fragments */ /* XXX Hmmm... */ -/* if (if_queued > if_thresh && towrite <= 0) { +/* if (if_queued > IF_THRESH && towrite <= 0) { * error = ENOBUFS; * goto bad; * } */ - + /* * If small enough for interface, can just send directly. */ - if ((u_int16_t)ip->ip_len <= if_mtu) { + if ((u_int16_t)ip->ip_len <= IF_MTU) { ip->ip_len = htons((u_int16_t)ip->ip_len); ip->ip_off = htons((u_int16_t)ip->ip_off); ip->ip_sum = 0; @@ -109,11 +116,11 @@ ip_output(so, m0) */ if (ip->ip_off & IP_DF) { error = -1; - ipstat.ips_cantfrag++; + STAT(ipstat.ips_cantfrag++); goto bad; } - - len = (if_mtu - hlen) &~ 7; /* ip databytes per packet */ + + len = (IF_MTU - hlen) &~ 7; /* ip databytes per packet */ if (len < 8) { error = -1; goto bad; @@ -129,18 +136,18 @@ ip_output(so, m0) */ m0 = m; mhlen = sizeof (struct ip); - for (off = hlen + len; off < ip->ip_len; off += len) { + for (off = hlen + len; off < (u_int16_t)ip->ip_len; off += len) { register struct ip *mhip; m = m_get(); if (m == 0) { error = -1; - ipstat.ips_odropped++; + STAT(ipstat.ips_odropped++); goto sendorfree; } - m->m_data += if_maxlinkhdr; + m->m_data += IF_MAXLINKHDR; mhip = mtod(m, struct ip *); *mhip = *ip; - + /* No options */ /* if (hlen > sizeof (struct ip)) { * mhlen = ip_optcopy(ip, mhip) + sizeof (struct ip); @@ -153,28 +160,28 @@ ip_output(so, m0) mhip->ip_off |= IP_MF; if (off + len >= (u_int16_t)ip->ip_len) len = (u_int16_t)ip->ip_len - off; - else + else mhip->ip_off |= IP_MF; mhip->ip_len = htons((u_int16_t)(len + mhlen)); - + if (m_copy(m, m0, off, len) < 0) { error = -1; goto sendorfree; } - + mhip->ip_off = htons((u_int16_t)mhip->ip_off); mhip->ip_sum = 0; mhip->ip_sum = cksum(m, mhlen); *mnext = m; mnext = &m->m_nextpkt; - ipstat.ips_ofragments++; + STAT(ipstat.ips_ofragments++); } /* * Update first fragment by trimming what's been copied out * and updating header, then send each fragment (in order). */ m = m0; - m_adj(m, hlen + firstlen - ip->ip_len); + m_adj(m, hlen + firstlen - (u_int16_t)ip->ip_len); ip->ip_len = htons((u_int16_t)m->m_len); ip->ip_off = htons((u_int16_t)(ip->ip_off | IP_MF)); ip->ip_sum = 0; @@ -190,7 +197,7 @@ sendorfree: } if (error == 0) - ipstat.ips_fragmented++; + STAT(ipstat.ips_fragmented++); } done: diff --git a/BasiliskII/src/slirp/libslirp.h b/BasiliskII/src/slirp/libslirp.h index 8a1aa31e..7e4cfa98 100644 --- a/BasiliskII/src/slirp/libslirp.h +++ b/BasiliskII/src/slirp/libslirp.h @@ -1,39 +1,33 @@ #ifndef _LIBSLIRP_H #define _LIBSLIRP_H -#ifdef _WIN32 -#include -int inet_aton(const char *cp, struct in_addr *ia); -#else -#include -#include -#endif - #ifdef __cplusplus extern "C" { #endif -int slirp_init(void); +void slirp_init(void); -int slirp_select_fill(int *pnfds, - fd_set *readfds, fd_set *writefds, fd_set *xfds); +void slirp_select_fill(int *pnfds, + fd_set *readfds, fd_set *writefds, fd_set *xfds); void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds); -void slirp_input(const uint8 *pkt, int pkt_len); +void slirp_input(const uint8_t *pkt, int pkt_len); /* you must provide the following functions: */ int slirp_can_output(void); -void slirp_output(const uint8 *pkt, int pkt_len); +void slirp_output(const uint8_t *pkt, int pkt_len); -int slirp_redir(int is_udp, int host_port, +int slirp_redir(int is_udp, int host_port, struct in_addr guest_addr, int guest_port); -int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, +int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, int guest_port); extern const char *tftp_prefix; extern char slirp_hostname[33]; +void slirp_stats(void); + #ifdef __cplusplus } #endif diff --git a/BasiliskII/src/slirp/main.h b/BasiliskII/src/slirp/main.h index 181b6ae8..c01addac 100644 --- a/BasiliskII/src/slirp/main.h +++ b/BasiliskII/src/slirp/main.h @@ -1,7 +1,7 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -42,7 +42,6 @@ extern char *username; extern char *socket_path; extern int towrite_max; extern int ppp_exit; -extern int so_options; extern int tcp_keepintvl; extern uint8_t client_ethaddr[6]; diff --git a/BasiliskII/src/slirp/mbuf.c b/BasiliskII/src/slirp/mbuf.c index 5a16fab8..5d125542 100644 --- a/BasiliskII/src/slirp/mbuf.c +++ b/BasiliskII/src/slirp/mbuf.c @@ -15,54 +15,49 @@ * the flags */ -#include #include struct mbuf *mbutl; char *mclrefcnt; int mbuf_alloced = 0; struct mbuf m_freelist, m_usedlist; -int mbuf_thresh = 30; +#define MBUF_THRESH 30 int mbuf_max = 0; -size_t msize; -void m_init() +/* + * Find a nice value for msize + * XXX if_maxlinkhdr already in mtu + */ +#define MSIZE (IF_MTU + IF_MAXLINKHDR + sizeof(struct m_hdr ) + 6) + +void +m_init() { m_freelist.m_next = m_freelist.m_prev = &m_freelist; m_usedlist.m_next = m_usedlist.m_prev = &m_usedlist; - msize_init(); -} - -void msize_init() -{ - /* - * Find a nice value for msize - * XXX if_maxlinkhdr already in mtu - */ - msize = (if_mtu>if_mru?if_mtu:if_mru) + - if_maxlinkhdr + sizeof(struct m_hdr ) + 6; } /* * Get an mbuf from the free list, if there are none * malloc one - * + * * Because fragmentation can occur if we alloc new mbufs and * free old mbufs, we mark all mbufs above mbuf_thresh as M_DOFREE, * which tells m_free to actually free() it */ -struct mbuf *m_get() +struct mbuf * +m_get() { register struct mbuf *m; int flags = 0; - + DEBUG_CALL("m_get"); - + if (m_freelist.m_next == &m_freelist) { - m = (struct mbuf *)malloc(msize); + m = (struct mbuf *)malloc(MSIZE); if (m == NULL) goto end_error; mbuf_alloced++; - if (mbuf_alloced > mbuf_thresh) + if (mbuf_alloced > MBUF_THRESH) flags = M_DOFREE; if (mbuf_alloced > mbuf_max) mbuf_max = mbuf_alloced; @@ -70,13 +65,13 @@ struct mbuf *m_get() m = m_freelist.m_next; remque(m); } - + /* Insert it in the used list */ insque(m,&m_usedlist); m->m_flags = (flags | M_USEDLIST); - + /* Initialise it */ - m->m_size = msize - sizeof(struct m_hdr); + m->m_size = MSIZE - sizeof(struct m_hdr); m->m_data = m->m_dat; m->m_len = 0; m->m_nextpkt = 0; @@ -86,17 +81,19 @@ end_error: return m; } -void m_free(struct mbuf *m) +void +m_free(m) + struct mbuf *m; { - + DEBUG_CALL("m_free"); DEBUG_ARG("m = %lx", (long )m); - + if(m) { /* Remove from m_usedlist */ if (m->m_flags & M_USEDLIST) remque(m); - + /* If it's M_EXT, free() it */ if (m->m_flags & M_EXT) free(m->m_ext); @@ -119,14 +116,16 @@ void m_free(struct mbuf *m) * the other.. if result is too big for one mbuf, malloc() * an M_EXT data segment */ -void m_cat(register struct mbuf *m, register struct mbuf *n) +void +m_cat(m, n) + register struct mbuf *m, *n; { /* * If there's no room, realloc */ if (M_FREEROOM(m) < n->m_len) m_inc(m,m->m_size+MINCSIZE); - + memcpy(m->m_data+m->m_len, n->m_data, n->m_len); m->m_len += n->m_len; @@ -135,20 +134,23 @@ void m_cat(register struct mbuf *m, register struct mbuf *n) /* make m size bytes large */ -void m_inc(struct mbuf *m, u_int size) +void +m_inc(m, size) + struct mbuf *m; + int size; { - int datasize; + int datasize; /* some compiles throw up on gotos. This one we can fake. */ if(m->m_size>size) return; if (m->m_flags & M_EXT) { - datasize = m->m_data - m->m_ext; + datasize = m->m_data - m->m_ext; m->m_ext = (char *)realloc(m->m_ext,size); /* if (m->m_ext == NULL) * return (struct mbuf *)NULL; - */ - m->m_data = m->m_ext + datasize; + */ + m->m_data = m->m_ext + datasize; } else { char *dat; datasize = m->m_data - m->m_dat; @@ -157,19 +159,22 @@ void m_inc(struct mbuf *m, u_int size) * return (struct mbuf *)NULL; */ memcpy(dat, m->m_dat, m->m_size); - + m->m_ext = dat; m->m_data = m->m_ext + datasize; m->m_flags |= M_EXT; } - + m->m_size = size; } -void m_adj(struct mbuf *m, int len) +void +m_adj(m, len) + struct mbuf *m; + int len; { if (m == NULL) return; @@ -189,7 +194,9 @@ void m_adj(struct mbuf *m, int len) * Copy len bytes from m, starting off bytes into n */ int -m_copy(struct mbuf *n, struct mbuf *m, u_int off, u_int len) +m_copy(n, m, off, len) + struct mbuf *n, *m; + int off, len; { if (len > M_FREEROOM(n)) return -1; @@ -205,10 +212,12 @@ m_copy(struct mbuf *n, struct mbuf *m, u_int off, u_int len) * XXX This is a kludge, I should eliminate the need for it * Fortunately, it's not used often */ -struct mbuf *dtom(void *dat) +struct mbuf * +dtom(dat) + void *dat; { struct mbuf *m; - + DEBUG_CALL("dtom"); DEBUG_ARG("dat = %lx", (long )dat); @@ -222,9 +231,9 @@ struct mbuf *dtom(void *dat) return m; } } - + DEBUG_ERROR((dfd, "dtom failed")); - + return (struct mbuf *)0; } diff --git a/BasiliskII/src/slirp/mbuf.h b/BasiliskII/src/slirp/mbuf.h index 11b252bb..f9f21325 100644 --- a/BasiliskII/src/slirp/mbuf.h +++ b/BasiliskII/src/slirp/mbuf.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -63,14 +67,14 @@ struct m_hdr { struct mbuf *mh_prevpkt; /* Flags aren't used in the output queue */ int mh_flags; /* Misc flags */ - size_t mh_size; /* Size of data */ + int mh_size; /* Size of data */ struct socket *mh_so; - + caddr_t mh_data; /* Location of data */ - size_t mh_len; /* Amount of data in this mbuf */ + int mh_len; /* Amount of data in this mbuf */ }; -/* +/* * How much room is in the mbuf, from m_data to the end of the mbuf */ #define M_ROOM(m) ((m->m_flags & M_EXT)? \ @@ -122,7 +126,7 @@ struct mbuf { struct mbstat { int mbs_alloced; /* Number of mbufs allocated */ - + }; extern struct mbstat mbstat; @@ -130,14 +134,13 @@ extern int mbuf_alloced; extern struct mbuf m_freelist, m_usedlist; extern int mbuf_max; -void m_init(void); -void msize_init(void); -struct mbuf * m_get(void); -void m_free(struct mbuf *); -void m_cat(register struct mbuf *, register struct mbuf *); -void m_inc(struct mbuf *, u_int); -void m_adj(struct mbuf *, int); -int m_copy(struct mbuf *, struct mbuf *, u_int, u_int); -struct mbuf * dtom(void *); +void m_init _P((void)); +struct mbuf * m_get _P((void)); +void m_free _P((struct mbuf *)); +void m_cat _P((register struct mbuf *, register struct mbuf *)); +void m_inc _P((struct mbuf *, int)); +void m_adj _P((struct mbuf *, int)); +int m_copy _P((struct mbuf *, struct mbuf *, int, int)); +struct mbuf * dtom _P((void *)); #endif diff --git a/BasiliskII/src/slirp/misc.c b/BasiliskII/src/slirp/misc.c index b80caf66..14808fe2 100644 --- a/BasiliskII/src/slirp/misc.c +++ b/BasiliskII/src/slirp/misc.c @@ -1,23 +1,24 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * + * * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ #define WANT_SYS_IOCTL_H -#include #include -u_int curtime, time_fasttimo, last_slowtimo, detach_time; -u_int detach_wait = 600000; /* 10 minutes */ +u_int curtime, time_fasttimo, last_slowtimo; #if 0 int x_port = -1; int x_display = 0; int x_screen = 0; -int show_x(char *buff, struct socket *inso) +int +show_x(buff, inso) + char *buff; + struct socket *inso; { if (x_port < 0) { lprint("X Redir: X not being redirected.\r\n"); @@ -29,7 +30,7 @@ int show_x(char *buff, struct socket *inso) if (x_display) lprint("X Redir: Redirecting to display %d\r\n", x_display); } - + return CFG_OK; } @@ -37,10 +38,15 @@ int show_x(char *buff, struct socket *inso) /* * XXX Allow more than one X redirection? */ -void redir_x(u_int32_t inaddr, int start_port, int display, int screen) +void +redir_x(inaddr, start_port, display, screen) + u_int32_t inaddr; + int start_port; + int display; + int screen; { int i; - + if (x_port >= 0) { lprint("X Redir: X already being redirected.\r\n"); show_x(0, 0); @@ -61,33 +67,34 @@ void redir_x(u_int32_t inaddr, int start_port, int display, int screen) #endif #ifndef HAVE_INET_ATON -int inet_aton(const char *cp, struct in_addr *ia) +int +inet_aton(cp, ia) + const char *cp; + struct in_addr *ia; { - return inet_pton(AF_INET, cp, &ia->s_addr); + u_int32_t addr = inet_addr(cp); + if (addr == 0xffffffff) + return 0; + ia->s_addr = addr; + return 1; } #endif /* * Get our IP address and put it in our_addr */ -void getouraddr() +void +getouraddr() { char buff[256]; + struct hostent *he = NULL; - if (gethostname(buff, sizeof(buff)) == 0) - { - struct addrinfo hints = { 0 }; - hints.ai_flags = AI_NUMERICHOST; - hints.ai_family = AF_INET; - struct addrinfo* ai; - if (getaddrinfo(buff, NULL, &hints, &ai) == 0) - { - our_addr = *(struct in_addr *)ai->ai_addr->sa_data; - freeaddrinfo(ai); - } - } - if (our_addr.s_addr == 0) - our_addr.s_addr = loopback_addr.s_addr; + if (gethostname(buff,256) == 0) + he = gethostbyname(buff); + if (he) + our_addr = *(struct in_addr *)he->h_addr; + if (our_addr.s_addr == 0) + our_addr.s_addr = loopback_addr.s_addr; } #if SIZEOF_CHAR_P == 8 @@ -97,7 +104,10 @@ struct quehead_32 { u_int32_t qh_rlink; }; -inline void insque_32(void *a, void *b) +inline void +insque_32(a, b) + void *a; + void *b; { register struct quehead_32 *element = (struct quehead_32 *) a; register struct quehead_32 *head = (struct quehead_32 *) b; @@ -108,7 +118,9 @@ inline void insque_32(void *a, void *b) = (u_int32_t)element; } -inline void remque_32(void *a) +inline void +remque_32(a) + void *a; { register struct quehead_32 *element = (struct quehead_32 *) a; ((struct quehead_32 *)(element->qh_link))->qh_rlink = element->qh_rlink; @@ -123,7 +135,9 @@ struct quehead { struct quehead *qh_rlink; }; -void insque(void *a, void *b) +inline void +insque(a, b) + void *a, *b; { register struct quehead *element = (struct quehead *) a; register struct quehead *head = (struct quehead *) b; @@ -134,7 +148,9 @@ void insque(void *a, void *b) = (struct quehead *)element; } -void remque(void *a) +inline void +remque(a) + void *a; { register struct quehead *element = (struct quehead *) a; ((struct quehead *)(element->qh_link))->qh_rlink = element->qh_rlink; @@ -146,16 +162,22 @@ void remque(void *a) /* #endif */ -int add_exec(struct ex_list **ex_ptr, int do_pty, char *exec, int addr, int port) +int +add_exec(ex_ptr, do_pty, exec, addr, port) + struct ex_list **ex_ptr; + int do_pty; + char *exec; + int addr; + int port; { struct ex_list *tmp_ptr; - + /* First, check if the port is "bound" */ for (tmp_ptr = *ex_ptr; tmp_ptr; tmp_ptr = tmp_ptr->ex_next) { if (port == tmp_ptr->ex_fport && addr == tmp_ptr->ex_addr) return -1; } - + tmp_ptr = *ex_ptr; *ex_ptr = (struct ex_list *)malloc(sizeof(struct ex_list)); (*ex_ptr)->ex_fport = port; @@ -175,7 +197,9 @@ int add_exec(struct ex_list **ex_ptr, int do_pty, char *exec, int addr, int port extern int sys_nerr; extern char *sys_errlist[]; -char *strerror(int error) +char * +strerror(error) + int error; { if (error < sys_nerr) return sys_errlist[error]; @@ -188,7 +212,8 @@ char *strerror(int error) #ifdef _WIN32 -int fork_exec(struct socket *so, char *ex, int do_pty) +int +fork_exec(struct socket *so, const char *ex, int do_pty) { /* not implemented */ return 0; @@ -196,13 +221,16 @@ int fork_exec(struct socket *so, char *ex, int do_pty) #else -int slirp_openpty(int *amaster, int *aslave) +#ifndef CONFIG_QEMU +int +slirp_openpty(amaster, aslave) + int *amaster, *aslave; { register int master, slave; #ifdef HAVE_GRANTPT char *ptr; - + if ((master = open("/dev/ptmx", O_RDWR)) < 0 || grantpt(master) < 0 || unlockpt(master) < 0 || @@ -210,7 +238,7 @@ int slirp_openpty(int *amaster, int *aslave) close(master); return -1; } - + if ((slave = open(ptr, O_RDWR)) < 0 || ioctl(slave, I_PUSH, "ptem") < 0 || ioctl(slave, I_PUSH, "ldterm") < 0 || @@ -219,16 +247,16 @@ int slirp_openpty(int *amaster, int *aslave) close(slave); return -1; } - + *amaster = master; *aslave = slave; return 0; - + #else - + static char line[] = "/dev/ptyXX"; register const char *cp1, *cp2; - + for (cp1 = "pqrsPQRS"; *cp1; cp1++) { line[8] = *cp1; for (cp2 = "0123456789abcdefghijklmnopqrstuv"; *cp2; cp2++) { @@ -258,6 +286,7 @@ int slirp_openpty(int *amaster, int *aslave) return (-1); #endif } +#endif /* * XXX This is ugly @@ -265,53 +294,57 @@ int slirp_openpty(int *amaster, int *aslave) * process, which connects to this socket, after which we * exec the wanted program. If something (strange) happens, * the accept() call could block us forever. - * + * * do_pty = 0 Fork/exec inetd style * do_pty = 1 Fork/exec using slirp.telnetd * do_ptr = 2 Fork/exec using pty */ -int fork_exec(struct socket *so, char *ex, int do_pty) +int +fork_exec(struct socket *so, const char *ex, int do_pty) { int s; struct sockaddr_in addr; - socklen_t addrlen = sizeof(addr); + int addrlen = sizeof(addr); int opt; - int master; + int master = -1; char *argv[256]; #if 0 char buff[256]; #endif /* don't want to clobber the original */ char *bptr; - char *curarg; + const char *curarg; int c, i, ret; - + DEBUG_CALL("fork_exec"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("ex = %lx", (long)ex); DEBUG_ARG("do_pty = %lx", (long)do_pty); - + if (do_pty == 2) { +#if 0 if (slirp_openpty(&master, &s) == -1) { lprint("Error: openpty failed: %s\n", strerror(errno)); return 0; } +#else + return 0; +#endif } else { - memset(&addr, 0, sizeof(struct sockaddr_in)); addr.sin_family = AF_INET; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; - + if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0 || bind(s, (struct sockaddr *)&addr, addrlen) < 0 || listen(s, 1) < 0) { lprint("Error: inet socket: %s\n", strerror(errno)); closesocket(s); - + return 0; } } - + switch(fork()) { case -1: lprint("Error: fork failed: %s\n", strerror(errno)); @@ -319,7 +352,7 @@ int fork_exec(struct socket *so, char *ex, int do_pty) if (do_pty == 2) close(master); return 0; - + case 0: /* Set the DISPLAY */ if (do_pty == 2) { @@ -341,7 +374,7 @@ int fork_exec(struct socket *so, char *ex, int do_pty) ret = connect(s, (struct sockaddr *)&addr, addrlen); } while (ret < 0 && errno == EINTR); } - + #if 0 if (x_port >= 0) { #ifdef HAVE_SETENV @@ -352,13 +385,13 @@ int fork_exec(struct socket *so, char *ex, int do_pty) putenv(buff); #endif } -#endif +#endif dup2(s, 0); dup2(s, 1); dup2(s, 2); - for (s = 3; s <= 255; s++) + for (s = getdtablesize() - 1; s >= 3; s--) close(s); - + i = 0; bptr = strdup(ex); /* No need to free() this */ if (do_pty == 1) { @@ -376,21 +409,21 @@ int fork_exec(struct socket *so, char *ex, int do_pty) *bptr++ = (char)0; argv[i++] = strdup(curarg); } while (c); - + argv[i] = 0; execvp(argv[0], argv); - + /* Ooops, failed, let's tell the user why */ { char buff[256]; - - sprintf(buff, "Error: execvp of %s failed: %s\n", + + sprintf(buff, "Error: execvp of %s failed: %s\n", argv[0], strerror(errno)); write(2, buff, strlen(buff)+1); } close(0); close(1); close(2); /* XXX */ exit(1); - + default: if (do_pty == 2) { close(s); @@ -413,32 +446,36 @@ int fork_exec(struct socket *so, char *ex, int do_pty) setsockopt(so->s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(int)); } fd_nonblock(so->s); - + /* Append the telnet options now */ if (so->so_m != 0 && do_pty == 1) { sbappend(so, so->so_m); so->so_m = 0; } - + return 1; } } #endif #ifndef HAVE_STRDUP -char *strdup(const char *str) +char * +strdup(str) + const char *str; { char *bptr; - + bptr = (char *)malloc(strlen(str)+1); strcpy(bptr, str); - + return bptr; } #endif #if 0 -void snooze_hup(int num) +void +snooze_hup(num) + int num; { int s, ret; #ifndef NO_UNIX_SOCKETS @@ -446,7 +483,7 @@ void snooze_hup(int num) #endif struct sockaddr_in sock_in; char buff[256]; - + ret = -1; if (slirp_socket_passwd) { s = socket(AF_INET, SOCK_STREAM, 0); @@ -476,48 +513,51 @@ void snooze_hup(int num) #endif slirp_exit(0); } - - -void snooze() + + +void +snooze() { sigset_t s; int i; - + /* Don't need our data anymore */ /* XXX This makes SunOS barf */ /* brk(0); */ - + /* Close all fd's */ for (i = 255; i >= 0; i--) close(i); - + signal(SIGQUIT, slirp_exit); signal(SIGHUP, snooze_hup); sigemptyset(&s); - + /* Wait for any signal */ sigsuspend(&s); - + /* Just in case ... */ exit(255); } -void relay(int s) +void +relay(s) + int s; { char buf[8192]; int n; fd_set readfds; struct ttys *ttyp; - + /* Don't need our data anymore */ /* XXX This makes SunOS barf */ /* brk(0); */ - + signal(SIGQUIT, slirp_exit); signal(SIGHUP, slirp_exit); signal(SIGINT, slirp_exit); signal(SIGTERM, slirp_exit); - + /* Fudge to get term_raw and term_restore to work */ if (NULL == (ttyp = tty_attach (0, slirp_tty))) { lprint ("Error: tty_attach failed in misc.c:relay()\r\n"); @@ -526,18 +566,18 @@ void relay(int s) ttyp->fd = 0; ttyp->flags |= TTY_CTTY; term_raw(ttyp); - + while (1) { FD_ZERO(&readfds); - + FD_SET(0, &readfds); FD_SET(s, &readfds); - + n = select(s+1, &readfds, (fd_set *)0, (fd_set *)0, (struct timeval *)0); - + if (n <= 0) slirp_exit(0); - + if (FD_ISSET(0, &readfds)) { n = read(0, buf, 8192); if (n <= 0) @@ -546,7 +586,7 @@ void relay(int s) if (n <= 0) slirp_exit(0); } - + if (FD_ISSET(s, &readfds)) { n = read(s, buf, 8192); if (n <= 0) @@ -556,20 +596,43 @@ void relay(int s) slirp_exit(0); } } - + /* Just in case.... */ exit(1); } #endif -int (*lprint_print)(void *, const char *, va_list); -char *lprint_ptr, *lprint_ptr2, **lprint_arg; +#ifdef CONFIG_QEMU +extern void term_vprintf(const char *fmt, va_list ap); void lprint(const char *format, ...) { - va_list args; - + va_list args; + va_start(args, format); + term_vprintf(format, args); + va_end(args); +} +#else +int (*lprint_print) _P((void *, const char *, va_list)); +char *lprint_ptr, *lprint_ptr2, **lprint_arg; + +void +#ifdef __STDC__ +lprint(const char *format, ...) +#else +lprint(va_alist) va_dcl +#endif +{ + va_list args; + +#ifdef __STDC__ + va_start(args, format); +#else + char *format; + va_start(args); + format = va_arg(args, char *); +#endif #if 0 /* If we're printing to an sbuf, make sure there's enough room */ /* XXX +100? */ @@ -579,33 +642,33 @@ void lprint(const char *format, ...) int deltaw = lprint_sb->sb_wptr - lprint_sb->sb_data; int deltar = lprint_sb->sb_rptr - lprint_sb->sb_data; int deltap = lprint_ptr - lprint_sb->sb_data; - + lprint_sb->sb_data = (char *)realloc(lprint_sb->sb_data, lprint_sb->sb_datalen + TCP_SNDSPACE); - + /* Adjust all values */ lprint_sb->sb_wptr = lprint_sb->sb_data + deltaw; lprint_sb->sb_rptr = lprint_sb->sb_data + deltar; lprint_ptr = lprint_sb->sb_data + deltap; - + lprint_sb->sb_datalen += TCP_SNDSPACE; } } -#endif +#endif if (lprint_print) lprint_ptr += (*lprint_print)(*lprint_arg, format, args); - + /* Check if they want output to be logged to file as well */ if (lfd) { - /* + /* * Remove \r's * otherwise you'll get ^M all over the file */ int len = strlen(format); char *bptr1, *bptr2; - + bptr1 = bptr2 = strdup(format); - + while (len--) { if (*bptr1 == '\r') memcpy(bptr1, bptr1+1, len+1); @@ -618,7 +681,9 @@ void lprint(const char *format, ...) va_end(args); } -void add_emu(char *buff) +void +add_emu(buff) + char *buff; { u_int lport, fport; u_int8_t tos = 0, emu = 0; @@ -626,12 +691,12 @@ void add_emu(char *buff) char *buff3 = buff4; struct emu_t *emup; struct socket *so; - + if (sscanf(buff, "%256s %256s", buff2, buff1) != 2) { lprint("Error: Bad arguments\r\n"); return; } - + if (sscanf(buff1, "%d:%d", &lport, &fport) != 2) { lport = 0; if (sscanf(buff1, "%d", &fport) != 1) { @@ -639,7 +704,7 @@ void add_emu(char *buff) return; } } - + if (sscanf(buff2, "%128[^:]:%128s", buff1, buff3) != 2) { buff3 = 0; if (sscanf(buff2, "%256s", buff1) != 1) { @@ -647,7 +712,7 @@ void add_emu(char *buff) return; } } - + if (buff3) { if (strcmp(buff3, "lowdelay") == 0) tos = IPTOS_LOWDELAY; @@ -658,7 +723,7 @@ void add_emu(char *buff) return; } } - + if (strcmp(buff1, "ftp") == 0) emu = EMU_FTP; else if (strcmp(buff1, "irc") == 0) @@ -669,7 +734,7 @@ void add_emu(char *buff) lprint("Error: Unknown service\r\n"); return; } - + /* First, check that it isn't already emulated */ for (emup = tcpemu; emup; emup = emup->next) { if (emup->lport == lport && emup->fport == fport) { @@ -677,7 +742,7 @@ void add_emu(char *buff) return; } } - + /* link it */ emup = (struct emu_t *)malloc(sizeof (struct emu_t)); emup->lport = (u_int16_t)lport; @@ -686,7 +751,7 @@ void add_emu(char *buff) emup->emu = emu; emup->next = tcpemu; tcpemu = emup; - + /* And finally, mark all current sessions, if any, as being emulated */ for (so = tcb.so_next; so != &tcb; so = so->so_next) { if ((lport && lport == ntohs(so->so_lport)) || @@ -697,9 +762,10 @@ void add_emu(char *buff) so->so_iptos = tos; } } - + lprint("Adding emulation for %s to port %d/%d\r\n", buff1, emup->lport, emup->fport); } +#endif #ifdef BAD_SPRINTF @@ -710,33 +776,51 @@ void add_emu(char *buff) * Some BSD-derived systems have a sprintf which returns char * */ -int vsprintf_len(char *string, const char *format, va_list args) +int +vsprintf_len(string, format, args) + char *string; + const char *format; + va_list args; { vsprintf(string, format, args); return strlen(string); } -int sprintf_len(char *string, const char *format, ...) +int +#ifdef __STDC__ +sprintf_len(char *string, const char *format, ...) +#else +sprintf_len(va_alist) va_dcl +#endif { va_list args; +#ifdef __STDC__ va_start(args, format); +#else + char *string; + char *format; + va_start(args); + string = va_arg(args, char *); + format = va_arg(args, char *); +#endif vsprintf(string, format, args); - va_end(args); return strlen(string); } #endif -void u_sleep(int usec) +void +u_sleep(usec) + int usec; { struct timeval t; fd_set fdset; - + FD_ZERO(&fdset); - + t.tv_sec = 0; t.tv_usec = usec * 1000; - + select(0, &fdset, &fdset, &fdset, &t); } @@ -744,30 +828,34 @@ void u_sleep(int usec) * Set fd blocking and non-blocking */ -void fd_nonblock(int fd) +void +fd_nonblock(fd) + int fd; { -#if defined USE_FIONBIO && defined FIONBIO - ioctlsockopt_t opt = 1; - +#ifdef FIONBIO + int opt = 1; + ioctlsocket(fd, FIONBIO, &opt); #else int opt; - + opt = fcntl(fd, F_GETFL, 0); opt |= O_NONBLOCK; fcntl(fd, F_SETFL, opt); #endif } -void fd_block(int fd) +void +fd_block(fd) + int fd; { -#if defined USE_FIONBIO && defined FIONBIO - ioctlsockopt_t opt = 0; - +#ifdef FIONBIO + int opt = 0; + ioctlsocket(fd, FIONBIO, &opt); #else int opt; - + opt = fcntl(fd, F_GETFL, 0); opt &= ~O_NONBLOCK; fcntl(fd, F_SETFL, opt); @@ -779,17 +867,22 @@ void fd_block(int fd) /* * invoke RSH */ -int rsh_exec(struct socket *so, struct socket *ns, - char *user, char *host, char *args) +int +rsh_exec(so,ns, user, host, args) + struct socket *so; + struct socket *ns; + char *user; + char *host; + char *args; { int fd[2]; int fd0[2]; int s; char buff[256]; - + DEBUG_CALL("rsh_exec"); DEBUG_ARG("so = %lx", (long)so); - + if (pipe(fd)<0) { lprint("Error: pipe failed: %s\n", strerror(errno)); return 0; @@ -810,7 +903,7 @@ int rsh_exec(struct socket *so, struct socket *ns, return 0; } #endif - + switch(fork()) { case -1: lprint("Error: fork failed: %s\n", strerror(errno)); @@ -819,11 +912,11 @@ int rsh_exec(struct socket *so, struct socket *ns, close(fd0[0]); close(fd0[1]); return 0; - + case 0: close(fd[0]); close(fd0[0]); - + /* Set the DISPLAY */ if (x_port >= 0) { #ifdef HAVE_SETENV @@ -834,29 +927,29 @@ int rsh_exec(struct socket *so, struct socket *ns, putenv(buff); #endif } - + dup2(fd0[1], 0); dup2(fd0[1], 1); dup2(fd[1], 2); for (s = 3; s <= 255; s++) close(s); - + execlp("rsh","rsh","-l", user, host, args, NULL); - + /* Ooops, failed, let's tell the user why */ - - sprintf(buff, "Error: execlp of %s failed: %s\n", + + sprintf(buff, "Error: execlp of %s failed: %s\n", "rsh", strerror(errno)); write(2, buff, strlen(buff)+1); close(0); close(1); close(2); /* XXX */ exit(1); - + default: close(fd[1]); close(fd0[1]); ns->s=fd[0]; so->s=fd0[0]; - + return 1; } } diff --git a/BasiliskII/src/slirp/misc.h b/BasiliskII/src/slirp/misc.h index 381f5f3e..e405e38d 100644 --- a/BasiliskII/src/slirp/misc.h +++ b/BasiliskII/src/slirp/misc.h @@ -1,7 +1,7 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -12,22 +12,22 @@ struct ex_list { int ex_pty; /* Do we want a pty? */ int ex_addr; /* The last byte of the address */ int ex_fport; /* Port to telnet to */ - char *ex_exec; /* Command line of what to exec */ + const char *ex_exec; /* Command line of what to exec */ struct ex_list *ex_next; }; extern struct ex_list *exec_list; -extern u_int curtime, time_fasttimo, last_slowtimo, detach_time, detach_wait; +extern u_int curtime, time_fasttimo, last_slowtimo; -extern int (*lprint_print)(void *, const char *, va_list); +extern int (*lprint_print) _P((void *, const char *, va_list)); extern char *lprint_ptr, *lprint_ptr2, **lprint_arg; extern struct sbuf *lprint_sb; #ifndef HAVE_STRDUP -char *strdup(const char *); +char *strdup _P((const char *)); #endif -void do_wait(int); +void do_wait _P((int)); #define EMU_NONE 0x0 @@ -63,25 +63,27 @@ struct emu_t { struct emu_t *next; }; +#ifndef CONFIG_QEMU extern struct emu_t *tcpemu; +#endif extern int x_port, x_server, x_display; -int show_x(char *, struct socket *); -void redir_x(u_int32_t, int, int, int); -void getouraddr(void); -void slirp_insque(void *, void *); -void slirp_remque(void *); -int add_exec(struct ex_list **, int, char *, int, int); -int slirp_openpty(int *, int *); -int fork_exec(struct socket *, char *, int); -void snooze_hup(int); -void snooze(void); -void relay(int); -void add_emu(char *); -void u_sleep(int); -void fd_nonblock(int); -void fd_block(int); -int rsh_exec(struct socket *, struct socket *, char *, char *, char *); +int show_x _P((char *, struct socket *)); +void redir_x _P((u_int32_t, int, int, int)); +void getouraddr _P((void)); +inline void slirp_insque _P((void *, void *)); +inline void slirp_remque _P((void *)); +int add_exec _P((struct ex_list **, int, char *, int, int)); +int slirp_openpty _P((int *, int *)); +int fork_exec(struct socket *so, const char *ex, int do_pty); +void snooze_hup _P((int)); +void snooze _P((void)); +void relay _P((int)); +void add_emu _P((char *)); +void u_sleep _P((int)); +void fd_nonblock _P((int)); +void fd_block _P((int)); +int rsh_exec _P((struct socket *, struct socket *, char *, char *, char *)); #endif diff --git a/BasiliskII/src/slirp/sbuf.c b/BasiliskII/src/slirp/sbuf.c index 278e3687..02c5fce0 100644 --- a/BasiliskII/src/slirp/sbuf.c +++ b/BasiliskII/src/slirp/sbuf.c @@ -1,31 +1,37 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ -#include #include +static void sbappendsb(struct sbuf *sb, struct mbuf *m); + /* Done as a macro in socket.h */ /* int - * sbspace(struct sockbuff *sb) + * sbspace(struct sockbuff *sb) * { * return SB_DATALEN - sb->sb_cc; * } */ -void sbfree(struct sbuf *sb) +void +sbfree(sb) + struct sbuf *sb; { free(sb->sb_data); } -void sbdrop(struct sbuf *sb, u_int num) +void +sbdrop(sb, num) + struct sbuf *sb; + int num; { - /* + /* * We can only drop how much we have - * This should never succeed + * This should never succeed */ if(num > sb->sb_cc) num = sb->sb_cc; @@ -33,10 +39,13 @@ void sbdrop(struct sbuf *sb, u_int num) sb->sb_rptr += num; if(sb->sb_rptr >= sb->sb_data + sb->sb_datalen) sb->sb_rptr -= sb->sb_datalen; - + } -void sbreserve(struct sbuf *sb, size_t size) +void +sbreserve(sb, size) + struct sbuf *sb; + int size; { if (sb->sb_data) { /* Already alloced, realloc if necessary */ @@ -64,21 +73,24 @@ void sbreserve(struct sbuf *sb, size_t size) * this prevents an unnecessary copy of the data * (the socket is non-blocking, so we won't hang) */ -void sbappend(struct socket *so, struct mbuf *m) +void +sbappend(so, m) + struct socket *so; + struct mbuf *m; { int ret = 0; - + DEBUG_CALL("sbappend"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("m = %lx", (long)m); - DEBUG_ARG("m->m_len = %zu", m->m_len); - + DEBUG_ARG("m->m_len = %d", m->m_len); + /* Shouldn't happen, but... e.g. foreign host closes connection */ if (m->m_len <= 0) { m_free(m); return; } - + /* * If there is urgent data, call sosendoob * if not all was sent, sowrite will take care of the rest @@ -90,16 +102,16 @@ void sbappend(struct socket *so, struct mbuf *m) sosendoob(so); return; } - + /* * We only write if there's nothing in the buffer, * ottherwise it'll arrive out of order, and hence corrupt */ if (!so->so_rcv.sb_cc) ret = send(so->s, m->m_data, m->m_len, 0); - + if (ret <= 0) { - /* + /* * Nothing was written * It's possible that the socket has closed, but * we don't need to check because if it has closed, @@ -123,10 +135,11 @@ void sbappend(struct socket *so, struct mbuf *m) * Copy the data from m into sb * The caller is responsible to make sure there's enough room */ -void sbappendsb(struct sbuf *sb, struct mbuf *m) +static void +sbappendsb(struct sbuf *sb, struct mbuf *m) { int len, n, nn; - + len = m->m_len; if (sb->sb_wptr < sb->sb_rptr) { @@ -159,10 +172,15 @@ void sbappendsb(struct sbuf *sb, struct mbuf *m) * Don't update the sbuf rptr, this will be * done in sbdrop when the data is acked */ -void sbcopy(struct sbuf *sb, u_int off, u_int len, char *to) +void +sbcopy(sb, off, len, to) + struct sbuf *sb; + int off; + int len; + char *to; { char *from; - + from = sb->sb_rptr + off; if (from >= sb->sb_data + sb->sb_datalen) from -= sb->sb_datalen; @@ -180,4 +198,4 @@ void sbcopy(struct sbuf *sb, u_int off, u_int len, char *to) memcpy(to+off,sb->sb_data,len); } } - + diff --git a/BasiliskII/src/slirp/sbuf.h b/BasiliskII/src/slirp/sbuf.h index 04f7981c..a4f10362 100644 --- a/BasiliskII/src/slirp/sbuf.h +++ b/BasiliskII/src/slirp/sbuf.h @@ -1,15 +1,13 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ #ifndef _SBUF_H_ #define _SBUF_H_ -#include - #define sbflush(sb) sbdrop((sb),(sb)->sb_cc) #define sbspace(sb) ((sb)->sb_datalen - (sb)->sb_cc) @@ -23,11 +21,10 @@ struct sbuf { char *sb_data; /* Actual data */ }; -void sbfree(struct sbuf *); -void sbdrop(struct sbuf *, u_int); -void sbreserve(struct sbuf *, size_t); -void sbappend(struct socket *, struct mbuf *); -void sbappendsb(struct sbuf *, struct mbuf *); -void sbcopy(struct sbuf *, u_int, u_int, char *); +void sbfree _P((struct sbuf *)); +void sbdrop _P((struct sbuf *, int)); +void sbreserve _P((struct sbuf *, int)); +void sbappend _P((struct socket *, struct mbuf *)); +void sbcopy _P((struct sbuf *, int, int, char *)); #endif diff --git a/BasiliskII/src/slirp/slirp.c b/BasiliskII/src/slirp/slirp.c index dc2fdc65..303f4825 100644 --- a/BasiliskII/src/slirp/slirp.c +++ b/BasiliskII/src/slirp/slirp.c @@ -12,7 +12,7 @@ struct in_addr special_addr; /* virtual address alias for host */ struct in_addr alias_addr; -const uint8_t special_ethaddr[6] = { +static const uint8_t special_ethaddr[6] = { 0x52, 0x54, 0x00, 0x12, 0x35, 0x00 }; @@ -38,10 +38,10 @@ static int get_dns_addr(struct in_addr *pdns_addr) DWORD ret; IP_ADDR_STRING *pIPAddr; struct in_addr tmp_addr; - + FixedInfo = (FIXED_INFO *)GlobalAlloc(GPTR, sizeof(FIXED_INFO)); BufLen = sizeof(FIXED_INFO); - + if (ERROR_BUFFER_OVERFLOW == GetNetworkParams(FixedInfo, &BufLen)) { if (FixedInfo) { GlobalFree(FixedInfo); @@ -49,7 +49,7 @@ static int get_dns_addr(struct in_addr *pdns_addr) } FixedInfo = GlobalAlloc(GPTR, BufLen); } - + if ((ret = GetNetworkParams(FixedInfo, &BufLen)) != ERROR_SUCCESS) { printf("GetNetworkParams failed. ret = %08x\n", (u_int)ret ); if (FixedInfo) { @@ -58,14 +58,14 @@ static int get_dns_addr(struct in_addr *pdns_addr) } return -1; } - + pIPAddr = &(FixedInfo->DnsServerList); inet_aton(pIPAddr->IpAddress.String, &tmp_addr); *pdns_addr = tmp_addr; #if 0 printf( "DNS Servers:\n" ); printf( "DNS Addr:%s\n", pIPAddr->IpAddress.String ); - + pIPAddr = FixedInfo -> DnsServerList.Next; while ( pIPAddr ) { printf( "DNS Addr:%s\n", pIPAddr ->IpAddress.String ); @@ -84,16 +84,18 @@ static int get_dns_addr(struct in_addr *pdns_addr) static int get_dns_addr(struct in_addr *pdns_addr) { char buff[512]; - char buff2[256+1]; + char buff2[256]; FILE *f; int found = 0; struct in_addr tmp_addr; - + f = fopen("/etc/resolv.conf", "r"); if (!f) return -1; +#ifdef DEBUG lprint("IP address of your DNS(s): "); +#endif while (fgets(buff, 512, f) != NULL) { if (sscanf(buff, "nameserver%*[ \t]%256s", buff2) == 1) { if (!inet_aton(buff2, &tmp_addr)) @@ -103,13 +105,20 @@ static int get_dns_addr(struct in_addr *pdns_addr) /* If it's the first one, set it to dns_addr */ if (!found) *pdns_addr = tmp_addr; +#ifdef DEBUG else lprint(", "); +#endif if (++found > 3) { +#ifdef DEBUG lprint("(more)"); +#endif break; - } else + } +#ifdef DEBUG + else lprint("%s", inet_ntoa(tmp_addr)); +#endif } } fclose(f); @@ -121,16 +130,16 @@ static int get_dns_addr(struct in_addr *pdns_addr) #endif #ifdef _WIN32 -void slirp_cleanup(void) +static void slirp_cleanup(void) { WSACleanup(); } #endif -int slirp_init(void) +void slirp_init(void) { // debug_init("/tmp/slirp.log", DEBUG_DEFAULT); - + #ifdef _WIN32 { WSADATA Data; @@ -150,13 +159,14 @@ int slirp_init(void) /* set default addresses */ inet_aton("127.0.0.1", &loopback_addr); - if (get_dns_addr(&dns_addr) < 0) - return -1; + if (get_dns_addr(&dns_addr) < 0) { + dns_addr = loopback_addr; + fprintf (stderr, "Warning: No DNS servers found\n"); + } inet_aton(CTL_SPECIAL, &special_addr); - alias_addr.s_addr = special_addr.s_addr | htonl(CTL_ALIAS); - getouraddr(); - return 0; + alias_addr.s_addr = special_addr.s_addr | htonl(CTL_ALIAS); + getouraddr(); } #define CONN_CANFSEND(so) (((so)->so_state & (SS_FCANTSENDMORE|SS_ISFCONNECTED)) == SS_ISFCONNECTED) @@ -179,56 +189,57 @@ static void updtime(void) static void updtime(void) { gettimeofday(&tt, 0); - + curtime = (u_int)tt.tv_sec * (u_int)1000; curtime += (u_int)tt.tv_usec / (u_int)1000; - + if ((tt.tv_usec % 1000) >= 500) curtime++; } #endif -int slirp_select_fill(int *pnfds, - fd_set *readfds, fd_set *writefds, fd_set *xfds) +void slirp_select_fill(int *pnfds, + fd_set *readfds, fd_set *writefds, fd_set *xfds) { struct socket *so, *so_next; + struct timeval timeout; int nfds; - int timeout, tmp_time; + int tmp_time; /* fail safe */ global_readfds = NULL; global_writefds = NULL; global_xfds = NULL; - + nfds = *pnfds; /* * First, TCP sockets */ do_slowtimo = 0; if (link_up) { - /* + /* * *_slowtimo needs calling if there are IP fragments * in the fragment queue, or there are TCP connections active */ do_slowtimo = ((tcb.so_next != &tcb) || ((struct ipasfrag *)&ipq != (struct ipasfrag *)ipq.next)); - + for (so = tcb.so_next; so != &tcb; so = so_next) { so_next = so->so_next; - + /* * See if we need a tcp_fasttimo */ if (time_fasttimo == 0 && so->so_tcpcb->t_flags & TF_DELACK) - time_fasttimo = curtime; /* Flag when we want a fasttimo */ - + time_fasttimo = curtime; /* Flag when we want a fasttimo */ + /* * NOFDREF can include still connecting to local-host, * newly socreated() sockets etc. Don't want to select these. */ if (so->so_state & SS_NOFDREF || so->s == -1) - continue; - + continue; + /* * Set for reading sockets which are accepting */ @@ -237,7 +248,7 @@ int slirp_select_fill(int *pnfds, UPD_NFDS(so->s); continue; } - + /* * Set for writing sockets which are connecting */ @@ -246,7 +257,7 @@ int slirp_select_fill(int *pnfds, UPD_NFDS(so->s); continue; } - + /* * Set for writing if we are connected, can send more, and * we have something to send @@ -255,7 +266,7 @@ int slirp_select_fill(int *pnfds, FD_SET(so->s, writefds); UPD_NFDS(so->s); } - + /* * Set for reading (and urgent data) if we are connected, can * receive more, and we have room for it XXX /2 ? @@ -266,13 +277,13 @@ int slirp_select_fill(int *pnfds, UPD_NFDS(so->s); } } - + /* * UDP sockets */ for (so = udb.so_next; so != &udb; so = so_next) { so_next = so->so_next; - + /* * See if it's timed out */ @@ -283,7 +294,7 @@ int slirp_select_fill(int *pnfds, } else do_slowtimo = 1; /* Let socket expire */ } - + /* * When UDP packets are received from over the * link, they're sendto()'d straight away, so @@ -300,58 +311,51 @@ int slirp_select_fill(int *pnfds, } } } - + /* * Setup timeout to use minimum CPU usage, especially when idle */ - timeout = -1; - /* - * If a slowtimo is needed, set timeout to 5ms from the last - * slow timeout. If a fast timeout is needed, set timeout within - * 2ms of when it was requested. + * First, see the timeout needed by *timo + */ + timeout.tv_sec = 0; + timeout.tv_usec = -1; + /* + * If a slowtimo is needed, set timeout to 500ms from the last + * slow timeout. If a fast timeout is needed, set timeout within + * 200ms of when it was requested. */ -# define SLOW_TIMO 5 -# define FAST_TIMO 2 if (do_slowtimo) { - timeout = (SLOW_TIMO - (curtime - last_slowtimo)) * 1000; - if (timeout < 0) - timeout = 0; - else if (timeout > (SLOW_TIMO * 1000)) - timeout = SLOW_TIMO * 1000; - + /* XXX + 10000 because some select()'s aren't that accurate */ + timeout.tv_usec = ((500 - (curtime - last_slowtimo)) * 1000) + 10000; + if (timeout.tv_usec < 0) + timeout.tv_usec = 0; + else if (timeout.tv_usec > 510000) + timeout.tv_usec = 510000; + /* Can only fasttimo if we also slowtimo */ if (time_fasttimo) { - tmp_time = (FAST_TIMO - (curtime - time_fasttimo)) * 1000; + tmp_time = (200 - (curtime - time_fasttimo)) * 1000; if (tmp_time < 0) - tmp_time = 0; - + tmp_time = 0; + /* Choose the smallest of the 2 */ - if (tmp_time < timeout) - timeout = tmp_time; + if (tmp_time < timeout.tv_usec) + timeout.tv_usec = (u_int)tmp_time; } } - *pnfds = nfds; - - /* - * Adjust the timeout to make the minimum timeout - * 2ms (XXX?) to lessen the CPU load - */ - if (timeout < (FAST_TIMO * 1000)) - timeout = FAST_TIMO * 1000; - - return timeout; -} + *pnfds = nfds; +} void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) { - struct socket *so, *so_next; - int ret; + struct socket *so, *so_next; + int ret; - global_readfds = readfds; - global_writefds = writefds; - global_xfds = xfds; + global_readfds = readfds; + global_writefds = writefds; + global_xfds = xfds; /* Update time */ updtime(); @@ -360,11 +364,11 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) * See if anything has timed out */ if (link_up) { - if (time_fasttimo && ((curtime - time_fasttimo) >= FAST_TIMO)) { + if (time_fasttimo && ((curtime - time_fasttimo) >= 2)) { tcp_fasttimo(); time_fasttimo = 0; } - if (do_slowtimo && ((curtime - last_slowtimo) >= SLOW_TIMO)) { + if (do_slowtimo && ((curtime - last_slowtimo) >= 499)) { ip_slowtimo(); tcp_slowtimo(); last_slowtimo = curtime; @@ -386,7 +390,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) * (and they can crash the program) */ if (so->so_state & SS_NOFDREF || so->s == -1) - continue; + continue; /* * Check for URG data @@ -394,7 +398,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) * test for readfds below if this succeeds */ if (FD_ISSET(so->s, xfds)) - sorecvoob(so); + sorecvoob(so); /* * Check sockets for reading */ @@ -410,88 +414,82 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) /* Output it if we read something */ if (ret > 0) - tcp_output(sototcpcb(so)); + tcp_output(sototcpcb(so)); } /* * Check sockets for writing */ if (FD_ISSET(so->s, writefds)) { - /* - * Check for non-blocking, still-connecting sockets - */ - if (so->so_state & SS_ISFCONNECTING) { - /* Connected */ - so->so_state &= ~SS_ISFCONNECTING; + /* + * Check for non-blocking, still-connecting sockets + */ + if (so->so_state & SS_ISFCONNECTING) { + /* Connected */ + so->so_state &= ~SS_ISFCONNECTING; - ret = send(so->s, (char*)&ret, 0, 0); - if (ret < 0) { - /* XXXXX Must fix, zero bytes is a NOP */ - int error = WSAGetLastError(); - if (error == EAGAIN || error == WSAEWOULDBLOCK || - error == WSAEINPROGRESS || error == WSAENOTCONN) - continue; + ret = send(so->s, &ret, 0, 0); + if (ret < 0) { + /* XXXXX Must fix, zero bytes is a NOP */ + if (errno == EAGAIN || errno == EWOULDBLOCK || + errno == EINPROGRESS || errno == ENOTCONN) + continue; - /* else failed */ - so->so_state = SS_NOFDREF; - } - /* else so->so_state &= ~SS_ISFCONNECTING; */ + /* else failed */ + so->so_state = SS_NOFDREF; + } + /* else so->so_state &= ~SS_ISFCONNECTING; */ - /* - * Continue tcp_input - */ - tcp_input((struct mbuf *)NULL, sizeof(struct ip), so); - /* continue; */ - } - else - ret = sowrite(so); - /* - * XXXXX If we wrote something (a lot), there - * could be a need for a window update. - * In the worst case, the remote will send - * a window probe to get things going again - */ + /* + * Continue tcp_input + */ + tcp_input((struct mbuf *)NULL, sizeof(struct ip), so); + /* continue; */ + } else + ret = sowrite(so); + /* + * XXXXX If we wrote something (a lot), there + * could be a need for a window update. + * In the worst case, the remote will send + * a window probe to get things going again + */ } /* * Probe a still-connecting, non-blocking socket * to check if it's still alive - */ + */ #ifdef PROBE_CONN if (so->so_state & SS_ISFCONNECTING) { - ret = recv(so->s, (char *)&ret, 0, 0); + ret = recv(so->s, (char *)&ret, 0,0); - if (ret < 0) { - /* XXX */ - int error = WSAGetLastError(); - if (error == EAGAIN || error == WSAEWOULDBLOCK || - error == WSAEINPROGRESS || error == WSAENOTCONN) - continue; /* Still connecting, continue */ + if (ret < 0) { + /* XXX */ + if (errno == EAGAIN || errno == EWOULDBLOCK || + errno == EINPROGRESS || errno == ENOTCONN) + continue; /* Still connecting, continue */ - /* else failed */ - so->so_state = SS_NOFDREF; + /* else failed */ + so->so_state = SS_NOFDREF; - /* tcp_input will take care of it */ - } - else { - ret = send(so->s, &ret, 0, 0); - if (ret < 0) { - /* XXX */ - int error = WSAGetLastError(); - if (error == EAGAIN || error == WSAEWOULDBLOCK || - error == WSAEINPROGRESS || error == WSAENOTCONN) - continue; - /* else failed */ - so->so_state = SS_NOFDREF; - } - else - so->so_state &= ~SS_ISFCONNECTING; + /* tcp_input will take care of it */ + } else { + ret = send(so->s, &ret, 0,0); + if (ret < 0) { + /* XXX */ + if (errno == EAGAIN || errno == EWOULDBLOCK || + errno == EINPROGRESS || errno == ENOTCONN) + continue; + /* else failed */ + so->so_state = SS_NOFDREF; + } else + so->so_state &= ~SS_ISFCONNECTING; - } - tcp_input((struct mbuf *)NULL, sizeof(struct ip), so); - } /* SS_ISFCONNECTING */ + } + tcp_input((struct mbuf *)NULL, sizeof(struct ip),so); + } /* SS_ISFCONNECTING */ #endif - } + } /* * Now UDP sockets. @@ -502,25 +500,25 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) so_next = so->so_next; if (so->s != -1 && FD_ISSET(so->s, readfds)) { - sorecvfrom(so); - } + sorecvfrom(so); + } } -} + } /* * See if we can start outputting */ if (if_queued && link_up) - if_start(); + if_start(); /* clear global file descriptor sets. * these reside on the stack in vl.c * so they're unusable if we're not in * slirp_select_fill or slirp_select_poll. */ - global_readfds = NULL; - global_writefds = NULL; - global_xfds = NULL; + global_readfds = NULL; + global_writefds = NULL; + global_xfds = NULL; } #define ETH_ALEN 6 @@ -532,7 +530,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) #define ARPOP_REQUEST 1 /* ARP request */ #define ARPOP_REPLY 2 /* ARP reply */ -struct ethhdr +struct ethhdr { unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ unsigned char h_source[ETH_ALEN]; /* source ether addr */ @@ -570,7 +568,7 @@ void arp_input(const uint8_t *pkt, int pkt_len) switch(ar_op) { case ARPOP_REQUEST: if (!memcmp(ah->ar_tip, &special_addr, 3)) { - if (ah->ar_tip[3] == CTL_DNS || ah->ar_tip[3] == CTL_ALIAS) + if (ah->ar_tip[3] == CTL_DNS || ah->ar_tip[3] == CTL_ALIAS) goto arp_ok; for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) { if (ex_ptr->ex_addr == ah->ar_tip[3]) @@ -611,8 +609,8 @@ void slirp_input(const uint8_t *pkt, int pkt_len) if (pkt_len < ETH_HLEN) return; - - proto = (pkt[12] << 8) | pkt[13]; + + proto = ntohs(*(uint16_t *)(pkt + 12)); switch(proto) { case ETH_P_ARP: arp_input(pkt, pkt_len); @@ -653,24 +651,24 @@ void if_encap(const uint8_t *ip_data, int ip_data_len) slirp_output(buf, ip_data_len + ETH_HLEN); } -int slirp_redir(int is_udp, int host_port, +int slirp_redir(int is_udp, int host_port, struct in_addr guest_addr, int guest_port) { if (is_udp) { - if (!udp_listen(htons(host_port), guest_addr.s_addr, + if (!udp_listen(htons(host_port), guest_addr.s_addr, htons(guest_port), 0)) return -1; } else { - if (!solisten(htons(host_port), guest_addr.s_addr, + if (!solisten(htons(host_port), guest_addr.s_addr, htons(guest_port), 0)) return -1; } return 0; } -int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, +int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, int guest_port) { - return add_exec(&exec_list, do_pty, (char *)args, + return add_exec(&exec_list, do_pty, (char *)args, addr_low_byte, htons(guest_port)); } diff --git a/BasiliskII/src/slirp/slirp.h b/BasiliskII/src/slirp/slirp.h index b845caa7..b8d756e5 100644 --- a/BasiliskII/src/slirp/slirp.h +++ b/BasiliskII/src/slirp/slirp.h @@ -3,12 +3,21 @@ #define CONFIG_QEMU -#define DEBUG 1 +//#define DEBUG 1 + +// Uncomment the following line to enable SLIRP statistics printing in Qemu +//#define LOG_ENABLED + +#ifdef LOG_ENABLED +#define STAT(expr) expr +#else +#define STAT(expr) do { } while(0) +#endif #ifndef CONFIG_QEMU #include "version.h" #endif -#include "config.h" +#include "config-host.h" #include "slirp_config.h" #ifdef _WIN32 @@ -19,31 +28,20 @@ typedef uint16_t u_int16_t; typedef uint32_t u_int32_t; typedef uint64_t u_int64_t; typedef char *caddr_t; -typedef int socklen_t; -typedef unsigned long ioctlsockopt_t; +#define WIN32_LEAN_AND_MEAN +# include # include -# include # include # include -# define USE_FIONBIO 1 - -/* Basilisk II Router defines those */ -# define udp_read_completion slirp_udp_read_completion -# define write_udp slirp_write_udp -# define init_udp slirp_init_udp -# define final_udp slirp_final_udp +# define EWOULDBLOCK WSAEWOULDBLOCK +# define EINPROGRESS WSAEINPROGRESS +# define ENOTCONN WSAENOTCONN +# define EHOSTUNREACH WSAEHOSTUNREACH +# define ENETUNREACH WSAENETUNREACH +# define ECONNREFUSED WSAECONNREFUSED #else -# define WSAGetLastError() (int)(errno) -# define WSASetLastError(e) (void)(errno = (e)) -# define WSAEWOULDBLOCK EWOULDBLOCK -# define WSAEINPROGRESS EINPROGRESS -# define WSAENOTCONN ENOTCONN -# define WSAEHOSTUNREACH EHOSTUNREACH -# define WSAENETUNREACH ENETUNREACH -# define WSAECONNREFUSED ECONNREFUSED -typedef int ioctlsockopt_t; # define ioctlsocket ioctl # define closesocket(s) close(s) # define O_BINARY 0 @@ -53,13 +51,8 @@ typedef int ioctlsockopt_t; #ifdef HAVE_SYS_BITYPES_H # include #endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifndef _WIN32 #include -#endif #ifdef NEED_TYPEDEFS typedef char int8_t; @@ -90,11 +83,6 @@ typedef unsigned char u_int8_t; # endif #endif /* NEED_TYPEDEFS */ -/* Basilisk II types glue */ -typedef u_int8_t uint8; -typedef u_int16_t uint16; -typedef u_int32_t uint32; - #ifdef HAVE_UNISTD_H # include #endif @@ -129,6 +117,17 @@ typedef u_int32_t uint32; #ifndef _WIN32 #include +#endif + +#ifndef _P +#ifndef NO_PROTOTYPES +# define _P(x) x +#else +# define _P(x) () +#endif +#endif + +#ifndef _WIN32 #include #include #endif @@ -139,23 +138,20 @@ typedef u_int32_t uint32; /* Systems lacking strdup() definition in . */ #if defined(ultrix) -char *strdup(const char *); +char *strdup _P((const char *)); #endif /* Systems lacking malloc() definition in . */ #if defined(ultrix) || defined(hcx) -void *malloc(size_t arg); -void free(void *ptr); +void *malloc _P((size_t arg)); +void free _P((void *ptr)); #endif #ifndef HAVE_INET_ATON -int inet_aton(const char *cp, struct in_addr *ia); +int inet_aton _P((const char *cp, struct in_addr *ia)); #endif #include -#ifdef _WIN32 -#include -#endif #ifndef NO_UNIX_SOCKETS #include #endif @@ -187,7 +183,11 @@ int inet_aton(const char *cp, struct in_addr *ia); #include #endif +#ifdef __STDC__ #include +#else +#include +#endif #include @@ -202,20 +202,6 @@ int inet_aton(const char *cp, struct in_addr *ia); #include "debug.h" -#if defined __GNUC__ -#define PACKED__ __attribute__ ((packed)) -#elif defined _MSC_VER -#define PRAGMA_PACK_SUPPORTED 1 -#define PACK_RESET -#define PACKED__ -#elif defined __sgi -#define PRAGMA_PACK_SUPPORTED 1 -#define PACK_RESET 0 -#define PACKED__ -#else -#error "Packed attribute or pragma shall be supported" -#endif - #include "ip.h" #include "tcp.h" #include "tcp_timer.h" @@ -246,47 +232,45 @@ extern struct ttys *ttys_unit[MAX_INTERFACES]; #endif #ifndef FULL_BOLT -void if_start(void); +void if_start _P((void)); #else -void if_start(struct ttys *); +void if_start _P((struct ttys *)); #endif #ifdef BAD_SPRINTF # define vsprintf vsprintf_len # define sprintf sprintf_len - extern int vsprintf_len(char *, const char *, va_list); - extern int sprintf_len(char *, const char *, ...); + extern int vsprintf_len _P((char *, const char *, va_list)); + extern int sprintf_len _P((char *, const char *, ...)); #endif #ifdef DECLARE_SPRINTF # ifndef BAD_SPRINTF - extern int vsprintf(char *, const char *, va_list); + extern int vsprintf _P((char *, const char *, va_list)); # endif - extern int vfprintf(FILE *, const char *, va_list); + extern int vfprintf _P((FILE *, const char *, va_list)); #endif #ifndef HAVE_STRERROR - extern char *strerror(int error); + extern char *strerror _P((int error)); #endif #ifndef HAVE_INDEX - char *index(const char *, int); + char *index _P((const char *, int)); #endif #ifndef HAVE_GETHOSTID - long gethostid(void); + long gethostid _P((void)); #endif -void lprint(const char *, ...); - -extern int do_echo; +void lprint _P((const char *, ...)); #if SIZEOF_CHAR_P == 4 # define insque_32 insque # define remque_32 remque #else - extern inline void insque_32(void *, void *); - extern inline void remque_32(void *); + inline void insque_32 _P((void *, void *)); + inline void remque_32 _P((void *)); #endif #ifndef _WIN32 @@ -295,51 +279,46 @@ extern int do_echo; #define DEFAULT_BAUD 115200 +#define SO_OPTIONS DO_KEEPALIVE +#define TCP_MAXIDLE (TCPTV_KEEPCNT * TCPTV_KEEPINTVL) + /* cksum.c */ int cksum(struct mbuf *m, int len); /* if.c */ -void if_init(void); -void if_output(struct socket *, struct mbuf *); +void if_init _P((void)); +void if_output _P((struct socket *, struct mbuf *)); /* ip_input.c */ -void ip_init(void); -void ip_input(struct mbuf *); -struct ip * ip_reass(register struct ipasfrag *, register struct ipq *); -void ip_freef(struct ipq *); -void ip_enq(register struct ipasfrag *, register struct ipasfrag *); -void ip_deq(register struct ipasfrag *); -void ip_slowtimo(void); -void ip_stripoptions(register struct mbuf *, struct mbuf *); +void ip_init _P((void)); +void ip_input _P((struct mbuf *)); +void ip_slowtimo _P((void)); +void ip_stripoptions _P((register struct mbuf *, struct mbuf *)); /* ip_output.c */ -int ip_output(struct socket *, struct mbuf *); +int ip_output _P((struct socket *, struct mbuf *)); /* tcp_input.c */ -int tcp_reass(register struct tcpcb *, register struct tcpiphdr *, struct mbuf *); -void tcp_input(register struct mbuf *, int, struct socket *); -void tcp_dooptions(struct tcpcb *, u_char *, int, struct tcpiphdr *); -void tcp_xmit_timer(register struct tcpcb *, int); -u_int tcp_mss(register struct tcpcb *, u_int); +void tcp_input _P((register struct mbuf *, int, struct socket *)); +int tcp_mss _P((register struct tcpcb *, u_int)); /* tcp_output.c */ -int tcp_output(register struct tcpcb *); -void tcp_setpersist(register struct tcpcb *); +int tcp_output _P((register struct tcpcb *)); +void tcp_setpersist _P((register struct tcpcb *)); /* tcp_subr.c */ -void tcp_init(void); -void tcp_template(struct tcpcb *); -void tcp_respond(struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int); -struct tcpcb * tcp_newtcpcb(struct socket *); -struct tcpcb * tcp_close(register struct tcpcb *); -void tcp_drain(void); -void tcp_sockclosed(struct tcpcb *); -int tcp_fconnect(struct socket *); -void tcp_connect(struct socket *); -int tcp_attach(struct socket *); -u_int8_t tcp_tos(struct socket *); -int tcp_emu(struct socket *, struct mbuf *); -int tcp_ctl(struct socket *); +void tcp_init _P((void)); +void tcp_template _P((struct tcpcb *)); +void tcp_respond _P((struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int)); +struct tcpcb * tcp_newtcpcb _P((struct socket *)); +struct tcpcb * tcp_close _P((register struct tcpcb *)); +void tcp_sockclosed _P((struct tcpcb *)); +int tcp_fconnect _P((struct socket *)); +void tcp_connect _P((struct socket *)); +int tcp_attach _P((struct socket *)); +u_int8_t tcp_tos _P((struct socket *)); +int tcp_emu _P((struct socket *, struct mbuf *)); +int tcp_ctl _P((struct socket *)); struct tcpcb *tcp_drop(struct tcpcb *tp, int err); #ifdef USE_PPP @@ -355,4 +334,9 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err); #define max(x,y) ((x) > (y) ? (x) : (y)) #endif +#ifdef _WIN32 +#undef errno +#define errno (WSAGetLastError()) +#endif + #endif diff --git a/BasiliskII/src/slirp/slirp_config.h b/BasiliskII/src/slirp/slirp_config.h index 237268fa..e7e95dd5 100644 --- a/BasiliskII/src/slirp/slirp_config.h +++ b/BasiliskII/src/slirp/slirp_config.h @@ -40,6 +40,11 @@ */ #undef USE_LOWCPU +/* Define this if your compiler doesn't like prototypes */ +#ifndef __STDC__ +#define NO_PROTOTYPES +#endif + /*********************************************************/ /* * Autoconf defined configuration options @@ -49,11 +54,40 @@ /* Ignore this */ #undef DUMMY_PPP -/* XXX: Define according to how time.h should be included */ -#undef TIME_WITH_SYS_TIME +/* Define if you have unistd.h */ +#define HAVE_UNISTD_H + +/* Define if you have stdlib.h */ +#define HAVE_STDLIB_H + +/* Define if you have sys/ioctl.h */ +#undef HAVE_SYS_IOCTL_H +#ifndef _WIN32 +#define HAVE_SYS_IOCTL_H +#endif + +/* Define if you have sys/filio.h */ +#undef HAVE_SYS_FILIO_H +#ifdef __APPLE__ +#define HAVE_SYS_FILIO_H +#endif + +/* Define if you have strerror */ +#define HAVE_STRERROR + +/* Define if you have strdup() */ +#define HAVE_STRDUP + +/* Define according to how time.h should be included */ #define TIME_WITH_SYS_TIME 0 #undef HAVE_SYS_TIME_H +/* Define if you have sys/bitypes.h */ +#undef HAVE_SYS_BITYPES_H + +/* Define if the machine is big endian */ +//#undef WORDS_BIGENDIAN + /* Define if your sprintf returns char * instead of int */ #undef BAD_SPRINTF @@ -69,17 +103,56 @@ /* Define if a declaration of sprintf/fprintf is needed */ #undef DECLARE_SPRINTF +/* Define if you have a POSIX.1 sys/wait.h */ +#undef HAVE_SYS_WAIT_H + +/* Define if you have sys/select.h */ +#undef HAVE_SYS_SELECT_H +#ifndef _WIN32 +#define HAVE_SYS_SELECT_H +#endif + +/* Define if you have strings.h */ +#define HAVE_STRING_H + +/* Define if you have arpa/inet.h */ +#undef HAVE_ARPA_INET_H +#ifndef _WIN32 +#define HAVE_ARPA_INET_H +#endif + +/* Define if you have sys/signal.h */ +#undef HAVE_SYS_SIGNAL_H + /* Define if you have sys/stropts.h */ #undef HAVE_SYS_STROPTS_H +/* Define to whatever your compiler thinks inline should be */ +#define inline inline + +/* Define to whatever your compiler thinks const should be */ +#define const const + +/* Define if your compiler doesn't like prototypes */ +#undef NO_PROTOTYPES + /* Define if you don't have u_int32_t etc. typedef'd */ #undef NEED_TYPEDEFS #ifdef __sun__ #define NEED_TYPEDEFS #endif +/* Define to sizeof(char) */ +#define SIZEOF_CHAR 1 + +/* Define to sizeof(short) */ +#define SIZEOF_SHORT 2 + +/* Define to sizeof(int) */ +#define SIZEOF_INT 4 + /* Define to sizeof(char *) */ -#define SIZEOF_CHAR_P SIZEOF_VOID_P +#define SIZEOF_CHAR_P (HOST_LONG_BITS / 8) /* Define if you have random() */ #undef HAVE_RANDOM @@ -87,6 +160,12 @@ /* Define if you have srandom() */ #undef HAVE_SRANDOM +/* Define if you have inet_aton */ +#undef HAVE_INET_ATON +#ifndef _WIN32 +#define HAVE_INET_ATON +#endif + /* Define if you have setenv */ #undef HAVE_SETENV diff --git a/BasiliskII/src/slirp/socket.c b/BasiliskII/src/slirp/socket.c index 42ba31b2..0c15132e 100644 --- a/BasiliskII/src/slirp/socket.c +++ b/BasiliskII/src/slirp/socket.c @@ -1,12 +1,11 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ #define WANT_SYS_IOCTL_H -#include #include #include "ip_icmp.h" #include "main.h" @@ -14,18 +13,16 @@ #include #endif -#ifdef _WIN32 -#define IS_EAGAIN(e) ((e) == WSAEINTR || (e) == EAGAIN) -#else -#define IS_EAGAIN(e) ((e) == EAGAIN) -#endif +static void sofcantrcvmore(struct socket *so); +static void sofcantsendmore(struct socket *so); -void +#if 0 +static void so_init() { /* Nothing yet */ } - +#endif struct socket * solookup(head, laddr, lport, faddr, fport) @@ -36,19 +33,19 @@ solookup(head, laddr, lport, faddr, fport) u_int fport; { struct socket *so; - + for (so = head->so_next; so != head; so = so->so_next) { - if (so->so_lport == lport && + if (so->so_lport == lport && so->so_laddr.s_addr == laddr.s_addr && so->so_faddr.s_addr == faddr.s_addr && so->so_fport == fport) break; } - + if (so == head) return (struct socket *)NULL; return so; - + } /* @@ -60,7 +57,7 @@ struct socket * socreate() { struct socket *so; - + so = (struct socket *)malloc(sizeof(struct socket)); if(so) { memset(so, 0, sizeof(struct socket)); @@ -85,10 +82,10 @@ sofree(so) tcp_last_so = &tcb; else if (so == udp_last_so) udp_last_so = &udb; - + m_free(so->so_m); - - if(so->so_next && so->so_prev) + + if(so->so_next && so->so_prev) remque(so); /* crashes if so is not in a queue */ free(so); @@ -103,23 +100,22 @@ int soread(so) struct socket *so; { - int n, nn; - u_int lss, total; + int n, nn, lss, total; struct sbuf *sb = &so->so_snd; - u_int len = sb->sb_datalen - sb->sb_cc; + int len = sb->sb_datalen - sb->sb_cc; struct iovec iov[2]; - u_int mss = so->so_tcpcb->t_maxseg; - + int mss = so->so_tcpcb->t_maxseg; + DEBUG_CALL("soread"); DEBUG_ARG("so = %lx", (long )so); - - /* + + /* * No need to check if there's enough room to read. * soread wouldn't have been called if there weren't */ - + len = sb->sb_datalen - sb->sb_cc; - + iov[0].iov_base = sb->sb_wptr; if (sb->sb_wptr < sb->sb_rptr) { iov[0].iov_len = sb->sb_rptr - sb->sb_wptr; @@ -158,16 +154,15 @@ soread(so) n = 1; } } - + #ifdef HAVE_READV nn = readv(so->s, (struct iovec *)iov, n); DEBUG_MISC((dfd, " ... read nn = %d bytes\n", nn)); #else nn = recv(so->s, iov[0].iov_base, iov[0].iov_len,0); -#endif +#endif if (nn <= 0) { - int error = WSAGetLastError(); - if (nn < 0 && IS_EAGAIN(error)) + if (nn < 0 && (errno == EINTR || errno == EAGAIN)) return 0; else { DEBUG_MISC((dfd, " --- soread() disconnected, nn = %d, errno = %d-%s\n", nn, errno,strerror(errno))); @@ -176,7 +171,7 @@ soread(so) return -1; } } - + #ifndef HAVE_READV /* * If there was no error, try and read the second time round @@ -193,10 +188,10 @@ soread(so) if (ret > 0) nn += ret; } - + DEBUG_MISC((dfd, " ... read nn = %d bytes\n", nn)); #endif - + /* Update fields */ sb->sb_cc += nn; sb->sb_wptr += nn; @@ -204,10 +199,10 @@ soread(so) sb->sb_wptr -= sb->sb_datalen; return nn; } - + /* * Get urgent data - * + * * When the socket is created, we set it SO_OOBINLINE, * so when OOB data arrives, we soread() it and everything * in the send buffer is sent as urgent data @@ -220,13 +215,13 @@ sorecvoob(so) DEBUG_CALL("sorecvoob"); DEBUG_ARG("so = %lx", (long)so); - + /* * We take a guess at how much urgent data has arrived. * In most situations, when urgent data arrives, the next * read() should get all the urgent data. This guess will * be wrong however if more data arrives just after the - * urgent data, or the read() doesn't return all the + * urgent data, or the read() doesn't return all the * urgent data. */ soread(so); @@ -246,24 +241,24 @@ sosendoob(so) { struct sbuf *sb = &so->so_rcv; char buff[2048]; /* XXX Shouldn't be sending more oob data than this */ - + int n, len; - + DEBUG_CALL("sosendoob"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("sb->sb_cc = %d", sb->sb_cc); - + if (so->so_urgc > 2048) so->so_urgc = 2048; /* XXXX */ - + if (sb->sb_rptr < sb->sb_wptr) { /* We can send it directly */ n = send(so->s, sb->sb_rptr, so->so_urgc, (MSG_OOB)); /* |MSG_DONTWAIT)); */ so->so_urgc -= n; - + DEBUG_MISC((dfd, " --- sent %d bytes urgent data, %d urgent bytes left\n", n, so->so_urgc)); } else { - /* + /* * Since there's no sendv or sendtov like writev, * we must copy all data to a linear buffer then * send it all @@ -283,20 +278,20 @@ sosendoob(so) #ifdef DEBUG if (n != len) DEBUG_ERROR((dfd, "Didn't send all data urgently XXXXX\n")); -#endif +#endif DEBUG_MISC((dfd, " ---2 sent %d bytes urgent data, %d urgent bytes left\n", n, so->so_urgc)); } - + sb->sb_cc -= n; sb->sb_rptr += n; if (sb->sb_rptr >= (sb->sb_data + sb->sb_datalen)) sb->sb_rptr -= sb->sb_datalen; - + return n; } /* - * Write data from so_rcv to so's socket, + * Write data from so_rcv to so's socket, * updating all sbuf field as necessary */ int @@ -305,12 +300,12 @@ sowrite(so) { int n,nn; struct sbuf *sb = &so->so_rcv; - u_int len = sb->sb_cc; + int len = sb->sb_cc; struct iovec iov[2]; - + DEBUG_CALL("sowrite"); DEBUG_ARG("so = %lx", (long)so); - + if (so->so_urgc) { sosendoob(so); if (sb->sb_cc == 0) @@ -321,9 +316,9 @@ sowrite(so) * No need to check if there's something to write, * sowrite wouldn't have been called otherwise */ - + len = sb->sb_cc; - + iov[0].iov_base = sb->sb_rptr; if (sb->sb_rptr < sb->sb_wptr) { iov[0].iov_len = sb->sb_wptr - sb->sb_rptr; @@ -346,17 +341,14 @@ sowrite(so) #ifdef HAVE_READV nn = writev(so->s, (const struct iovec *)iov, n); - + DEBUG_MISC((dfd, " ... wrote nn = %d bytes\n", nn)); #else nn = send(so->s, iov[0].iov_base, iov[0].iov_len,0); #endif /* This should never happen, but people tell me it does *shrug* */ - if (nn < 0) { - int error = WSAGetLastError(); - if (IS_EAGAIN(error)) - return 0; - } + if (nn < 0 && (errno == EAGAIN || errno == EINTR)) + return 0; if (nn <= 0) { DEBUG_MISC((dfd, " --- sowrite disconnected, so->so_state = %x, errno = %d\n", @@ -365,7 +357,7 @@ sowrite(so) tcp_sockclosed(sototcpcb(so)); return -1; } - + #ifndef HAVE_READV if (n == 2 && nn == iov[0].iov_len) { int ret; @@ -375,20 +367,20 @@ sowrite(so) } DEBUG_MISC((dfd, " ... wrote nn = %d bytes\n", nn)); #endif - + /* Update sbuf */ sb->sb_cc -= nn; sb->sb_rptr += nn; if (sb->sb_rptr >= (sb->sb_data + sb->sb_datalen)) sb->sb_rptr -= sb->sb_datalen; - + /* * If in DRAIN mode, and there's no more data, set * it CANTSENDMORE */ if ((so->so_state & SS_FWDRAIN) && sb->sb_cc == 0) sofcantsendmore(so); - + return nn; } @@ -400,26 +392,25 @@ sorecvfrom(so) struct socket *so; { struct sockaddr_in addr; - socklen_t addrlen = sizeof(struct sockaddr_in); - + int addrlen = sizeof(struct sockaddr_in); + DEBUG_CALL("sorecvfrom"); DEBUG_ARG("so = %lx", (long)so); - + if (so->so_type == IPPROTO_ICMP) { /* This is a "ping" reply */ char buff[256]; int len; - - len = recvfrom(so->s, buff, 256, 0, + + len = recvfrom(so->s, buff, 256, 0, (struct sockaddr *)&addr, &addrlen); /* XXX Check if reply is "correct"? */ - + if(len == -1 || len == 0) { u_char code=ICMP_UNREACH_PORT; - int error = WSAGetLastError(); - if(error == WSAEHOSTUNREACH) code=ICMP_UNREACH_HOST; - else if(error == WSAENETUNREACH) code=ICMP_UNREACH_NET; - + if(errno == EHOSTUNREACH) code=ICMP_UNREACH_HOST; + else if(errno == ENETUNREACH) code=ICMP_UNREACH_NET; + DEBUG_MISC((dfd," udp icmp rx errno = %d-%s\n", errno,strerror(errno))); icmp_error(so->so_m, ICMP_UNREACH,code, 0,strerror(errno)); @@ -431,38 +422,36 @@ sorecvfrom(so) udp_detach(so); } else { /* A "normal" UDP packet */ struct mbuf *m; - u_int len; - ioctlsockopt_t n; + int len, n; if (!(m = m_get())) return; - m->m_data += if_maxlinkhdr; - - /* + m->m_data += IF_MAXLINKHDR; + + /* * XXX Shouldn't FIONREAD packets destined for port 53, * but I don't know the max packet size for DNS lookups */ len = M_FREEROOM(m); /* if (so->so_fport != htons(53)) { */ ioctlsocket(so->s, FIONREAD, &n); - + if (n > len) { n = (m->m_data - m->m_dat) + m->m_len + n + 1; m_inc(m, n); len = M_FREEROOM(m); } /* } */ - + m->m_len = recvfrom(so->s, m->m_data, len, 0, (struct sockaddr *)&addr, &addrlen); - DEBUG_MISC((dfd, " did recvfrom %zu, errno = %d-%s\n", + DEBUG_MISC((dfd, " did recvfrom %d, errno = %d-%s\n", m->m_len, errno,strerror(errno))); if(m->m_len<0) { u_char code=ICMP_UNREACH_PORT; - int error = WSAGetLastError(); - if(error == WSAEHOSTUNREACH) code=ICMP_UNREACH_HOST; - else if(error == WSAENETUNREACH) code=ICMP_UNREACH_NET; - + if(errno == EHOSTUNREACH) code=ICMP_UNREACH_HOST; + else if(errno == ENETUNREACH) code=ICMP_UNREACH_NET; + DEBUG_MISC((dfd," rx error, tx icmp ICMP_UNREACH:%i\n", code)); icmp_error(so->so_m, ICMP_UNREACH,code, 0,strerror(errno)); m_free(m); @@ -485,8 +474,8 @@ sorecvfrom(so) * m->m_len = 0; * } */ - - /* + + /* * If this packet was destined for CTL_ADDR, * make it look like that's where it came from, done by udp_output */ @@ -509,7 +498,7 @@ sosendto(so, m) DEBUG_CALL("sosendto"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("m = %lx", (long)m); - + addr.sin_family = AF_INET; if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) { /* It's an alias */ @@ -526,16 +515,14 @@ sosendto(so, m) addr.sin_addr = so->so_faddr; addr.sin_port = so->so_fport; - char addrstr[INET_ADDRSTRLEN]; - DEBUG_MISC((dfd, " sendto()ing, addr.sin_port=%d, addr.sin_addr.s_addr=%.16s\n", - ntohs(addr.sin_port), inet_ntop(AF_INET, &addr.sin_addr, addrstr, sizeof(addrstr)))); - + DEBUG_MISC((dfd, " sendto()ing, addr.sin_port=%d, addr.sin_addr.s_addr=%.16s\n", ntohs(addr.sin_port), inet_ntoa(addr.sin_addr))); + /* Don't care what port we get */ ret = sendto(so->s, m->m_data, m->m_len, 0, (struct sockaddr *)&addr, sizeof (struct sockaddr)); if (ret < 0) return -1; - + /* * Kill the socket if there's no reply in 4 minutes, * but only if it's an expirable socket @@ -558,57 +545,58 @@ solisten(port, laddr, lport, flags) { struct sockaddr_in addr; struct socket *so; - int s; - socklen_t addrlen = sizeof(addr); - int opt = 1; + int s, addrlen = sizeof(addr), opt = 1; DEBUG_CALL("solisten"); DEBUG_ARG("port = %d", port); DEBUG_ARG("laddr = %x", laddr); DEBUG_ARG("lport = %d", lport); DEBUG_ARG("flags = %x", flags); - + if ((so = socreate()) == NULL) { /* free(so); Not sofree() ??? free(NULL) == NOP */ return NULL; } - + /* Don't tcp_attach... we don't need so_snd nor so_rcv */ if ((so->so_tcpcb = tcp_newtcpcb(so)) == NULL) { free(so); return NULL; } insque(so,&tcb); - - /* + + /* * SS_FACCEPTONCE sockets must time out. */ if (flags & SS_FACCEPTONCE) so->so_tcpcb->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT*2; - + so->so_state = (SS_FACCEPTCONN|flags); so->so_lport = lport; /* Kept in network format */ so->so_laddr.s_addr = laddr; /* Ditto */ - - memset(&addr, 0, sizeof(struct sockaddr_in)); + addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_port = port; - + if (((s = socket(AF_INET,SOCK_STREAM,0)) < 0) || (setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int)) < 0) || (bind(s,(struct sockaddr *)&addr, sizeof(addr)) < 0) || (listen(s,1) < 0)) { - int error = WSAGetLastError(); /* Don't clobber the real reason we failed */ - + int tmperrno = errno; /* Don't clobber the real reason we failed */ + close(s); sofree(so); /* Restore the real errno */ - WSASetLastError(error); +#ifdef _WIN32 + WSASetLastError(tmperrno); +#else + errno = tmperrno; +#endif return NULL; } setsockopt(s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(int)); - + getsockname(s,(struct sockaddr *)&addr,&addrlen); so->so_fport = addr.sin_port; if (addr.sin_addr.s_addr == 0 || addr.sin_addr.s_addr == loopback_addr.s_addr) @@ -620,30 +608,32 @@ solisten(port, laddr, lport, flags) return so; } -/* +#if 0 +/* * Data is available in so_rcv * Just write() the data to the socket * XXX not yet... */ -void +static void sorwakeup(so) struct socket *so; { /* sowrite(so); */ /* FD_CLR(so->s,&writefds); */ } - + /* * Data has been freed in so_snd * We have room for a read() if we want to * For now, don't read, it'll be done in the main loop */ -void +static void sowwakeup(so) struct socket *so; { /* Nothing, yet */ } +#endif /* * Various session state calls @@ -668,9 +658,8 @@ soisfconnected(so) so->so_state |= SS_ISFCONNECTED; /* Clobber other states */ } -void -sofcantrcvmore(so) - struct socket *so; +static void +sofcantrcvmore(struct socket *so) { if ((so->so_state & SS_NOFDREF) == 0) { shutdown(so->s,0); @@ -685,9 +674,8 @@ sofcantrcvmore(so) so->so_state |= SS_FCANTRCVMORE; } -void -sofcantsendmore(so) - struct socket *so; +static void +sofcantsendmore(struct socket *so) { if ((so->so_state & SS_NOFDREF) == 0) { shutdown(so->s,1); /* send FIN to fhost */ diff --git a/BasiliskII/src/slirp/socket.h b/BasiliskII/src/slirp/socket.h index 3b0fee16..94fb8d8c 100644 --- a/BasiliskII/src/slirp/socket.h +++ b/BasiliskII/src/slirp/socket.h @@ -1,7 +1,7 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -33,21 +33,21 @@ struct socket { struct in_addr so_laddr; /* local host table entry */ u_int16_t so_fport; /* foreign port */ u_int16_t so_lport; /* local port */ - + u_int8_t so_iptos; /* Type of service */ u_int8_t so_emu; /* Is the socket emulated? */ - + u_char so_type; /* Type of socket, UDP or TCP */ int so_state; /* internal state flags SS_*, below */ - + struct tcpcb *so_tcpcb; /* pointer to TCP protocol control block */ u_int so_expire; /* When the socket will expire */ - + int so_queued; /* Number of packets queued from this socket */ int so_nqueued; /* Number of packets queued in a row * Used to determine when to "downgrade" a session * from fastq to batchq */ - + struct sbuf so_rcv; /* Receive buffer */ struct sbuf so_snd; /* Send buffer */ void * extra; /* Extra pointer */ @@ -81,24 +81,19 @@ struct iovec { }; #endif -void so_init(void); -struct socket * solookup(struct socket *, struct in_addr, u_int, struct in_addr, u_int); -struct socket * socreate(void); -void sofree(struct socket *); -int soread(struct socket *); -void sorecvoob(struct socket *); -int sosendoob(struct socket *); -int sowrite(struct socket *); -void sorecvfrom(struct socket *); -int sosendto(struct socket *, struct mbuf *); -struct socket * solisten(u_int, u_int32_t, u_int, int); -void sorwakeup(struct socket *); -void sowwakeup(struct socket *); -void soisfconnecting(register struct socket *); -void soisfconnected(register struct socket *); -void sofcantrcvmore(struct socket *); -void sofcantsendmore(struct socket *); -void soisfdisconnected(struct socket *); -void sofwdrain(struct socket *); +struct socket * solookup _P((struct socket *, struct in_addr, u_int, struct in_addr, u_int)); +struct socket * socreate _P((void)); +void sofree _P((struct socket *)); +int soread _P((struct socket *)); +void sorecvoob _P((struct socket *)); +int sosendoob _P((struct socket *)); +int sowrite _P((struct socket *)); +void sorecvfrom _P((struct socket *)); +int sosendto _P((struct socket *, struct mbuf *)); +struct socket * solisten _P((u_int, u_int32_t, u_int, int)); +void soisfconnecting _P((register struct socket *)); +void soisfconnected _P((register struct socket *)); +void soisfdisconnected _P((struct socket *)); +void sofwdrain _P((struct socket *)); #endif /* _SOCKET_H_ */ diff --git a/BasiliskII/src/slirp/tcp.h b/BasiliskII/src/slirp/tcp.h index 24e7914a..11150766 100644 --- a/BasiliskII/src/slirp/tcp.h +++ b/BasiliskII/src/slirp/tcp.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -38,8 +42,6 @@ typedef u_int32_t tcp_seq; #define PR_SLOWHZ 2 /* 2 slow timeouts per second (approx) */ #define PR_FASTHZ 5 /* 5 fast timeouts per second (not important) */ -extern size_t tcp_rcvspace; -extern size_t tcp_sndspace; extern struct socket *tcp_last_so; #define TCP_SNDSPACE 8192 @@ -49,20 +51,16 @@ extern struct socket *tcp_last_so; * TCP header. * Per RFC 793, September, 1981. */ -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(1) -#endif - struct tcphdr { u_int16_t th_sport; /* source port */ u_int16_t th_dport; /* destination port */ tcp_seq th_seq; /* sequence number */ tcp_seq th_ack; /* acknowledgement number */ #ifdef WORDS_BIGENDIAN - u_char th_off:4, /* data offset */ + u_int th_off:4, /* data offset */ th_x2:4; /* (unused) */ #else - u_char th_x2:4, /* (unused) */ + u_int th_x2:4, /* (unused) */ th_off:4; /* data offset */ #endif u_int8_t th_flags; @@ -75,11 +73,7 @@ struct tcphdr { u_int16_t th_win; /* window */ u_int16_t th_sum; /* checksum */ u_int16_t th_urp; /* urgent pointer */ -} PACKED__; - -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) -#endif +}; #include "tcp_var.h" @@ -176,6 +170,6 @@ struct tcphdr { extern tcp_seq tcp_iss; /* tcp initial send seq # */ -extern char *tcpstates[]; +extern const char * const tcpstates[]; #endif diff --git a/BasiliskII/src/slirp/tcp_input.c b/BasiliskII/src/slirp/tcp_input.c index 5c06f16f..17a9387f 100644 --- a/BasiliskII/src/slirp/tcp_input.c +++ b/BasiliskII/src/slirp/tcp_input.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -33,18 +37,17 @@ /* * Changes and additions relating to SLiRP * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ -#include #include #include "ip_icmp.h" struct socket tcb; -int tcprexmtthresh = 3; +#define TCPREXMTTHRESH 3 struct socket *tcp_last_so = &tcb; tcp_seq tcp_iss; /* tcp initial send seq # */ @@ -76,8 +79,8 @@ tcp_seq tcp_iss; /* tcp initial send seq # */ tp->t_flags |= TF_DELACK; \ (tp)->rcv_nxt += (ti)->ti_len; \ flags = (ti)->ti_flags & TH_FIN; \ - tcpstat.tcps_rcvpack++;\ - tcpstat.tcps_rcvbyte += (ti)->ti_len;\ + STAT(tcpstat.tcps_rcvpack++); \ + STAT(tcpstat.tcps_rcvbyte += (ti)->ti_len); \ if (so->so_emu) { \ if (tcp_emu((so),(m))) sbappend((so), (m)); \ } else \ @@ -96,8 +99,8 @@ tcp_seq tcp_iss; /* tcp initial send seq # */ tp->t_flags |= TF_DELACK; \ (tp)->rcv_nxt += (ti)->ti_len; \ flags = (ti)->ti_flags & TH_FIN; \ - tcpstat.tcps_rcvpack++;\ - tcpstat.tcps_rcvbyte += (ti)->ti_len;\ + STAT(tcpstat.tcps_rcvpack++); \ + STAT(tcpstat.tcps_rcvbyte += (ti)->ti_len); \ if (so->so_emu) { \ if (tcp_emu((so),(m))) sbappend(so, (m)); \ } else \ @@ -109,14 +112,18 @@ tcp_seq tcp_iss; /* tcp initial send seq # */ } \ } #endif +static void tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, + struct tcpiphdr *ti); +static void tcp_xmit_timer(register struct tcpcb *tp, int rtt); -int -tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, struct mbuf *m) +static int +tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, + struct mbuf *m) { register struct tcpiphdr *q; struct socket *so = tp->t_socket; int flags; - + /* * Call with ti==0 after become established to * force pre-ESTABLISHED data up to user socket. @@ -144,8 +151,8 @@ tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, struct mbuf * i = q->ti_seq + q->ti_len - ti->ti_seq; if (i > 0) { if (i >= ti->ti_len) { - tcpstat.tcps_rcvduppack++; - tcpstat.tcps_rcvdupbyte += ti->ti_len; + STAT(tcpstat.tcps_rcvduppack++); + STAT(tcpstat.tcps_rcvdupbyte += ti->ti_len); m_freem(m); /* * Try to present any queued data @@ -161,8 +168,8 @@ tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, struct mbuf * } q = (struct tcpiphdr *)(q->ti_next); } - tcpstat.tcps_rcvoopack++; - tcpstat.tcps_rcvoobyte += ti->ti_len; + STAT(tcpstat.tcps_rcvoopack++); + STAT(tcpstat.tcps_rcvoobyte += ti->ti_len); REASS_MBUF(ti) = (mbufp_32) m; /* XXX */ /* @@ -226,9 +233,13 @@ present: * TCP input routine, follows pages 65-76 of the * protocol specification dated September, 1981 very closely. */ -void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) +void +tcp_input(m, iphlen, inso) + register struct mbuf *m; + int iphlen; + struct socket *inso; { - struct ip save_ip, *ip; + struct ip save_ip, *ip; register struct tcpiphdr *ti; caddr_t optp = NULL; int optlen = 0; @@ -236,18 +247,16 @@ void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) register struct tcpcb *tp = 0; register int tiflags; struct socket *so = 0; - int todrop; - u_int acked; - int ourfinisacked, needoutput = 0; - /* int dropsocket = 0; */ + int todrop, acked, ourfinisacked, needoutput = 0; +/* int dropsocket = 0; */ int iss = 0; u_long tiwin; int ret; - /* int ts_present = 0; */ +/* int ts_present = 0; */ DEBUG_CALL("tcp_input"); - DEBUG_ARGS((dfd, " m = %8lx iphlen = %2d inso = %lx\n", - (long)m, iphlen, (long)inso)); + DEBUG_ARGS((dfd," m = %8lx iphlen = %2d inso = %lx\n", + (long )m, iphlen, (long )inso )); /* * If called with m == 0, then we're continuing the connect @@ -267,15 +276,15 @@ void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) } - tcpstat.tcps_rcvtotal++; + STAT(tcpstat.tcps_rcvtotal++); /* * Get IP and TCP header together in first mbuf. * Note: IP leaves IP header in first mbuf. */ ti = mtod(m, struct tcpiphdr *); - if (iphlen > sizeof(struct ip)) { - ip_stripoptions(m, (struct mbuf *)0); - iphlen = sizeof(struct ip); + if (iphlen > sizeof(struct ip )) { + ip_stripoptions(m, (struct mbuf *)0); + iphlen=sizeof(struct ip ); } /* XXX Check if too short */ @@ -284,28 +293,24 @@ void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) * Save a copy of the IP header in case we want restore it * for sending an ICMP error message in response. */ - ip = mtod(m, struct ip *); + ip=mtod(m, struct ip *); save_ip = *ip; - save_ip.ip_len += iphlen; + save_ip.ip_len+= iphlen; /* * Checksum extended TCP header and data. */ tlen = ((struct ip *)ti)->ip_len; - //ti->ti_next = ti->ti_prev = 0; - - tcpiphdr2qlink(ti)->next = tcpiphdr2qlink(ti)->prev = 0; - memset(&ti->ti_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr)); - + ti->ti_next = ti->ti_prev = 0; ti->ti_x1 = 0; ti->ti_len = htons((u_int16_t)tlen); - len = sizeof(struct ip) + tlen; + len = sizeof(struct ip ) + tlen; /* keep checksum for ICMP reply * ti->ti_sum = cksum(m, len); * if (ti->ti_sum) { */ - if (cksum(m, len)) { - tcpstat.tcps_rcvbadsum++; - goto drop; + if(cksum(m, len)) { + STAT(tcpstat.tcps_rcvbadsum++); + goto drop; } /* @@ -313,15 +318,15 @@ void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) * pull out TCP options and adjust length. XXX */ off = ti->ti_off << 2; - if (off < sizeof(struct tcphdr) || off > tlen) { - tcpstat.tcps_rcvbadoff++; - goto drop; + if (off < sizeof (struct tcphdr) || off > tlen) { + STAT(tcpstat.tcps_rcvbadoff++); + goto drop; } tlen -= off; ti->ti_len = tlen; - if (off > sizeof(struct tcphdr)) { - optlen = off - sizeof(struct tcphdr); - optp = mtod(m, caddr_t) + sizeof(struct tcpiphdr); + if (off > sizeof (struct tcphdr)) { + optlen = off - sizeof (struct tcphdr); + optp = mtod(m, caddr_t) + sizeof (struct tcpiphdr); /* * Do quick retrieval of timestamp options ("options @@ -330,17 +335,17 @@ void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) * quickly get the values now and not bother calling * tcp_dooptions(), etc. */ - /* if ((optlen == TCPOLEN_TSTAMP_APPA || - * (optlen > TCPOLEN_TSTAMP_APPA && - * optp[TCPOLEN_TSTAMP_APPA] == TCPOPT_EOL)) && - * *(u_int32_t *)optp == htonl(TCPOPT_TSTAMP_HDR) && - * (ti->ti_flags & TH_SYN) == 0) { - * ts_present = 1; - * ts_val = ntohl(*(u_int32_t *)(optp + 4)); - * ts_ecr = ntohl(*(u_int32_t *)(optp + 8)); - * optp = NULL; / * we've parsed the options * / - * } - */ +/* if ((optlen == TCPOLEN_TSTAMP_APPA || + * (optlen > TCPOLEN_TSTAMP_APPA && + * optp[TCPOLEN_TSTAMP_APPA] == TCPOPT_EOL)) && + * *(u_int32_t *)optp == htonl(TCPOPT_TSTAMP_HDR) && + * (ti->ti_flags & TH_SYN) == 0) { + * ts_present = 1; + * ts_val = ntohl(*(u_int32_t *)(optp + 4)); + * ts_ecr = ntohl(*(u_int32_t *)(optp + 8)); + * optp = NULL; / * we've parsed the options * / + * } + */ } tiflags = ti->ti_flags; @@ -355,8 +360,8 @@ void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) /* * Drop TCP, IP headers and TCP options. */ - m->m_data += sizeof(struct tcpiphdr) + off - sizeof(struct tcphdr); - m->m_len -= sizeof(struct tcpiphdr) + off - sizeof(struct tcphdr); + m->m_data += sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); + m->m_len -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); /* * Locate pcb for segment. @@ -364,14 +369,14 @@ void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) findso: so = tcp_last_so; if (so->so_fport != ti->ti_dport || - so->so_lport != ti->ti_sport || - so->so_laddr.s_addr != ti->ti_src.s_addr || - so->so_faddr.s_addr != ti->ti_dst.s_addr) { + so->so_lport != ti->ti_sport || + so->so_laddr.s_addr != ti->ti_src.s_addr || + so->so_faddr.s_addr != ti->ti_dst.s_addr) { so = solookup(&tcb, ti->ti_src, ti->ti_sport, - ti->ti_dst, ti->ti_dport); + ti->ti_dst, ti->ti_dport); if (so) tcp_last_so = so; - ++tcpstat.tcps_socachemiss; + STAT(tcpstat.tcps_socachemiss++); } /* @@ -388,41 +393,41 @@ findso: * as if it was LISTENING, and continue... */ if (so == 0) { - if ((tiflags & (TH_SYN | TH_FIN | TH_RST | TH_URG | TH_ACK)) != TH_SYN) - goto dropwithreset; + if ((tiflags & (TH_SYN|TH_FIN|TH_RST|TH_URG|TH_ACK)) != TH_SYN) + goto dropwithreset; - if ((so = socreate()) == NULL) - goto dropwithreset; - if (tcp_attach(so) < 0) { - free(so); /* Not sofree (if it failed, it's not insqued) */ - goto dropwithreset; - } + if ((so = socreate()) == NULL) + goto dropwithreset; + if (tcp_attach(so) < 0) { + free(so); /* Not sofree (if it failed, it's not insqued) */ + goto dropwithreset; + } - sbreserve(&so->so_snd, tcp_sndspace); - sbreserve(&so->so_rcv, tcp_rcvspace); + sbreserve(&so->so_snd, TCP_SNDSPACE); + sbreserve(&so->so_rcv, TCP_RCVSPACE); - /* tcp_last_so = so; */ /* XXX ? */ - /* tp = sototcpcb(so); */ + /* tcp_last_so = so; */ /* XXX ? */ + /* tp = sototcpcb(so); */ - so->so_laddr = ti->ti_src; - so->so_lport = ti->ti_sport; - so->so_faddr = ti->ti_dst; - so->so_fport = ti->ti_dport; + so->so_laddr = ti->ti_src; + so->so_lport = ti->ti_sport; + so->so_faddr = ti->ti_dst; + so->so_fport = ti->ti_dport; - if ((so->so_iptos = tcp_tos(so)) == 0) - so->so_iptos = ((struct ip *)ti)->ip_tos; + if ((so->so_iptos = tcp_tos(so)) == 0) + so->so_iptos = ((struct ip *)ti)->ip_tos; - tp = sototcpcb(so); - tp->t_state = TCPS_LISTEN; + tp = sototcpcb(so); + tp->t_state = TCPS_LISTEN; } - /* - * If this is a still-connecting socket, this probably - * a retransmit of the SYN. Whether it's a retransmit SYN - * or something else, we nuke it. - */ - if (so->so_state & SS_ISFCONNECTING) - goto drop; + /* + * If this is a still-connecting socket, this probably + * a retransmit of the SYN. Whether it's a retransmit SYN + * or something else, we nuke it. + */ + if (so->so_state & SS_ISFCONNECTING) + goto drop; tp = sototcpcb(so); @@ -437,17 +442,17 @@ findso: * tiwin = ti->ti_win << tp->snd_scale; * else */ - tiwin = ti->ti_win; + tiwin = ti->ti_win; /* * Segment received on connection. * Reset idle time and keep-alive timer. */ tp->t_idle = 0; - if (so_options) - tp->t_timer[TCPT_KEEP] = tcp_keepintvl; + if (SO_OPTIONS) + tp->t_timer[TCPT_KEEP] = TCPTV_KEEPINTVL; else - tp->t_timer[TCPT_KEEP] = tcp_keepidle; + tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_IDLE; /* * Process options if not in LISTEN state, @@ -455,60 +460,60 @@ findso: */ if (optp && tp->t_state != TCPS_LISTEN) tcp_dooptions(tp, (u_char *)optp, optlen, ti); - /* , */ - /* &ts_present, &ts_val, &ts_ecr); */ +/* , */ +/* &ts_present, &ts_val, &ts_ecr); */ - /* - * Header prediction: check for the two common cases - * of a uni-directional data xfer. If the packet has - * no control flags, is in-sequence, the window didn't - * change and we're not retransmitting, it's a - * candidate. If the length is zero and the ack moved - * forward, we're the sender side of the xfer. Just - * free the data acked & wake any higher level process - * that was blocked waiting for space. If the length - * is non-zero and the ack didn't move, we're the - * receiver side. If we're getting packets in-order - * (the reassembly queue is empty), add the data to - * the socket buffer and note that we need a delayed ack. - * - * XXX Some of these tests are not needed - * eg: the tiwin == tp->snd_wnd prevents many more - * predictions.. with no *real* advantage.. - */ + /* + * Header prediction: check for the two common cases + * of a uni-directional data xfer. If the packet has + * no control flags, is in-sequence, the window didn't + * change and we're not retransmitting, it's a + * candidate. If the length is zero and the ack moved + * forward, we're the sender side of the xfer. Just + * free the data acked & wake any higher level process + * that was blocked waiting for space. If the length + * is non-zero and the ack didn't move, we're the + * receiver side. If we're getting packets in-order + * (the reassembly queue is empty), add the data to + * the socket buffer and note that we need a delayed ack. + * + * XXX Some of these tests are not needed + * eg: the tiwin == tp->snd_wnd prevents many more + * predictions.. with no *real* advantage.. + */ if (tp->t_state == TCPS_ESTABLISHED && - (tiflags & (TH_SYN | TH_FIN | TH_RST | TH_URG | TH_ACK)) == TH_ACK && - /* (!ts_present || TSTMP_GEQ(ts_val, tp->ts_recent)) && */ - ti->ti_seq == tp->rcv_nxt && - tiwin && tiwin == tp->snd_wnd && - tp->snd_nxt == tp->snd_max) { + (tiflags & (TH_SYN|TH_FIN|TH_RST|TH_URG|TH_ACK)) == TH_ACK && +/* (!ts_present || TSTMP_GEQ(ts_val, tp->ts_recent)) && */ + ti->ti_seq == tp->rcv_nxt && + tiwin && tiwin == tp->snd_wnd && + tp->snd_nxt == tp->snd_max) { /* * If last ACK falls within this segment's sequence numbers, * record the timestamp. */ - /* if (ts_present && SEQ_LEQ(ti->ti_seq, tp->last_ack_sent) && - * SEQ_LT(tp->last_ack_sent, ti->ti_seq + ti->ti_len)) { - * tp->ts_recent_age = tcp_now; - * tp->ts_recent = ts_val; - * } - */ +/* if (ts_present && SEQ_LEQ(ti->ti_seq, tp->last_ack_sent) && + * SEQ_LT(tp->last_ack_sent, ti->ti_seq + ti->ti_len)) { + * tp->ts_recent_age = tcp_now; + * tp->ts_recent = ts_val; + * } + */ if (ti->ti_len == 0) { if (SEQ_GT(ti->ti_ack, tp->snd_una) && - SEQ_LEQ(ti->ti_ack, tp->snd_max) && - tp->snd_cwnd >= tp->snd_wnd) { + SEQ_LEQ(ti->ti_ack, tp->snd_max) && + tp->snd_cwnd >= tp->snd_wnd) { /* * this is a pure ack for outstanding data. */ - ++tcpstat.tcps_predack; - /* if (ts_present) - * tcp_xmit_timer(tp, tcp_now-ts_ecr+1); - * else - */ if (tp->t_rtt && -SEQ_GT(ti->ti_ack, tp->t_rtseq)) + STAT(tcpstat.tcps_predack++); +/* if (ts_present) + * tcp_xmit_timer(tp, tcp_now-ts_ecr+1); + * else + */ if (tp->t_rtt && + SEQ_GT(ti->ti_ack, tp->t_rtseq)) tcp_xmit_timer(tp, tp->t_rtt); acked = ti->ti_ack - tp->snd_una; - tcpstat.tcps_rcvackpack++; - tcpstat.tcps_rcvackbyte += acked; + STAT(tcpstat.tcps_rcvackpack++); + STAT(tcpstat.tcps_rcvackbyte += acked); sbdrop(&so->so_snd, acked); tp->snd_una = ti->ti_ack; m_freem(m); @@ -531,39 +536,37 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * There's room in so_snd, sowwakup will read() * from the socket if we can */ - /* if (so->so_snd.sb_flags & SB_NOTIFY) - * sowwakeup(so); - */ - /* - * This is called because sowwakeup might have - * put data into so_snd. Since we don't so sowwakeup, - * we don't need this.. XXX??? - */ +/* if (so->so_snd.sb_flags & SB_NOTIFY) + * sowwakeup(so); + */ + /* + * This is called because sowwakeup might have + * put data into so_snd. Since we don't so sowwakeup, + * we don't need this.. XXX??? + */ if (so->so_snd.sb_cc) (void) tcp_output(tp); return; } - } - else if (ti->ti_ack == tp->snd_una && - tp->seg_next == (tcpiphdrp_32)tp && - ti->ti_len <= sbspace(&so->so_rcv)) { + } else if (ti->ti_ack == tp->snd_una && + tp->seg_next == (tcpiphdrp_32)tp && + ti->ti_len <= sbspace(&so->so_rcv)) { /* * this is a pure, in-sequence data packet * with nothing on the reassembly queue and * we have enough buffer space to take it. */ - ++tcpstat.tcps_preddat; + STAT(tcpstat.tcps_preddat++); tp->rcv_nxt += ti->ti_len; - tcpstat.tcps_rcvpack++; - tcpstat.tcps_rcvbyte += ti->ti_len; + STAT(tcpstat.tcps_rcvpack++); + STAT(tcpstat.tcps_rcvbyte += ti->ti_len); /* * Add data to socket buffer. */ if (so->so_emu) { - if (tcp_emu(so, m)) sbappend(so, m); - } - else + if (tcp_emu(so,m)) sbappend(so, m); + } else sbappend(so, m); /* @@ -571,16 +574,16 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * if we can actually write() to the socket * XXX Need to check? It's be NON_BLOCKING */ - /* sorwakeup(so); */ +/* sorwakeup(so); */ - /* - * If this is a short packet, then ACK now - with Nagel - * congestion avoidance sender won't send more until - * he gets an ACK. - * - * It is better to not delay acks at all to maximize - * TCP throughput. See RFC 2581. - */ + /* + * If this is a short packet, then ACK now - with Nagel + * congestion avoidance sender won't send more until + * he gets an ACK. + * + * It is better to not delay acks at all to maximize + * TCP throughput. See RFC 2581. + */ tp->t_flags |= TF_ACKNOW; tcp_output(tp); return; @@ -593,145 +596,139 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * but not less than advertised window. */ { int win; - win = sbspace(&so->so_rcv); - if (win < 0) - win = 0; - tp->rcv_wnd = max(win, (int)(tp->rcv_adv - tp->rcv_nxt)); + win = sbspace(&so->so_rcv); + if (win < 0) + win = 0; + tp->rcv_wnd = max(win, (int)(tp->rcv_adv - tp->rcv_nxt)); } switch (tp->t_state) { - /* - * If the state is LISTEN then ignore segment if it contains an RST. - * If the segment contains an ACK then it is bad and send a RST. - * If it does not contain a SYN then it is not interesting; drop it. - * Don't bother responding if the destination was a broadcast. - * Otherwise initialize tp->rcv_nxt, and tp->irs, select an initial - * tp->iss, and send a segment: - * - * Also initialize tp->snd_nxt to tp->iss+1 and tp->snd_una to tp->iss. - * Fill in remote peer address fields if not previously specified. - * Enter SYN_RECEIVED state, and process any other fields of this - * segment in this state. - */ + /* + * If the state is LISTEN then ignore segment if it contains an RST. + * If the segment contains an ACK then it is bad and send a RST. + * If it does not contain a SYN then it is not interesting; drop it. + * Don't bother responding if the destination was a broadcast. + * Otherwise initialize tp->rcv_nxt, and tp->irs, select an initial + * tp->iss, and send a segment: + * + * Also initialize tp->snd_nxt to tp->iss+1 and tp->snd_una to tp->iss. + * Fill in remote peer address fields if not previously specified. + * Enter SYN_RECEIVED state, and process any other fields of this + * segment in this state. + */ case TCPS_LISTEN: { - if (tiflags & TH_RST) - goto drop; - if (tiflags & TH_ACK) - goto dropwithreset; - if ((tiflags & TH_SYN) == 0) - goto drop; + if (tiflags & TH_RST) + goto drop; + if (tiflags & TH_ACK) + goto dropwithreset; + if ((tiflags & TH_SYN) == 0) + goto drop; - /* - * This has way too many gotos... - * But a bit of spaghetti code never hurt anybody :) - */ + /* + * This has way too many gotos... + * But a bit of spaghetti code never hurt anybody :) + */ - /* - * If this is destined for the control address, then flag to - * tcp_ctl once connected, otherwise connect - */ - if ((so->so_faddr.s_addr&htonl(0xffffff00)) == special_addr.s_addr) { - int lastbyte = ntohl(so->so_faddr.s_addr) & 0xff; - if (lastbyte != CTL_ALIAS && lastbyte != CTL_DNS) { + /* + * If this is destined for the control address, then flag to + * tcp_ctl once connected, otherwise connect + */ + if ((so->so_faddr.s_addr&htonl(0xffffff00)) == special_addr.s_addr) { + int lastbyte=ntohl(so->so_faddr.s_addr) & 0xff; + if (lastbyte!=CTL_ALIAS && lastbyte!=CTL_DNS) { #if 0 - if (lastbyte == CTL_CMD || lastbyte == CTL_EXEC) { - /* Command or exec adress */ - so->so_state |= SS_CTL; - } - else + if(lastbyte==CTL_CMD || lastbyte==CTL_EXEC) { + /* Command or exec adress */ + so->so_state |= SS_CTL; + } else #endif - { - /* May be an add exec */ - struct ex_list *ex_ptr; - for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) { - if (ex_ptr->ex_fport == so->so_fport && - lastbyte == ex_ptr->ex_addr) { - so->so_state |= SS_CTL; - break; - } - } - } - if (so->so_state & SS_CTL) goto cont_input; - } - /* CTL_ALIAS: Do nothing, tcp_fconnect will be called on it */ + { + /* May be an add exec */ + struct ex_list *ex_ptr; + for(ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) { + if(ex_ptr->ex_fport == so->so_fport && + lastbyte == ex_ptr->ex_addr) { + so->so_state |= SS_CTL; + break; + } } + } + if(so->so_state & SS_CTL) goto cont_input; + } + /* CTL_ALIAS: Do nothing, tcp_fconnect will be called on it */ + } - if (so->so_emu & EMU_NOCONNECT) { - so->so_emu &= ~EMU_NOCONNECT; - goto cont_input; - } + if (so->so_emu & EMU_NOCONNECT) { + so->so_emu &= ~EMU_NOCONNECT; + goto cont_input; + } - if (tcp_fconnect(so) == -1) { - int error = WSAGetLastError(); - if ((error != WSAEINPROGRESS) && (error != WSAEWOULDBLOCK)) { - u_char code = ICMP_UNREACH_NET; - DEBUG_MISC((dfd, " tcp fconnect errno = %d-%s\n", - errno, strerror(errno))); - if (error == WSAECONNREFUSED) { - /* ACK the SYN, send RST to refuse the connection */ - tcp_respond(tp, ti, m, ti->ti_seq + 1, (tcp_seq)0, - TH_RST | TH_ACK); - } - else { - if (error == WSAEHOSTUNREACH) code = ICMP_UNREACH_HOST; - HTONL(ti->ti_seq); /* restore tcp header */ - HTONL(ti->ti_ack); - HTONS(ti->ti_win); - HTONS(ti->ti_urp); - m->m_data -= sizeof(struct tcpiphdr) + off - sizeof(struct tcphdr); - m->m_len += sizeof(struct tcpiphdr) + off - sizeof(struct tcphdr); - *ip = save_ip; - icmp_error(m, ICMP_UNREACH, code, 0, strerror(errno)); - } - tp = tcp_close(tp); - m_free(m); - return; - } - } - - /* - * Haven't connected yet, save the current mbuf - * and ti, and return - * XXX Some OS's don't tell us whether the connect() - * succeeded or not. So we must time it out. - */ - so->so_m = m; - so->so_ti = ti; - tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; - tp->t_state = TCPS_SYN_RECEIVED; - return; + if((tcp_fconnect(so) == -1) && (errno != EINPROGRESS) && (errno != EWOULDBLOCK)) { + u_char code=ICMP_UNREACH_NET; + DEBUG_MISC((dfd," tcp fconnect errno = %d-%s\n", + errno,strerror(errno))); + if(errno == ECONNREFUSED) { + /* ACK the SYN, send RST to refuse the connection */ + tcp_respond(tp, ti, m, ti->ti_seq+1, (tcp_seq)0, + TH_RST|TH_ACK); + } else { + if(errno == EHOSTUNREACH) code=ICMP_UNREACH_HOST; + HTONL(ti->ti_seq); /* restore tcp header */ + HTONL(ti->ti_ack); + HTONS(ti->ti_win); + HTONS(ti->ti_urp); + m->m_data -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); + m->m_len += sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); + *ip=save_ip; + icmp_error(m, ICMP_UNREACH,code, 0,strerror(errno)); + } + tp = tcp_close(tp); + m_free(m); + } else { + /* + * Haven't connected yet, save the current mbuf + * and ti, and return + * XXX Some OS's don't tell us whether the connect() + * succeeded or not. So we must time it out. + */ + so->so_m = m; + so->so_ti = ti; + tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; + tp->t_state = TCPS_SYN_RECEIVED; + } + return; cont_conn: - /* m==NULL - * Check if the connect succeeded - */ - if (so->so_state & SS_NOFDREF) { - tp = tcp_close(tp); - goto dropwithreset; - } + /* m==NULL + * Check if the connect succeeded + */ + if (so->so_state & SS_NOFDREF) { + tp = tcp_close(tp); + goto dropwithreset; + } cont_input: - tcp_template(tp); + tcp_template(tp); - if (optp) - tcp_dooptions(tp, (u_char *)optp, optlen, ti); - /* , */ - /* &ts_present, &ts_val, &ts_ecr); */ + if (optp) + tcp_dooptions(tp, (u_char *)optp, optlen, ti); + /* , */ + /* &ts_present, &ts_val, &ts_ecr); */ - if (iss) - tp->iss = iss; - else - tp->iss = tcp_iss; - tcp_iss += TCP_ISSINCR / 2; - tp->irs = ti->ti_seq; - tcp_sendseqinit(tp); - tcp_rcvseqinit(tp); - tp->t_flags |= TF_ACKNOW; - tp->t_state = TCPS_SYN_RECEIVED; - tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; - tcpstat.tcps_accepts++; - goto trimthenstep6; + if (iss) + tp->iss = iss; + else + tp->iss = tcp_iss; + tcp_iss += TCP_ISSINCR/2; + tp->irs = ti->ti_seq; + tcp_sendseqinit(tp); + tcp_rcvseqinit(tp); + tp->t_flags |= TF_ACKNOW; + tp->t_state = TCPS_SYN_RECEIVED; + tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; + STAT(tcpstat.tcps_accepts++); + goto trimthenstep6; } /* case TCPS_LISTEN */ /* @@ -748,13 +745,13 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) */ case TCPS_SYN_SENT: if ((tiflags & TH_ACK) && - (SEQ_LEQ(ti->ti_ack, tp->iss) || - SEQ_GT(ti->ti_ack, tp->snd_max))) + (SEQ_LEQ(ti->ti_ack, tp->iss) || + SEQ_GT(ti->ti_ack, tp->snd_max))) goto dropwithreset; if (tiflags & TH_RST) { if (tiflags & TH_ACK) - tp = tcp_drop(tp, 0); /* XXX Check t_softerror! */ + tp = tcp_drop(tp,0); /* XXX Check t_softerror! */ goto drop; } @@ -771,7 +768,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) tcp_rcvseqinit(tp); tp->t_flags |= TF_ACKNOW; if (tiflags & TH_ACK && SEQ_GT(tp->snd_una, tp->iss)) { - tcpstat.tcps_connects++; + STAT(tcpstat.tcps_connects++); soisfconnected(so); tp->t_state = TCPS_ESTABLISHED; @@ -782,7 +779,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * tp->rcv_scale = tp->request_r_scale; * } */ - (void)tcp_reass(tp, (struct tcpiphdr *)0, + (void) tcp_reass(tp, (struct tcpiphdr *)0, (struct mbuf *)0); /* * if we didn't have to retransmit the SYN, @@ -790,11 +787,10 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) */ if (tp->t_rtt) tcp_xmit_timer(tp, tp->t_rtt); - } - else + } else tp->t_state = TCPS_SYN_RECEIVED; - trimthenstep6: +trimthenstep6: /* * Advance ti->ti_seq to correspond to first data byte. * If data, trim to stay within window, @@ -806,8 +802,8 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) m_adj(m, -todrop); ti->ti_len = tp->rcv_wnd; tiflags &= ~TH_FIN; - tcpstat.tcps_rcvpackafterwin++; - tcpstat.tcps_rcvbyteafterwin += todrop; + STAT(tcpstat.tcps_rcvpackafterwin++); + STAT(tcpstat.tcps_rcvbyteafterwin += todrop); } tp->snd_wl1 = ti->ti_seq - 1; tp->rcv_up = ti->ti_seq; @@ -823,31 +819,31 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * RFC 1323 PAWS: If we have a timestamp reply on this segment * and it's less than ts_recent, drop it. */ - /* if (ts_present && (tiflags & TH_RST) == 0 && tp->ts_recent && - * TSTMP_LT(ts_val, tp->ts_recent)) { - * - */ /* Check to see if ts_recent is over 24 days old. */ - /* if ((int)(tcp_now - tp->ts_recent_age) > TCP_PAWS_IDLE) { - */ /* - * * Invalidate ts_recent. If this segment updates - * * ts_recent, the age will be reset later and ts_recent - * * will get a valid value. If it does not, setting - * * ts_recent to zero will at least satisfy the - * * requirement that zero be placed in the timestamp - * * echo reply when ts_recent isn't valid. The - * * age isn't reset until we get a valid ts_recent - * * because we don't want out-of-order segments to be - * * dropped when ts_recent is old. - * */ - /* tp->ts_recent = 0; - * } else { - * tcpstat.tcps_rcvduppack++; - * tcpstat.tcps_rcvdupbyte += ti->ti_len; - * tcpstat.tcps_pawsdrop++; - * goto dropafterack; - * } - * } - */ +/* if (ts_present && (tiflags & TH_RST) == 0 && tp->ts_recent && + * TSTMP_LT(ts_val, tp->ts_recent)) { + * + */ /* Check to see if ts_recent is over 24 days old. */ +/* if ((int)(tcp_now - tp->ts_recent_age) > TCP_PAWS_IDLE) { + */ /* + * * Invalidate ts_recent. If this segment updates + * * ts_recent, the age will be reset later and ts_recent + * * will get a valid value. If it does not, setting + * * ts_recent to zero will at least satisfy the + * * requirement that zero be placed in the timestamp + * * echo reply when ts_recent isn't valid. The + * * age isn't reset until we get a valid ts_recent + * * because we don't want out-of-order segments to be + * * dropped when ts_recent is old. + * */ +/* tp->ts_recent = 0; + * } else { + * tcpstat.tcps_rcvduppack++; + * tcpstat.tcps_rcvdupbyte += ti->ti_len; + * tcpstat.tcps_pawsdrop++; + * goto dropafterack; + * } + * } + */ todrop = tp->rcv_nxt - ti->ti_seq; if (todrop > 0) { @@ -864,7 +860,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * Following if statement from Stevens, vol. 2, p. 960. */ if (todrop > ti->ti_len - || (todrop == ti->ti_len && (tiflags & TH_FIN) == 0)) { + || (todrop == ti->ti_len && (tiflags & TH_FIN) == 0)) { /* * Any valid FIN must be to the left of the window. * At this point the FIN must be a duplicate or out @@ -878,12 +874,11 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) */ tp->t_flags |= TF_ACKNOW; todrop = ti->ti_len; - tcpstat.tcps_rcvduppack++; - tcpstat.tcps_rcvdupbyte += todrop; - } - else { - tcpstat.tcps_rcvpartduppack++; - tcpstat.tcps_rcvpartdupbyte += todrop; + STAT(tcpstat.tcps_rcvduppack++); + STAT(tcpstat.tcps_rcvdupbyte += todrop); + } else { + STAT(tcpstat.tcps_rcvpartduppack++); + STAT(tcpstat.tcps_rcvpartdupbyte += todrop); } m_adj(m, todrop); ti->ti_seq += todrop; @@ -900,9 +895,9 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * user processes are gone, then RST the other end. */ if ((so->so_state & SS_NOFDREF) && - tp->t_state > TCPS_CLOSE_WAIT && ti->ti_len) { + tp->t_state > TCPS_CLOSE_WAIT && ti->ti_len) { tp = tcp_close(tp); - tcpstat.tcps_rcvafterclose++; + STAT(tcpstat.tcps_rcvafterclose++); goto dropwithreset; } @@ -910,11 +905,11 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * If segment ends after window, drop trailing data * (and PUSH and FIN); if nothing left, just ACK. */ - todrop = (ti->ti_seq + ti->ti_len) - (tp->rcv_nxt + tp->rcv_wnd); + todrop = (ti->ti_seq+ti->ti_len) - (tp->rcv_nxt+tp->rcv_wnd); if (todrop > 0) { - tcpstat.tcps_rcvpackafterwin++; + STAT(tcpstat.tcps_rcvpackafterwin++); if (todrop >= ti->ti_len) { - tcpstat.tcps_rcvbyteafterwin += ti->ti_len; + STAT(tcpstat.tcps_rcvbyteafterwin += ti->ti_len); /* * If a new connection request is received * while in TIME_WAIT, drop the old connection @@ -922,8 +917,8 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * are above the previous ones. */ if (tiflags & TH_SYN && - tp->t_state == TCPS_TIME_WAIT && - SEQ_GT(ti->ti_seq, tp->rcv_nxt)) { + tp->t_state == TCPS_TIME_WAIT && + SEQ_GT(ti->ti_seq, tp->rcv_nxt)) { iss = tp->rcv_nxt + TCP_ISSINCR; tp = tcp_close(tp); goto findso; @@ -937,56 +932,54 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) */ if (tp->rcv_wnd == 0 && ti->ti_seq == tp->rcv_nxt) { tp->t_flags |= TF_ACKNOW; - tcpstat.tcps_rcvwinprobe++; - } - else + STAT(tcpstat.tcps_rcvwinprobe++); + } else goto dropafterack; - } - else - tcpstat.tcps_rcvbyteafterwin += todrop; + } else + STAT(tcpstat.tcps_rcvbyteafterwin += todrop); m_adj(m, -todrop); ti->ti_len -= todrop; - tiflags &= ~(TH_PUSH | TH_FIN); + tiflags &= ~(TH_PUSH|TH_FIN); } /* * If last ACK falls within this segment's sequence numbers, * record its timestamp. */ - /* if (ts_present && SEQ_LEQ(ti->ti_seq, tp->last_ack_sent) && - * SEQ_LT(tp->last_ack_sent, ti->ti_seq + ti->ti_len + - * ((tiflags & (TH_SYN|TH_FIN)) != 0))) { - * tp->ts_recent_age = tcp_now; - * tp->ts_recent = ts_val; - * } - */ +/* if (ts_present && SEQ_LEQ(ti->ti_seq, tp->last_ack_sent) && + * SEQ_LT(tp->last_ack_sent, ti->ti_seq + ti->ti_len + + * ((tiflags & (TH_SYN|TH_FIN)) != 0))) { + * tp->ts_recent_age = tcp_now; + * tp->ts_recent = ts_val; + * } + */ - /* - * If the RST bit is set examine the state: - * SYN_RECEIVED STATE: - * If passive open, return to LISTEN state. - * If active open, inform user that connection was refused. - * ESTABLISHED, FIN_WAIT_1, FIN_WAIT2, CLOSE_WAIT STATES: - * Inform user that connection was reset, and close tcb. - * CLOSING, LAST_ACK, TIME_WAIT STATES - * Close the tcb. - */ + /* + * If the RST bit is set examine the state: + * SYN_RECEIVED STATE: + * If passive open, return to LISTEN state. + * If active open, inform user that connection was refused. + * ESTABLISHED, FIN_WAIT_1, FIN_WAIT2, CLOSE_WAIT STATES: + * Inform user that connection was reset, and close tcb. + * CLOSING, LAST_ACK, TIME_WAIT STATES + * Close the tcb. + */ if (tiflags&TH_RST) switch (tp->t_state) { case TCPS_SYN_RECEIVED: - /* so->so_error = ECONNREFUSED; */ +/* so->so_error = ECONNREFUSED; */ goto close; case TCPS_ESTABLISHED: case TCPS_FIN_WAIT_1: case TCPS_FIN_WAIT_2: case TCPS_CLOSE_WAIT: - /* so->so_error = ECONNRESET; */ - close: - tp->t_state = TCPS_CLOSED; - tcpstat.tcps_drops++; - tp = tcp_close(tp); - goto drop; +/* so->so_error = ECONNRESET; */ + close: + tp->t_state = TCPS_CLOSED; + STAT(tcpstat.tcps_drops++); + tp = tcp_close(tp); + goto drop; case TCPS_CLOSING: case TCPS_LAST_ACK: @@ -1000,7 +993,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * error and we send an RST and drop the connection. */ if (tiflags & TH_SYN) { - tp = tcp_drop(tp, 0); + tp = tcp_drop(tp,0); goto dropwithreset; } @@ -1013,17 +1006,17 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * Ack processing. */ switch (tp->t_state) { - /* - * In SYN_RECEIVED state if the ack ACKs our SYN then enter - * ESTABLISHED state and continue processing, otherwise - * send an RST. una<=ack<=max - */ + /* + * In SYN_RECEIVED state if the ack ACKs our SYN then enter + * ESTABLISHED state and continue processing, otherwise + * send an RST. una<=ack<=max + */ case TCPS_SYN_RECEIVED: if (SEQ_GT(tp->snd_una, ti->ti_ack) || - SEQ_GT(ti->ti_ack, tp->snd_max)) + SEQ_GT(ti->ti_ack, tp->snd_max)) goto dropwithreset; - tcpstat.tcps_connects++; + STAT(tcpstat.tcps_connects++); tp->t_state = TCPS_ESTABLISHED; /* * The sent SYN is ack'ed with our sequence number +1 @@ -1032,24 +1025,21 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * SS_CTL since the buffer is empty otherwise. * tp->snd_una++; or: */ - tp->snd_una = ti->ti_ack; + tp->snd_una=ti->ti_ack; if (so->so_state & SS_CTL) { - /* So tcp_ctl reports the right state */ - ret = tcp_ctl(so); - if (ret == 1) { - soisfconnected(so); - so->so_state &= ~SS_CTL; /* success XXX */ - } - else if (ret == 2) { - so->so_state = SS_NOFDREF; /* CTL_CMD */ - } - else { - needoutput = 1; - tp->t_state = TCPS_FIN_WAIT_1; - } - } - else { - soisfconnected(so); + /* So tcp_ctl reports the right state */ + ret = tcp_ctl(so); + if (ret == 1) { + soisfconnected(so); + so->so_state &= ~SS_CTL; /* success XXX */ + } else if (ret == 2) { + so->so_state = SS_NOFDREF; /* CTL_CMD */ + } else { + needoutput = 1; + tp->t_state = TCPS_FIN_WAIT_1; + } + } else { + soisfconnected(so); } /* Do window scaling? */ @@ -1059,7 +1049,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * tp->rcv_scale = tp->request_r_scale; * } */ - (void)tcp_reass(tp, (struct tcpiphdr *)0, (struct mbuf *)0); + (void) tcp_reass(tp, (struct tcpiphdr *)0, (struct mbuf *)0); tp->snd_wl1 = ti->ti_seq - 1; /* Avoid ack processing; snd_una==ti_ack => dup ack */ goto synrx_to_est; @@ -1083,9 +1073,9 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) if (SEQ_LEQ(ti->ti_ack, tp->snd_una)) { if (ti->ti_len == 0 && tiwin == tp->snd_wnd) { - tcpstat.tcps_rcvdupack++; - DEBUG_MISC((dfd, " dup ack m = %lx so = %lx \n", - (long)m, (long)so)); + STAT(tcpstat.tcps_rcvdupack++); + DEBUG_MISC((dfd," dup ack m = %lx so = %lx \n", + (long )m, (long )so)); /* * If we have outstanding data (other than * a window probe), this is a completely @@ -1111,12 +1101,12 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * network. */ if (tp->t_timer[TCPT_REXMT] == 0 || - ti->ti_ack != tp->snd_una) + ti->ti_ack != tp->snd_una) tp->t_dupacks = 0; - else if (++tp->t_dupacks == tcprexmtthresh) { + else if (++tp->t_dupacks == TCPREXMTTHRESH) { tcp_seq onxt = tp->snd_nxt; u_int win = - min(tp->snd_wnd, tp->snd_cwnd) / 2 / + min(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_maxseg; if (win < 2) @@ -1126,20 +1116,18 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) tp->t_rtt = 0; tp->snd_nxt = ti->ti_ack; tp->snd_cwnd = tp->t_maxseg; - (void)tcp_output(tp); + (void) tcp_output(tp); tp->snd_cwnd = tp->snd_ssthresh + - tp->t_maxseg * tp->t_dupacks; + tp->t_maxseg * tp->t_dupacks; if (SEQ_GT(onxt, tp->snd_nxt)) tp->snd_nxt = onxt; goto drop; - } - else if (tp->t_dupacks > tcprexmtthresh) { + } else if (tp->t_dupacks > TCPREXMTTHRESH) { tp->snd_cwnd += tp->t_maxseg; - (void)tcp_output(tp); + (void) tcp_output(tp); goto drop; } - } - else + } else tp->t_dupacks = 0; break; } @@ -1148,17 +1136,17 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * If the congestion window was inflated to account * for the other side's cached packets, retract it. */ - if (tp->t_dupacks > tcprexmtthresh && - tp->snd_cwnd > tp->snd_ssthresh) + if (tp->t_dupacks > TCPREXMTTHRESH && + tp->snd_cwnd > tp->snd_ssthresh) tp->snd_cwnd = tp->snd_ssthresh; tp->t_dupacks = 0; if (SEQ_GT(ti->ti_ack, tp->snd_max)) { - tcpstat.tcps_rcvacktoomuch++; + STAT(tcpstat.tcps_rcvacktoomuch++); goto dropafterack; } acked = ti->ti_ack - tp->snd_una; - tcpstat.tcps_rcvackpack++; - tcpstat.tcps_rcvackbyte += acked; + STAT(tcpstat.tcps_rcvackpack++); + STAT(tcpstat.tcps_rcvackbyte += acked); /* * If we have a timestamp reply, update smoothed @@ -1169,12 +1157,12 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * timer backoff (cf., Phil Karn's retransmit alg.). * Recompute the initial retransmit timer. */ - /* if (ts_present) - * tcp_xmit_timer(tp, tcp_now-ts_ecr+1); - * else - */ - if (tp->t_rtt && SEQ_GT(ti->ti_ack, tp->t_rtseq)) - tcp_xmit_timer(tp, tp->t_rtt); +/* if (ts_present) + * tcp_xmit_timer(tp, tcp_now-ts_ecr+1); + * else + */ + if (tp->t_rtt && SEQ_GT(ti->ti_ack, tp->t_rtseq)) + tcp_xmit_timer(tp,tp->t_rtt); /* * If all outstanding data is acked, stop retransmit @@ -1185,8 +1173,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) if (ti->ti_ack == tp->snd_max) { tp->t_timer[TCPT_REXMT] = 0; needoutput = 1; - } - else if (tp->t_timer[TCPT_PERSIST] == 0) + } else if (tp->t_timer[TCPT_PERSIST] == 0) tp->t_timer[TCPT_REXMT] = tp->t_rxtcur; /* * When new data is acked, open the congestion window. @@ -1196,19 +1183,18 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * (maxseg^2 / cwnd per packet). */ { - register u_int cw = tp->snd_cwnd; - register u_int incr = tp->t_maxseg; + register u_int cw = tp->snd_cwnd; + register u_int incr = tp->t_maxseg; - if (cw > tp->snd_ssthresh) - incr = incr * incr / cw; - tp->snd_cwnd = min(cw + incr, (u_int32_t) (TCP_MAXWIN << tp->snd_scale)); + if (cw > tp->snd_ssthresh) + incr = incr * incr / cw; + tp->snd_cwnd = min(cw + incr, TCP_MAXWIN<snd_scale); } if (acked > so->so_snd.sb_cc) { tp->snd_wnd -= so->so_snd.sb_cc; - sbdrop(&so->so_snd, so->so_snd.sb_cc); + sbdrop(&so->so_snd, (int )so->so_snd.sb_cc); ourfinisacked = 1; - } - else { + } else { sbdrop(&so->so_snd, acked); tp->snd_wnd -= acked; ourfinisacked = 0; @@ -1217,20 +1203,20 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * XXX sowwakup is called when data is acked and there's room for * for more data... it should read() the socket */ - /* if (so->so_snd.sb_flags & SB_NOTIFY) - * sowwakeup(so); - */ +/* if (so->so_snd.sb_flags & SB_NOTIFY) + * sowwakeup(so); + */ tp->snd_una = ti->ti_ack; if (SEQ_LT(tp->snd_nxt, tp->snd_una)) tp->snd_nxt = tp->snd_una; switch (tp->t_state) { - /* - * In FIN_WAIT_1 STATE in addition to the processing - * for the ESTABLISHED state if our FIN is now acknowledged - * then enter FIN_WAIT_2. - */ + /* + * In FIN_WAIT_1 STATE in addition to the processing + * for the ESTABLISHED state if our FIN is now acknowledged + * then enter FIN_WAIT_2. + */ case TCPS_FIN_WAIT_1: if (ourfinisacked) { /* @@ -1242,18 +1228,18 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) */ if (so->so_state & SS_FCANTRCVMORE) { soisfdisconnected(so); - tp->t_timer[TCPT_2MSL] = tcp_maxidle; + tp->t_timer[TCPT_2MSL] = TCP_MAXIDLE; } tp->t_state = TCPS_FIN_WAIT_2; } break; - /* - * In CLOSING STATE in addition to the processing for - * the ESTABLISHED state if the ACK acknowledges our FIN - * then enter the TIME-WAIT state, otherwise ignore - * the segment. - */ + /* + * In CLOSING STATE in addition to the processing for + * the ESTABLISHED state if the ACK acknowledges our FIN + * then enter the TIME-WAIT state, otherwise ignore + * the segment. + */ case TCPS_CLOSING: if (ourfinisacked) { tp->t_state = TCPS_TIME_WAIT; @@ -1263,12 +1249,12 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) } break; - /* - * In LAST_ACK, we may still be waiting for data to drain - * and/or to be acked, as well as for the ack of our FIN. - * If our FIN is now acknowledged, delete the TCB, - * enter the closed state and return. - */ + /* + * In LAST_ACK, we may still be waiting for data to drain + * and/or to be acked, as well as for the ack of our FIN. + * If our FIN is now acknowledged, delete the TCB, + * enter the closed state and return. + */ case TCPS_LAST_ACK: if (ourfinisacked) { tp = tcp_close(tp); @@ -1276,11 +1262,11 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) } break; - /* - * In TIME_WAIT state the only thing that should arrive - * is a retransmission of the remote FIN. Acknowledge - * it and restart the finack timer. - */ + /* + * In TIME_WAIT state the only thing that should arrive + * is a retransmission of the remote FIN. Acknowledge + * it and restart the finack timer. + */ case TCPS_TIME_WAIT: tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL; goto dropafterack; @@ -1293,13 +1279,13 @@ step6: * Don't look at window if no ACK: TAC's send garbage on first SYN. */ if ((tiflags & TH_ACK) && - (SEQ_LT(tp->snd_wl1, ti->ti_seq) || - (tp->snd_wl1 == ti->ti_seq && (SEQ_LT(tp->snd_wl2, ti->ti_ack) || - (tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd))))) { + (SEQ_LT(tp->snd_wl1, ti->ti_seq) || + (tp->snd_wl1 == ti->ti_seq && (SEQ_LT(tp->snd_wl2, ti->ti_ack) || + (tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd))))) { /* keep track of pure window updates */ if (ti->ti_len == 0 && - tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd) - tcpstat.tcps_rcvwinupd++; + tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd) + STAT(tcpstat.tcps_rcvwinupd++); tp->snd_wnd = tiwin; tp->snd_wl1 = ti->ti_seq; tp->snd_wl2 = ti->ti_ack; @@ -1312,7 +1298,7 @@ step6: * Process segments with URG. */ if ((tiflags & TH_URG) && ti->ti_urp && - TCPS_HAVERCVDFIN(tp->t_state) == 0) { + TCPS_HAVERCVDFIN(tp->t_state) == 0) { /* * This is a kludge, but if we receive and accept * random urgent pointers, we'll crash in @@ -1338,22 +1324,21 @@ step6: * of data past the urgent section as the original * spec states (in one of two places). */ - if (SEQ_GT(ti->ti_seq + ti->ti_urp, tp->rcv_up)) { + if (SEQ_GT(ti->ti_seq+ti->ti_urp, tp->rcv_up)) { tp->rcv_up = ti->ti_seq + ti->ti_urp; - so->so_urgc = so->so_rcv.sb_cc + + so->so_urgc = so->so_rcv.sb_cc + (tp->rcv_up - tp->rcv_nxt); /* -1; */ tp->rcv_up = ti->ti_seq + ti->ti_urp; } - } - else + } else /* * If no out of band data is expected, * pull receive urgent pointer along * with the receive window. */ if (SEQ_GT(tp->rcv_nxt, tp->rcv_up)) - tp->rcv_up = tp->rcv_nxt; + tp->rcv_up = tp->rcv_nxt; dodata: /* @@ -1365,7 +1350,7 @@ dodata: * connection then we just ignore the text. */ if ((ti->ti_len || (tiflags&TH_FIN)) && - TCPS_HAVERCVDFIN(tp->t_state) == 0) { + TCPS_HAVERCVDFIN(tp->t_state) == 0) { TCP_REASS(tp, ti, m, so, tiflags); /* * Note the amount of data that peer has sent into @@ -1373,8 +1358,7 @@ dodata: * buffer size. */ len = so->so_rcv.sb_datalen - (tp->rcv_adv - tp->rcv_nxt); - } - else { + } else { m_free(m); tiflags &= ~TH_FIN; } @@ -1388,13 +1372,13 @@ dodata: /* * If we receive a FIN we can't send more data, * set it SS_FDRAIN - * Shutdown the socket if there is no rx data in the + * Shutdown the socket if there is no rx data in the * buffer. * soread() is called on completion of shutdown() and * will got to TCPS_LAST_ACK, and use tcp_output() * to send the FIN. */ - /* sofcantrcvmore(so); */ +/* sofcantrcvmore(so); */ sofwdrain(so); tp->t_flags |= TF_ACKNOW; @@ -1402,31 +1386,31 @@ dodata: } switch (tp->t_state) { - /* - * In SYN_RECEIVED and ESTABLISHED STATES - * enter the CLOSE_WAIT state. - */ + /* + * In SYN_RECEIVED and ESTABLISHED STATES + * enter the CLOSE_WAIT state. + */ case TCPS_SYN_RECEIVED: case TCPS_ESTABLISHED: - if (so->so_emu == EMU_CTL) /* no shutdown on socket */ - tp->t_state = TCPS_LAST_ACK; - else - tp->t_state = TCPS_CLOSE_WAIT; - break; + if(so->so_emu == EMU_CTL) /* no shutdown on socket */ + tp->t_state = TCPS_LAST_ACK; + else + tp->t_state = TCPS_CLOSE_WAIT; + break; - /* - * If still in FIN_WAIT_1 STATE FIN has not been acked so - * enter the CLOSING state. - */ + /* + * If still in FIN_WAIT_1 STATE FIN has not been acked so + * enter the CLOSING state. + */ case TCPS_FIN_WAIT_1: tp->t_state = TCPS_CLOSING; break; - /* - * In FIN_WAIT_2 state enter the TIME_WAIT state, - * starting the time-wait timer, turning off the other - * standard timers. - */ + /* + * In FIN_WAIT_2 state enter the TIME_WAIT state, + * starting the time-wait timer, turning off the other + * standard timers. + */ case TCPS_FIN_WAIT_2: tp->t_state = TCPS_TIME_WAIT; tcp_canceltimers(tp); @@ -1434,9 +1418,9 @@ dodata: soisfdisconnected(so); break; - /* - * In TIME_WAIT state restart the 2 MSL time_wait timer. - */ + /* + * In TIME_WAIT state restart the 2 MSL time_wait timer. + */ case TCPS_TIME_WAIT: tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL; break; @@ -1450,15 +1434,15 @@ dodata: * * See above. */ - /* if (ti->ti_len && (unsigned)ti->ti_len < tp->t_maxseg) { - */ - /* if ((ti->ti_len && (unsigned)ti->ti_len < tp->t_maxseg && - * (so->so_iptos & IPTOS_LOWDELAY) == 0) || - * ((so->so_iptos & IPTOS_LOWDELAY) && - * ((struct tcpiphdr_2 *)ti)->first_char == (char)27)) { - */ +/* if (ti->ti_len && (unsigned)ti->ti_len < tp->t_maxseg) { + */ +/* if ((ti->ti_len && (unsigned)ti->ti_len < tp->t_maxseg && + * (so->so_iptos & IPTOS_LOWDELAY) == 0) || + * ((so->so_iptos & IPTOS_LOWDELAY) && + * ((struct tcpiphdr_2 *)ti)->first_char == (char)27)) { + */ if (ti->ti_len && (unsigned)ti->ti_len <= 5 && - ((struct tcpiphdr_2 *)ti)->first_char == (char)27) { + ((struct tcpiphdr_2 *)ti)->first_char == (char)27) { tp->t_flags |= TF_ACKNOW; } @@ -1466,7 +1450,7 @@ dodata: * Return any desired output. */ if (needoutput || (tp->t_flags & TF_ACKNOW)) { - (void)tcp_output(tp); + (void) tcp_output(tp); } return; @@ -1479,7 +1463,7 @@ dropafterack: goto drop; m_freem(m); tp->t_flags |= TF_ACKNOW; - (void)tcp_output(tp); + (void) tcp_output(tp); return; dropwithreset: @@ -1488,8 +1472,8 @@ dropwithreset: tcp_respond(tp, ti, m, (tcp_seq)0, ti->ti_ack, TH_RST); else { if (tiflags & TH_SYN) ti->ti_len++; - tcp_respond(tp, ti, m, ti->ti_seq + ti->ti_len, (tcp_seq)0, - TH_RST | TH_ACK); + tcp_respond(tp, ti, m, ti->ti_seq+ti->ti_len, (tcp_seq)0, + TH_RST|TH_ACK); } return; @@ -1507,7 +1491,7 @@ drop: /* int *ts_present; * u_int32_t *ts_val, *ts_ecr; */ -void +static void tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti) { u_int16_t mss; @@ -1539,7 +1523,7 @@ tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti) continue; memcpy((char *) &mss, (char *) cp + 2, sizeof(mss)); NTOHS(mss); - tcp_mss(tp, mss); /* sets t_maxseg */ + (void) tcp_mss(tp, mss); /* sets t_maxseg */ break; /* case TCPOPT_WINDOW: @@ -1560,7 +1544,7 @@ tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti) * memcpy((char *) ts_ecr, (char *)cp + 6, sizeof(*ts_ecr)); * NTOHL(*ts_ecr); * - */ /* + */ /* * * A timestamp received in a SYN makes * * it ok to send timestamp requests and replies. * */ @@ -1584,10 +1568,14 @@ tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti) #ifdef notdef -void tcp_pulloutofband(struct socket *so, struct tcpiphdr *ti, register struct mbuf *m) +void +tcp_pulloutofband(so, ti, m) + struct socket *so; + struct tcpiphdr *ti; + register struct mbuf *m; { int cnt = ti->ti_urp - 1; - + while (cnt >= 0) { if (m->m_len > cnt) { char *cp = mtod(m, caddr_t) + cnt; @@ -1614,15 +1602,16 @@ void tcp_pulloutofband(struct socket *so, struct tcpiphdr *ti, register struct m * and update averages and current timeout. */ -void tcp_xmit_timer(register struct tcpcb *tp, int rtt) +static void +tcp_xmit_timer(register struct tcpcb *tp, int rtt) { register short delta; DEBUG_CALL("tcp_xmit_timer"); DEBUG_ARG("tp = %lx", (long)tp); DEBUG_ARG("rtt = %d", rtt); - - tcpstat.tcps_rttupdated++; + + STAT(tcpstat.tcps_rttupdated++); if (tp->t_srtt != 0) { /* * srtt is stored as fixed point with 3 bits after the @@ -1650,7 +1639,7 @@ void tcp_xmit_timer(register struct tcpcb *tp, int rtt) if ((tp->t_rttvar += delta) <= 0) tp->t_rttvar = 1; } else { - /* + /* * No rtt measurement yet - use the unsmoothed rtt. * Set the variance to half the rtt (so our first * retransmit happens at 3*rtt). @@ -1674,7 +1663,7 @@ void tcp_xmit_timer(register struct tcpcb *tp, int rtt) */ TCPT_RANGESET(tp->t_rxtcur, TCP_REXMTVAL(tp), (short)tp->t_rttmin, TCPTV_REXMTMAX); /* XXX */ - + /* * We received an ack for a packet that wasn't retransmitted; * it is probably safe to discard any error indications we've @@ -1701,28 +1690,35 @@ void tcp_xmit_timer(register struct tcpcb *tp, int rtt) * parameters from pre-set or cached values in the routing entry. */ -u_int tcp_mss(register struct tcpcb *tp, u_int offer) +int +tcp_mss(tp, offer) + register struct tcpcb *tp; + u_int offer; { struct socket *so = tp->t_socket; - u_int mss; - + int mss; + DEBUG_CALL("tcp_mss"); DEBUG_ARG("tp = %lx", (long)tp); DEBUG_ARG("offer = %d", offer); - - mss = min(if_mtu, if_mru) - sizeof(struct tcpiphdr); + + mss = min(IF_MTU, IF_MRU) - sizeof(struct tcpiphdr); if (offer) mss = min(mss, offer); mss = max(mss, 32); if (mss < tp->t_maxseg || offer != 0) tp->t_maxseg = mss; - + tp->snd_cwnd = mss; - - sbreserve(&so->so_snd, tcp_sndspace+((tcp_sndspace%mss)?(mss-(tcp_sndspace%mss)):0)); - sbreserve(&so->so_rcv, tcp_rcvspace+((tcp_rcvspace%mss)?(mss-(tcp_rcvspace%mss)):0)); - + + sbreserve(&so->so_snd, TCP_SNDSPACE + ((TCP_SNDSPACE % mss) ? + (mss - (TCP_SNDSPACE % mss)) : + 0)); + sbreserve(&so->so_rcv, TCP_RCVSPACE + ((TCP_RCVSPACE % mss) ? + (mss - (TCP_RCVSPACE % mss)) : + 0)); + DEBUG_MISC((dfd, " returning mss = %d\n", mss)); - + return mss; } diff --git a/BasiliskII/src/slirp/tcp_output.c b/BasiliskII/src/slirp/tcp_output.c index 01df0118..dba4ed7a 100644 --- a/BasiliskII/src/slirp/tcp_output.c +++ b/BasiliskII/src/slirp/tcp_output.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -33,8 +37,8 @@ /* * Changes and additions relating to SLiRP * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -44,16 +48,16 @@ * Since this is only used in "stats socket", we give meaning * names instead of the REAL names */ -char *tcpstates[] = { +const char * const tcpstates[] = { /* "CLOSED", "LISTEN", "SYN_SENT", "SYN_RCVD", */ "REDIRECT", "LISTEN", "SYN_SENT", "SYN_RCVD", "ESTABLISHED", "CLOSE_WAIT", "FIN_WAIT_1", "CLOSING", "LAST_ACK", "FIN_WAIT_2", "TIME_WAIT", }; -u_char tcp_outflags[TCP_NSTATES] = { +static const u_char tcp_outflags[TCP_NSTATES] = { TH_RST|TH_ACK, 0, TH_SYN, TH_SYN|TH_ACK, - TH_ACK, TH_ACK, TH_FIN|TH_ACK, TH_FIN|TH_ACK, + TH_ACK, TH_ACK, TH_FIN|TH_ACK, TH_FIN|TH_ACK, TH_FIN|TH_ACK, TH_ACK, TH_ACK, }; @@ -63,7 +67,9 @@ u_char tcp_outflags[TCP_NSTATES] = { /* * Tcp output routine: figure out what should be sent and send it. */ -int tcp_output(register struct tcpcb *tp) +int +tcp_output(tp) + register struct tcpcb *tp; { register struct socket *so = tp->t_socket; register long len, win; @@ -73,10 +79,10 @@ int tcp_output(register struct tcpcb *tp) u_char opt[MAX_TCPOPTLEN]; unsigned optlen, hdrlen; int idle, sendalot; - + DEBUG_CALL("tcp_output"); DEBUG_ARG("tp = %lx", (long )tp); - + /* * Determine length of data that should be transmitted, * and flags that will be used. @@ -97,9 +103,9 @@ again: win = min(tp->snd_wnd, tp->snd_cwnd); flags = tcp_outflags[tp->t_state]; - + DEBUG_MISC((dfd, " --- tcp_output flags = 0x%x\n",flags)); - + /* * If in persist timeout with window of 0, send 1 byte. * Otherwise, if window is small but nonzero @@ -124,7 +130,7 @@ again: * to send then the probe will be the FIN * itself. */ - if (off < (int)so->so_snd.sb_cc) + if (off < so->so_snd.sb_cc) flags &= ~TH_FIN; win = 1; } else { @@ -152,7 +158,7 @@ again: tp->snd_nxt = tp->snd_una; } } - + if (len > tp->t_maxseg) { len = tp->t_maxseg; sendalot = 1; @@ -194,17 +200,17 @@ again: * window, then want to send a window update to peer. */ if (win > 0) { - /* + /* * "adv" is the amount we can increase the window, * taking into account that we are limited by * TCP_MAXWIN << tp->rcv_scale. */ - long adv = min(win, TCP_MAXWIN << tp->rcv_scale) - + long adv = min(win, (long)TCP_MAXWIN << tp->rcv_scale) - (tp->rcv_adv - tp->rcv_nxt); - if (adv >= (long)(2 * tp->t_maxseg)) + if (adv >= (long) (2 * tp->t_maxseg)) goto send; - if (2 * adv >= (long)so->so_rcv.sb_datalen) + if (2 * adv >= (long) so->so_rcv.sb_datalen) goto send; } @@ -257,8 +263,8 @@ again: /* * No reason to send a segment, just return. */ - tcpstat.tcps_didnuttin++; - + STAT(tcpstat.tcps_didnuttin++); + return (0); send: @@ -296,9 +302,9 @@ send: */ } } - + /* - * Send a timestamp and echo-reply if this is a SYN and our side + * Send a timestamp and echo-reply if this is a SYN and our side * wants to use timestamps (TF_REQ_TSTMP is set) or both our side * and our peer have sent timestamps in our SYN's. */ @@ -316,7 +322,7 @@ send: * } */ hdrlen += optlen; - + /* * Adjust data length if insertion of options will * bump the packet length beyond the t_maxseg length. @@ -333,13 +339,13 @@ send: */ if (len) { if (tp->t_force && len == 1) - tcpstat.tcps_sndprobe++; + STAT(tcpstat.tcps_sndprobe++); else if (SEQ_LT(tp->snd_nxt, tp->snd_max)) { - tcpstat.tcps_sndrexmitpack++; - tcpstat.tcps_sndrexmitbyte += len; + STAT(tcpstat.tcps_sndrexmitpack++); + STAT(tcpstat.tcps_sndrexmitbyte += len); } else { - tcpstat.tcps_sndpack++; - tcpstat.tcps_sndbyte += len; + STAT(tcpstat.tcps_sndpack++); + STAT(tcpstat.tcps_sndbyte += len); } m = m_get(); @@ -348,16 +354,16 @@ send: error = 1; goto out; } - m->m_data += if_maxlinkhdr; + m->m_data += IF_MAXLINKHDR; m->m_len = hdrlen; - - /* + + /* * This will always succeed, since we make sure our mbufs * are big enough to hold one MSS packet + header + ... etc. */ /* if (len <= MHLEN - hdrlen - max_linkhdr) { */ - sbcopy(&so->so_snd, off, len, mtod(m, caddr_t) + hdrlen); + sbcopy(&so->so_snd, off, (int) len, mtod(m, caddr_t) + hdrlen); m->m_len += len; /* } else { @@ -376,13 +382,13 @@ send: flags |= TH_PUSH; } else { if (tp->t_flags & TF_ACKNOW) - tcpstat.tcps_sndacks++; + STAT(tcpstat.tcps_sndacks++); else if (flags & (TH_SYN|TH_FIN|TH_RST)) - tcpstat.tcps_sndctrl++; + STAT(tcpstat.tcps_sndctrl++); else if (SEQ_GT(tp->snd_up, tp->snd_una)) - tcpstat.tcps_sndurg++; + STAT(tcpstat.tcps_sndurg++); else - tcpstat.tcps_sndwinup++; + STAT(tcpstat.tcps_sndwinup++); m = m_get(); if (m == NULL) { @@ -390,12 +396,12 @@ send: error = 1; goto out; } - m->m_data += if_maxlinkhdr; + m->m_data += IF_MAXLINKHDR; m->m_len = hdrlen; } ti = mtod(m, struct tcpiphdr *); - + memcpy((caddr_t)ti, &tp->t_template, sizeof (struct tcpiphdr)); /* @@ -403,7 +409,7 @@ send: * window for use in delaying messages about window sizes. * If resending a FIN, be sure not to use a new sequence number. */ - if (flags & TH_FIN && tp->t_flags & TF_SENTFIN && + if (flags & TH_FIN && tp->t_flags & TF_SENTFIN && tp->snd_nxt == tp->snd_max) tp->snd_nxt--; /* @@ -433,17 +439,17 @@ send: * Calculate receive window. Don't shrink window, * but avoid silly window syndrome. */ - if (win < (so->so_rcv.sb_datalen / 4) && win < tp->t_maxseg) + if (win < (long)(so->so_rcv.sb_datalen / 4) && win < (long)tp->t_maxseg) win = 0; - if (win > (u_long) (TCP_MAXWIN << tp->rcv_scale)) - win = (u_long) (TCP_MAXWIN << tp->rcv_scale); - if (win < (tp->rcv_adv - tp->rcv_nxt)) - win = (tp->rcv_adv - tp->rcv_nxt); + if (win > (long)TCP_MAXWIN << tp->rcv_scale) + win = (long)TCP_MAXWIN << tp->rcv_scale; + if (win < (long)(tp->rcv_adv - tp->rcv_nxt)) + win = (long)(tp->rcv_adv - tp->rcv_nxt); ti->ti_win = htons((u_int16_t) (win>>tp->rcv_scale)); - + if (SEQ_GT(tp->snd_up, tp->snd_una)) { ti->ti_urp = htons((u_int16_t)(tp->snd_up - ntohl(ti->ti_seq))); -#ifdef notdef +#ifdef notdef if (SEQ_GT(tp->snd_up, tp->snd_nxt)) { ti->ti_urp = htons((u_int16_t)(tp->snd_up - tp->snd_nxt)); #endif @@ -494,7 +500,7 @@ send: if (tp->t_rtt == 0) { tp->t_rtt = 1; tp->t_rtseq = startseq; - tcpstat.tcps_segstimed++; + STAT(tcpstat.tcps_segstimed++); } } @@ -525,14 +531,14 @@ send: * the template, but need a way to checksum without them. */ m->m_len = hdrlen + len; /* XXX Needed? m_len should be correct */ - - { - - ((struct ip *)ti)->ip_len = (u_int16_t) m->m_len; - ((struct ip *)ti)->ip_ttl = ip_defttl; + { + + ((struct ip *)ti)->ip_len = m->m_len; + + ((struct ip *)ti)->ip_ttl = IPDEFTTL; ((struct ip *)ti)->ip_tos = so->so_iptos; - + /* #if BSD >= 43 */ /* Don't do IP options... */ /* error = ip_output(m, tp->t_inpcb->inp_options, &tp->t_inpcb->inp_route, @@ -541,7 +547,7 @@ send: error = ip_output(so, m); /* #else - * error = ip_output(m, (struct mbuf *)0, &tp->t_inpcb->inp_route, + * error = ip_output(m, (struct mbuf *)0, &tp->t_inpcb->inp_route, * so->so_options & SO_DONTROUTE); * #endif */ @@ -561,7 +567,7 @@ out: */ return (error); } - tcpstat.tcps_sndtotal++; + STAT(tcpstat.tcps_sndtotal++); /* * Data sent (as far as we can tell). @@ -579,7 +585,9 @@ out: return (0); } -void tcp_setpersist(register struct tcpcb *tp) +void +tcp_setpersist(tp) + register struct tcpcb *tp; { int t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1; diff --git a/BasiliskII/src/slirp/tcp_subr.c b/BasiliskII/src/slirp/tcp_subr.c index 70e04b5e..ba1296d4 100644 --- a/BasiliskII/src/slirp/tcp_subr.c +++ b/BasiliskII/src/slirp/tcp_subr.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -33,37 +37,26 @@ /* * Changes and additions relating to SLiRP * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ #define WANT_SYS_IOCTL_H -#include #include /* patchable/settable parameters for tcp */ -int tcp_mssdflt = TCP_MSS; -int tcp_rttdflt = TCPTV_SRTTDFLT / PR_SLOWHZ; -int tcp_do_rfc1323 = 0; /* Don't do rfc1323 performance enhancements */ -size_t tcp_rcvspace; /* You may want to change this */ -size_t tcp_sndspace; /* Keep small if you have an error prone link */ +/* Don't do rfc1323 performance enhancements */ +#define TCP_DO_RFC1323 0 /* * Tcp initialization */ -void tcp_init() +void +tcp_init() { tcp_iss = 1; /* wrong */ tcb.so_next = tcb.so_prev = &tcb; - - /* tcp_rcvspace = our Window we advertise to the remote */ - tcp_rcvspace = TCP_RCVSPACE; - tcp_sndspace = TCP_SNDSPACE; - - /* Make sure tcp_sndspace is at least 2*MSS */ - if (tcp_sndspace < 2*(min(if_mtu, if_mru) - sizeof(struct tcpiphdr))) - tcp_sndspace = 2*(min(if_mtu, if_mru) - sizeof(struct tcpiphdr)); } /* @@ -73,7 +66,9 @@ void tcp_init() * necessary when the connection is used. */ /* struct tcpiphdr * */ -void tcp_template(struct tcpcb *tp) +void +tcp_template(tp) + struct tcpcb *tp; { struct socket *so = tp->t_socket; register struct tcpiphdr *n = &tp->t_template; @@ -86,7 +81,7 @@ void tcp_template(struct tcpcb *tp) n->ti_dst = so->so_laddr; n->ti_sport = so->so_fport; n->ti_dport = so->so_lport; - + n->ti_seq = 0; n->ti_ack = 0; n->ti_x2 = 0; @@ -110,8 +105,13 @@ void tcp_template(struct tcpcb *tp) * In any case the ack and sequence number of the transmitted * segment are as specified by the parameters. */ -void tcp_respond(struct tcpcb *tp, register struct tcpiphdr *ti, - register struct mbuf *m, tcp_seq ack, tcp_seq seq, int flags) +void +tcp_respond(tp, ti, m, ack, seq, flags) + struct tcpcb *tp; + register struct tcpiphdr *ti; + register struct mbuf *m; + tcp_seq ack, seq; + int flags; { register int tlen; int win = 0; @@ -123,7 +123,7 @@ void tcp_respond(struct tcpcb *tp, register struct tcpiphdr *ti, DEBUG_ARG("ack = %u", ack); DEBUG_ARG("seq = %u", seq); DEBUG_ARG("flags = %x", flags); - + if (tp) win = sbspace(&tp->t_socket->so_rcv); if (m == 0) { @@ -134,17 +134,17 @@ void tcp_respond(struct tcpcb *tp, register struct tcpiphdr *ti, #else tlen = 0; #endif - m->m_data += if_maxlinkhdr; + m->m_data += IF_MAXLINKHDR; *mtod(m, struct tcpiphdr *) = *ti; ti = mtod(m, struct tcpiphdr *); flags = TH_ACK; } else { - /* + /* * ti points into m so the next line is just making * the mbuf point to ti */ m->m_data = (caddr_t)ti; - + m->m_len = sizeof (struct tcpiphdr); tlen = 0; #define xchg(a,b,type) { type t; t=a; a=b; b=t; } @@ -172,11 +172,11 @@ void tcp_respond(struct tcpcb *tp, register struct tcpiphdr *ti, ti->ti_sum = cksum(m, tlen); ((struct ip *)ti)->ip_len = tlen; - if(flags & TH_RST) + if(flags & TH_RST) ((struct ip *)ti)->ip_ttl = MAXTTL; - else - ((struct ip *)ti)->ip_ttl = ip_defttl; - + else + ((struct ip *)ti)->ip_ttl = IPDEFTTL; + (void) ip_output((struct socket *)0, m); } @@ -185,38 +185,40 @@ void tcp_respond(struct tcpcb *tp, register struct tcpiphdr *ti, * empty reassembly queue and hooking it to the argument * protocol control block. */ -struct tcpcb *tcp_newtcpcb(struct socket *so) +struct tcpcb * +tcp_newtcpcb(so) + struct socket *so; { register struct tcpcb *tp; - + tp = (struct tcpcb *)malloc(sizeof(*tp)); if (tp == NULL) return ((struct tcpcb *)0); - + memset((char *) tp, 0, sizeof(struct tcpcb)); tp->seg_next = tp->seg_prev = (tcpiphdrp_32)tp; - tp->t_maxseg = tcp_mssdflt; - - tp->t_flags = tcp_do_rfc1323 ? (TF_REQ_SCALE|TF_REQ_TSTMP) : 0; + tp->t_maxseg = TCP_MSS; + + tp->t_flags = TCP_DO_RFC1323 ? (TF_REQ_SCALE|TF_REQ_TSTMP) : 0; tp->t_socket = so; - + /* * Init srtt to TCPTV_SRTTBASE (0), so we can tell that we have no * rtt estimate. Set rttvar so that srtt + 2 * rttvar gives * reasonable initial retransmit time. */ tp->t_srtt = TCPTV_SRTTBASE; - tp->t_rttvar = tcp_rttdflt * PR_SLOWHZ << 2; + tp->t_rttvar = TCPTV_SRTTDFLT << 2; tp->t_rttmin = TCPTV_MIN; - TCPT_RANGESET(tp->t_rxtcur, + TCPT_RANGESET(tp->t_rxtcur, ((TCPTV_SRTTBASE >> 2) + (TCPTV_SRTTDFLT << 2)) >> 1, TCPTV_MIN, TCPTV_REXMTMAX); tp->snd_cwnd = TCP_MAXWIN << TCP_MAX_WINSHIFT; tp->snd_ssthresh = TCP_MAXWIN << TCP_MAX_WINSHIFT; tp->t_state = TCPS_CLOSED; - + so->so_tcpcb = tp; return (tp); @@ -227,7 +229,7 @@ struct tcpcb *tcp_newtcpcb(struct socket *so) * the specified error. If connection is synchronized, * then send a RST to peer. */ -struct tcpcb *tcp_drop(struct tcpcb *tp, int err) +struct tcpcb *tcp_drop(struct tcpcb *tp, int err) { /* tcp_drop(tp, errno) register struct tcpcb *tp; @@ -238,13 +240,13 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err) DEBUG_CALL("tcp_drop"); DEBUG_ARG("tp = %lx", (long)tp); DEBUG_ARG("errno = %d", errno); - + if (TCPS_HAVERCVDSYN(tp->t_state)) { tp->t_state = TCPS_CLOSED; (void) tcp_output(tp); - tcpstat.tcps_drops++; + STAT(tcpstat.tcps_drops++); } else - tcpstat.tcps_conndrops++; + STAT(tcpstat.tcps_conndrops++); /* if (errno == ETIMEDOUT && tp->t_softerror) * errno = tp->t_softerror; */ @@ -258,7 +260,9 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err) * discard internet protocol block * wake up any sleepers */ -struct tcpcb *tcp_close(register struct tcpcb *tp) +struct tcpcb * +tcp_close(tp) + register struct tcpcb *tp; { register struct tcpiphdr *t; struct socket *so = tp->t_socket; @@ -266,7 +270,7 @@ struct tcpcb *tcp_close(register struct tcpcb *tp) DEBUG_CALL("tcp_close"); DEBUG_ARG("tp = %lx", (long )tp); - + /* free the reassembly queue, if any */ t = (struct tcpiphdr *) tp->seg_next; while (t != (struct tcpiphdr *)tp) { @@ -290,11 +294,13 @@ struct tcpcb *tcp_close(register struct tcpcb *tp) sbfree(&so->so_rcv); sbfree(&so->so_snd); sofree(so); - tcpstat.tcps_closed++; + STAT(tcpstat.tcps_closed++); return ((struct tcpcb *)0); } -void tcp_drain() +#ifdef notdef +void +tcp_drain() { /* XXX */ } @@ -303,10 +309,10 @@ void tcp_drain() * When a source quench is received, close congestion window * to one segment. We will gradually open it again as we proceed. */ +void +tcp_quench(i, errno) -#ifdef notdef - -void tcp_quench(int i, int errno) + int errno; { struct tcpcb *tp = intotcpcb(inp); @@ -330,12 +336,14 @@ void tcp_quench(int i, int errno) * for peer to send FIN or not respond to keep-alives, etc. * We can let the user exit from the close as soon as the FIN is acked. */ -void tcp_sockclosed(struct tcpcb *tp) +void +tcp_sockclosed(tp) + struct tcpcb *tp; { DEBUG_CALL("tcp_sockclosed"); DEBUG_ARG("tp = %lx", (long)tp); - + switch (tp->t_state) { case TCPS_CLOSED: @@ -361,34 +369,34 @@ void tcp_sockclosed(struct tcpcb *tp) tcp_output(tp); } -/* +/* * Connect to a host on the Internet * Called by tcp_input * Only do a connect, the tcp fields will be set in tcp_input * return 0 if there's a result of the connect, * else return -1 means we're still connecting * The return value is almost always -1 since the socket is - * nonblocking. Connect returns after the SYN is sent, and does + * nonblocking. Connect returns after the SYN is sent, and does * not wait for ACK+SYN. */ -int tcp_fconnect(struct socket *so) +int tcp_fconnect(so) + struct socket *so; { int ret=0; - + DEBUG_CALL("tcp_fconnect"); DEBUG_ARG("so = %lx", (long )so); if( (ret=so->s=socket(AF_INET,SOCK_STREAM,0)) >= 0) { int opt, s=so->s; struct sockaddr_in addr; - memset(&addr, 0, sizeof(struct sockaddr_in)); fd_nonblock(s); opt = 1; setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(opt )); opt = 1; setsockopt(s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(opt )); - + addr.sin_family = AF_INET; if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) { /* It's an alias */ @@ -405,14 +413,12 @@ int tcp_fconnect(struct socket *so) addr.sin_addr = so->so_faddr; addr.sin_port = so->so_fport; - char addrstr[INET_ADDRSTRLEN]; DEBUG_MISC((dfd, " connect()ing, addr.sin_port=%d, " - "addr.sin_addr.s_addr=%.16s\n", - ntohs(addr.sin_port), inet_ntop(AF_INET, &addr.sin_addr, - addrstr, sizeof(addrstr)))); + "addr.sin_addr.s_addr=%.16s\n", + ntohs(addr.sin_port), inet_ntoa(addr.sin_addr))); /* We don't care what port we get */ ret = connect(s,(struct sockaddr *)&addr,sizeof (addr)); - + /* * If it's not in progress, it failed, so we just return 0, * without clearing SS_NOFDREF @@ -425,27 +431,29 @@ int tcp_fconnect(struct socket *so) /* * Accept the socket and connect to the local-host - * + * * We have a problem. The correct thing to do would be * to first connect to the local-host, and only if the * connection is accepted, then do an accept() here. - * But, a) we need to know who's trying to connect + * But, a) we need to know who's trying to connect * to the socket to be able to SYN the local-host, and * b) we are already connected to the foreign host by * the time it gets to accept(), so... We simply accept * here and SYN the local-host. - */ -void tcp_connect(struct socket *inso) + */ +void +tcp_connect(inso) + struct socket *inso; { struct socket *so; struct sockaddr_in addr; - socklen_t addrlen = sizeof(struct sockaddr_in); + int addrlen = sizeof(struct sockaddr_in); struct tcpcb *tp; int s, opt; DEBUG_CALL("tcp_connect"); DEBUG_ARG("inso = %lx", (long)inso); - + /* * If it's an SS_ACCEPTONCE socket, no need to socreate() * another socket, just use the accept() socket. @@ -466,8 +474,8 @@ void tcp_connect(struct socket *inso) so->so_laddr = inso->so_laddr; so->so_lport = inso->so_lport; } - - tcp_mss(sototcpcb(so), 0); + + (void) tcp_mss(sototcpcb(so), 0); if ((s = accept(inso->s,(struct sockaddr *)&addr,&addrlen)) < 0) { tcp_close(sototcpcb(so)); /* This will sofree() as well */ @@ -480,13 +488,13 @@ void tcp_connect(struct socket *inso) setsockopt(s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(int)); opt = 1; setsockopt(s,IPPROTO_TCP,TCP_NODELAY,(char *)&opt,sizeof(int)); - + so->so_fport = addr.sin_port; so->so_faddr = addr.sin_addr; /* Translate connections from localhost to the real hostname */ if (so->so_faddr.s_addr == 0 || so->so_faddr.s_addr == loopback_addr.s_addr) so->so_faddr = alias_addr; - + /* Close the accept() socket, set right state */ if (inso->so_state & SS_FACCEPTONCE) { closesocket(so->s); /* If we only accept once, close the accept() socket */ @@ -494,12 +502,12 @@ void tcp_connect(struct socket *inso) /* if it's not FACCEPTONCE, it's already NOFDREF */ } so->s = s; - + so->so_iptos = tcp_tos(so); tp = sototcpcb(so); tcp_template(tp); - + /* Compute window scaling to request. */ /* while (tp->request_r_scale < TCP_MAX_WINSHIFT && * (TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat) @@ -507,11 +515,11 @@ void tcp_connect(struct socket *inso) */ /* soisconnecting(so); */ /* NOFDREF used instead */ - tcpstat.tcps_connattempt++; - + STAT(tcpstat.tcps_connattempt++); + tp->t_state = TCPS_SYN_SENT; tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; - tp->iss = tcp_iss; + tp->iss = tcp_iss; tcp_iss += TCP_ISSINCR/2; tcp_sendseqinit(tp); tcp_output(tp); @@ -520,11 +528,13 @@ void tcp_connect(struct socket *inso) /* * Attach a TCPCB to a socket. */ -int tcp_attach(struct socket *so) +int +tcp_attach(so) + struct socket *so; { if ((so->so_tcpcb = tcp_newtcpcb(so)) == NULL) return -1; - + insque(so, &tcb); return 0; @@ -533,7 +543,7 @@ int tcp_attach(struct socket *so) /* * Set the socket's type of service field */ -struct tos_t tcptos[] = { +static const struct tos_t tcptos[] = { {0, 20, IPTOS_THROUGHPUT, 0}, /* ftp data */ {21, 21, IPTOS_LOWDELAY, EMU_FTP}, /* ftp control */ {0, 23, IPTOS_LOWDELAY, 0}, /* telnet */ @@ -549,16 +559,21 @@ struct tos_t tcptos[] = { {0, 0, 0, 0} }; +#ifdef CONFIG_QEMU +static +#endif struct emu_t *tcpemu = 0; - + /* * Return TOS according to the above table */ -u_int8_t tcp_tos(struct socket *so) +u_int8_t +tcp_tos(so) + struct socket *so; { int i = 0; struct emu_t *emup; - + while(tcptos[i].tos) { if ((tcptos[i].fport && (ntohs(so->so_fport) == tcptos[i].fport)) || (tcptos[i].lport && (ntohs(so->so_lport) == tcptos[i].lport))) { @@ -567,7 +582,7 @@ u_int8_t tcp_tos(struct socket *so) } i++; } - + /* Nope, lets see if there's a user-added one */ for (emup = tcpemu; emup; emup = emup->next) { if ((emup->fport && (ntohs(so->so_fport) == emup->fport)) || @@ -576,68 +591,73 @@ u_int8_t tcp_tos(struct socket *so) return emup->tos; } } - + return 0; } +#if 0 int do_echo = -1; +#endif /* * Emulate programs that try and connect to us * This includes ftp (the data connection is * initiated by the server) and IRC (DCC CHAT and * DCC SEND) for now - * + * * NOTE: It's possible to crash SLiRP by sending it * unstandard strings to emulate... if this is a problem, * more checks are needed here * * XXX Assumes the whole command came in one packet - * + * * XXX Some ftp clients will have their TOS set to * LOWDELAY and so Nagel will kick in. Because of this, * we'll get the first letter, followed by the rest, so * we simply scan for ORT instead of PORT... * DCC doesn't have this problem because there's other stuff * in the packet before the DCC command. - * - * Return 1 if the mbuf m is still valid and should be + * + * Return 1 if the mbuf m is still valid and should be * sbappend()ed - * + * * NOTE: if you return 0 you MUST m_free() the mbuf! */ -int tcp_emu(struct socket *so, struct mbuf *m) +int +tcp_emu(so, m) + struct socket *so; + struct mbuf *m; { u_int n1, n2, n3, n4, n5, n6; char buff[256]; u_int32_t laddr; u_int lport; char *bptr; - + DEBUG_CALL("tcp_emu"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("m = %lx", (long)m); - + switch(so->so_emu) { int x, i; - + case EMU_IDENT: /* * Identification protocol as per rfc-1413 */ - + { struct socket *tmpso; struct sockaddr_in addr; - socklen_t addrlen = sizeof(struct sockaddr_in); + int addrlen = sizeof(struct sockaddr_in); struct sbuf *so_rcv = &so->so_rcv; - + memcpy(so_rcv->sb_wptr, m->m_data, m->m_len); so_rcv->sb_wptr += m->m_len; so_rcv->sb_rptr += m->m_len; m->m_data[m->m_len] = 0; /* NULL terminate */ if (strchr(m->m_data, '\r') || strchr(m->m_data, '\n')) { - if (sscanf(so_rcv->sb_data, "%d%*[ ,]%d", &n1, &n2) == 2) { + if (sscanf(so_rcv->sb_data, "%u%*[ ,]%u", &n1, &n2) == 2) { HTONS(n1); HTONS(n2); /* n2 is the one on our host */ @@ -660,7 +680,7 @@ int tcp_emu(struct socket *so, struct mbuf *m) m_free(m); return 0; } - + #if 0 case EMU_RLOGIN: /* @@ -675,7 +695,7 @@ int tcp_emu(struct socket *so, struct mbuf *m) char term[100]; struct sbuf *so_snd = &so->so_snd; struct sbuf *so_rcv = &so->so_rcv; - + /* First check if they have a priveladged port, or too much data has arrived */ if (ntohs(so->so_lport) > 1023 || ntohs(so->so_lport) < 512 || (m->m_len + so_rcv->sb_wptr) > (so_rcv->sb_data + so_rcv->sb_datalen)) { @@ -686,13 +706,13 @@ int tcp_emu(struct socket *so, struct mbuf *m) m_free(m); return 0; } - + /* Append the current data */ memcpy(so_rcv->sb_wptr, m->m_data, m->m_len); so_rcv->sb_wptr += m->m_len; so_rcv->sb_rptr += m->m_len; m_free(m); - + /* * Check if we have all the initial options, * and build argument list to rlogin while we're here @@ -724,10 +744,10 @@ int tcp_emu(struct socket *so, struct mbuf *m) } } } - + if (n != 4) return 0; - + /* We have it, set our term variable and fork_exec() */ #ifdef HAVE_SETENV setenv("TERM", term, 1); @@ -737,15 +757,15 @@ int tcp_emu(struct socket *so, struct mbuf *m) fork_exec(so, args, 2); term[0] = 0; so->so_emu = 0; - + /* And finally, send the client a 0 character */ so_snd->sb_wptr[0] = 0; so_snd->sb_wptr++; so_snd->sb_cc++; - + return 0; } - + case EMU_RSH: /* * rsh emulation @@ -759,7 +779,7 @@ int tcp_emu(struct socket *so, struct mbuf *m) char *args; struct sbuf *so_snd = &so->so_snd; struct sbuf *so_rcv = &so->so_rcv; - + /* First check if they have a priveladged port, or too much data has arrived */ if (ntohs(so->so_lport) > 1023 || ntohs(so->so_lport) < 512 || (m->m_len + so_rcv->sb_wptr) > (so_rcv->sb_data + so_rcv->sb_datalen)) { @@ -770,13 +790,13 @@ int tcp_emu(struct socket *so, struct mbuf *m) m_free(m); return 0; } - + /* Append the current data */ memcpy(so_rcv->sb_wptr, m->m_data, m->m_len); so_rcv->sb_wptr += m->m_len; so_rcv->sb_rptr += m->m_len; m_free(m); - + /* * Check if we have all the initial options, * and build argument list to rlogin while we're here @@ -807,20 +827,20 @@ int tcp_emu(struct socket *so, struct mbuf *m) ns->so_laddr=so->so_laddr; ns->so_lport=htons(port); - tcp_mss(sototcpcb(ns), 0); + (void) tcp_mss(sototcpcb(ns), 0); ns->so_faddr=so->so_faddr; ns->so_fport=htons(IPPORT_RESERVED-1); /* Use a fake port. */ - if (ns->so_faddr.s_addr == 0 || + if (ns->so_faddr.s_addr == 0 || ns->so_faddr.s_addr == loopback_addr.s_addr) ns->so_faddr = alias_addr; ns->so_iptos = tcp_tos(ns); tp = sototcpcb(ns); - + tcp_template(tp); - + /* Compute window scaling to request. */ /* while (tp->request_r_scale < TCP_MAX_WINSHIFT && * (TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat) @@ -829,11 +849,11 @@ int tcp_emu(struct socket *so, struct mbuf *m) /*soisfconnecting(ns);*/ - tcpstat.tcps_connattempt++; - + STAT(tcpstat.tcps_connattempt++); + tp->t_state = TCPS_SYN_SENT; tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; - tp->iss = tcp_iss; + tp->iss = tcp_iss; tcp_iss += TCP_ISSINCR/2; tcp_sendseqinit(tp); tcp_output(tp); @@ -849,19 +869,19 @@ int tcp_emu(struct socket *so, struct mbuf *m) } } } - + if (n != 4) return 0; - + rsh_exec(so,so->extra, user, inet_ntoa(so->so_faddr), args); so->so_emu = 0; so->extra=NULL; - + /* And finally, send the client a 0 character */ so_snd->sb_wptr[0] = 0; so_snd->sb_wptr++; so_snd->sb_cc++; - + return 0; } @@ -870,7 +890,7 @@ int tcp_emu(struct socket *so, struct mbuf *m) int num; struct sbuf *so_snd = &so->so_snd; struct sbuf *so_rcv = &so->so_rcv; - + /* * If there is binary data here, we save it in so->so_m */ @@ -885,16 +905,16 @@ int tcp_emu(struct socket *so, struct mbuf *m) } } } /* if(so->so_m==NULL) */ - + /* * Append the line */ sbappendsb(so_rcv, m); - + /* To avoid going over the edge of the buffer, we reset it */ if (so_snd->sb_cc == 0) so_snd->sb_wptr = so_snd->sb_rptr = so_snd->sb_data; - + /* * A bit of a hack: * If the first packet we get here is 1 byte long, then it @@ -913,13 +933,13 @@ int tcp_emu(struct socket *so, struct mbuf *m) tcp_output(sototcpcb(so)); /* XXX */ } else m_free(m); - + num = 0; while (num < so->so_rcv.sb_cc) { if (*(so->so_rcv.sb_rptr + num) == '\n' || *(so->so_rcv.sb_rptr + num) == '\r') { int n; - + *(so_rcv->sb_rptr + num) = 0; if (ctl_password && !ctl_password_ok) { /* Need a password */ @@ -956,76 +976,76 @@ do_prompt: } return 0; } -#endif +#endif case EMU_FTP: /* ftp */ *(m->m_data+m->m_len) = 0; /* NULL terminate for strstr */ if ((bptr = (char *)strstr(m->m_data, "ORT")) != NULL) { /* * Need to emulate the PORT command - */ - x = sscanf(bptr, "ORT %d,%d,%d,%d,%d,%d\r\n%256[^\177]", + */ + x = sscanf(bptr, "ORT %u,%u,%u,%u,%u,%u\r\n%256[^\177]", &n1, &n2, &n3, &n4, &n5, &n6, buff); if (x < 6) return 1; - + laddr = htonl((n1 << 24) | (n2 << 16) | (n3 << 8) | (n4)); lport = htons((n5 << 8) | (n6)); - + if ((so = solisten(0, laddr, lport, SS_FACCEPTONCE)) == NULL) return 1; - + n6 = ntohs(so->so_fport); - + n5 = (n6 >> 8) & 0xff; n6 &= 0xff; - + laddr = ntohl(so->so_faddr.s_addr); - + n1 = ((laddr >> 24) & 0xff); n2 = ((laddr >> 16) & 0xff); n3 = ((laddr >> 8) & 0xff); n4 = (laddr & 0xff); - + m->m_len = bptr - m->m_data; /* Adjust length */ - m->m_len += sprintf(bptr,"ORT %d,%d,%d,%d,%d,%d\r\n%s", + m->m_len += sprintf(bptr,"ORT %d,%d,%d,%d,%d,%d\r\n%s", n1, n2, n3, n4, n5, n6, x==7?buff:""); return 1; } else if ((bptr = (char *)strstr(m->m_data, "27 Entering")) != NULL) { /* * Need to emulate the PASV response */ - x = sscanf(bptr, "27 Entering Passive Mode (%d,%d,%d,%d,%d,%d)\r\n%256[^\177]", + x = sscanf(bptr, "27 Entering Passive Mode (%u,%u,%u,%u,%u,%u)\r\n%256[^\177]", &n1, &n2, &n3, &n4, &n5, &n6, buff); if (x < 6) return 1; - + laddr = htonl((n1 << 24) | (n2 << 16) | (n3 << 8) | (n4)); lport = htons((n5 << 8) | (n6)); - + if ((so = solisten(0, laddr, lport, SS_FACCEPTONCE)) == NULL) return 1; - + n6 = ntohs(so->so_fport); - + n5 = (n6 >> 8) & 0xff; n6 &= 0xff; - + laddr = ntohl(so->so_faddr.s_addr); - + n1 = ((laddr >> 24) & 0xff); n2 = ((laddr >> 16) & 0xff); n3 = ((laddr >> 8) & 0xff); n4 = (laddr & 0xff); - + m->m_len = bptr - m->m_data; /* Adjust length */ m->m_len += sprintf(bptr,"27 Entering Passive Mode (%d,%d,%d,%d,%d,%d)\r\n%s", n1, n2, n3, n4, n5, n6, x==7?buff:""); - + return 1; } - + return 1; - + case EMU_KSH: /* * The kshell (Kerberos rsh) and shell services both pass @@ -1034,7 +1054,7 @@ do_prompt: * of the connection as a NUL-terminated decimal ASCII string. */ so->so_emu = 0; - for (lport = 0, i = 0; i < (int) (m->m_len-1); ++i) { + for (lport = 0, i = 0; i < m->m_len-1; ++i) { if (m->m_data[i] < '0' || m->m_data[i] > '9') return 1; /* invalid number */ lport *= 10; @@ -1044,7 +1064,7 @@ do_prompt: (so = solisten(0, so->so_laddr.s_addr, htons(lport), SS_FACCEPTONCE)) != NULL) m->m_len = sprintf(m->m_data, "%d", ntohs(so->so_fport))+1; return 1; - + case EMU_IRC: /* * Need to emulate DCC CHAT, DCC SEND and DCC MOVE @@ -1052,12 +1072,12 @@ do_prompt: *(m->m_data+m->m_len) = 0; /* NULL terminate the string for strstr */ if ((bptr = (char *)strstr(m->m_data, "DCC")) == NULL) return 1; - + /* The %256s is for the broken mIRC */ if (sscanf(bptr, "DCC CHAT %256s %u %u", buff, &laddr, &lport) == 3) { if ((so = solisten(0, htonl(laddr), htons(lport), SS_FACCEPTONCE)) == NULL) return 1; - + m->m_len = bptr - m->m_data; /* Adjust length */ m->m_len += sprintf(bptr, "DCC CHAT chat %lu %u%c\n", (unsigned long)ntohl(so->so_faddr.s_addr), @@ -1065,15 +1085,15 @@ do_prompt: } else if (sscanf(bptr, "DCC SEND %256s %u %u %u", buff, &laddr, &lport, &n1) == 4) { if ((so = solisten(0, htonl(laddr), htons(lport), SS_FACCEPTONCE)) == NULL) return 1; - + m->m_len = bptr - m->m_data; /* Adjust length */ - m->m_len += sprintf(bptr, "DCC SEND %s %lu %u %u%c\n", + m->m_len += sprintf(bptr, "DCC SEND %s %lu %u %u%c\n", buff, (unsigned long)ntohl(so->so_faddr.s_addr), ntohs(so->so_fport), n1, 1); } else if (sscanf(bptr, "DCC MOVE %256s %u %u %u", buff, &laddr, &lport, &n1) == 4) { if ((so = solisten(0, htonl(laddr), htons(lport), SS_FACCEPTONCE)) == NULL) return 1; - + m->m_len = bptr - m->m_data; /* Adjust length */ m->m_len += sprintf(bptr, "DCC MOVE %s %lu %u %u%c\n", buff, (unsigned long)ntohl(so->so_faddr.s_addr), @@ -1082,7 +1102,7 @@ do_prompt: return 1; case EMU_REALAUDIO: - /* + /* * RealAudio emulation - JP. We must try to parse the incoming * data and try to find the two characters that contain the * port number. Then we redirect an udp port and replace the @@ -1090,45 +1110,45 @@ do_prompt: * * The 1.0 beta versions of the player are not supported * any more. - * + * * A typical packet for player version 1.0 (release version): - * - * 0000:50 4E 41 00 05 + * + * 0000:50 4E 41 00 05 * 0000:00 01 00 02 1B D7 00 00 67 E6 6C DC 63 00 12 50 .....×..gælÜc..P * 0010:4E 43 4C 49 45 4E 54 20 31 30 31 20 41 4C 50 48 NCLIENT 101 ALPH * 0020:41 6C 00 00 52 00 17 72 61 66 69 6C 65 73 2F 76 Al..R..rafiles/v * 0030:6F 61 2F 65 6E 67 6C 69 73 68 5F 2E 72 61 79 42 oa/english_.rayB - * + * * Now the port number 0x1BD7 is found at offset 0x04 of the * Now the port number 0x1BD7 is found at offset 0x04 of the * second packet. This time we received five bytes first and * then the rest. You never know how many bytes you get. * * A typical packet for player version 2.0 (beta): - * + * * 0000:50 4E 41 00 06 00 02 00 00 00 01 00 02 1B C1 00 PNA...........Á. * 0010:00 67 75 78 F5 63 00 0A 57 69 6E 32 2E 30 2E 30 .guxõc..Win2.0.0 * 0020:2E 35 6C 00 00 52 00 1C 72 61 66 69 6C 65 73 2F .5l..R..rafiles/ * 0030:77 65 62 73 69 74 65 2F 32 30 72 65 6C 65 61 73 website/20releas * 0040:65 2E 72 61 79 53 00 00 06 36 42 e.rayS...6B - * + * * Port number 0x1BC1 is found at offset 0x0d. - * + * * This is just a horrible switch statement. Variable ra tells * us where we're going. */ - + bptr = m->m_data; while (bptr < m->m_data + m->m_len) { u_short p; static int ra = 0; - char ra_tbl[4]; - + char ra_tbl[4]; + ra_tbl[0] = 0x50; ra_tbl[1] = 0x4e; ra_tbl[2] = 0x41; ra_tbl[3] = 0; - + switch (ra) { case 0: case 2: @@ -1138,7 +1158,7 @@ do_prompt: continue; } break; - + case 1: /* * We may get 0x50 several times, ignore them @@ -1152,15 +1172,15 @@ do_prompt: continue; } break; - - case 4: - /* + + case 4: + /* * skip version number */ bptr++; break; - - case 5: + + case 5: /* * The difference between versions 1.0 and * 2.0 is here. For future versions of @@ -1170,19 +1190,19 @@ do_prompt: bptr += 8; else bptr += 4; - break; - + break; + case 6: /* This is the field containing the port * number that RA-player is listening to. */ - lport = (((u_char*)bptr)[0] << 8) + lport = (((u_char*)bptr)[0] << 8) + ((u_char *)bptr)[1]; - if (lport < 6970) + if (lport < 6970) lport += 256; /* don't know why */ if (lport < 6970 || lport > 7170) return 1; /* failed */ - + /* try to get udp port between 6970 - 7170 */ for (p = 6970; p < 7071; p++) { if (udp_listen( htons(p), @@ -1196,17 +1216,17 @@ do_prompt: p = 0; *(u_char *)bptr++ = (p >> 8) & 0xff; *(u_char *)bptr++ = p & 0xff; - ra = 0; + ra = 0; return 1; /* port redirected, we're done */ - break; - + break; + default: - ra = 0; + ra = 0; } ra++; } - return 1; - + return 1; + default: /* Ooops, not emulated, won't call tcp_emu again */ so->so_emu = 0; @@ -1219,17 +1239,19 @@ do_prompt: * Return 0 if this connections is to be closed, 1 otherwise, * return 2 if this is a command-line connection */ -int tcp_ctl(struct socket *so) +int +tcp_ctl(so) + struct socket *so; { struct sbuf *sb = &so->so_snd; int command; struct ex_list *ex_ptr; int do_pty; // struct socket *tmpso; - + DEBUG_CALL("tcp_ctl"); DEBUG_ARG("so = %lx", (long )so); - + #if 0 /* * Check if they're authorised @@ -1239,12 +1261,12 @@ int tcp_ctl(struct socket *so) sb->sb_wptr += sb->sb_cc; return 0; } -#endif +#endif command = (ntohl(so->so_faddr.s_addr) & 0xff); - + switch(command) { default: /* Check for exec's */ - + /* * Check if it's pty_exec */ @@ -1255,12 +1277,12 @@ int tcp_ctl(struct socket *so) goto do_exec; } } - + /* * Nothing bound.. */ /* tcp_fconnect(so); */ - + /* FALLTHROUGH */ case CTL_ALIAS: sb->sb_cc = sprintf(sb->sb_wptr, @@ -1271,12 +1293,12 @@ int tcp_ctl(struct socket *so) do_exec: DEBUG_MISC((dfd, " executing %s \n",ex_ptr->ex_exec)); return(fork_exec(so, ex_ptr->ex_exec, do_pty)); - + #if 0 case CTL_CMD: for (tmpso = tcb.so_next; tmpso != &tcb; tmpso = tmpso->so_next) { - if (tmpso->so_emu == EMU_CTL && - !(tmpso->so_tcpcb? + if (tmpso->so_emu == EMU_CTL && + !(tmpso->so_tcpcb? (tmpso->so_tcpcb->t_state & (TCPS_TIME_WAIT|TCPS_LAST_ACK)) :0)) { /* Ooops, control connection already active */ diff --git a/BasiliskII/src/slirp/tcp_timer.c b/BasiliskII/src/slirp/tcp_timer.c index ab9aa580..244bad6a 100644 --- a/BasiliskII/src/slirp/tcp_timer.c +++ b/BasiliskII/src/slirp/tcp_timer.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -32,14 +36,14 @@ #include -int tcp_keepidle = TCPTV_KEEP_IDLE; -int tcp_keepintvl = TCPTV_KEEPINTVL; -int tcp_maxidle; -int so_options = DO_KEEPALIVE; - +#ifdef LOG_ENABLED struct tcpstat tcpstat; /* tcp statistics */ +#endif + u_int32_t tcp_now; /* for RFC 1323 timestamps */ +static struct tcpcb *tcp_timers(register struct tcpcb *tp, int timer); + /* * Fast timeout routine for processing delayed acks */ @@ -50,7 +54,7 @@ tcp_fasttimo() register struct tcpcb *tp; DEBUG_CALL("tcp_fasttimo"); - + so = tcb.so_next; if (so) for (; so != &tcb; so = so->so_next) @@ -58,7 +62,7 @@ tcp_fasttimo() (tp->t_flags & TF_DELACK)) { tp->t_flags &= ~TF_DELACK; tp->t_flags |= TF_ACKNOW; - tcpstat.tcps_delack++; + STAT(tcpstat.tcps_delack++); (void) tcp_output(tp); } } @@ -76,8 +80,7 @@ tcp_slowtimo() register int i; DEBUG_CALL("tcp_slowtimo"); - - tcp_maxidle = TCPTV_KEEPCNT * tcp_keepintvl; + /* * Search through tcb's and update active timers. */ @@ -123,21 +126,19 @@ tcp_canceltimers(tp) tp->t_timer[i] = 0; } -int tcp_backoff[TCP_MAXRXTSHIFT + 1] = +const int tcp_backoff[TCP_MAXRXTSHIFT + 1] = { 1, 2, 4, 8, 16, 32, 64, 64, 64, 64, 64, 64, 64 }; /* * TCP timer processing. */ -struct tcpcb * -tcp_timers(tp, timer) - register struct tcpcb *tp; - int timer; +static struct tcpcb * +tcp_timers(register struct tcpcb *tp, int timer) { register int rexmt; - + DEBUG_CALL("tcp_timers"); - + switch (timer) { /* @@ -148,8 +149,8 @@ tcp_timers(tp, timer) */ case TCPT_2MSL: if (tp->t_state != TCPS_TIME_WAIT && - tp->t_idle <= tcp_maxidle) - tp->t_timer[TCPT_2MSL] = tcp_keepintvl; + tp->t_idle <= TCP_MAXIDLE) + tp->t_timer[TCPT_2MSL] = TCPTV_KEEPINTVL; else tp = tcp_close(tp); break; @@ -160,12 +161,12 @@ tcp_timers(tp, timer) * to a longer retransmit interval and retransmit one segment. */ case TCPT_REXMT: - + /* * XXXXX If a packet has timed out, then remove all the queued * packets for that session. */ - + if (++tp->t_rxtshift > TCP_MAXRXTSHIFT) { /* * This is a hack to suit our terminal server here at the uni of canberra @@ -174,33 +175,33 @@ tcp_timers(tp, timer) * keep retransmitting it, it'll keep eating the zeroes, so we keep * retransmitting, and eventually the connection dies... * (this only happens on incoming data) - * + * * So, if we were gonna drop the connection from too many retransmits, * don't... instead halve the t_maxseg, which might break up the NULLs and * let them through - * + * * *sigh* */ - + tp->t_maxseg >>= 1; if (tp->t_maxseg < 32) { /* * We tried our best, now the connection must die! */ tp->t_rxtshift = TCP_MAXRXTSHIFT; - tcpstat.tcps_timeoutdrop++; + STAT(tcpstat.tcps_timeoutdrop++); tp = tcp_drop(tp, tp->t_softerror); /* tp->t_softerror : ETIMEDOUT); */ /* XXX */ return (tp); /* XXX */ } - + /* * Set rxtshift to 6, which is still at the maximum * backoff time */ tp->t_rxtshift = 6; } - tcpstat.tcps_rexmttimeo++; + STAT(tcpstat.tcps_rexmttimeo++); rexmt = TCP_REXMTVAL(tp) * tcp_backoff[tp->t_rxtshift]; TCPT_RANGESET(tp->t_rxtcur, rexmt, (short)tp->t_rttmin, TCPTV_REXMTMAX); /* XXX */ @@ -236,7 +237,7 @@ tcp_timers(tp, timer) * size increase exponentially with time. If the * window is larger than the path can handle, this * exponential growth results in dropped packet(s) - * almost immediately. To get more time between + * almost immediately. To get more time between * drops but still "push" the network to take advantage * of improving conditions, we switch from exponential * to linear window opening at some threshold size. @@ -263,7 +264,7 @@ tcp_timers(tp, timer) * Force a byte to be output, if possible. */ case TCPT_PERSIST: - tcpstat.tcps_persisttimeo++; + STAT(tcpstat.tcps_persisttimeo++); tcp_setpersist(tp); tp->t_force = 1; (void) tcp_output(tp); @@ -275,13 +276,13 @@ tcp_timers(tp, timer) * or drop connection if idle for too long. */ case TCPT_KEEP: - tcpstat.tcps_keeptimeo++; + STAT(tcpstat.tcps_keeptimeo++); if (tp->t_state < TCPS_ESTABLISHED) goto dropit; /* if (tp->t_socket->so_options & SO_KEEPALIVE && */ - if ((so_options) && tp->t_state <= TCPS_CLOSE_WAIT) { - if (tp->t_idle >= tcp_keepidle + tcp_maxidle) + if ((SO_OPTIONS) && tp->t_state <= TCPS_CLOSE_WAIT) { + if (tp->t_idle >= TCPTV_KEEP_IDLE + TCP_MAXIDLE) goto dropit; /* * Send a packet designed to force a response @@ -295,7 +296,7 @@ tcp_timers(tp, timer) * by the protocol spec, this requires the * correspondent TCP to respond. */ - tcpstat.tcps_keepprobe++; + STAT(tcpstat.tcps_keepprobe++); #ifdef TCP_COMPAT_42 /* * The keepalive packet must have nonzero length @@ -307,13 +308,13 @@ tcp_timers(tp, timer) tcp_respond(tp, &tp->t_template, (struct mbuf *)NULL, tp->rcv_nxt, tp->snd_una - 1, 0); #endif - tp->t_timer[TCPT_KEEP] = tcp_keepintvl; + tp->t_timer[TCPT_KEEP] = TCPTV_KEEPINTVL; } else - tp->t_timer[TCPT_KEEP] = tcp_keepidle; + tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_IDLE; break; dropit: - tcpstat.tcps_keepdrops++; + STAT(tcpstat.tcps_keepdrops++); tp = tcp_drop(tp, 0); /* ETIMEDOUT); */ break; } diff --git a/BasiliskII/src/slirp/tcp_timer.h b/BasiliskII/src/slirp/tcp_timer.h index 73fe2089..f251846b 100644 --- a/BasiliskII/src/slirp/tcp_timer.h +++ b/BasiliskII/src/slirp/tcp_timer.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -122,17 +126,12 @@ char *tcptimers[] = (tv) = (tvmax); \ } -extern int tcp_keepidle; /* time before keepalive probes begin */ -extern int tcp_keepintvl; /* time between keepalive probes */ -extern int tcp_maxidle; /* time to drop after starting probes */ -extern int tcp_ttl; /* time to live for TCP segs */ -extern int tcp_backoff[]; +extern const int tcp_backoff[]; struct tcpcb; -void tcp_fasttimo(void); -void tcp_slowtimo(void); -void tcp_canceltimers(struct tcpcb *); -struct tcpcb * tcp_timers(register struct tcpcb *, int); +void tcp_fasttimo _P((void)); +void tcp_slowtimo _P((void)); +void tcp_canceltimers _P((struct tcpcb *)); #endif diff --git a/BasiliskII/src/slirp/tcp_var.h b/BasiliskII/src/slirp/tcp_var.h index c8e99ae0..82380f93 100644 --- a/BasiliskII/src/slirp/tcp_var.h +++ b/BasiliskII/src/slirp/tcp_var.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -181,6 +185,7 @@ typedef u_int32_t mbufp_32; #endif #define REASS_MBUF(ti) (*(mbufp_32 *)&((ti)->ti_t)) +#ifdef LOG_ENABLED /* * TCP statistics. * Many of these should be kept per connection, @@ -243,6 +248,8 @@ struct tcpstat { }; extern struct tcpstat tcpstat; /* tcp statistics */ +#endif + extern u_int32_t tcp_now; /* for RFC 1323 timestamps */ #endif diff --git a/BasiliskII/src/slirp/tcpip.h b/BasiliskII/src/slirp/tcpip.h index dff5a3c9..82708b09 100644 --- a/BasiliskII/src/slirp/tcpip.h +++ b/BasiliskII/src/slirp/tcpip.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/tftp.c b/BasiliskII/src/slirp/tftp.c index 3ba2971c..562ae895 100644 --- a/BasiliskII/src/slirp/tftp.c +++ b/BasiliskII/src/slirp/tftp.c @@ -1,8 +1,8 @@ /* * tftp.c - a simple, read-only tftp server for qemu - * + * * Copyright (c) 2004 Magnus Damm - * + * * 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 @@ -26,15 +26,15 @@ struct tftp_session { int in_use; - char filename[TFTP_FILENAME_MAX]; - + unsigned char filename[TFTP_FILENAME_MAX]; + struct in_addr client_ip; u_int16_t client_port; - + int timestamp; }; -struct tftp_session tftp_sessions[TFTP_SESSIONS_MAX]; +static struct tftp_session tftp_sessions[TFTP_SESSIONS_MAX]; const char *tftp_prefix; @@ -102,8 +102,15 @@ static int tftp_read_data(struct tftp_session *spt, u_int16_t block_nr, { int fd; int bytes_read = 0; + char buffer[1024]; + int n; - fd = open(spt->filename, O_RDONLY | O_BINARY); + n = snprintf(buffer, sizeof(buffer), "%s/%s", + tftp_prefix, spt->filename); + if (n >= sizeof(buffer)) + return -1; + + fd = open(buffer, O_RDONLY | O_BINARY); if (fd < 0) { return -1; @@ -120,13 +127,53 @@ static int tftp_read_data(struct tftp_session *spt, u_int16_t block_nr, return bytes_read; } -static int tftp_send_error(struct tftp_session *spt, +static int tftp_send_oack(struct tftp_session *spt, + const char *key, uint32_t value, + struct tftp_t *recv_tp) +{ + struct sockaddr_in saddr, daddr; + struct mbuf *m; + struct tftp_t *tp; + int n = 0; + + m = m_get(); + + if (!m) + return -1; + + memset(m->m_data, 0, m->m_size); + + m->m_data += IF_MAXLINKHDR; + tp = (void *)m->m_data; + m->m_data += sizeof(struct udpiphdr); + + tp->tp_op = htons(TFTP_OACK); + n += sprintf(tp->x.tp_buf + n, "%s", key) + 1; + n += sprintf(tp->x.tp_buf + n, "%u", value) + 1; + + saddr.sin_addr = recv_tp->ip.ip_dst; + saddr.sin_port = recv_tp->udp.uh_dport; + + daddr.sin_addr = spt->client_ip; + daddr.sin_port = spt->client_port; + + m->m_len = sizeof(struct tftp_t) - 514 + n - + sizeof(struct ip) - sizeof(struct udphdr); + udp_output2(NULL, m, &saddr, &daddr, IPTOS_LOWDELAY); + + return 0; +} + + + +static int tftp_send_error(struct tftp_session *spt, u_int16_t errorcode, const char *msg, struct tftp_t *recv_tp) { struct sockaddr_in saddr, daddr; struct mbuf *m; struct tftp_t *tp; + int nobytes; m = m_get(); @@ -136,14 +183,13 @@ static int tftp_send_error(struct tftp_session *spt, memset(m->m_data, 0, m->m_size); - m->m_data += if_maxlinkhdr; + m->m_data += IF_MAXLINKHDR; tp = (void *)m->m_data; m->m_data += sizeof(struct udpiphdr); - + tp->tp_op = htons(TFTP_ERROR); tp->x.tp_error.tp_error_code = htons(errorcode); - strncpy((char *)tp->x.tp_error.tp_msg, msg, sizeof(tp->x.tp_error.tp_msg)); - tp->x.tp_error.tp_msg[sizeof(tp->x.tp_error.tp_msg)-1] = 0; + strcpy(tp->x.tp_error.tp_msg, msg); saddr.sin_addr = recv_tp->ip.ip_dst; saddr.sin_port = recv_tp->udp.uh_dport; @@ -151,7 +197,9 @@ static int tftp_send_error(struct tftp_session *spt, daddr.sin_addr = spt->client_ip; daddr.sin_port = spt->client_port; - m->m_len = sizeof(struct tftp_t) - 514 + 3 + strlen(msg) - + nobytes = 2; + + m->m_len = sizeof(struct tftp_t) - 514 + 3 + strlen(msg) - sizeof(struct ip) - sizeof(struct udphdr); udp_output2(NULL, m, &saddr, &daddr, IPTOS_LOWDELAY); @@ -161,7 +209,7 @@ static int tftp_send_error(struct tftp_session *spt, return 0; } -static int tftp_send_data(struct tftp_session *spt, +static int tftp_send_data(struct tftp_session *spt, u_int16_t block_nr, struct tftp_t *recv_tp) { @@ -182,10 +230,10 @@ static int tftp_send_data(struct tftp_session *spt, memset(m->m_data, 0, m->m_size); - m->m_data += if_maxlinkhdr; + m->m_data += IF_MAXLINKHDR; tp = (void *)m->m_data; m->m_data += sizeof(struct udpiphdr); - + tp->tp_op = htons(TFTP_DATA); tp->x.tp_data.tp_block_nr = htons(block_nr); @@ -207,7 +255,7 @@ static int tftp_send_data(struct tftp_session *spt, return -1; } - m->m_len = sizeof(struct tftp_t) - (512 - nobytes) - + m->m_len = sizeof(struct tftp_t) - (512 - nobytes) - sizeof(struct ip) - sizeof(struct udphdr); udp_output2(NULL, m, &saddr, &daddr, IPTOS_LOWDELAY); @@ -237,7 +285,7 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen) spt = &tftp_sessions[s]; src = tp->x.tp_buf; - dst = (u_int8_t *)spt->filename; + dst = spt->filename; n = pktlen - ((uint8_t *)&tp->x.tp_buf[0] - (uint8_t *)tp); /* get name */ @@ -249,28 +297,30 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen) else { return; } - + if (src[k] == '\0') { break; } } - + if (k >= n) { return; } - + k++; - + /* check mode */ if ((n - k) < 6) { return; } - + if (memcmp(&src[k], "octet\0", 6) != 0) { tftp_send_error(spt, 4, "Unsupported transfer mode", tp); return; } + k += 6; /* skipping octet */ + /* do sanity checks on the filename */ if ((spt->filename[0] != '/') @@ -282,19 +332,60 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen) /* only allow exported prefixes */ - if (!tftp_prefix - || (strncmp(spt->filename, tftp_prefix, strlen(tftp_prefix)) != 0)) { + if (!tftp_prefix) { tftp_send_error(spt, 2, "Access violation", tp); return; } /* check if the file exists */ - - if (tftp_read_data(spt, 0, (u_int8_t *)spt->filename, 0) < 0) { + + if (tftp_read_data(spt, 0, spt->filename, 0) < 0) { tftp_send_error(spt, 1, "File not found", tp); return; } + if (src[n - 1] != 0) { + tftp_send_error(spt, 2, "Access violation", tp); + return; + } + + while (k < n) { + const char *key, *value; + + key = src + k; + k += strlen(key) + 1; + + if (k >= n) { + tftp_send_error(spt, 2, "Access violation", tp); + return; + } + + value = src + k; + k += strlen(value) + 1; + + if (strcmp(key, "tsize") == 0) { + int tsize = atoi(value); + struct stat stat_p; + + if (tsize == 0 && tftp_prefix) { + char buffer[1024]; + int len; + + len = snprintf(buffer, sizeof(buffer), "%s/%s", + tftp_prefix, spt->filename); + + if (stat(buffer, &stat_p) == 0) + tsize = stat_p.st_size; + else { + tftp_send_error(spt, 1, "File not found", tp); + return; + } + } + + tftp_send_oack(spt, "tsize", tsize, tp); + } + } + tftp_send_data(spt, 1, tp); } @@ -308,8 +399,8 @@ static void tftp_handle_ack(struct tftp_t *tp, int pktlen) return; } - if (tftp_send_data(&tftp_sessions[s], - ntohs(tp->x.tp_data.tp_block_nr) + 1, + if (tftp_send_data(&tftp_sessions[s], + ntohs(tp->x.tp_data.tp_block_nr) + 1, tp) < 0) { return; } diff --git a/BasiliskII/src/slirp/tftp.h b/BasiliskII/src/slirp/tftp.h index b150a049..8f2675e0 100644 --- a/BasiliskII/src/slirp/tftp.h +++ b/BasiliskII/src/slirp/tftp.h @@ -9,32 +9,25 @@ #define TFTP_DATA 3 #define TFTP_ACK 4 #define TFTP_ERROR 5 +#define TFTP_OACK 6 #define TFTP_FILENAME_MAX 512 -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(1) -#endif - struct tftp_t { struct ip ip; struct udphdr udp; u_int16_t tp_op; union { - struct { + struct { u_int16_t tp_block_nr; u_int8_t tp_buf[512]; } tp_data; - struct { + struct { u_int16_t tp_error_code; u_int8_t tp_msg[512]; } tp_error; u_int8_t tp_buf[512 + 2]; } x; -} PACKED__; - -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) -#endif +}; void tftp_input(struct mbuf *m); diff --git a/BasiliskII/src/slirp/udp.c b/BasiliskII/src/slirp/udp.c index 9d805ff3..c48923b0 100644 --- a/BasiliskII/src/slirp/udp.c +++ b/BasiliskII/src/slirp/udp.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -33,27 +37,31 @@ /* * Changes and additions relating to SLiRP * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ -#include #include #include "ip_icmp.h" +#ifdef LOG_ENABLED struct udpstat udpstat; +#endif struct socket udb; +static u_int8_t udp_tos(struct socket *so); +static void udp_emu(struct socket *so, struct mbuf *m); + /* * UDP protocol implementation. * Per RFC 768, August, 1980. */ #ifndef COMPAT_42 -int udpcksum = 1; +#define UDPCKSUM 1 #else -int udpcksum = 0; /* XXX */ +#define UDPCKSUM 0 /* XXX */ #endif struct socket *udp_last_so = &udb; @@ -63,8 +71,8 @@ udp_init() { udb.so_next = udb.so_prev = &udb; } -/* m->m_data points at ip packet header - * m->m_len length ip packet +/* m->m_data points at ip packet header + * m->m_len length ip packet * ip->ip_len length data (IPDU) */ void @@ -76,14 +84,14 @@ udp_input(m, iphlen) register struct udphdr *uh; /* struct mbuf *opts = 0;*/ int len; - struct ip save_ip; + struct ip save_ip; struct socket *so; - + DEBUG_CALL("udp_input"); DEBUG_ARG("m = %lx", (long)m); DEBUG_ARG("iphlen = %d", iphlen); - - udpstat.udps_ipackets++; + + STAT(udpstat.udps_ipackets++); /* * Strip IP options, if any; should skip this, @@ -110,34 +118,34 @@ udp_input(m, iphlen) if (ip->ip_len != len) { if (len > ip->ip_len) { - udpstat.udps_badlen++; + STAT(udpstat.udps_badlen++); goto bad; } m_adj(m, len - ip->ip_len); ip->ip_len = len; } - + /* * Save a copy of the IP header in case we want restore it * for sending an ICMP error message in response. */ - save_ip = *ip; + save_ip = *ip; save_ip.ip_len+= iphlen; /* tcp_input subtracts this */ /* * Checksum extended UDP header and data. */ - if (udpcksum && uh->uh_sum) { + if (UDPCKSUM && uh->uh_sum) { ((struct ipovly *)ip)->ih_next = 0; ((struct ipovly *)ip)->ih_prev = 0; ((struct ipovly *)ip)->ih_x1 = 0; ((struct ipovly *)ip)->ih_len = uh->uh_ulen; /* keep uh_sum for ICMP reply - * uh->uh_sum = cksum(m, len + sizeof (struct ip)); - * if (uh->uh_sum) { + * uh->uh_sum = cksum(m, len + sizeof (struct ip)); + * if (uh->uh_sum) { */ if(cksum(m, len + sizeof(struct ip))) { - udpstat.udps_badsum++; + STAT(udpstat.udps_badsum++); goto bad; } } @@ -165,7 +173,7 @@ udp_input(m, iphlen) if (so->so_lport != uh->uh_sport || so->so_laddr.s_addr != ip->ip_src.s_addr) { struct socket *tmp; - + for (tmp = udb.so_next; tmp != &udb; tmp = tmp->so_next) { if (tmp->so_lport == uh->uh_sport && tmp->so_laddr.s_addr == ip->ip_src.s_addr) { @@ -178,11 +186,11 @@ udp_input(m, iphlen) if (tmp == &udb) { so = NULL; } else { - udpstat.udpps_pcbcachemiss++; + STAT(udpstat.udpps_pcbcachemiss++); udp_last_so = so; } } - + if (so == NULL) { /* * If there's no socket for this packet, @@ -190,22 +198,22 @@ udp_input(m, iphlen) */ if ((so = socreate()) == NULL) goto bad; if(udp_attach(so) == -1) { - DEBUG_MISC((dfd," udp_attach errno = %d-%s\n", + DEBUG_MISC((dfd," udp_attach errno = %d-%s\n", errno,strerror(errno))); sofree(so); goto bad; } - + /* * Setup fields */ /* udp_last_so = so; */ so->so_laddr = ip->ip_src; so->so_lport = uh->uh_sport; - + if ((so->so_iptos = udp_tos(so)) == 0) so->so_iptos = ip->ip_tos; - + /* * XXXXX Here, check if it's in udpexec_list, * and if it is, do the fork_exec() etc. @@ -230,7 +238,7 @@ udp_input(m, iphlen) m->m_data -= iphlen; *ip=save_ip; DEBUG_MISC((dfd,"udp tx errno = %d-%s\n",errno,strerror(errno))); - icmp_error(m, ICMP_UNREACH,ICMP_UNREACH_NET, 0,strerror(errno)); + icmp_error(m, ICMP_UNREACH,ICMP_UNREACH_NET, 0,strerror(errno)); } m_free(so->so_m); /* used for ICMP if error on sorecvfrom */ @@ -248,7 +256,7 @@ bad: return; } -int udp_output2(struct socket *so, struct mbuf *m, +int udp_output2(struct socket *so, struct mbuf *m, struct sockaddr_in *saddr, struct sockaddr_in *daddr, int iptos) { @@ -266,19 +274,16 @@ int udp_output2(struct socket *so, struct mbuf *m, */ m->m_data -= sizeof(struct udpiphdr); m->m_len += sizeof(struct udpiphdr); - + /* * Fill in mbuf with extended UDP header * and addresses and length put into network format. */ ui = mtod(m, struct udpiphdr *); - //ui->ui_next = ui->ui_prev = 0; - - memset(&ui->ui_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr)); - + ui->ui_next = ui->ui_prev = 0; ui->ui_x1 = 0; ui->ui_pr = IPPROTO_UDP; - ui->ui_len = htons((u_short) (m->m_len - sizeof(struct ip))); /* + sizeof (struct udphdr)); */ + ui->ui_len = htons(m->m_len - sizeof(struct ip)); /* + sizeof (struct udphdr)); */ /* XXXXX Check for from-one-location sockets, or from-any-location sockets */ ui->ui_src = saddr->sin_addr; ui->ui_dst = daddr->sin_addr; @@ -290,23 +295,23 @@ int udp_output2(struct socket *so, struct mbuf *m, * Stuff checksum and output datagram. */ ui->ui_sum = 0; - if (udpcksum) { + if (UDPCKSUM) { if ((ui->ui_sum = cksum(m, /* sizeof (struct udpiphdr) + */ m->m_len)) == 0) ui->ui_sum = 0xffff; } - ((struct ip *)ui)->ip_len = (u_int16_t) m->m_len; + ((struct ip *)ui)->ip_len = m->m_len; - ((struct ip *)ui)->ip_ttl = ip_defttl; + ((struct ip *)ui)->ip_ttl = IPDEFTTL; ((struct ip *)ui)->ip_tos = iptos; - - udpstat.udps_opackets++; - + + STAT(udpstat.udps_opackets++); + error = ip_output(so, m); - + return (error); } -int udp_output(struct socket *so, struct mbuf *m, +int udp_output(struct socket *so, struct mbuf *m, struct sockaddr_in *addr) { @@ -320,7 +325,7 @@ int udp_output(struct socket *so, struct mbuf *m, } daddr.sin_addr = so->so_laddr; daddr.sin_port = so->so_lport; - + return udp_output2(so, m, &saddr, &daddr, so->so_iptos); } @@ -329,22 +334,25 @@ udp_attach(so) struct socket *so; { struct sockaddr_in addr; - + if((so->s = socket(AF_INET,SOCK_DGRAM,0)) != -1) { /* * Here, we bind() the socket. Although not really needed * (sendto() on an unbound socket will bind it), it's done * here so that emulation of ytalk etc. don't have to do it */ - memset(&addr, 0, sizeof(struct sockaddr_in)); addr.sin_family = AF_INET; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; if(bind(so->s, (struct sockaddr *)&addr, sizeof(addr))<0) { - int error = WSAGetLastError(); + int lasterrno=errno; closesocket(so->s); so->s=-1; - WSASetLastError(error); +#ifdef _WIN32 + WSASetLastError(lasterrno); +#else + errno=lasterrno; +#endif } else { /* success, insert in queue */ so->so_expire = curtime + SO_EXPIRE; @@ -364,7 +372,7 @@ udp_detach(so) sofree(so); } -struct tos_t udptos[] = { +static const struct tos_t udptos[] = { {0, 53, IPTOS_LOWDELAY, 0}, /* DNS */ {517, 517, IPTOS_LOWDELAY, EMU_TALK}, /* talk */ {518, 518, IPTOS_LOWDELAY, EMU_NTALK}, /* ntalk */ @@ -372,12 +380,11 @@ struct tos_t udptos[] = { {0, 0, 0, 0} }; -u_int8_t -udp_tos(so) - struct socket *so; +static u_int8_t +udp_tos(struct socket *so) { int i = 0; - + while(udptos[i].tos) { if ((udptos[i].fport && ntohs(so->so_fport) == udptos[i].fport) || (udptos[i].lport && ntohs(so->so_lport) == udptos[i].lport)) { @@ -386,7 +393,7 @@ udp_tos(so) } i++; } - + return 0; } @@ -397,29 +404,27 @@ udp_tos(so) /* * Here, talk/ytalk/ntalk requests must be emulated */ -void -udp_emu(so, m) - struct socket *so; - struct mbuf *m; +static void +udp_emu(struct socket *so, struct mbuf *m) { struct sockaddr_in addr; - socklen_t addrlen = sizeof(addr); + int addrlen = sizeof(addr); #ifdef EMULATE_TALK CTL_MSG_OLD *omsg; CTL_MSG *nmsg; char buff[sizeof(CTL_MSG)]; u_char type; - + struct talk_request { struct talk_request *next; struct socket *udp_so; struct socket *tcp_so; } *req; - - static struct talk_request *req_tbl = 0; - + + static struct talk_request *req_tbl = 0; + #endif - + struct cu_header { uint16_t d_family; // destination family uint16_t d_port; // destination port @@ -446,7 +451,7 @@ struct cu_header { */ if (getsockname(so->s, (struct sockaddr *)&addr, &addrlen) < 0) return; - + #define IS_OLD (so->so_emu == EMU_TALK) #define COPY_MSG(dest, src) { dest->type = src->type; \ @@ -469,7 +474,7 @@ struct cu_header { OTOSIN(omsg, ctl_addr)->sin_port = addr.sin_port; OTOSIN(omsg, ctl_addr)->sin_addr = our_addr; strncpy(omsg->l_name, getlogin(), NAME_SIZE_OLD); - } else { /* new talk */ + } else { /* new talk */ omsg = (CTL_MSG_OLD *) buff; nmsg = mtod(m, CTL_MSG *); type = nmsg->type; @@ -477,10 +482,10 @@ struct cu_header { OTOSIN(nmsg, ctl_addr)->sin_addr = our_addr; strncpy(nmsg->l_name, getlogin(), NAME_SIZE_OLD); } - - if (type == LOOK_UP) + + if (type == LOOK_UP) return; /* for LOOK_UP this is enough */ - + if (IS_OLD) { /* make a copy of the message */ COPY_MSG(nmsg, omsg); nmsg->vers = 1; @@ -499,75 +504,75 @@ struct cu_header { * ports, 517 and 518. This is why we have two copies * of the message, one in old talk and one in new talk * format. - */ + */ if (type == ANNOUNCE) { int s; u_short temp_port; - + for(req = req_tbl; req; req = req->next) if (so == req->udp_so) break; /* found it */ - + if (!req) { /* no entry for so, create new */ req = (struct talk_request *) malloc(sizeof(struct talk_request)); req->udp_so = so; - req->tcp_so = solisten(0, - OTOSIN(omsg, addr)->sin_addr.s_addr, + req->tcp_so = solisten(0, + OTOSIN(omsg, addr)->sin_addr.s_addr, OTOSIN(omsg, addr)->sin_port, SS_FACCEPTONCE); req->next = req_tbl; req_tbl = req; - } - + } + /* replace port number in addr field */ addrlen = sizeof(addr); - getsockname(req->tcp_so->s, + getsockname(req->tcp_so->s, (struct sockaddr *) &addr, - &addrlen); + &addrlen); OTOSIN(omsg, addr)->sin_port = addr.sin_port; OTOSIN(omsg, addr)->sin_addr = our_addr; OTOSIN(nmsg, addr)->sin_port = addr.sin_port; - OTOSIN(nmsg, addr)->sin_addr = our_addr; - + OTOSIN(nmsg, addr)->sin_addr = our_addr; + /* send LEAVE_INVITEs */ temp_port = OTOSIN(omsg, ctl_addr)->sin_port; OTOSIN(omsg, ctl_addr)->sin_port = 0; OTOSIN(nmsg, ctl_addr)->sin_port = 0; - omsg->type = nmsg->type = LEAVE_INVITE; - + omsg->type = nmsg->type = LEAVE_INVITE; + s = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); addr.sin_addr = our_addr; addr.sin_family = AF_INET; addr.sin_port = htons(517); - sendto(s, (char *)omsg, sizeof(*omsg), 0, + sendto(s, (char *)omsg, sizeof(*omsg), 0, (struct sockaddr *)&addr, sizeof(addr)); addr.sin_port = htons(518); sendto(s, (char *)nmsg, sizeof(*nmsg), 0, (struct sockaddr *) &addr, sizeof(addr)); closesocket(s) ; - omsg->type = nmsg->type = ANNOUNCE; + omsg->type = nmsg->type = ANNOUNCE; OTOSIN(omsg, ctl_addr)->sin_port = temp_port; OTOSIN(nmsg, ctl_addr)->sin_port = temp_port; } - - /* + + /* * If it is a DELETE message, we send a copy to the * local daemons. Then we delete the entry corresponding * to our socket from the request table. */ - + if (type == DELETE) { struct talk_request *temp_req, *req_next; int s; u_short temp_port; - + temp_port = OTOSIN(omsg, ctl_addr)->sin_port; OTOSIN(omsg, ctl_addr)->sin_port = 0; OTOSIN(nmsg, ctl_addr)->sin_port = 0; - + s = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); addr.sin_addr = our_addr; addr.sin_family = AF_INET; @@ -578,7 +583,7 @@ struct cu_header { sendto(s, (char *)nmsg, sizeof(*nmsg), 0, (struct sockaddr *)&addr, sizeof(addr)); closesocket(s); - + OTOSIN(omsg, ctl_addr)->sin_port = temp_port; OTOSIN(nmsg, ctl_addr)->sin_port = temp_port; @@ -601,18 +606,18 @@ struct cu_header { } } } - - return; + + return; #endif - + case EMU_CUSEEME: - + /* * Cu-SeeMe emulation. * Hopefully the packet is more that 16 bytes long. We don't * do any other tests, just replace the address and port * fields. - */ + */ if (m->m_len >= sizeof (*cu_head)) { if (getsockname(so->s, (struct sockaddr *)&addr, &addrlen) < 0) return; @@ -620,7 +625,7 @@ struct cu_header { cu_head->s_port = addr.sin_port; cu_head->so_addr = our_addr.s_addr; } - + return; } } @@ -634,9 +639,8 @@ udp_listen(port, laddr, lport, flags) { struct sockaddr_in addr; struct socket *so; - socklen_t addrlen = sizeof(struct sockaddr_in); - int opt = 1; - + int addrlen = sizeof(struct sockaddr_in), opt = 1; + if ((so = socreate()) == NULL) { free(so); return NULL; @@ -645,7 +649,6 @@ udp_listen(port, laddr, lport, flags) so->so_expire = curtime + SO_EXPIRE; insque(so,&udb); - memset(&addr, 0, sizeof(struct sockaddr_in)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_port = port; @@ -656,20 +659,20 @@ udp_listen(port, laddr, lport, flags) } setsockopt(so->s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int)); /* setsockopt(so->s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(int)); */ - + getsockname(so->s,(struct sockaddr *)&addr,&addrlen); so->so_fport = addr.sin_port; if (addr.sin_addr.s_addr == 0 || addr.sin_addr.s_addr == loopback_addr.s_addr) so->so_faddr = alias_addr; else so->so_faddr = addr.sin_addr; - + so->so_lport = lport; so->so_laddr.s_addr = laddr; if (flags != SS_FACCEPTONCE) so->so_expire = 0; - + so->so_state = SS_ISFCONNECTED; - + return so; } diff --git a/BasiliskII/src/slirp/udp.h b/BasiliskII/src/slirp/udp.h index 7d844efe..4f69b098 100644 --- a/BasiliskII/src/slirp/udp.h +++ b/BasiliskII/src/slirp/udp.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -42,20 +46,12 @@ extern struct socket *udp_last_so; * Udp protocol header. * Per RFC 768, September, 1981. */ -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(1) -#endif - struct udphdr { u_int16_t uh_sport; /* source port */ u_int16_t uh_dport; /* destination port */ int16_t uh_ulen; /* udp length */ u_int16_t uh_sum; /* udp checksum */ -} PACKED__; - -#ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) -#endif +}; /* * UDP kernel structures and variables. @@ -76,6 +72,7 @@ struct udpiphdr { #define ui_ulen ui_u.uh_ulen #define ui_sum ui_u.uh_sum +#ifdef LOG_ENABLED struct udpstat { /* input statistics: */ u_long udps_ipackets; /* total input packets */ @@ -89,6 +86,7 @@ struct udpstat { /* output statistics: */ u_long udps_opackets; /* total output packets */ }; +#endif /* * Names for UDP sysctl objects @@ -96,19 +94,20 @@ struct udpstat { #define UDPCTL_CHECKSUM 1 /* checksum UDP packets */ #define UDPCTL_MAXID 2 +#ifdef LOG_ENABLED extern struct udpstat udpstat; +#endif + extern struct socket udb; struct mbuf; -void udp_init(void); -void udp_input(register struct mbuf *, int); -int udp_output(struct socket *, struct mbuf *, struct sockaddr_in *); -int udp_attach(struct socket *); -void udp_detach(struct socket *); -u_int8_t udp_tos(struct socket *); -void udp_emu(struct socket *, struct mbuf *); -struct socket * udp_listen(u_int, u_int32_t, u_int, int); -int udp_output2(struct socket *so, struct mbuf *m, +void udp_init _P((void)); +void udp_input _P((register struct mbuf *, int)); +int udp_output _P((struct socket *, struct mbuf *, struct sockaddr_in *)); +int udp_attach _P((struct socket *)); +void udp_detach _P((struct socket *)); +struct socket * udp_listen _P((u_int, u_int32_t, u_int, int)); +int udp_output2(struct socket *so, struct mbuf *m, struct sockaddr_in *saddr, struct sockaddr_in *daddr, int iptos); #endif From ef4725552ef0a953fceaf3e7fd5166462b70f861 Mon Sep 17 00:00:00 2001 From: jvernet Date: Tue, 3 Oct 2017 22:37:31 +0200 Subject: [PATCH 74/85] SLIRP 0.10.1 64 Bits clean ? --- BasiliskII/src/slirp/COPYRIGHT | 3 - BasiliskII/src/slirp/bootp.c | 27 +- BasiliskII/src/slirp/cksum.c | 6 +- BasiliskII/src/slirp/debug.c | 2 - BasiliskII/src/slirp/debug.h | 1 - BasiliskII/src/slirp/icmp_var.h | 6 +- BasiliskII/src/slirp/if.c | 12 +- BasiliskII/src/slirp/ip.h | 70 ++--- BasiliskII/src/slirp/ip_icmp.c | 20 +- BasiliskII/src/slirp/ip_icmp.h | 9 +- BasiliskII/src/slirp/ip_input.c | 165 +++++++----- BasiliskII/src/slirp/ip_output.c | 6 +- BasiliskII/src/slirp/libslirp.h | 7 +- BasiliskII/src/slirp/main.h | 3 + BasiliskII/src/slirp/mbuf.c | 9 +- BasiliskII/src/slirp/mbuf.h | 6 +- BasiliskII/src/slirp/misc.c | 60 +---- BasiliskII/src/slirp/misc.h | 6 +- BasiliskII/src/slirp/sbuf.c | 3 +- BasiliskII/src/slirp/slirp.c | 391 +++++++++++++++++++++++++++- BasiliskII/src/slirp/slirp.h | 14 +- BasiliskII/src/slirp/slirp_config.h | 8 +- BasiliskII/src/slirp/socket.c | 111 ++++++-- BasiliskII/src/slirp/socket.h | 10 +- BasiliskII/src/slirp/tcp.h | 6 +- BasiliskII/src/slirp/tcp_input.c | 60 +++-- BasiliskII/src/slirp/tcp_output.c | 6 +- BasiliskII/src/slirp/tcp_subr.c | 75 +++--- BasiliskII/src/slirp/tcp_timer.c | 6 +- BasiliskII/src/slirp/tcp_timer.h | 6 +- BasiliskII/src/slirp/tcp_var.h | 31 +-- BasiliskII/src/slirp/tcpip.h | 17 +- BasiliskII/src/slirp/tftp.c | 17 +- BasiliskII/src/slirp/udp.c | 26 +- BasiliskII/src/slirp/udp.h | 9 +- 35 files changed, 764 insertions(+), 450 deletions(-) diff --git a/BasiliskII/src/slirp/COPYRIGHT b/BasiliskII/src/slirp/COPYRIGHT index 3f331ee0..1bc83d49 100644 --- a/BasiliskII/src/slirp/COPYRIGHT +++ b/BasiliskII/src/slirp/COPYRIGHT @@ -25,9 +25,6 @@ The copyright terms and conditions: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this software - must display the following acknowledgment: - This product includes software developed by Danny Gasparovski. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY diff --git a/BasiliskII/src/slirp/bootp.c b/BasiliskII/src/slirp/bootp.c index 3ae3db20..ca177f40 100644 --- a/BasiliskII/src/slirp/bootp.c +++ b/BasiliskII/src/slirp/bootp.c @@ -36,7 +36,7 @@ typedef struct { uint8_t macaddr[6]; } BOOTPClient; -BOOTPClient bootp_clients[NB_ADDR]; +static BOOTPClient bootp_clients[NB_ADDR]; const char *bootp_filename; @@ -172,7 +172,8 @@ static void bootp_reply(struct bootp_t *bp) } if (bootp_filename) - snprintf(rbp->bp_file, sizeof(rbp->bp_file), "%s", bootp_filename); + snprintf((char *)rbp->bp_file, sizeof(rbp->bp_file), "%s", + bootp_filename); dprintf("offered addr=%08x\n", ntohl(daddr.sin_addr.s_addr)); @@ -190,6 +191,8 @@ static void bootp_reply(struct bootp_t *bp) rbp->bp_yiaddr = daddr.sin_addr; /* Client IP address */ rbp->bp_siaddr = saddr.sin_addr; /* Server IP address */ + daddr.sin_addr.s_addr = 0xffffffffu; + q = rbp->bp_vend; memcpy(q, rfc1533_cookie, 4); q += 4; @@ -218,16 +221,18 @@ static void bootp_reply(struct bootp_t *bp) *q++ = 0xff; *q++ = 0x00; - *q++ = RFC1533_GATEWAY; - *q++ = 4; - memcpy(q, &saddr.sin_addr, 4); - q += 4; + if (!slirp_restrict) { + *q++ = RFC1533_GATEWAY; + *q++ = 4; + memcpy(q, &saddr.sin_addr, 4); + q += 4; - *q++ = RFC1533_DNS; - *q++ = 4; - dns_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_DNS); - memcpy(q, &dns_addr, 4); - q += 4; + *q++ = RFC1533_DNS; + *q++ = 4; + dns_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_DNS); + memcpy(q, &dns_addr, 4); + q += 4; + } *q++ = RFC2132_LEASE_TIME; *q++ = 4; diff --git a/BasiliskII/src/slirp/cksum.c b/BasiliskII/src/slirp/cksum.c index b98373b5..34977ffc 100644 --- a/BasiliskII/src/slirp/cksum.c +++ b/BasiliskII/src/slirp/cksum.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/debug.c b/BasiliskII/src/slirp/debug.c index 7c8581d6..bfef5806 100644 --- a/BasiliskII/src/slirp/debug.c +++ b/BasiliskII/src/slirp/debug.c @@ -16,8 +16,6 @@ int dostats = 0; #endif int slirp_debug = 0; -extern char *strerror _P((int)); - /* Carry over one item from main.c so that the tty's restored. * Only done when the tty being used is /dev/tty --RedWolf */ #ifndef CONFIG_QEMU diff --git a/BasiliskII/src/slirp/debug.h b/BasiliskII/src/slirp/debug.h index 8a523b2e..c43eff73 100644 --- a/BasiliskII/src/slirp/debug.h +++ b/BasiliskII/src/slirp/debug.h @@ -37,4 +37,3 @@ extern int slirp_debug; #endif void debug_init _P((char *, int)); - diff --git a/BasiliskII/src/slirp/icmp_var.h b/BasiliskII/src/slirp/icmp_var.h index cd865b79..99d4c9e6 100644 --- a/BasiliskII/src/slirp/icmp_var.h +++ b/BasiliskII/src/slirp/icmp_var.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/if.c b/BasiliskII/src/slirp/if.c index 67a7b6ff..0e10f3e6 100644 --- a/BasiliskII/src/slirp/if.c +++ b/BasiliskII/src/slirp/if.c @@ -15,9 +15,8 @@ struct mbuf *next_m; /* Pointer to next mbuf to output */ #define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm)) -void -ifs_insque(ifm, ifmhead) - struct mbuf *ifm, *ifmhead; +static void +ifs_insque(struct mbuf *ifm, struct mbuf *ifmhead) { ifm->ifs_next = ifmhead->ifs_next; ifmhead->ifs_next = ifm; @@ -25,9 +24,8 @@ ifs_insque(ifm, ifmhead) ifm->ifs_next->ifs_prev = ifm; } -void -ifs_remque(ifm) - struct mbuf *ifm; +static void +ifs_remque(struct mbuf *ifm) { ifm->ifs_prev->ifs_next = ifm->ifs_next; ifm->ifs_next->ifs_prev = ifm->ifs_prev; @@ -291,7 +289,7 @@ if_start(void) } /* Encapsulate the packet for sending */ - if_encap(ifm->m_data, ifm->m_len); + if_encap((uint8_t *)ifm->m_data, ifm->m_len); m_free(ifm); diff --git a/BasiliskII/src/slirp/ip.h b/BasiliskII/src/slirp/ip.h index a8cdb0d3..7a7a9b94 100644 --- a/BasiliskII/src/slirp/ip.h +++ b/BasiliskII/src/slirp/ip.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -183,35 +179,31 @@ struct ip_timestamp { #define IP_MSS 576 /* default maximum segment size */ -#ifdef HAVE_SYS_TYPES32_H /* Overcome some Solaris 2.x junk */ -#include -#else #if SIZEOF_CHAR_P == 4 -typedef caddr_t caddr32_t; +struct mbuf_ptr { + struct mbuf *mptr; + uint32_t dummy; +}; #else -typedef u_int32_t caddr32_t; -#endif -#endif - -#if SIZEOF_CHAR_P == 4 -typedef struct ipq *ipqp_32; -typedef struct ipasfrag *ipasfragp_32; -#else -typedef caddr32_t ipqp_32; -typedef caddr32_t ipasfragp_32; +struct mbuf_ptr { + struct mbuf *mptr; +}; #endif +struct qlink { + void *next, *prev; +}; /* * Overlay for ip header used by other protocols (tcp, udp). */ struct ipovly { - caddr32_t ih_next, ih_prev; /* for protocol sequence q's */ + struct mbuf_ptr ih_mbuf; /* backpointer to mbuf */ u_int8_t ih_x1; /* (unused) */ u_int8_t ih_pr; /* protocol */ u_int16_t ih_len; /* protocol length */ struct in_addr ih_src; /* source internet address */ struct in_addr ih_dst; /* destination internet address */ -}; +} __attribute__((packed)); /* * Ip reassembly queue structure. Each fragment @@ -221,44 +213,30 @@ struct ipovly { * size 28 bytes */ struct ipq { - ipqp_32 next,prev; /* to other reass headers */ + struct qlink frag_link; /* to ip headers of fragments */ + struct qlink ip_link; /* to other reass headers */ u_int8_t ipq_ttl; /* time for reass q to live */ u_int8_t ipq_p; /* protocol of this fragment */ u_int16_t ipq_id; /* sequence id for reassembly */ - ipasfragp_32 ipq_next,ipq_prev; - /* to ip headers of fragments */ struct in_addr ipq_src,ipq_dst; }; /* * Ip header, when holding a fragment. * - * Note: ipf_next must be at same offset as ipq_next above + * Note: ipf_link must be at same offset as frag_link above */ struct ipasfrag { -#ifdef WORDS_BIGENDIAN - u_int ip_v:4, - ip_hl:4; -#else - u_int ip_hl:4, - ip_v:4; -#endif - /* BUG : u_int changed to u_int8_t. - * sizeof(u_int)==4 on linux 2.0 - */ - u_int8_t ipf_mff; /* XXX overlays ip_tos: use low bit - * to avoid destroying tos (PPPDTRuu); - * copied from (ip_off&IP_MF) */ - u_int16_t ip_len; - u_int16_t ip_id; - u_int16_t ip_off; - u_int8_t ip_ttl; - u_int8_t ip_p; - u_int16_t ip_sum; - ipasfragp_32 ipf_next; /* next fragment */ - ipasfragp_32 ipf_prev; /* previous fragment */ + struct qlink ipf_link; + struct ip ipf_ip; }; +#define ipf_off ipf_ip.ip_off +#define ipf_tos ipf_ip.ip_tos +#define ipf_len ipf_ip.ip_len +#define ipf_next ipf_link.next +#define ipf_prev ipf_link.prev + /* * Structure stored in mbuf in inpcb.ip_options * and passed to ip_output when ip options are in use. diff --git a/BasiliskII/src/slirp/ip_icmp.c b/BasiliskII/src/slirp/ip_icmp.c index d1da0a2f..4b27facf 100644 --- a/BasiliskII/src/slirp/ip_icmp.c +++ b/BasiliskII/src/slirp/ip_icmp.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -43,7 +39,7 @@ struct icmpstat icmpstat; /* The message sent when emulating PING */ /* Be nice and tell them it's just a pseudo-ping packet */ -const char icmp_ping_msg[] = "This is a pseudo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n"; +static const char icmp_ping_msg[] = "This is a pseudo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n"; /* list of actions for icmp_error() on RX of an icmp message */ static const int icmp_flush[19] = { @@ -207,12 +203,8 @@ end_error: #define ICMP_MAXDATALEN (IP_MSS-28) void -icmp_error(msrc, type, code, minsize, message) - struct mbuf *msrc; - u_char type; - u_char code; - int minsize; - char *message; +icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize, + const char *message) { unsigned hlen, shlen, s_ip_len; register struct ip *ip; @@ -228,7 +220,7 @@ icmp_error(msrc, type, code, minsize, message) /* check msrc */ if(!msrc) goto end_error; ip = mtod(msrc, struct ip *); -#if DEBUG +#ifdef DEBUG { char bufa[20], bufb[20]; strcpy(bufa, inet_ntoa(ip->ip_src)); strcpy(bufb, inet_ntoa(ip->ip_dst)); @@ -285,7 +277,7 @@ icmp_error(msrc, type, code, minsize, message) HTONS(icp->icmp_ip.ip_id); HTONS(icp->icmp_ip.ip_off); -#if DEBUG +#ifdef DEBUG if(message) { /* DEBUG : append message to ICMP packet */ int message_len; char *cpnt; diff --git a/BasiliskII/src/slirp/ip_icmp.h b/BasiliskII/src/slirp/ip_icmp.h index 8c9b5a1b..03301313 100644 --- a/BasiliskII/src/slirp/ip_icmp.h +++ b/BasiliskII/src/slirp/ip_icmp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -158,7 +154,8 @@ struct icmp { (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) void icmp_input _P((struct mbuf *, int)); -void icmp_error _P((struct mbuf *, u_char, u_char, int, char *)); +void icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize, + const char *message); void icmp_reflect _P((struct mbuf *)); #endif diff --git a/BasiliskII/src/slirp/ip_input.c b/BasiliskII/src/slirp/ip_input.c index b0468402..505149a3 100644 --- a/BasiliskII/src/slirp/ip_input.c +++ b/BasiliskII/src/slirp/ip_input.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -43,6 +39,7 @@ */ #include +#include #include "ip_icmp.h" #ifdef LOG_ENABLED @@ -51,7 +48,7 @@ struct ipstat ipstat; struct ipq ipq; -static struct ip *ip_reass(register struct ipasfrag *ip, +static struct ip *ip_reass(register struct ip *ip, register struct ipq *fp); static void ip_freef(struct ipq *fp); static void ip_enq(register struct ipasfrag *p, @@ -65,7 +62,7 @@ static void ip_deq(register struct ipasfrag *p); void ip_init() { - ipq.next = ipq.prev = (ipqp_32)&ipq; + ipq.ip_link.next = ipq.ip_link.prev = &ipq.ip_link; ip_id = tt.tv_sec & 0xffff; udp_init(); tcp_init(); @@ -136,6 +133,27 @@ ip_input(m) STAT(ipstat.ips_tooshort++); goto bad; } + + if (slirp_restrict) { + if (memcmp(&ip->ip_dst.s_addr, &special_addr, 3)) { + if (ip->ip_dst.s_addr == 0xffffffff && ip->ip_p != IPPROTO_UDP) + goto bad; + } else { + int host = ntohl(ip->ip_dst.s_addr) & 0xff; + struct ex_list *ex_ptr; + + if (host == 0xff) + goto bad; + + for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) + if (ex_ptr->ex_addr == host) + break; + + if (!ex_ptr) + goto bad; + } + } + /* Should drop packet if mbuf too long? hmmm... */ if (m->m_len > ip->ip_len) m_adj(m, ip->ip_len - m->m_len); @@ -167,18 +185,20 @@ ip_input(m) */ if (ip->ip_off &~ IP_DF) { register struct ipq *fp; + struct qlink *l; /* * Look for queue of fragments * of this datagram. */ - for (fp = (struct ipq *) ipq.next; fp != &ipq; - fp = (struct ipq *) fp->next) - if (ip->ip_id == fp->ipq_id && - ip->ip_src.s_addr == fp->ipq_src.s_addr && - ip->ip_dst.s_addr == fp->ipq_dst.s_addr && - ip->ip_p == fp->ipq_p) + for (l = ipq.ip_link.next; l != &ipq.ip_link; l = l->next) { + fp = container_of(l, struct ipq, ip_link); + if (ip->ip_id == fp->ipq_id && + ip->ip_src.s_addr == fp->ipq_src.s_addr && + ip->ip_dst.s_addr == fp->ipq_dst.s_addr && + ip->ip_p == fp->ipq_p) goto found; - fp = 0; + } + fp = NULL; found: /* @@ -188,9 +208,9 @@ ip_input(m) */ ip->ip_len -= hlen; if (ip->ip_off & IP_MF) - ((struct ipasfrag *)ip)->ipf_mff |= 1; + ip->ip_tos |= 1; else - ((struct ipasfrag *)ip)->ipf_mff &= ~1; + ip->ip_tos &= ~1; ip->ip_off <<= 3; @@ -199,9 +219,9 @@ ip_input(m) * or if this is not the first fragment, * attempt reassembly; if it succeeds, proceed. */ - if (((struct ipasfrag *)ip)->ipf_mff & 1 || ip->ip_off) { + if (ip->ip_tos & 1 || ip->ip_off) { STAT(ipstat.ips_fragments++); - ip = ip_reass((struct ipasfrag *)ip, fp); + ip = ip_reass(ip, fp); if (ip == 0) return; STAT(ipstat.ips_reassembled++); @@ -237,6 +257,8 @@ bad: return; } +#define iptofrag(P) ((struct ipasfrag *)(((char*)(P)) - sizeof(struct qlink))) +#define fragtoip(P) ((struct ip*)(((char*)(P)) + sizeof(struct qlink))) /* * Take incoming datagram fragment and try to * reassemble it into whole datagram. If a chain for @@ -244,7 +266,7 @@ bad: * is given as fp; otherwise have to make a chain. */ static struct ip * -ip_reass(register struct ipasfrag *ip, register struct ipq *fp) +ip_reass(register struct ip *ip, register struct ipq *fp) { register struct mbuf *m = dtom(ip); register struct ipasfrag *q; @@ -271,13 +293,13 @@ ip_reass(register struct ipasfrag *ip, register struct ipq *fp) struct mbuf *t; if ((t = m_get()) == NULL) goto dropfrag; fp = mtod(t, struct ipq *); - insque_32(fp, &ipq); + insque(&fp->ip_link, &ipq.ip_link); fp->ipq_ttl = IPFRAGTTL; fp->ipq_p = ip->ip_p; fp->ipq_id = ip->ip_id; - fp->ipq_next = fp->ipq_prev = (ipasfragp_32)fp; - fp->ipq_src = ((struct ip *)ip)->ip_src; - fp->ipq_dst = ((struct ip *)ip)->ip_dst; + fp->frag_link.next = fp->frag_link.prev = &fp->frag_link; + fp->ipq_src = ip->ip_src; + fp->ipq_dst = ip->ip_dst; q = (struct ipasfrag *)fp; goto insert; } @@ -285,9 +307,9 @@ ip_reass(register struct ipasfrag *ip, register struct ipq *fp) /* * Find a segment which begins after this one does. */ - for (q = (struct ipasfrag *)fp->ipq_next; q != (struct ipasfrag *)fp; - q = (struct ipasfrag *)q->ipf_next) - if (q->ip_off > ip->ip_off) + for (q = fp->frag_link.next; q != (struct ipasfrag *)&fp->frag_link; + q = q->ipf_next) + if (q->ipf_off > ip->ip_off) break; /* @@ -295,9 +317,9 @@ ip_reass(register struct ipasfrag *ip, register struct ipq *fp) * our data already. If so, drop the data from the incoming * segment. If it provides all of our data, drop us. */ - if (q->ipf_prev != (ipasfragp_32)fp) { - i = ((struct ipasfrag *)(q->ipf_prev))->ip_off + - ((struct ipasfrag *)(q->ipf_prev))->ip_len - ip->ip_off; + if (q->ipf_prev != &fp->frag_link) { + struct ipasfrag *pq = q->ipf_prev; + i = pq->ipf_off + pq->ipf_len - ip->ip_off; if (i > 0) { if (i >= ip->ip_len) goto dropfrag; @@ -311,17 +333,18 @@ ip_reass(register struct ipasfrag *ip, register struct ipq *fp) * While we overlap succeeding segments trim them or, * if they are completely covered, dequeue them. */ - while (q != (struct ipasfrag *)fp && ip->ip_off + ip->ip_len > q->ip_off) { - i = (ip->ip_off + ip->ip_len) - q->ip_off; - if (i < q->ip_len) { - q->ip_len -= i; - q->ip_off += i; + while (q != (struct ipasfrag*)&fp->frag_link && + ip->ip_off + ip->ip_len > q->ipf_off) { + i = (ip->ip_off + ip->ip_len) - q->ipf_off; + if (i < q->ipf_len) { + q->ipf_len -= i; + q->ipf_off += i; m_adj(dtom(q), i); break; } - q = (struct ipasfrag *) q->ipf_next; - m_freem(dtom((struct ipasfrag *) q->ipf_prev)); - ip_deq((struct ipasfrag *) q->ipf_prev); + q = q->ipf_next; + m_freem(dtom(q->ipf_prev)); + ip_deq(q->ipf_prev); } insert: @@ -329,27 +352,26 @@ insert: * Stick new segment in its place; * check for complete reassembly. */ - ip_enq(ip, (struct ipasfrag *) q->ipf_prev); + ip_enq(iptofrag(ip), q->ipf_prev); next = 0; - for (q = (struct ipasfrag *) fp->ipq_next; q != (struct ipasfrag *)fp; - q = (struct ipasfrag *) q->ipf_next) { - if (q->ip_off != next) + for (q = fp->frag_link.next; q != (struct ipasfrag*)&fp->frag_link; + q = q->ipf_next) { + if (q->ipf_off != next) return (0); - next += q->ip_len; + next += q->ipf_len; } - if (((struct ipasfrag *)(q->ipf_prev))->ipf_mff & 1) + if (((struct ipasfrag *)(q->ipf_prev))->ipf_tos & 1) return (0); /* * Reassembly is complete; concatenate fragments. */ - q = (struct ipasfrag *) fp->ipq_next; + q = fp->frag_link.next; m = dtom(q); q = (struct ipasfrag *) q->ipf_next; - while (q != (struct ipasfrag *)fp) { - struct mbuf *t; - t = dtom(q); + while (q != (struct ipasfrag*)&fp->frag_link) { + struct mbuf *t = dtom(q); q = (struct ipasfrag *) q->ipf_next; m_cat(m, t); } @@ -360,7 +382,7 @@ insert: * dequeue and discard fragment reassembly header. * Make header visible. */ - ip = (struct ipasfrag *) fp->ipq_next; + q = fp->frag_link.next; /* * If the fragments concatenated to an mbuf that's @@ -370,25 +392,24 @@ insert: * into the new buffer. */ if (m->m_flags & M_EXT) { - int delta; - delta = (char *)ip - m->m_dat; - ip = (struct ipasfrag *)(m->m_ext + delta); + int delta = (char *)q - m->m_dat; + q = (struct ipasfrag *)(m->m_ext + delta); } /* DEBUG_ARG("ip = %lx", (long)ip); * ip=(struct ipasfrag *)m->m_data; */ + ip = fragtoip(q); ip->ip_len = next; - ip->ipf_mff &= ~1; - ((struct ip *)ip)->ip_src = fp->ipq_src; - ((struct ip *)ip)->ip_dst = fp->ipq_dst; - remque_32(fp); + ip->ip_tos &= ~1; + ip->ip_src = fp->ipq_src; + ip->ip_dst = fp->ipq_dst; + remque(&fp->ip_link); (void) m_free(dtom(fp)); - m = dtom(ip); m->m_len += (ip->ip_hl << 2); m->m_data -= (ip->ip_hl << 2); - return ((struct ip *)ip); + return ip; dropfrag: STAT(ipstat.ips_fragdropped++); @@ -405,13 +426,12 @@ ip_freef(struct ipq *fp) { register struct ipasfrag *q, *p; - for (q = (struct ipasfrag *) fp->ipq_next; q != (struct ipasfrag *)fp; - q = p) { - p = (struct ipasfrag *) q->ipf_next; + for (q = fp->frag_link.next; q != (struct ipasfrag*)&fp->frag_link; q = p) { + p = q->ipf_next; ip_deq(q); m_freem(dtom(q)); } - remque_32(fp); + remque(&fp->ip_link); (void) m_free(dtom(fp)); } @@ -424,10 +444,10 @@ ip_enq(register struct ipasfrag *p, register struct ipasfrag *prev) { DEBUG_CALL("ip_enq"); DEBUG_ARG("prev = %lx", (long)prev); - p->ipf_prev = (ipasfragp_32) prev; + p->ipf_prev = prev; p->ipf_next = prev->ipf_next; - ((struct ipasfrag *)(prev->ipf_next))->ipf_prev = (ipasfragp_32) p; - prev->ipf_next = (ipasfragp_32) p; + ((struct ipasfrag *)(prev->ipf_next))->ipf_prev = p; + prev->ipf_next = p; } /* @@ -448,20 +468,21 @@ ip_deq(register struct ipasfrag *p) void ip_slowtimo() { - register struct ipq *fp; + struct qlink *l; DEBUG_CALL("ip_slowtimo"); - fp = (struct ipq *) ipq.next; - if (fp == 0) + l = ipq.ip_link.next; + + if (l == 0) return; - while (fp != &ipq) { - --fp->ipq_ttl; - fp = (struct ipq *) fp->next; - if (((struct ipq *)(fp->prev))->ipq_ttl == 0) { + while (l != &ipq.ip_link) { + struct ipq *fp = container_of(l, struct ipq, ip_link); + l = l->next; + if (--fp->ipq_ttl == 0) { STAT(ipstat.ips_fragtimeout++); - ip_freef((struct ipq *) fp->prev); + ip_freef(fp); } } } diff --git a/BasiliskII/src/slirp/ip_output.c b/BasiliskII/src/slirp/ip_output.c index a8a6067b..9538db98 100644 --- a/BasiliskII/src/slirp/ip_output.c +++ b/BasiliskII/src/slirp/ip_output.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/libslirp.h b/BasiliskII/src/slirp/libslirp.h index 7e4cfa98..6c5db54c 100644 --- a/BasiliskII/src/slirp/libslirp.h +++ b/BasiliskII/src/slirp/libslirp.h @@ -5,7 +5,7 @@ extern "C" { #endif -void slirp_init(void); +void slirp_init(int restrict, char *special_ip); void slirp_select_fill(int *pnfds, fd_set *readfds, fd_set *writefds, fd_set *xfds); @@ -20,13 +20,16 @@ void slirp_output(const uint8_t *pkt, int pkt_len); int slirp_redir(int is_udp, int host_port, struct in_addr guest_addr, int guest_port); -int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, +int slirp_add_exec(int do_pty, const void *args, int addr_low_byte, int guest_port); extern const char *tftp_prefix; extern char slirp_hostname[33]; void slirp_stats(void); +void slirp_socket_recv(int addr_low_byte, int guest_port, const uint8_t *buf, + int size); +size_t slirp_socket_can_recv(int addr_low_byte, int guest_port); #ifdef __cplusplus } diff --git a/BasiliskII/src/slirp/main.h b/BasiliskII/src/slirp/main.h index c01addac..ed513855 100644 --- a/BasiliskII/src/slirp/main.h +++ b/BasiliskII/src/slirp/main.h @@ -44,6 +44,8 @@ extern int towrite_max; extern int ppp_exit; extern int tcp_keepintvl; extern uint8_t client_ethaddr[6]; +extern const char *slirp_special_ip; +extern int slirp_restrict; #define PROTO_SLIP 0x1 #ifdef USE_PPP @@ -51,3 +53,4 @@ extern uint8_t client_ethaddr[6]; #endif void if_encap(const uint8_t *ip_data, int ip_data_len); +ssize_t slirp_send(struct socket *so, const void *buf, size_t len, int flags); diff --git a/BasiliskII/src/slirp/mbuf.c b/BasiliskII/src/slirp/mbuf.c index 5d125542..655de418 100644 --- a/BasiliskII/src/slirp/mbuf.c +++ b/BasiliskII/src/slirp/mbuf.c @@ -17,8 +17,6 @@ #include -struct mbuf *mbutl; -char *mclrefcnt; int mbuf_alloced = 0; struct mbuf m_freelist, m_usedlist; #define MBUF_THRESH 30 @@ -28,7 +26,7 @@ int mbuf_max = 0; * Find a nice value for msize * XXX if_maxlinkhdr already in mtu */ -#define MSIZE (IF_MTU + IF_MAXLINKHDR + sizeof(struct m_hdr ) + 6) +#define SLIRP_MSIZE (IF_MTU + IF_MAXLINKHDR + sizeof(struct m_hdr ) + 6) void m_init() @@ -54,7 +52,7 @@ m_get() DEBUG_CALL("m_get"); if (m_freelist.m_next == &m_freelist) { - m = (struct mbuf *)malloc(MSIZE); + m = (struct mbuf *)malloc(SLIRP_MSIZE); if (m == NULL) goto end_error; mbuf_alloced++; if (mbuf_alloced > MBUF_THRESH) @@ -71,7 +69,7 @@ m_get() m->m_flags = (flags | M_USEDLIST); /* Initialise it */ - m->m_size = MSIZE - sizeof(struct m_hdr); + m->m_size = SLIRP_MSIZE - sizeof(struct m_hdr); m->m_data = m->m_dat; m->m_len = 0; m->m_nextpkt = 0; @@ -236,4 +234,3 @@ dtom(dat) return (struct mbuf *)0; } - diff --git a/BasiliskII/src/slirp/mbuf.h b/BasiliskII/src/slirp/mbuf.h index f9f21325..55273734 100644 --- a/BasiliskII/src/slirp/mbuf.h +++ b/BasiliskII/src/slirp/mbuf.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/misc.c b/BasiliskII/src/slirp/misc.c index 14808fe2..f558b3c0 100644 --- a/BasiliskII/src/slirp/misc.c +++ b/BasiliskII/src/slirp/misc.c @@ -66,20 +66,6 @@ redir_x(inaddr, start_port, display, screen) } #endif -#ifndef HAVE_INET_ATON -int -inet_aton(cp, ia) - const char *cp; - struct in_addr *ia; -{ - u_int32_t addr = inet_addr(cp); - if (addr == 0xffffffff) - return 0; - ia->s_addr = addr; - return 1; -} -#endif - /* * Get our IP address and put it in our_addr */ @@ -97,39 +83,6 @@ getouraddr() our_addr.s_addr = loopback_addr.s_addr; } -#if SIZEOF_CHAR_P == 8 - -struct quehead_32 { - u_int32_t qh_link; - u_int32_t qh_rlink; -}; - -inline void -insque_32(a, b) - void *a; - void *b; -{ - register struct quehead_32 *element = (struct quehead_32 *) a; - register struct quehead_32 *head = (struct quehead_32 *) b; - element->qh_link = head->qh_link; - head->qh_link = (u_int32_t)element; - element->qh_rlink = (u_int32_t)head; - ((struct quehead_32 *)(element->qh_link))->qh_rlink - = (u_int32_t)element; -} - -inline void -remque_32(a) - void *a; -{ - register struct quehead_32 *element = (struct quehead_32 *) a; - ((struct quehead_32 *)(element->qh_link))->qh_rlink = element->qh_rlink; - ((struct quehead_32 *)(element->qh_rlink))->qh_link = element->qh_link; - element->qh_rlink = 0; -} - -#endif /* SIZEOF_CHAR_P == 8 */ - struct quehead { struct quehead *qh_link; struct quehead *qh_rlink; @@ -183,7 +136,7 @@ add_exec(ex_ptr, do_pty, exec, addr, port) (*ex_ptr)->ex_fport = port; (*ex_ptr)->ex_addr = addr; (*ex_ptr)->ex_pty = do_pty; - (*ex_ptr)->ex_exec = strdup(exec); + (*ex_ptr)->ex_exec = (do_pty == 3) ? exec : strdup(exec); (*ex_ptr)->ex_next = tmp_ptr; return 0; } @@ -304,10 +257,10 @@ fork_exec(struct socket *so, const char *ex, int do_pty) { int s; struct sockaddr_in addr; - int addrlen = sizeof(addr); + socklen_t addrlen = sizeof(addr); int opt; int master = -1; - char *argv[256]; + const char *argv[256]; #if 0 char buff[256]; #endif @@ -411,14 +364,15 @@ fork_exec(struct socket *so, const char *ex, int do_pty) } while (c); argv[i] = 0; - execvp(argv[0], argv); + execvp(argv[0], (char **)argv); /* Ooops, failed, let's tell the user why */ { char buff[256]; - sprintf(buff, "Error: execvp of %s failed: %s\n", - argv[0], strerror(errno)); + snprintf(buff, sizeof(buff), + "Error: execvp of %s failed: %s\n", + argv[0], strerror(errno)); write(2, buff, strlen(buff)+1); } close(0); close(1); close(2); /* XXX */ diff --git a/BasiliskII/src/slirp/misc.h b/BasiliskII/src/slirp/misc.h index e405e38d..ab8e3a72 100644 --- a/BasiliskII/src/slirp/misc.h +++ b/BasiliskII/src/slirp/misc.h @@ -17,7 +17,7 @@ struct ex_list { }; extern struct ex_list *exec_list; -extern u_int curtime, time_fasttimo, last_slowtimo; +extern u_int time_fasttimo, last_slowtimo; extern int (*lprint_print) _P((void *, const char *, va_list)); extern char *lprint_ptr, *lprint_ptr2, **lprint_arg; @@ -72,8 +72,8 @@ extern int x_port, x_server, x_display; int show_x _P((char *, struct socket *)); void redir_x _P((u_int32_t, int, int, int)); void getouraddr _P((void)); -inline void slirp_insque _P((void *, void *)); -inline void slirp_remque _P((void *)); +void slirp_insque _P((void *, void *)); +void slirp_remque _P((void *)); int add_exec _P((struct ex_list **, int, char *, int, int)); int slirp_openpty _P((int *, int *)); int fork_exec(struct socket *so, const char *ex, int do_pty); diff --git a/BasiliskII/src/slirp/sbuf.c b/BasiliskII/src/slirp/sbuf.c index 02c5fce0..2e6e2b21 100644 --- a/BasiliskII/src/slirp/sbuf.c +++ b/BasiliskII/src/slirp/sbuf.c @@ -108,7 +108,7 @@ sbappend(so, m) * ottherwise it'll arrive out of order, and hence corrupt */ if (!so->so_rcv.sb_cc) - ret = send(so->s, m->m_data, m->m_len, 0); + ret = slirp_send(so, m->m_data, m->m_len, 0); if (ret <= 0) { /* @@ -198,4 +198,3 @@ sbcopy(sb, off, len, to) memcpy(to+off,sb->sb_data,len); } } - diff --git a/BasiliskII/src/slirp/slirp.c b/BasiliskII/src/slirp/slirp.c index 303f4825..0394496a 100644 --- a/BasiliskII/src/slirp/slirp.c +++ b/BasiliskII/src/slirp/slirp.c @@ -1,4 +1,30 @@ +/* + * libslirp glue + * + * Copyright (c) 2004-2008 Fabrice Bellard + * + * 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +#include "qemu-common.h" +#include "qemu-char.h" #include "slirp.h" +#include "hw/hw.h" /* host address */ struct in_addr our_addr; @@ -16,8 +42,14 @@ static const uint8_t special_ethaddr[6] = { 0x52, 0x54, 0x00, 0x12, 0x35, 0x00 }; +/* ARP cache for the guest IP addresses (XXX: allow many entries) */ uint8_t client_ethaddr[6]; +static struct in_addr client_ipaddr; +static const uint8_t zero_ethaddr[6] = { 0, 0, 0, 0, 0, 0 }; + +const char *slirp_special_ip = CTL_SPECIAL; +int slirp_restrict; int do_slowtimo; int link_up; struct timeval tt; @@ -84,7 +116,7 @@ static int get_dns_addr(struct in_addr *pdns_addr) static int get_dns_addr(struct in_addr *pdns_addr) { char buff[512]; - char buff2[256]; + char buff2[257]; FILE *f; int found = 0; struct in_addr tmp_addr; @@ -136,7 +168,10 @@ static void slirp_cleanup(void) } #endif -void slirp_init(void) +static void slirp_state_save(QEMUFile *f, void *opaque); +static int slirp_state_load(QEMUFile *f, void *opaque, int version_id); + +void slirp_init(int restrict, char *special_ip) { // debug_init("/tmp/slirp.log", DEBUG_DEFAULT); @@ -149,6 +184,7 @@ void slirp_init(void) #endif link_up = 1; + slirp_restrict = restrict; if_init(); ip_init(); @@ -164,9 +200,13 @@ void slirp_init(void) fprintf (stderr, "Warning: No DNS servers found\n"); } - inet_aton(CTL_SPECIAL, &special_addr); + if (special_ip) + slirp_special_ip = special_ip; + + inet_aton(slirp_special_ip, &special_addr); alias_addr.s_addr = special_addr.s_addr | htonl(CTL_ALIAS); getouraddr(); + register_savevm("slirp", 0, 1, slirp_state_save, slirp_state_load, NULL); } #define CONN_CANFSEND(so) (((so)->so_state & (SS_FCANTSENDMORE|SS_ISFCONNECTED)) == SS_ISFCONNECTED) @@ -222,7 +262,7 @@ void slirp_select_fill(int *pnfds, * in the fragment queue, or there are TCP connections active */ do_slowtimo = ((tcb.so_next != &tcb) || - ((struct ipasfrag *)&ipq != (struct ipasfrag *)ipq.next)); + (&ipq.ip_link != ipq.ip_link.next)); for (so = tcb.so_next; so != &tcb; so = so_next) { so_next = so->so_next; @@ -554,7 +594,7 @@ struct arphdr unsigned char ar_tip[4]; /* target IP address */ }; -void arp_input(const uint8_t *pkt, int pkt_len) +static void arp_input(const uint8_t *pkt, int pkt_len) { struct ethhdr *eh = (struct ethhdr *)pkt; struct arphdr *ah = (struct arphdr *)(pkt + ETH_HLEN); @@ -597,6 +637,13 @@ void arp_input(const uint8_t *pkt, int pkt_len) slirp_output(arp_reply, sizeof(arp_reply)); } break; + case ARPOP_REPLY: + /* reply to request of client mac address ? */ + if (!memcmp(client_ethaddr, zero_ethaddr, ETH_ALEN) && + !memcmp(ah->ar_sip, &client_ipaddr.s_addr, 4)) { + memcpy(client_ethaddr, ah->ar_sha, ETH_ALEN); + } + break; default: break; } @@ -620,6 +667,9 @@ void slirp_input(const uint8_t *pkt, int pkt_len) if (!m) return; /* Note: we add to align the IP header */ + if (M_FREEROOM(m) < pkt_len + 2) { + m_inc(m, pkt_len + 2); + } m->m_len = pkt_len + 2; memcpy(m->m_data + 2, pkt, pkt_len); @@ -641,14 +691,47 @@ void if_encap(const uint8_t *ip_data, int ip_data_len) if (ip_data_len + ETH_HLEN > sizeof(buf)) return; + + if (!memcmp(client_ethaddr, zero_ethaddr, ETH_ALEN)) { + uint8_t arp_req[ETH_HLEN + sizeof(struct arphdr)]; + struct ethhdr *reh = (struct ethhdr *)arp_req; + struct arphdr *rah = (struct arphdr *)(arp_req + ETH_HLEN); + const struct ip *iph = (const struct ip *)ip_data; - memcpy(eh->h_dest, client_ethaddr, ETH_ALEN); - memcpy(eh->h_source, special_ethaddr, ETH_ALEN - 1); - /* XXX: not correct */ - eh->h_source[5] = CTL_ALIAS; - eh->h_proto = htons(ETH_P_IP); - memcpy(buf + sizeof(struct ethhdr), ip_data, ip_data_len); - slirp_output(buf, ip_data_len + ETH_HLEN); + /* If the client addr is not known, there is no point in + sending the packet to it. Normally the sender should have + done an ARP request to get its MAC address. Here we do it + in place of sending the packet and we hope that the sender + will retry sending its packet. */ + memset(reh->h_dest, 0xff, ETH_ALEN); + memcpy(reh->h_source, special_ethaddr, ETH_ALEN - 1); + reh->h_source[5] = CTL_ALIAS; + reh->h_proto = htons(ETH_P_ARP); + rah->ar_hrd = htons(1); + rah->ar_pro = htons(ETH_P_IP); + rah->ar_hln = ETH_ALEN; + rah->ar_pln = 4; + rah->ar_op = htons(ARPOP_REQUEST); + /* source hw addr */ + memcpy(rah->ar_sha, special_ethaddr, ETH_ALEN - 1); + rah->ar_sha[5] = CTL_ALIAS; + /* source IP */ + memcpy(rah->ar_sip, &alias_addr, 4); + /* target hw addr (none) */ + memset(rah->ar_tha, 0, ETH_ALEN); + /* target IP */ + memcpy(rah->ar_tip, &iph->ip_dst, 4); + client_ipaddr = iph->ip_dst; + slirp_output(arp_req, sizeof(arp_req)); + } else { + memcpy(eh->h_dest, client_ethaddr, ETH_ALEN); + memcpy(eh->h_source, special_ethaddr, ETH_ALEN - 1); + /* XXX: not correct */ + eh->h_source[5] = CTL_ALIAS; + eh->h_proto = htons(ETH_P_IP); + memcpy(buf + sizeof(struct ethhdr), ip_data, ip_data_len); + slirp_output(buf, ip_data_len + ETH_HLEN); + } } int slirp_redir(int is_udp, int host_port, @@ -666,9 +749,291 @@ int slirp_redir(int is_udp, int host_port, return 0; } -int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, +int slirp_add_exec(int do_pty, const void *args, int addr_low_byte, int guest_port) { return add_exec(&exec_list, do_pty, (char *)args, addr_low_byte, htons(guest_port)); } + +ssize_t slirp_send(struct socket *so, const void *buf, size_t len, int flags) +{ + if (so->s == -1 && so->extra) { + qemu_chr_write(so->extra, buf, len); + return len; + } + + return send(so->s, buf, len, flags); +} + +static struct socket *slirp_find_ctl_socket(int addr_low_byte, int guest_port) +{ + struct socket *so; + + for (so = tcb.so_next; so != &tcb; so = so->so_next) { + if ((so->so_faddr.s_addr & htonl(0xffffff00)) == + special_addr.s_addr + && (ntohl(so->so_faddr.s_addr) & 0xff) == + addr_low_byte + && htons(so->so_fport) == guest_port) + return so; + } + + return NULL; +} + +size_t slirp_socket_can_recv(int addr_low_byte, int guest_port) +{ + struct iovec iov[2]; + struct socket *so; + + if (!link_up) + return 0; + + so = slirp_find_ctl_socket(addr_low_byte, guest_port); + + if (!so || so->so_state & SS_NOFDREF) + return 0; + + if (!CONN_CANFRCV(so) || so->so_snd.sb_cc >= (so->so_snd.sb_datalen/2)) + return 0; + + return sopreprbuf(so, iov, NULL); +} + +void slirp_socket_recv(int addr_low_byte, int guest_port, const uint8_t *buf, + int size) +{ + int ret; + struct socket *so = slirp_find_ctl_socket(addr_low_byte, guest_port); + + if (!so) + return; + + ret = soreadbuf(so, (const char *)buf, size); + + if (ret > 0) + tcp_output(sototcpcb(so)); +} + +static void slirp_tcp_save(QEMUFile *f, struct tcpcb *tp) +{ + int i; + + qemu_put_sbe16(f, tp->t_state); + for (i = 0; i < TCPT_NTIMERS; i++) + qemu_put_sbe16(f, tp->t_timer[i]); + qemu_put_sbe16(f, tp->t_rxtshift); + qemu_put_sbe16(f, tp->t_rxtcur); + qemu_put_sbe16(f, tp->t_dupacks); + qemu_put_be16(f, tp->t_maxseg); + qemu_put_sbyte(f, tp->t_force); + qemu_put_be16(f, tp->t_flags); + qemu_put_be32(f, tp->snd_una); + qemu_put_be32(f, tp->snd_nxt); + qemu_put_be32(f, tp->snd_up); + qemu_put_be32(f, tp->snd_wl1); + qemu_put_be32(f, tp->snd_wl2); + qemu_put_be32(f, tp->iss); + qemu_put_be32(f, tp->snd_wnd); + qemu_put_be32(f, tp->rcv_wnd); + qemu_put_be32(f, tp->rcv_nxt); + qemu_put_be32(f, tp->rcv_up); + qemu_put_be32(f, tp->irs); + qemu_put_be32(f, tp->rcv_adv); + qemu_put_be32(f, tp->snd_max); + qemu_put_be32(f, tp->snd_cwnd); + qemu_put_be32(f, tp->snd_ssthresh); + qemu_put_sbe16(f, tp->t_idle); + qemu_put_sbe16(f, tp->t_rtt); + qemu_put_be32(f, tp->t_rtseq); + qemu_put_sbe16(f, tp->t_srtt); + qemu_put_sbe16(f, tp->t_rttvar); + qemu_put_be16(f, tp->t_rttmin); + qemu_put_be32(f, tp->max_sndwnd); + qemu_put_byte(f, tp->t_oobflags); + qemu_put_byte(f, tp->t_iobc); + qemu_put_sbe16(f, tp->t_softerror); + qemu_put_byte(f, tp->snd_scale); + qemu_put_byte(f, tp->rcv_scale); + qemu_put_byte(f, tp->request_r_scale); + qemu_put_byte(f, tp->requested_s_scale); + qemu_put_be32(f, tp->ts_recent); + qemu_put_be32(f, tp->ts_recent_age); + qemu_put_be32(f, tp->last_ack_sent); +} + +static void slirp_sbuf_save(QEMUFile *f, struct sbuf *sbuf) +{ + uint32_t off; + + qemu_put_be32(f, sbuf->sb_cc); + qemu_put_be32(f, sbuf->sb_datalen); + off = (uint32_t)(sbuf->sb_wptr - sbuf->sb_data); + qemu_put_sbe32(f, off); + off = (uint32_t)(sbuf->sb_rptr - sbuf->sb_data); + qemu_put_sbe32(f, off); + qemu_put_buffer(f, (unsigned char*)sbuf->sb_data, sbuf->sb_datalen); +} + +static void slirp_socket_save(QEMUFile *f, struct socket *so) +{ + qemu_put_be32(f, so->so_urgc); + qemu_put_be32(f, so->so_faddr.s_addr); + qemu_put_be32(f, so->so_laddr.s_addr); + qemu_put_be16(f, so->so_fport); + qemu_put_be16(f, so->so_lport); + qemu_put_byte(f, so->so_iptos); + qemu_put_byte(f, so->so_emu); + qemu_put_byte(f, so->so_type); + qemu_put_be32(f, so->so_state); + slirp_sbuf_save(f, &so->so_rcv); + slirp_sbuf_save(f, &so->so_snd); + slirp_tcp_save(f, so->so_tcpcb); +} + +static void slirp_state_save(QEMUFile *f, void *opaque) +{ + struct ex_list *ex_ptr; + + for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) + if (ex_ptr->ex_pty == 3) { + struct socket *so; + so = slirp_find_ctl_socket(ex_ptr->ex_addr, ntohs(ex_ptr->ex_fport)); + if (!so) + continue; + + qemu_put_byte(f, 42); + slirp_socket_save(f, so); + } + qemu_put_byte(f, 0); +} + +static void slirp_tcp_load(QEMUFile *f, struct tcpcb *tp) +{ + int i; + + tp->t_state = qemu_get_sbe16(f); + for (i = 0; i < TCPT_NTIMERS; i++) + tp->t_timer[i] = qemu_get_sbe16(f); + tp->t_rxtshift = qemu_get_sbe16(f); + tp->t_rxtcur = qemu_get_sbe16(f); + tp->t_dupacks = qemu_get_sbe16(f); + tp->t_maxseg = qemu_get_be16(f); + tp->t_force = qemu_get_sbyte(f); + tp->t_flags = qemu_get_be16(f); + tp->snd_una = qemu_get_be32(f); + tp->snd_nxt = qemu_get_be32(f); + tp->snd_up = qemu_get_be32(f); + tp->snd_wl1 = qemu_get_be32(f); + tp->snd_wl2 = qemu_get_be32(f); + tp->iss = qemu_get_be32(f); + tp->snd_wnd = qemu_get_be32(f); + tp->rcv_wnd = qemu_get_be32(f); + tp->rcv_nxt = qemu_get_be32(f); + tp->rcv_up = qemu_get_be32(f); + tp->irs = qemu_get_be32(f); + tp->rcv_adv = qemu_get_be32(f); + tp->snd_max = qemu_get_be32(f); + tp->snd_cwnd = qemu_get_be32(f); + tp->snd_ssthresh = qemu_get_be32(f); + tp->t_idle = qemu_get_sbe16(f); + tp->t_rtt = qemu_get_sbe16(f); + tp->t_rtseq = qemu_get_be32(f); + tp->t_srtt = qemu_get_sbe16(f); + tp->t_rttvar = qemu_get_sbe16(f); + tp->t_rttmin = qemu_get_be16(f); + tp->max_sndwnd = qemu_get_be32(f); + tp->t_oobflags = qemu_get_byte(f); + tp->t_iobc = qemu_get_byte(f); + tp->t_softerror = qemu_get_sbe16(f); + tp->snd_scale = qemu_get_byte(f); + tp->rcv_scale = qemu_get_byte(f); + tp->request_r_scale = qemu_get_byte(f); + tp->requested_s_scale = qemu_get_byte(f); + tp->ts_recent = qemu_get_be32(f); + tp->ts_recent_age = qemu_get_be32(f); + tp->last_ack_sent = qemu_get_be32(f); + tcp_template(tp); +} + +static int slirp_sbuf_load(QEMUFile *f, struct sbuf *sbuf) +{ + uint32_t off, sb_cc, sb_datalen; + + sb_cc = qemu_get_be32(f); + sb_datalen = qemu_get_be32(f); + + sbreserve(sbuf, sb_datalen); + + if (sbuf->sb_datalen != sb_datalen) + return -ENOMEM; + + sbuf->sb_cc = sb_cc; + + off = qemu_get_sbe32(f); + sbuf->sb_wptr = sbuf->sb_data + off; + off = qemu_get_sbe32(f); + sbuf->sb_rptr = sbuf->sb_data + off; + qemu_get_buffer(f, (unsigned char*)sbuf->sb_data, sbuf->sb_datalen); + + return 0; +} + +static int slirp_socket_load(QEMUFile *f, struct socket *so) +{ + if (tcp_attach(so) < 0) + return -ENOMEM; + + so->so_urgc = qemu_get_be32(f); + so->so_faddr.s_addr = qemu_get_be32(f); + so->so_laddr.s_addr = qemu_get_be32(f); + so->so_fport = qemu_get_be16(f); + so->so_lport = qemu_get_be16(f); + so->so_iptos = qemu_get_byte(f); + so->so_emu = qemu_get_byte(f); + so->so_type = qemu_get_byte(f); + so->so_state = qemu_get_be32(f); + if (slirp_sbuf_load(f, &so->so_rcv) < 0) + return -ENOMEM; + if (slirp_sbuf_load(f, &so->so_snd) < 0) + return -ENOMEM; + slirp_tcp_load(f, so->so_tcpcb); + + return 0; +} + +static int slirp_state_load(QEMUFile *f, void *opaque, int version_id) +{ + struct ex_list *ex_ptr; + int r; + + while ((r = qemu_get_byte(f))) { + int ret; + struct socket *so = socreate(); + + if (!so) + return -ENOMEM; + + ret = slirp_socket_load(f, so); + + if (ret < 0) + return ret; + + if ((so->so_faddr.s_addr & htonl(0xffffff00)) != special_addr.s_addr) + return -EINVAL; + + for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) + if (ex_ptr->ex_pty == 3 && + (ntohl(so->so_faddr.s_addr) & 0xff) == ex_ptr->ex_addr && + so->so_fport == ex_ptr->ex_fport) + break; + + if (!ex_ptr) + return -EINVAL; + + so->extra = (void *)ex_ptr->ex_exec; + } + + return 0; +} diff --git a/BasiliskII/src/slirp/slirp.h b/BasiliskII/src/slirp/slirp.h index b8d756e5..6f8a7f60 100644 --- a/BasiliskII/src/slirp/slirp.h +++ b/BasiliskII/src/slirp/slirp.h @@ -32,6 +32,7 @@ typedef char *caddr_t; #define WIN32_LEAN_AND_MEAN # include # include +# include # include # include @@ -102,7 +103,7 @@ typedef unsigned char u_int8_t; # include # include #else -# if HAVE_SYS_TIME_H +# ifdef HAVE_SYS_TIME_H # include # else # include @@ -119,13 +120,12 @@ typedef unsigned char u_int8_t; #include #endif -#ifndef _P +#undef _P #ifndef NO_PROTOTYPES # define _P(x) x #else # define _P(x) () #endif -#endif #ifndef _WIN32 #include @@ -265,14 +265,6 @@ void if_start _P((struct ttys *)); void lprint _P((const char *, ...)); -#if SIZEOF_CHAR_P == 4 -# define insque_32 insque -# define remque_32 remque -#else - inline void insque_32 _P((void *, void *)); - inline void remque_32 _P((void *)); -#endif - #ifndef _WIN32 #include #endif diff --git a/BasiliskII/src/slirp/slirp_config.h b/BasiliskII/src/slirp/slirp_config.h index e7e95dd5..dbc8dfd4 100644 --- a/BasiliskII/src/slirp/slirp_config.h +++ b/BasiliskII/src/slirp/slirp_config.h @@ -128,10 +128,10 @@ #undef HAVE_SYS_STROPTS_H /* Define to whatever your compiler thinks inline should be */ -#define inline inline +//#define inline inline /* Define to whatever your compiler thinks const should be */ -#define const const +//#define const const /* Define if your compiler doesn't like prototypes */ #undef NO_PROTOTYPES @@ -170,7 +170,7 @@ #undef HAVE_SETENV /* Define if you have index() */ -#undef HAVE_INDEX +#define HAVE_INDEX /* Define if you have bcmp() */ #undef HAVE_BCMP @@ -182,7 +182,7 @@ #define HAVE_MEMMOVE /* Define if you have gethostid */ -#undef HAVE_GETHOSTID +#define HAVE_GETHOSTID /* Define if you DON'T have unix-domain sockets */ #undef NO_UNIX_SOCKETS diff --git a/BasiliskII/src/slirp/socket.c b/BasiliskII/src/slirp/socket.c index 0c15132e..9def541d 100644 --- a/BasiliskII/src/slirp/socket.c +++ b/BasiliskII/src/slirp/socket.c @@ -5,10 +5,10 @@ * terms and conditions of the copyright. */ +#include "qemu-common.h" #define WANT_SYS_IOCTL_H #include #include "ip_icmp.h" -#include "main.h" #ifdef __sun__ #include #endif @@ -91,32 +91,24 @@ sofree(so) free(so); } -/* - * Read from so's socket into sb_snd, updating all relevant sbuf fields - * NOTE: This will only be called if it is select()ed for reading, so - * a read() of 0 (or less) means it's disconnected - */ -int -soread(so) - struct socket *so; +size_t sopreprbuf(struct socket *so, struct iovec *iov, int *np) { - int n, nn, lss, total; + int n, lss, total; struct sbuf *sb = &so->so_snd; int len = sb->sb_datalen - sb->sb_cc; - struct iovec iov[2]; int mss = so->so_tcpcb->t_maxseg; - DEBUG_CALL("soread"); + DEBUG_CALL("sopreprbuf"); DEBUG_ARG("so = %lx", (long )so); - /* - * No need to check if there's enough room to read. - * soread wouldn't have been called if there weren't - */ - len = sb->sb_datalen - sb->sb_cc; + if (len <= 0) + return 0; + iov[0].iov_base = sb->sb_wptr; + iov[1].iov_base = NULL; + iov[1].iov_len = 0; if (sb->sb_wptr < sb->sb_rptr) { iov[0].iov_len = sb->sb_rptr - sb->sb_wptr; /* Should never succeed, but... */ @@ -154,6 +146,33 @@ soread(so) n = 1; } } + if (np) + *np = n; + + return iov[0].iov_len + (n - 1) * iov[1].iov_len; +} + +/* + * Read from so's socket into sb_snd, updating all relevant sbuf fields + * NOTE: This will only be called if it is select()ed for reading, so + * a read() of 0 (or less) means it's disconnected + */ +int +soread(so) + struct socket *so; +{ + int n, nn; + struct sbuf *sb = &so->so_snd; + struct iovec iov[2]; + + DEBUG_CALL("soread"); + DEBUG_ARG("so = %lx", (long )so); + + /* + * No need to check if there's enough room to read. + * soread wouldn't have been called if there weren't + */ + sopreprbuf(so, iov, &n); #ifdef HAVE_READV nn = readv(so->s, (struct iovec *)iov, n); @@ -200,6 +219,48 @@ soread(so) return nn; } +int soreadbuf(struct socket *so, const char *buf, int size) +{ + int n, nn, copy = size; + struct sbuf *sb = &so->so_snd; + struct iovec iov[2]; + + DEBUG_CALL("soreadbuf"); + DEBUG_ARG("so = %lx", (long )so); + + /* + * No need to check if there's enough room to read. + * soread wouldn't have been called if there weren't + */ + if (sopreprbuf(so, iov, &n) < size) + goto err; + + nn = MIN(iov[0].iov_len, copy); + memcpy(iov[0].iov_base, buf, nn); + + copy -= nn; + buf += nn; + + if (copy == 0) + goto done; + + memcpy(iov[1].iov_base, buf, copy); + +done: + /* Update fields */ + sb->sb_cc += size; + sb->sb_wptr += size; + if (sb->sb_wptr >= (sb->sb_data + sb->sb_datalen)) + sb->sb_wptr -= sb->sb_datalen; + return size; +err: + + sofcantrcvmore(so); + tcp_sockclosed(sototcpcb(so)); + fprintf(stderr, "soreadbuf buffer to small"); + return -1; +} + /* * Get urgent data * @@ -253,7 +314,7 @@ sosendoob(so) if (sb->sb_rptr < sb->sb_wptr) { /* We can send it directly */ - n = send(so->s, sb->sb_rptr, so->so_urgc, (MSG_OOB)); /* |MSG_DONTWAIT)); */ + n = slirp_send(so, sb->sb_rptr, so->so_urgc, (MSG_OOB)); /* |MSG_DONTWAIT)); */ so->so_urgc -= n; DEBUG_MISC((dfd, " --- sent %d bytes urgent data, %d urgent bytes left\n", n, so->so_urgc)); @@ -274,7 +335,7 @@ sosendoob(so) so->so_urgc -= n; len += n; } - n = send(so->s, buff, len, (MSG_OOB)); /* |MSG_DONTWAIT)); */ + n = slirp_send(so, buff, len, (MSG_OOB)); /* |MSG_DONTWAIT)); */ #ifdef DEBUG if (n != len) DEBUG_ERROR((dfd, "Didn't send all data urgently XXXXX\n")); @@ -320,6 +381,8 @@ sowrite(so) len = sb->sb_cc; iov[0].iov_base = sb->sb_rptr; + iov[1].iov_base = NULL; + iov[1].iov_len = 0; if (sb->sb_rptr < sb->sb_wptr) { iov[0].iov_len = sb->sb_wptr - sb->sb_rptr; /* Should never succeed, but... */ @@ -344,7 +407,7 @@ sowrite(so) DEBUG_MISC((dfd, " ... wrote nn = %d bytes\n", nn)); #else - nn = send(so->s, iov[0].iov_base, iov[0].iov_len,0); + nn = slirp_send(so, iov[0].iov_base, iov[0].iov_len,0); #endif /* This should never happen, but people tell me it does *shrug* */ if (nn < 0 && (errno == EAGAIN || errno == EINTR)) @@ -361,7 +424,7 @@ sowrite(so) #ifndef HAVE_READV if (n == 2 && nn == iov[0].iov_len) { int ret; - ret = send(so->s, iov[1].iov_base, iov[1].iov_len,0); + ret = slirp_send(so, iov[1].iov_base, iov[1].iov_len,0); if (ret > 0) nn += ret; } @@ -392,7 +455,7 @@ sorecvfrom(so) struct socket *so; { struct sockaddr_in addr; - int addrlen = sizeof(struct sockaddr_in); + socklen_t addrlen = sizeof(struct sockaddr_in); DEBUG_CALL("sorecvfrom"); DEBUG_ARG("so = %lx", (long)so); @@ -545,7 +608,8 @@ solisten(port, laddr, lport, flags) { struct sockaddr_in addr; struct socket *so; - int s, addrlen = sizeof(addr), opt = 1; + int s, opt = 1; + socklen_t addrlen = sizeof(addr); DEBUG_CALL("solisten"); DEBUG_ARG("port = %d", port); @@ -718,4 +782,3 @@ sofwdrain(so) else sofcantsendmore(so); } - diff --git a/BasiliskII/src/slirp/socket.h b/BasiliskII/src/slirp/socket.h index 94fb8d8c..72b473d6 100644 --- a/BasiliskII/src/slirp/socket.h +++ b/BasiliskII/src/slirp/socket.h @@ -73,14 +73,6 @@ struct socket { extern struct socket tcb; - -#if defined(DECLARE_IOVEC) && !defined(HAVE_READV) -struct iovec { - char *iov_base; - size_t iov_len; -}; -#endif - struct socket * solookup _P((struct socket *, struct in_addr, u_int, struct in_addr, u_int)); struct socket * socreate _P((void)); void sofree _P((struct socket *)); @@ -95,5 +87,7 @@ void soisfconnecting _P((register struct socket *)); void soisfconnected _P((register struct socket *)); void soisfdisconnected _P((struct socket *)); void sofwdrain _P((struct socket *)); +size_t sopreprbuf(struct socket *so, struct iovec *iov, int *np); +int soreadbuf(struct socket *so, const char *buf, int size); #endif /* _SOCKET_H_ */ diff --git a/BasiliskII/src/slirp/tcp.h b/BasiliskII/src/slirp/tcp.h index 11150766..40570326 100644 --- a/BasiliskII/src/slirp/tcp.h +++ b/BasiliskII/src/slirp/tcp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/tcp_input.c b/BasiliskII/src/slirp/tcp_input.c index 17a9387f..d7805b53 100644 --- a/BasiliskII/src/slirp/tcp_input.c +++ b/BasiliskII/src/slirp/tcp_input.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -71,7 +67,7 @@ tcp_seq tcp_iss; /* tcp initial send seq # */ #ifdef TCP_ACK_HACK #define TCP_REASS(tp, ti, m, so, flags) {\ if ((ti)->ti_seq == (tp)->rcv_nxt && \ - (tp)->seg_next == (tcpiphdrp_32)(tp) && \ + tcpfrag_list_empty(tp) && \ (tp)->t_state == TCPS_ESTABLISHED) {\ if (ti->ti_flags & TH_PUSH) \ tp->t_flags |= TF_ACKNOW; \ @@ -94,7 +90,7 @@ tcp_seq tcp_iss; /* tcp initial send seq # */ #else #define TCP_REASS(tp, ti, m, so, flags) { \ if ((ti)->ti_seq == (tp)->rcv_nxt && \ - (tp)->seg_next == (tcpiphdrp_32)(tp) && \ + tcpfrag_list_empty(tp) && \ (tp)->t_state == TCPS_ESTABLISHED) { \ tp->t_flags |= TF_DELACK; \ (tp)->rcv_nxt += (ti)->ti_len; \ @@ -134,8 +130,8 @@ tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, /* * Find a segment which begins after this one does. */ - for (q = (struct tcpiphdr *)tp->seg_next; q != (struct tcpiphdr *)tp; - q = (struct tcpiphdr *)q->ti_next) + for (q = tcpfrag_list_first(tp); !tcpfrag_list_end(q, tp); + q = tcpiphdr_next(q)) if (SEQ_GT(q->ti_seq, ti->ti_seq)) break; @@ -144,9 +140,9 @@ tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, * our data already. If so, drop the data from the incoming * segment. If it provides all of our data, drop us. */ - if ((struct tcpiphdr *)q->ti_prev != (struct tcpiphdr *)tp) { + if (!tcpfrag_list_end(tcpiphdr_prev(q), tp)) { register int i; - q = (struct tcpiphdr *)q->ti_prev; + q = tcpiphdr_prev(q); /* conversion to int (in i) handles seq wraparound */ i = q->ti_seq + q->ti_len - ti->ti_seq; if (i > 0) { @@ -166,36 +162,36 @@ tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, ti->ti_len -= i; ti->ti_seq += i; } - q = (struct tcpiphdr *)(q->ti_next); + q = tcpiphdr_next(q); } STAT(tcpstat.tcps_rcvoopack++); STAT(tcpstat.tcps_rcvoobyte += ti->ti_len); - REASS_MBUF(ti) = (mbufp_32) m; /* XXX */ + ti->ti_mbuf = m; /* * While we overlap succeeding segments trim them or, * if they are completely covered, dequeue them. */ - while (q != (struct tcpiphdr *)tp) { + while (!tcpfrag_list_end(q, tp)) { register int i = (ti->ti_seq + ti->ti_len) - q->ti_seq; if (i <= 0) break; if (i < q->ti_len) { q->ti_seq += i; q->ti_len -= i; - m_adj((struct mbuf *) REASS_MBUF(q), i); + m_adj(q->ti_mbuf, i); break; } - q = (struct tcpiphdr *)q->ti_next; - m = (struct mbuf *) REASS_MBUF((struct tcpiphdr *)q->ti_prev); - remque_32((void *)(q->ti_prev)); + q = tcpiphdr_next(q); + m = tcpiphdr_prev(q)->ti_mbuf; + remque(tcpiphdr2qlink(tcpiphdr_prev(q))); m_freem(m); } /* * Stick new segment in its place. */ - insque_32(ti, (void *)(q->ti_prev)); + insque(tcpiphdr2qlink(ti), tcpiphdr2qlink(tcpiphdr_prev(q))); present: /* @@ -204,17 +200,17 @@ present: */ if (!TCPS_HAVEESTABLISHED(tp->t_state)) return (0); - ti = (struct tcpiphdr *) tp->seg_next; - if (ti == (struct tcpiphdr *)tp || ti->ti_seq != tp->rcv_nxt) + ti = tcpfrag_list_first(tp); + if (tcpfrag_list_end(ti, tp) || ti->ti_seq != tp->rcv_nxt) return (0); if (tp->t_state == TCPS_SYN_RECEIVED && ti->ti_len) return (0); do { tp->rcv_nxt += ti->ti_len; flags = ti->ti_flags & TH_FIN; - remque_32(ti); - m = (struct mbuf *) REASS_MBUF(ti); /* XXX */ - ti = (struct tcpiphdr *)ti->ti_next; + remque(tcpiphdr2qlink(ti)); + m = ti->ti_mbuf; + ti = tcpiphdr_next(ti); /* if (so->so_state & SS_FCANTRCVMORE) */ if (so->so_state & SS_FCANTSENDMORE) m_freem(m); @@ -253,6 +249,7 @@ tcp_input(m, iphlen, inso) u_long tiwin; int ret; /* int ts_present = 0; */ + struct ex_list *ex_ptr; DEBUG_CALL("tcp_input"); DEBUG_ARGS((dfd," m = %8lx iphlen = %2d inso = %lx\n", @@ -301,7 +298,8 @@ tcp_input(m, iphlen, inso) * Checksum extended TCP header and data. */ tlen = ((struct ip *)ti)->ip_len; - ti->ti_next = ti->ti_prev = 0; + tcpiphdr2qlink(ti)->next = tcpiphdr2qlink(ti)->prev = 0; + memset(&ti->ti_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr)); ti->ti_x1 = 0; ti->ti_len = htons((u_int16_t)tlen); len = sizeof(struct ip ) + tlen; @@ -363,6 +361,15 @@ tcp_input(m, iphlen, inso) m->m_data += sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); m->m_len -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); + if (slirp_restrict) { + for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) + if (ex_ptr->ex_fport == ti->ti_dport && + (ntohl(ti->ti_dst.s_addr) & 0xff) == ex_ptr->ex_addr) + break; + + if (!ex_ptr) + goto drop; + } /* * Locate pcb for segment. */ @@ -550,7 +557,7 @@ findso: return; } } else if (ti->ti_ack == tp->snd_una && - tp->seg_next == (tcpiphdrp_32)tp && + tcpfrag_list_empty(tp) && ti->ti_len <= sbspace(&so->so_rcv)) { /* * this is a pure, in-sequence data packet @@ -646,7 +653,6 @@ findso: #endif { /* May be an add exec */ - struct ex_list *ex_ptr; for(ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) { if(ex_ptr->ex_fport == so->so_fport && lastbyte == ex_ptr->ex_addr) { diff --git a/BasiliskII/src/slirp/tcp_output.c b/BasiliskII/src/slirp/tcp_output.c index dba4ed7a..4a7bdbce 100644 --- a/BasiliskII/src/slirp/tcp_output.c +++ b/BasiliskII/src/slirp/tcp_output.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/tcp_subr.c b/BasiliskII/src/slirp/tcp_subr.c index ba1296d4..b30dffdc 100644 --- a/BasiliskII/src/slirp/tcp_subr.c +++ b/BasiliskII/src/slirp/tcp_subr.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -73,7 +69,7 @@ tcp_template(tp) struct socket *so = tp->t_socket; register struct tcpiphdr *n = &tp->t_template; - n->ti_next = n->ti_prev = 0; + n->ti_mbuf = NULL; n->ti_x1 = 0; n->ti_pr = IPPROTO_TCP; n->ti_len = htons(sizeof (struct tcpiphdr) - sizeof (struct ip)); @@ -156,7 +152,7 @@ tcp_respond(tp, ti, m, ack, seq, flags) tlen += sizeof (struct tcpiphdr); m->m_len = tlen; - ti->ti_next = ti->ti_prev = 0; + ti->ti_mbuf = 0; ti->ti_x1 = 0; ti->ti_seq = htonl(seq); ti->ti_ack = htonl(ack); @@ -196,7 +192,7 @@ tcp_newtcpcb(so) return ((struct tcpcb *)0); memset((char *) tp, 0, sizeof(struct tcpcb)); - tp->seg_next = tp->seg_prev = (tcpiphdrp_32)tp; + tp->seg_next = tp->seg_prev = (struct tcpiphdr*)tp; tp->t_maxseg = TCP_MSS; tp->t_flags = TCP_DO_RFC1323 ? (TF_REQ_SCALE|TF_REQ_TSTMP) : 0; @@ -272,11 +268,11 @@ tcp_close(tp) DEBUG_ARG("tp = %lx", (long )tp); /* free the reassembly queue, if any */ - t = (struct tcpiphdr *) tp->seg_next; - while (t != (struct tcpiphdr *)tp) { - t = (struct tcpiphdr *)t->ti_next; - m = (struct mbuf *) REASS_MBUF((struct tcpiphdr *)t->ti_prev); - remque_32((struct tcpiphdr *) t->ti_prev); + t = tcpfrag_list_first(tp); + while (!tcpfrag_list_end(t, tp)) { + t = tcpiphdr_next(t); + m = tcpiphdr_prev(t)->ti_mbuf; + remque(tcpiphdr2qlink(tcpiphdr_prev(t))); m_freem(m); } /* It's static */ @@ -447,7 +443,7 @@ tcp_connect(inso) { struct socket *so; struct sockaddr_in addr; - int addrlen = sizeof(struct sockaddr_in); + socklen_t addrlen = sizeof(struct sockaddr_in); struct tcpcb *tp; int s, opt; @@ -629,7 +625,7 @@ tcp_emu(so, m) struct mbuf *m; { u_int n1, n2, n3, n4, n5, n6; - char buff[256]; + char buff[257]; u_int32_t laddr; u_int lport; char *bptr; @@ -649,7 +645,7 @@ tcp_emu(so, m) { struct socket *tmpso; struct sockaddr_in addr; - int addrlen = sizeof(struct sockaddr_in); + socklen_t addrlen = sizeof(struct sockaddr_in); struct sbuf *so_rcv = &so->so_rcv; memcpy(so_rcv->sb_wptr, m->m_data, m->m_len); @@ -673,7 +669,9 @@ tcp_emu(so, m) } } } - so_rcv->sb_cc = sprintf(so_rcv->sb_data, "%d,%d\r\n", n1, n2); + so_rcv->sb_cc = snprintf(so_rcv->sb_data, + so_rcv->sb_datalen, + "%d,%d\r\n", n1, n2); so_rcv->sb_rptr = so_rcv->sb_data; so_rcv->sb_wptr = so_rcv->sb_data + so_rcv->sb_cc; } @@ -1007,8 +1005,9 @@ do_prompt: n4 = (laddr & 0xff); m->m_len = bptr - m->m_data; /* Adjust length */ - m->m_len += sprintf(bptr,"ORT %d,%d,%d,%d,%d,%d\r\n%s", - n1, n2, n3, n4, n5, n6, x==7?buff:""); + m->m_len += snprintf(bptr, m->m_hdr.mh_size - m->m_len, + "ORT %d,%d,%d,%d,%d,%d\r\n%s", + n1, n2, n3, n4, n5, n6, x==7?buff:""); return 1; } else if ((bptr = (char *)strstr(m->m_data, "27 Entering")) != NULL) { /* @@ -1038,8 +1037,9 @@ do_prompt: n4 = (laddr & 0xff); m->m_len = bptr - m->m_data; /* Adjust length */ - m->m_len += sprintf(bptr,"27 Entering Passive Mode (%d,%d,%d,%d,%d,%d)\r\n%s", - n1, n2, n3, n4, n5, n6, x==7?buff:""); + m->m_len += snprintf(bptr, m->m_hdr.mh_size - m->m_len, + "27 Entering Passive Mode (%d,%d,%d,%d,%d,%d)\r\n%s", + n1, n2, n3, n4, n5, n6, x==7?buff:""); return 1; } @@ -1062,7 +1062,8 @@ do_prompt: } if (m->m_data[m->m_len-1] == '\0' && lport != 0 && (so = solisten(0, so->so_laddr.s_addr, htons(lport), SS_FACCEPTONCE)) != NULL) - m->m_len = sprintf(m->m_data, "%d", ntohs(so->so_fport))+1; + m->m_len = snprintf(m->m_data, m->m_hdr.mh_size, "%d", + ntohs(so->so_fport)) + 1; return 1; case EMU_IRC: @@ -1079,25 +1080,28 @@ do_prompt: return 1; m->m_len = bptr - m->m_data; /* Adjust length */ - m->m_len += sprintf(bptr, "DCC CHAT chat %lu %u%c\n", - (unsigned long)ntohl(so->so_faddr.s_addr), - ntohs(so->so_fport), 1); + m->m_len += snprintf(bptr, m->m_hdr.mh_size, + "DCC CHAT chat %lu %u%c\n", + (unsigned long)ntohl(so->so_faddr.s_addr), + ntohs(so->so_fport), 1); } else if (sscanf(bptr, "DCC SEND %256s %u %u %u", buff, &laddr, &lport, &n1) == 4) { if ((so = solisten(0, htonl(laddr), htons(lport), SS_FACCEPTONCE)) == NULL) return 1; m->m_len = bptr - m->m_data; /* Adjust length */ - m->m_len += sprintf(bptr, "DCC SEND %s %lu %u %u%c\n", - buff, (unsigned long)ntohl(so->so_faddr.s_addr), - ntohs(so->so_fport), n1, 1); + m->m_len += snprintf(bptr, m->m_hdr.mh_size, + "DCC SEND %s %lu %u %u%c\n", buff, + (unsigned long)ntohl(so->so_faddr.s_addr), + ntohs(so->so_fport), n1, 1); } else if (sscanf(bptr, "DCC MOVE %256s %u %u %u", buff, &laddr, &lport, &n1) == 4) { if ((so = solisten(0, htonl(laddr), htons(lport), SS_FACCEPTONCE)) == NULL) return 1; m->m_len = bptr - m->m_data; /* Adjust length */ - m->m_len += sprintf(bptr, "DCC MOVE %s %lu %u %u%c\n", - buff, (unsigned long)ntohl(so->so_faddr.s_addr), - ntohs(so->so_fport), n1, 1); + m->m_len += snprintf(bptr, m->m_hdr.mh_size, + "DCC MOVE %s %lu %u %u%c\n", buff, + (unsigned long)ntohl(so->so_faddr.s_addr), + ntohs(so->so_fport), n1, 1); } return 1; @@ -1273,6 +1277,11 @@ tcp_ctl(so) for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) { if (ex_ptr->ex_fport == so->so_fport && command == ex_ptr->ex_addr) { + if (ex_ptr->ex_pty == 3) { + so->s = -1; + so->extra = (void *)ex_ptr->ex_exec; + return 1; + } do_pty = ex_ptr->ex_pty; goto do_exec; } @@ -1285,8 +1294,8 @@ tcp_ctl(so) /* FALLTHROUGH */ case CTL_ALIAS: - sb->sb_cc = sprintf(sb->sb_wptr, - "Error: No application configured.\r\n"); + sb->sb_cc = snprintf(sb->sb_wptr, sb->sb_datalen - (sb->sb_wptr - sb->sb_data), + "Error: No application configured.\r\n"); sb->sb_wptr += sb->sb_cc; return(0); diff --git a/BasiliskII/src/slirp/tcp_timer.c b/BasiliskII/src/slirp/tcp_timer.c index 244bad6a..47f01bb9 100644 --- a/BasiliskII/src/slirp/tcp_timer.c +++ b/BasiliskII/src/slirp/tcp_timer.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/tcp_timer.h b/BasiliskII/src/slirp/tcp_timer.h index f251846b..791ee49d 100644 --- a/BasiliskII/src/slirp/tcp_timer.h +++ b/BasiliskII/src/slirp/tcp_timer.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/tcp_var.h b/BasiliskII/src/slirp/tcp_var.h index 82380f93..d4af1c8d 100644 --- a/BasiliskII/src/slirp/tcp_var.h +++ b/BasiliskII/src/slirp/tcp_var.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -40,18 +36,12 @@ #include "tcpip.h" #include "tcp_timer.h" -#if SIZEOF_CHAR_P == 4 - typedef struct tcpiphdr *tcpiphdrp_32; -#else - typedef u_int32_t tcpiphdrp_32; -#endif - /* * Tcp control block, one per tcp; fields: */ struct tcpcb { - tcpiphdrp_32 seg_next; /* sequencing queue */ - tcpiphdrp_32 seg_prev; + struct tcpiphdr *seg_next; /* sequencing queue */ + struct tcpiphdr *seg_prev; short t_state; /* state of this connection */ short t_timer[TCPT_NTIMERS]; /* tcp timers */ short t_rxtshift; /* log(2) of rexmt exp. backoff */ @@ -170,21 +160,6 @@ struct tcpcb { #define TCP_REXMTVAL(tp) \ (((tp)->t_srtt >> TCP_RTT_SHIFT) + (tp)->t_rttvar) -/* XXX - * We want to avoid doing m_pullup on incoming packets but that - * means avoiding dtom on the tcp reassembly code. That in turn means - * keeping an mbuf pointer in the reassembly queue (since we might - * have a cluster). As a quick hack, the source & destination - * port numbers (which are no longer needed once we've located the - * tcpcb) are overlayed with an mbuf pointer. - */ -#if SIZEOF_CHAR_P == 4 -typedef struct mbuf *mbufp_32; -#else -typedef u_int32_t mbufp_32; -#endif -#define REASS_MBUF(ti) (*(mbufp_32 *)&((ti)->ti_t)) - #ifdef LOG_ENABLED /* * TCP statistics. diff --git a/BasiliskII/src/slirp/tcpip.h b/BasiliskII/src/slirp/tcpip.h index 82708b09..7974ce3d 100644 --- a/BasiliskII/src/slirp/tcpip.h +++ b/BasiliskII/src/slirp/tcpip.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -44,8 +40,7 @@ struct tcpiphdr { struct ipovly ti_i; /* overlaid ip structure */ struct tcphdr ti_t; /* tcp header */ }; -#define ti_next ti_i.ih_next -#define ti_prev ti_i.ih_prev +#define ti_mbuf ti_i.ih_mbuf.mptr #define ti_x1 ti_i.ih_x1 #define ti_pr ti_i.ih_pr #define ti_len ti_i.ih_len @@ -62,6 +57,14 @@ struct tcpiphdr { #define ti_sum ti_t.th_sum #define ti_urp ti_t.th_urp +#define tcpiphdr2qlink(T) ((struct qlink*)(((char*)(T)) - sizeof(struct qlink))) +#define qlink2tcpiphdr(Q) ((struct tcpiphdr*)(((char*)(Q)) + sizeof(struct qlink))) +#define tcpiphdr_next(T) qlink2tcpiphdr(tcpiphdr2qlink(T)->next) +#define tcpiphdr_prev(T) qlink2tcpiphdr(tcpiphdr2qlink(T)->prev) +#define tcpfrag_list_first(T) qlink2tcpiphdr((T)->seg_next) +#define tcpfrag_list_end(F, T) (tcpiphdr2qlink(F) == (struct qlink*)(T)) +#define tcpfrag_list_empty(T) ((T)->seg_next == (struct tcpiphdr*)(T)) + /* * Just a clean way to get to the first byte * of the packet diff --git a/BasiliskII/src/slirp/tftp.c b/BasiliskII/src/slirp/tftp.c index 562ae895..4ad55048 100644 --- a/BasiliskII/src/slirp/tftp.c +++ b/BasiliskII/src/slirp/tftp.c @@ -23,6 +23,7 @@ */ #include +#include "qemu-common.h" // for pstrcpy struct tftp_session { int in_use; @@ -148,8 +149,10 @@ static int tftp_send_oack(struct tftp_session *spt, m->m_data += sizeof(struct udpiphdr); tp->tp_op = htons(TFTP_OACK); - n += sprintf(tp->x.tp_buf + n, "%s", key) + 1; - n += sprintf(tp->x.tp_buf + n, "%u", value) + 1; + n += snprintf((char *)tp->x.tp_buf + n, sizeof(tp->x.tp_buf) - n, "%s", + key) + 1; + n += snprintf((char *)tp->x.tp_buf + n, sizeof(tp->x.tp_buf) - n, "%u", + value) + 1; saddr.sin_addr = recv_tp->ip.ip_dst; saddr.sin_port = recv_tp->udp.uh_dport; @@ -189,7 +192,7 @@ static int tftp_send_error(struct tftp_session *spt, tp->tp_op = htons(TFTP_ERROR); tp->x.tp_error.tp_error_code = htons(errorcode); - strcpy(tp->x.tp_error.tp_msg, msg); + pstrcpy((char *)tp->x.tp_error.tp_msg, sizeof(tp->x.tp_error.tp_msg), msg); saddr.sin_addr = recv_tp->ip.ip_dst; saddr.sin_port = recv_tp->udp.uh_dport; @@ -324,8 +327,8 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen) /* do sanity checks on the filename */ if ((spt->filename[0] != '/') - || (spt->filename[strlen(spt->filename) - 1] == '/') - || strstr(spt->filename, "/../")) { + || (spt->filename[strlen((char *)spt->filename) - 1] == '/') + || strstr((char *)spt->filename, "/../")) { tftp_send_error(spt, 2, "Access violation", tp); return; } @@ -352,7 +355,7 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen) while (k < n) { const char *key, *value; - key = src + k; + key = (char *)src + k; k += strlen(key) + 1; if (k >= n) { @@ -360,7 +363,7 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen) return; } - value = src + k; + value = (char *)src + k; k += strlen(value) + 1; if (strcmp(key, "tsize") == 0) { diff --git a/BasiliskII/src/slirp/udp.c b/BasiliskII/src/slirp/udp.c index c48923b0..8d3bdd2c 100644 --- a/BasiliskII/src/slirp/udp.c +++ b/BasiliskII/src/slirp/udp.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -136,8 +132,7 @@ udp_input(m, iphlen) * Checksum extended UDP header and data. */ if (UDPCKSUM && uh->uh_sum) { - ((struct ipovly *)ip)->ih_next = 0; - ((struct ipovly *)ip)->ih_prev = 0; + memset(&((struct ipovly *)ip)->ih_mbuf, 0, sizeof(struct mbuf_ptr)); ((struct ipovly *)ip)->ih_x1 = 0; ((struct ipovly *)ip)->ih_len = uh->uh_ulen; /* keep uh_sum for ICMP reply @@ -158,6 +153,9 @@ udp_input(m, iphlen) goto bad; } + if (slirp_restrict) + goto bad; + /* * handle TFTP */ @@ -280,7 +278,7 @@ int udp_output2(struct socket *so, struct mbuf *m, * and addresses and length put into network format. */ ui = mtod(m, struct udpiphdr *); - ui->ui_next = ui->ui_prev = 0; + memset(&ui->ui_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr)); ui->ui_x1 = 0; ui->ui_pr = IPPROTO_UDP; ui->ui_len = htons(m->m_len - sizeof(struct ip)); /* + sizeof (struct udphdr)); */ @@ -319,9 +317,11 @@ int udp_output(struct socket *so, struct mbuf *m, saddr = *addr; if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) { - saddr.sin_addr.s_addr = so->so_faddr.s_addr; if ((so->so_faddr.s_addr & htonl(0x000000ff)) == htonl(0xff)) saddr.sin_addr.s_addr = alias_addr.s_addr; + else if (addr->sin_addr.s_addr == loopback_addr.s_addr || + (ntohl(so->so_faddr.s_addr) & 0xff) != CTL_ALIAS) + saddr.sin_addr.s_addr = so->so_faddr.s_addr; } daddr.sin_addr = so->so_laddr; daddr.sin_port = so->so_lport; @@ -408,7 +408,7 @@ static void udp_emu(struct socket *so, struct mbuf *m) { struct sockaddr_in addr; - int addrlen = sizeof(addr); + socklen_t addrlen = sizeof(addr); #ifdef EMULATE_TALK CTL_MSG_OLD *omsg; CTL_MSG *nmsg; @@ -473,14 +473,14 @@ struct cu_header { type = omsg->type; OTOSIN(omsg, ctl_addr)->sin_port = addr.sin_port; OTOSIN(omsg, ctl_addr)->sin_addr = our_addr; - strncpy(omsg->l_name, getlogin(), NAME_SIZE_OLD); + pstrcpy(omsg->l_name, NAME_SIZE_OLD, getlogin()); } else { /* new talk */ omsg = (CTL_MSG_OLD *) buff; nmsg = mtod(m, CTL_MSG *); type = nmsg->type; OTOSIN(nmsg, ctl_addr)->sin_port = addr.sin_port; OTOSIN(nmsg, ctl_addr)->sin_addr = our_addr; - strncpy(nmsg->l_name, getlogin(), NAME_SIZE_OLD); + pstrcpy(nmsg->l_name, NAME_SIZE_OLD, getlogin()); } if (type == LOOK_UP) @@ -639,7 +639,7 @@ udp_listen(port, laddr, lport, flags) { struct sockaddr_in addr; struct socket *so; - int addrlen = sizeof(struct sockaddr_in), opt = 1; + socklen_t addrlen = sizeof(struct sockaddr_in), opt = 1; if ((so = socreate()) == NULL) { free(so); diff --git a/BasiliskII/src/slirp/udp.h b/BasiliskII/src/slirp/udp.h index 4f69b098..51a07a2f 100644 --- a/BasiliskII/src/slirp/udp.h +++ b/BasiliskII/src/slirp/udp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -60,8 +56,7 @@ struct udpiphdr { struct ipovly ui_i; /* overlaid ip structure */ struct udphdr ui_u; /* udp header */ }; -#define ui_next ui_i.ih_next -#define ui_prev ui_i.ih_prev +#define ui_mbuf ui_i.ih_mbuf.mptr #define ui_x1 ui_i.ih_x1 #define ui_pr ui_i.ih_pr #define ui_len ui_i.ih_len From c20d9d3c52d47995f9cd78cd23c2b5ddfdd6e684 Mon Sep 17 00:00:00 2001 From: jvernet Date: Wed, 4 Oct 2017 18:22:40 +0200 Subject: [PATCH 75/85] Revert "SLIRP 0.10.1" This reverts commit ef4725552ef0a953fceaf3e7fd5166462b70f861. --- BasiliskII/src/slirp/COPYRIGHT | 3 + BasiliskII/src/slirp/bootp.c | 27 +- BasiliskII/src/slirp/cksum.c | 6 +- BasiliskII/src/slirp/debug.c | 2 + BasiliskII/src/slirp/debug.h | 1 + BasiliskII/src/slirp/icmp_var.h | 6 +- BasiliskII/src/slirp/if.c | 12 +- BasiliskII/src/slirp/ip.h | 72 +++-- BasiliskII/src/slirp/ip_icmp.c | 20 +- BasiliskII/src/slirp/ip_icmp.h | 9 +- BasiliskII/src/slirp/ip_input.c | 165 +++++------- BasiliskII/src/slirp/ip_output.c | 6 +- BasiliskII/src/slirp/libslirp.h | 7 +- BasiliskII/src/slirp/main.h | 3 - BasiliskII/src/slirp/mbuf.c | 9 +- BasiliskII/src/slirp/mbuf.h | 6 +- BasiliskII/src/slirp/misc.c | 60 ++++- BasiliskII/src/slirp/misc.h | 6 +- BasiliskII/src/slirp/sbuf.c | 3 +- BasiliskII/src/slirp/slirp.c | 391 +--------------------------- BasiliskII/src/slirp/slirp.h | 14 +- BasiliskII/src/slirp/slirp_config.h | 8 +- BasiliskII/src/slirp/socket.c | 111 ++------ BasiliskII/src/slirp/socket.h | 10 +- BasiliskII/src/slirp/tcp.h | 6 +- BasiliskII/src/slirp/tcp_input.c | 60 ++--- BasiliskII/src/slirp/tcp_output.c | 6 +- BasiliskII/src/slirp/tcp_subr.c | 75 +++--- BasiliskII/src/slirp/tcp_timer.c | 6 +- BasiliskII/src/slirp/tcp_timer.h | 6 +- BasiliskII/src/slirp/tcp_var.h | 31 ++- BasiliskII/src/slirp/tcpip.h | 17 +- BasiliskII/src/slirp/tftp.c | 17 +- BasiliskII/src/slirp/udp.c | 26 +- BasiliskII/src/slirp/udp.h | 9 +- 35 files changed, 451 insertions(+), 765 deletions(-) diff --git a/BasiliskII/src/slirp/COPYRIGHT b/BasiliskII/src/slirp/COPYRIGHT index 1bc83d49..3f331ee0 100644 --- a/BasiliskII/src/slirp/COPYRIGHT +++ b/BasiliskII/src/slirp/COPYRIGHT @@ -25,6 +25,9 @@ The copyright terms and conditions: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgment: + This product includes software developed by Danny Gasparovski. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY diff --git a/BasiliskII/src/slirp/bootp.c b/BasiliskII/src/slirp/bootp.c index ca177f40..3ae3db20 100644 --- a/BasiliskII/src/slirp/bootp.c +++ b/BasiliskII/src/slirp/bootp.c @@ -36,7 +36,7 @@ typedef struct { uint8_t macaddr[6]; } BOOTPClient; -static BOOTPClient bootp_clients[NB_ADDR]; +BOOTPClient bootp_clients[NB_ADDR]; const char *bootp_filename; @@ -172,8 +172,7 @@ static void bootp_reply(struct bootp_t *bp) } if (bootp_filename) - snprintf((char *)rbp->bp_file, sizeof(rbp->bp_file), "%s", - bootp_filename); + snprintf(rbp->bp_file, sizeof(rbp->bp_file), "%s", bootp_filename); dprintf("offered addr=%08x\n", ntohl(daddr.sin_addr.s_addr)); @@ -191,8 +190,6 @@ static void bootp_reply(struct bootp_t *bp) rbp->bp_yiaddr = daddr.sin_addr; /* Client IP address */ rbp->bp_siaddr = saddr.sin_addr; /* Server IP address */ - daddr.sin_addr.s_addr = 0xffffffffu; - q = rbp->bp_vend; memcpy(q, rfc1533_cookie, 4); q += 4; @@ -221,18 +218,16 @@ static void bootp_reply(struct bootp_t *bp) *q++ = 0xff; *q++ = 0x00; - if (!slirp_restrict) { - *q++ = RFC1533_GATEWAY; - *q++ = 4; - memcpy(q, &saddr.sin_addr, 4); - q += 4; + *q++ = RFC1533_GATEWAY; + *q++ = 4; + memcpy(q, &saddr.sin_addr, 4); + q += 4; - *q++ = RFC1533_DNS; - *q++ = 4; - dns_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_DNS); - memcpy(q, &dns_addr, 4); - q += 4; - } + *q++ = RFC1533_DNS; + *q++ = 4; + dns_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_DNS); + memcpy(q, &dns_addr, 4); + q += 4; *q++ = RFC2132_LEASE_TIME; *q++ = 4; diff --git a/BasiliskII/src/slirp/cksum.c b/BasiliskII/src/slirp/cksum.c index 34977ffc..b98373b5 100644 --- a/BasiliskII/src/slirp/cksum.c +++ b/BasiliskII/src/slirp/cksum.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/debug.c b/BasiliskII/src/slirp/debug.c index bfef5806..7c8581d6 100644 --- a/BasiliskII/src/slirp/debug.c +++ b/BasiliskII/src/slirp/debug.c @@ -16,6 +16,8 @@ int dostats = 0; #endif int slirp_debug = 0; +extern char *strerror _P((int)); + /* Carry over one item from main.c so that the tty's restored. * Only done when the tty being used is /dev/tty --RedWolf */ #ifndef CONFIG_QEMU diff --git a/BasiliskII/src/slirp/debug.h b/BasiliskII/src/slirp/debug.h index c43eff73..8a523b2e 100644 --- a/BasiliskII/src/slirp/debug.h +++ b/BasiliskII/src/slirp/debug.h @@ -37,3 +37,4 @@ extern int slirp_debug; #endif void debug_init _P((char *, int)); + diff --git a/BasiliskII/src/slirp/icmp_var.h b/BasiliskII/src/slirp/icmp_var.h index 99d4c9e6..cd865b79 100644 --- a/BasiliskII/src/slirp/icmp_var.h +++ b/BasiliskII/src/slirp/icmp_var.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/if.c b/BasiliskII/src/slirp/if.c index 0e10f3e6..67a7b6ff 100644 --- a/BasiliskII/src/slirp/if.c +++ b/BasiliskII/src/slirp/if.c @@ -15,8 +15,9 @@ struct mbuf *next_m; /* Pointer to next mbuf to output */ #define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm)) -static void -ifs_insque(struct mbuf *ifm, struct mbuf *ifmhead) +void +ifs_insque(ifm, ifmhead) + struct mbuf *ifm, *ifmhead; { ifm->ifs_next = ifmhead->ifs_next; ifmhead->ifs_next = ifm; @@ -24,8 +25,9 @@ ifs_insque(struct mbuf *ifm, struct mbuf *ifmhead) ifm->ifs_next->ifs_prev = ifm; } -static void -ifs_remque(struct mbuf *ifm) +void +ifs_remque(ifm) + struct mbuf *ifm; { ifm->ifs_prev->ifs_next = ifm->ifs_next; ifm->ifs_next->ifs_prev = ifm->ifs_prev; @@ -289,7 +291,7 @@ if_start(void) } /* Encapsulate the packet for sending */ - if_encap((uint8_t *)ifm->m_data, ifm->m_len); + if_encap(ifm->m_data, ifm->m_len); m_free(ifm); diff --git a/BasiliskII/src/slirp/ip.h b/BasiliskII/src/slirp/ip.h index 7a7a9b94..a8cdb0d3 100644 --- a/BasiliskII/src/slirp/ip.h +++ b/BasiliskII/src/slirp/ip.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -179,31 +183,35 @@ struct ip_timestamp { #define IP_MSS 576 /* default maximum segment size */ -#if SIZEOF_CHAR_P == 4 -struct mbuf_ptr { - struct mbuf *mptr; - uint32_t dummy; -}; +#ifdef HAVE_SYS_TYPES32_H /* Overcome some Solaris 2.x junk */ +#include #else -struct mbuf_ptr { - struct mbuf *mptr; -}; +#if SIZEOF_CHAR_P == 4 +typedef caddr_t caddr32_t; +#else +typedef u_int32_t caddr32_t; +#endif +#endif + +#if SIZEOF_CHAR_P == 4 +typedef struct ipq *ipqp_32; +typedef struct ipasfrag *ipasfragp_32; +#else +typedef caddr32_t ipqp_32; +typedef caddr32_t ipasfragp_32; #endif -struct qlink { - void *next, *prev; -}; /* * Overlay for ip header used by other protocols (tcp, udp). */ struct ipovly { - struct mbuf_ptr ih_mbuf; /* backpointer to mbuf */ + caddr32_t ih_next, ih_prev; /* for protocol sequence q's */ u_int8_t ih_x1; /* (unused) */ u_int8_t ih_pr; /* protocol */ u_int16_t ih_len; /* protocol length */ struct in_addr ih_src; /* source internet address */ struct in_addr ih_dst; /* destination internet address */ -} __attribute__((packed)); +}; /* * Ip reassembly queue structure. Each fragment @@ -213,30 +221,44 @@ struct ipovly { * size 28 bytes */ struct ipq { - struct qlink frag_link; /* to ip headers of fragments */ - struct qlink ip_link; /* to other reass headers */ + ipqp_32 next,prev; /* to other reass headers */ u_int8_t ipq_ttl; /* time for reass q to live */ u_int8_t ipq_p; /* protocol of this fragment */ u_int16_t ipq_id; /* sequence id for reassembly */ + ipasfragp_32 ipq_next,ipq_prev; + /* to ip headers of fragments */ struct in_addr ipq_src,ipq_dst; }; /* * Ip header, when holding a fragment. * - * Note: ipf_link must be at same offset as frag_link above + * Note: ipf_next must be at same offset as ipq_next above */ struct ipasfrag { - struct qlink ipf_link; - struct ip ipf_ip; +#ifdef WORDS_BIGENDIAN + u_int ip_v:4, + ip_hl:4; +#else + u_int ip_hl:4, + ip_v:4; +#endif + /* BUG : u_int changed to u_int8_t. + * sizeof(u_int)==4 on linux 2.0 + */ + u_int8_t ipf_mff; /* XXX overlays ip_tos: use low bit + * to avoid destroying tos (PPPDTRuu); + * copied from (ip_off&IP_MF) */ + u_int16_t ip_len; + u_int16_t ip_id; + u_int16_t ip_off; + u_int8_t ip_ttl; + u_int8_t ip_p; + u_int16_t ip_sum; + ipasfragp_32 ipf_next; /* next fragment */ + ipasfragp_32 ipf_prev; /* previous fragment */ }; -#define ipf_off ipf_ip.ip_off -#define ipf_tos ipf_ip.ip_tos -#define ipf_len ipf_ip.ip_len -#define ipf_next ipf_link.next -#define ipf_prev ipf_link.prev - /* * Structure stored in mbuf in inpcb.ip_options * and passed to ip_output when ip options are in use. diff --git a/BasiliskII/src/slirp/ip_icmp.c b/BasiliskII/src/slirp/ip_icmp.c index 4b27facf..d1da0a2f 100644 --- a/BasiliskII/src/slirp/ip_icmp.c +++ b/BasiliskII/src/slirp/ip_icmp.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -39,7 +43,7 @@ struct icmpstat icmpstat; /* The message sent when emulating PING */ /* Be nice and tell them it's just a pseudo-ping packet */ -static const char icmp_ping_msg[] = "This is a pseudo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n"; +const char icmp_ping_msg[] = "This is a pseudo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n"; /* list of actions for icmp_error() on RX of an icmp message */ static const int icmp_flush[19] = { @@ -203,8 +207,12 @@ end_error: #define ICMP_MAXDATALEN (IP_MSS-28) void -icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize, - const char *message) +icmp_error(msrc, type, code, minsize, message) + struct mbuf *msrc; + u_char type; + u_char code; + int minsize; + char *message; { unsigned hlen, shlen, s_ip_len; register struct ip *ip; @@ -220,7 +228,7 @@ icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize, /* check msrc */ if(!msrc) goto end_error; ip = mtod(msrc, struct ip *); -#ifdef DEBUG +#if DEBUG { char bufa[20], bufb[20]; strcpy(bufa, inet_ntoa(ip->ip_src)); strcpy(bufb, inet_ntoa(ip->ip_dst)); @@ -277,7 +285,7 @@ icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize, HTONS(icp->icmp_ip.ip_id); HTONS(icp->icmp_ip.ip_off); -#ifdef DEBUG +#if DEBUG if(message) { /* DEBUG : append message to ICMP packet */ int message_len; char *cpnt; diff --git a/BasiliskII/src/slirp/ip_icmp.h b/BasiliskII/src/slirp/ip_icmp.h index 03301313..8c9b5a1b 100644 --- a/BasiliskII/src/slirp/ip_icmp.h +++ b/BasiliskII/src/slirp/ip_icmp.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -154,8 +158,7 @@ struct icmp { (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) void icmp_input _P((struct mbuf *, int)); -void icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize, - const char *message); +void icmp_error _P((struct mbuf *, u_char, u_char, int, char *)); void icmp_reflect _P((struct mbuf *)); #endif diff --git a/BasiliskII/src/slirp/ip_input.c b/BasiliskII/src/slirp/ip_input.c index 505149a3..b0468402 100644 --- a/BasiliskII/src/slirp/ip_input.c +++ b/BasiliskII/src/slirp/ip_input.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -39,7 +43,6 @@ */ #include -#include #include "ip_icmp.h" #ifdef LOG_ENABLED @@ -48,7 +51,7 @@ struct ipstat ipstat; struct ipq ipq; -static struct ip *ip_reass(register struct ip *ip, +static struct ip *ip_reass(register struct ipasfrag *ip, register struct ipq *fp); static void ip_freef(struct ipq *fp); static void ip_enq(register struct ipasfrag *p, @@ -62,7 +65,7 @@ static void ip_deq(register struct ipasfrag *p); void ip_init() { - ipq.ip_link.next = ipq.ip_link.prev = &ipq.ip_link; + ipq.next = ipq.prev = (ipqp_32)&ipq; ip_id = tt.tv_sec & 0xffff; udp_init(); tcp_init(); @@ -133,27 +136,6 @@ ip_input(m) STAT(ipstat.ips_tooshort++); goto bad; } - - if (slirp_restrict) { - if (memcmp(&ip->ip_dst.s_addr, &special_addr, 3)) { - if (ip->ip_dst.s_addr == 0xffffffff && ip->ip_p != IPPROTO_UDP) - goto bad; - } else { - int host = ntohl(ip->ip_dst.s_addr) & 0xff; - struct ex_list *ex_ptr; - - if (host == 0xff) - goto bad; - - for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) - if (ex_ptr->ex_addr == host) - break; - - if (!ex_ptr) - goto bad; - } - } - /* Should drop packet if mbuf too long? hmmm... */ if (m->m_len > ip->ip_len) m_adj(m, ip->ip_len - m->m_len); @@ -185,20 +167,18 @@ ip_input(m) */ if (ip->ip_off &~ IP_DF) { register struct ipq *fp; - struct qlink *l; /* * Look for queue of fragments * of this datagram. */ - for (l = ipq.ip_link.next; l != &ipq.ip_link; l = l->next) { - fp = container_of(l, struct ipq, ip_link); - if (ip->ip_id == fp->ipq_id && - ip->ip_src.s_addr == fp->ipq_src.s_addr && - ip->ip_dst.s_addr == fp->ipq_dst.s_addr && - ip->ip_p == fp->ipq_p) + for (fp = (struct ipq *) ipq.next; fp != &ipq; + fp = (struct ipq *) fp->next) + if (ip->ip_id == fp->ipq_id && + ip->ip_src.s_addr == fp->ipq_src.s_addr && + ip->ip_dst.s_addr == fp->ipq_dst.s_addr && + ip->ip_p == fp->ipq_p) goto found; - } - fp = NULL; + fp = 0; found: /* @@ -208,9 +188,9 @@ ip_input(m) */ ip->ip_len -= hlen; if (ip->ip_off & IP_MF) - ip->ip_tos |= 1; + ((struct ipasfrag *)ip)->ipf_mff |= 1; else - ip->ip_tos &= ~1; + ((struct ipasfrag *)ip)->ipf_mff &= ~1; ip->ip_off <<= 3; @@ -219,9 +199,9 @@ ip_input(m) * or if this is not the first fragment, * attempt reassembly; if it succeeds, proceed. */ - if (ip->ip_tos & 1 || ip->ip_off) { + if (((struct ipasfrag *)ip)->ipf_mff & 1 || ip->ip_off) { STAT(ipstat.ips_fragments++); - ip = ip_reass(ip, fp); + ip = ip_reass((struct ipasfrag *)ip, fp); if (ip == 0) return; STAT(ipstat.ips_reassembled++); @@ -257,8 +237,6 @@ bad: return; } -#define iptofrag(P) ((struct ipasfrag *)(((char*)(P)) - sizeof(struct qlink))) -#define fragtoip(P) ((struct ip*)(((char*)(P)) + sizeof(struct qlink))) /* * Take incoming datagram fragment and try to * reassemble it into whole datagram. If a chain for @@ -266,7 +244,7 @@ bad: * is given as fp; otherwise have to make a chain. */ static struct ip * -ip_reass(register struct ip *ip, register struct ipq *fp) +ip_reass(register struct ipasfrag *ip, register struct ipq *fp) { register struct mbuf *m = dtom(ip); register struct ipasfrag *q; @@ -293,13 +271,13 @@ ip_reass(register struct ip *ip, register struct ipq *fp) struct mbuf *t; if ((t = m_get()) == NULL) goto dropfrag; fp = mtod(t, struct ipq *); - insque(&fp->ip_link, &ipq.ip_link); + insque_32(fp, &ipq); fp->ipq_ttl = IPFRAGTTL; fp->ipq_p = ip->ip_p; fp->ipq_id = ip->ip_id; - fp->frag_link.next = fp->frag_link.prev = &fp->frag_link; - fp->ipq_src = ip->ip_src; - fp->ipq_dst = ip->ip_dst; + fp->ipq_next = fp->ipq_prev = (ipasfragp_32)fp; + fp->ipq_src = ((struct ip *)ip)->ip_src; + fp->ipq_dst = ((struct ip *)ip)->ip_dst; q = (struct ipasfrag *)fp; goto insert; } @@ -307,9 +285,9 @@ ip_reass(register struct ip *ip, register struct ipq *fp) /* * Find a segment which begins after this one does. */ - for (q = fp->frag_link.next; q != (struct ipasfrag *)&fp->frag_link; - q = q->ipf_next) - if (q->ipf_off > ip->ip_off) + for (q = (struct ipasfrag *)fp->ipq_next; q != (struct ipasfrag *)fp; + q = (struct ipasfrag *)q->ipf_next) + if (q->ip_off > ip->ip_off) break; /* @@ -317,9 +295,9 @@ ip_reass(register struct ip *ip, register struct ipq *fp) * our data already. If so, drop the data from the incoming * segment. If it provides all of our data, drop us. */ - if (q->ipf_prev != &fp->frag_link) { - struct ipasfrag *pq = q->ipf_prev; - i = pq->ipf_off + pq->ipf_len - ip->ip_off; + if (q->ipf_prev != (ipasfragp_32)fp) { + i = ((struct ipasfrag *)(q->ipf_prev))->ip_off + + ((struct ipasfrag *)(q->ipf_prev))->ip_len - ip->ip_off; if (i > 0) { if (i >= ip->ip_len) goto dropfrag; @@ -333,18 +311,17 @@ ip_reass(register struct ip *ip, register struct ipq *fp) * While we overlap succeeding segments trim them or, * if they are completely covered, dequeue them. */ - while (q != (struct ipasfrag*)&fp->frag_link && - ip->ip_off + ip->ip_len > q->ipf_off) { - i = (ip->ip_off + ip->ip_len) - q->ipf_off; - if (i < q->ipf_len) { - q->ipf_len -= i; - q->ipf_off += i; + while (q != (struct ipasfrag *)fp && ip->ip_off + ip->ip_len > q->ip_off) { + i = (ip->ip_off + ip->ip_len) - q->ip_off; + if (i < q->ip_len) { + q->ip_len -= i; + q->ip_off += i; m_adj(dtom(q), i); break; } - q = q->ipf_next; - m_freem(dtom(q->ipf_prev)); - ip_deq(q->ipf_prev); + q = (struct ipasfrag *) q->ipf_next; + m_freem(dtom((struct ipasfrag *) q->ipf_prev)); + ip_deq((struct ipasfrag *) q->ipf_prev); } insert: @@ -352,26 +329,27 @@ insert: * Stick new segment in its place; * check for complete reassembly. */ - ip_enq(iptofrag(ip), q->ipf_prev); + ip_enq(ip, (struct ipasfrag *) q->ipf_prev); next = 0; - for (q = fp->frag_link.next; q != (struct ipasfrag*)&fp->frag_link; - q = q->ipf_next) { - if (q->ipf_off != next) + for (q = (struct ipasfrag *) fp->ipq_next; q != (struct ipasfrag *)fp; + q = (struct ipasfrag *) q->ipf_next) { + if (q->ip_off != next) return (0); - next += q->ipf_len; + next += q->ip_len; } - if (((struct ipasfrag *)(q->ipf_prev))->ipf_tos & 1) + if (((struct ipasfrag *)(q->ipf_prev))->ipf_mff & 1) return (0); /* * Reassembly is complete; concatenate fragments. */ - q = fp->frag_link.next; + q = (struct ipasfrag *) fp->ipq_next; m = dtom(q); q = (struct ipasfrag *) q->ipf_next; - while (q != (struct ipasfrag*)&fp->frag_link) { - struct mbuf *t = dtom(q); + while (q != (struct ipasfrag *)fp) { + struct mbuf *t; + t = dtom(q); q = (struct ipasfrag *) q->ipf_next; m_cat(m, t); } @@ -382,7 +360,7 @@ insert: * dequeue and discard fragment reassembly header. * Make header visible. */ - q = fp->frag_link.next; + ip = (struct ipasfrag *) fp->ipq_next; /* * If the fragments concatenated to an mbuf that's @@ -392,24 +370,25 @@ insert: * into the new buffer. */ if (m->m_flags & M_EXT) { - int delta = (char *)q - m->m_dat; - q = (struct ipasfrag *)(m->m_ext + delta); + int delta; + delta = (char *)ip - m->m_dat; + ip = (struct ipasfrag *)(m->m_ext + delta); } /* DEBUG_ARG("ip = %lx", (long)ip); * ip=(struct ipasfrag *)m->m_data; */ - ip = fragtoip(q); ip->ip_len = next; - ip->ip_tos &= ~1; - ip->ip_src = fp->ipq_src; - ip->ip_dst = fp->ipq_dst; - remque(&fp->ip_link); + ip->ipf_mff &= ~1; + ((struct ip *)ip)->ip_src = fp->ipq_src; + ((struct ip *)ip)->ip_dst = fp->ipq_dst; + remque_32(fp); (void) m_free(dtom(fp)); + m = dtom(ip); m->m_len += (ip->ip_hl << 2); m->m_data -= (ip->ip_hl << 2); - return ip; + return ((struct ip *)ip); dropfrag: STAT(ipstat.ips_fragdropped++); @@ -426,12 +405,13 @@ ip_freef(struct ipq *fp) { register struct ipasfrag *q, *p; - for (q = fp->frag_link.next; q != (struct ipasfrag*)&fp->frag_link; q = p) { - p = q->ipf_next; + for (q = (struct ipasfrag *) fp->ipq_next; q != (struct ipasfrag *)fp; + q = p) { + p = (struct ipasfrag *) q->ipf_next; ip_deq(q); m_freem(dtom(q)); } - remque(&fp->ip_link); + remque_32(fp); (void) m_free(dtom(fp)); } @@ -444,10 +424,10 @@ ip_enq(register struct ipasfrag *p, register struct ipasfrag *prev) { DEBUG_CALL("ip_enq"); DEBUG_ARG("prev = %lx", (long)prev); - p->ipf_prev = prev; + p->ipf_prev = (ipasfragp_32) prev; p->ipf_next = prev->ipf_next; - ((struct ipasfrag *)(prev->ipf_next))->ipf_prev = p; - prev->ipf_next = p; + ((struct ipasfrag *)(prev->ipf_next))->ipf_prev = (ipasfragp_32) p; + prev->ipf_next = (ipasfragp_32) p; } /* @@ -468,21 +448,20 @@ ip_deq(register struct ipasfrag *p) void ip_slowtimo() { - struct qlink *l; + register struct ipq *fp; DEBUG_CALL("ip_slowtimo"); - l = ipq.ip_link.next; - - if (l == 0) + fp = (struct ipq *) ipq.next; + if (fp == 0) return; - while (l != &ipq.ip_link) { - struct ipq *fp = container_of(l, struct ipq, ip_link); - l = l->next; - if (--fp->ipq_ttl == 0) { + while (fp != &ipq) { + --fp->ipq_ttl; + fp = (struct ipq *) fp->next; + if (((struct ipq *)(fp->prev))->ipq_ttl == 0) { STAT(ipstat.ips_fragtimeout++); - ip_freef(fp); + ip_freef((struct ipq *) fp->prev); } } } diff --git a/BasiliskII/src/slirp/ip_output.c b/BasiliskII/src/slirp/ip_output.c index 9538db98..a8a6067b 100644 --- a/BasiliskII/src/slirp/ip_output.c +++ b/BasiliskII/src/slirp/ip_output.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/libslirp.h b/BasiliskII/src/slirp/libslirp.h index 6c5db54c..7e4cfa98 100644 --- a/BasiliskII/src/slirp/libslirp.h +++ b/BasiliskII/src/slirp/libslirp.h @@ -5,7 +5,7 @@ extern "C" { #endif -void slirp_init(int restrict, char *special_ip); +void slirp_init(void); void slirp_select_fill(int *pnfds, fd_set *readfds, fd_set *writefds, fd_set *xfds); @@ -20,16 +20,13 @@ void slirp_output(const uint8_t *pkt, int pkt_len); int slirp_redir(int is_udp, int host_port, struct in_addr guest_addr, int guest_port); -int slirp_add_exec(int do_pty, const void *args, int addr_low_byte, +int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, int guest_port); extern const char *tftp_prefix; extern char slirp_hostname[33]; void slirp_stats(void); -void slirp_socket_recv(int addr_low_byte, int guest_port, const uint8_t *buf, - int size); -size_t slirp_socket_can_recv(int addr_low_byte, int guest_port); #ifdef __cplusplus } diff --git a/BasiliskII/src/slirp/main.h b/BasiliskII/src/slirp/main.h index ed513855..c01addac 100644 --- a/BasiliskII/src/slirp/main.h +++ b/BasiliskII/src/slirp/main.h @@ -44,8 +44,6 @@ extern int towrite_max; extern int ppp_exit; extern int tcp_keepintvl; extern uint8_t client_ethaddr[6]; -extern const char *slirp_special_ip; -extern int slirp_restrict; #define PROTO_SLIP 0x1 #ifdef USE_PPP @@ -53,4 +51,3 @@ extern int slirp_restrict; #endif void if_encap(const uint8_t *ip_data, int ip_data_len); -ssize_t slirp_send(struct socket *so, const void *buf, size_t len, int flags); diff --git a/BasiliskII/src/slirp/mbuf.c b/BasiliskII/src/slirp/mbuf.c index 655de418..5d125542 100644 --- a/BasiliskII/src/slirp/mbuf.c +++ b/BasiliskII/src/slirp/mbuf.c @@ -17,6 +17,8 @@ #include +struct mbuf *mbutl; +char *mclrefcnt; int mbuf_alloced = 0; struct mbuf m_freelist, m_usedlist; #define MBUF_THRESH 30 @@ -26,7 +28,7 @@ int mbuf_max = 0; * Find a nice value for msize * XXX if_maxlinkhdr already in mtu */ -#define SLIRP_MSIZE (IF_MTU + IF_MAXLINKHDR + sizeof(struct m_hdr ) + 6) +#define MSIZE (IF_MTU + IF_MAXLINKHDR + sizeof(struct m_hdr ) + 6) void m_init() @@ -52,7 +54,7 @@ m_get() DEBUG_CALL("m_get"); if (m_freelist.m_next == &m_freelist) { - m = (struct mbuf *)malloc(SLIRP_MSIZE); + m = (struct mbuf *)malloc(MSIZE); if (m == NULL) goto end_error; mbuf_alloced++; if (mbuf_alloced > MBUF_THRESH) @@ -69,7 +71,7 @@ m_get() m->m_flags = (flags | M_USEDLIST); /* Initialise it */ - m->m_size = SLIRP_MSIZE - sizeof(struct m_hdr); + m->m_size = MSIZE - sizeof(struct m_hdr); m->m_data = m->m_dat; m->m_len = 0; m->m_nextpkt = 0; @@ -234,3 +236,4 @@ dtom(dat) return (struct mbuf *)0; } + diff --git a/BasiliskII/src/slirp/mbuf.h b/BasiliskII/src/slirp/mbuf.h index 55273734..f9f21325 100644 --- a/BasiliskII/src/slirp/mbuf.h +++ b/BasiliskII/src/slirp/mbuf.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/misc.c b/BasiliskII/src/slirp/misc.c index f558b3c0..14808fe2 100644 --- a/BasiliskII/src/slirp/misc.c +++ b/BasiliskII/src/slirp/misc.c @@ -66,6 +66,20 @@ redir_x(inaddr, start_port, display, screen) } #endif +#ifndef HAVE_INET_ATON +int +inet_aton(cp, ia) + const char *cp; + struct in_addr *ia; +{ + u_int32_t addr = inet_addr(cp); + if (addr == 0xffffffff) + return 0; + ia->s_addr = addr; + return 1; +} +#endif + /* * Get our IP address and put it in our_addr */ @@ -83,6 +97,39 @@ getouraddr() our_addr.s_addr = loopback_addr.s_addr; } +#if SIZEOF_CHAR_P == 8 + +struct quehead_32 { + u_int32_t qh_link; + u_int32_t qh_rlink; +}; + +inline void +insque_32(a, b) + void *a; + void *b; +{ + register struct quehead_32 *element = (struct quehead_32 *) a; + register struct quehead_32 *head = (struct quehead_32 *) b; + element->qh_link = head->qh_link; + head->qh_link = (u_int32_t)element; + element->qh_rlink = (u_int32_t)head; + ((struct quehead_32 *)(element->qh_link))->qh_rlink + = (u_int32_t)element; +} + +inline void +remque_32(a) + void *a; +{ + register struct quehead_32 *element = (struct quehead_32 *) a; + ((struct quehead_32 *)(element->qh_link))->qh_rlink = element->qh_rlink; + ((struct quehead_32 *)(element->qh_rlink))->qh_link = element->qh_link; + element->qh_rlink = 0; +} + +#endif /* SIZEOF_CHAR_P == 8 */ + struct quehead { struct quehead *qh_link; struct quehead *qh_rlink; @@ -136,7 +183,7 @@ add_exec(ex_ptr, do_pty, exec, addr, port) (*ex_ptr)->ex_fport = port; (*ex_ptr)->ex_addr = addr; (*ex_ptr)->ex_pty = do_pty; - (*ex_ptr)->ex_exec = (do_pty == 3) ? exec : strdup(exec); + (*ex_ptr)->ex_exec = strdup(exec); (*ex_ptr)->ex_next = tmp_ptr; return 0; } @@ -257,10 +304,10 @@ fork_exec(struct socket *so, const char *ex, int do_pty) { int s; struct sockaddr_in addr; - socklen_t addrlen = sizeof(addr); + int addrlen = sizeof(addr); int opt; int master = -1; - const char *argv[256]; + char *argv[256]; #if 0 char buff[256]; #endif @@ -364,15 +411,14 @@ fork_exec(struct socket *so, const char *ex, int do_pty) } while (c); argv[i] = 0; - execvp(argv[0], (char **)argv); + execvp(argv[0], argv); /* Ooops, failed, let's tell the user why */ { char buff[256]; - snprintf(buff, sizeof(buff), - "Error: execvp of %s failed: %s\n", - argv[0], strerror(errno)); + sprintf(buff, "Error: execvp of %s failed: %s\n", + argv[0], strerror(errno)); write(2, buff, strlen(buff)+1); } close(0); close(1); close(2); /* XXX */ diff --git a/BasiliskII/src/slirp/misc.h b/BasiliskII/src/slirp/misc.h index ab8e3a72..e405e38d 100644 --- a/BasiliskII/src/slirp/misc.h +++ b/BasiliskII/src/slirp/misc.h @@ -17,7 +17,7 @@ struct ex_list { }; extern struct ex_list *exec_list; -extern u_int time_fasttimo, last_slowtimo; +extern u_int curtime, time_fasttimo, last_slowtimo; extern int (*lprint_print) _P((void *, const char *, va_list)); extern char *lprint_ptr, *lprint_ptr2, **lprint_arg; @@ -72,8 +72,8 @@ extern int x_port, x_server, x_display; int show_x _P((char *, struct socket *)); void redir_x _P((u_int32_t, int, int, int)); void getouraddr _P((void)); -void slirp_insque _P((void *, void *)); -void slirp_remque _P((void *)); +inline void slirp_insque _P((void *, void *)); +inline void slirp_remque _P((void *)); int add_exec _P((struct ex_list **, int, char *, int, int)); int slirp_openpty _P((int *, int *)); int fork_exec(struct socket *so, const char *ex, int do_pty); diff --git a/BasiliskII/src/slirp/sbuf.c b/BasiliskII/src/slirp/sbuf.c index 2e6e2b21..02c5fce0 100644 --- a/BasiliskII/src/slirp/sbuf.c +++ b/BasiliskII/src/slirp/sbuf.c @@ -108,7 +108,7 @@ sbappend(so, m) * ottherwise it'll arrive out of order, and hence corrupt */ if (!so->so_rcv.sb_cc) - ret = slirp_send(so, m->m_data, m->m_len, 0); + ret = send(so->s, m->m_data, m->m_len, 0); if (ret <= 0) { /* @@ -198,3 +198,4 @@ sbcopy(sb, off, len, to) memcpy(to+off,sb->sb_data,len); } } + diff --git a/BasiliskII/src/slirp/slirp.c b/BasiliskII/src/slirp/slirp.c index 0394496a..303f4825 100644 --- a/BasiliskII/src/slirp/slirp.c +++ b/BasiliskII/src/slirp/slirp.c @@ -1,30 +1,4 @@ -/* - * libslirp glue - * - * Copyright (c) 2004-2008 Fabrice Bellard - * - * 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -#include "qemu-common.h" -#include "qemu-char.h" #include "slirp.h" -#include "hw/hw.h" /* host address */ struct in_addr our_addr; @@ -42,14 +16,8 @@ static const uint8_t special_ethaddr[6] = { 0x52, 0x54, 0x00, 0x12, 0x35, 0x00 }; -/* ARP cache for the guest IP addresses (XXX: allow many entries) */ uint8_t client_ethaddr[6]; -static struct in_addr client_ipaddr; -static const uint8_t zero_ethaddr[6] = { 0, 0, 0, 0, 0, 0 }; - -const char *slirp_special_ip = CTL_SPECIAL; -int slirp_restrict; int do_slowtimo; int link_up; struct timeval tt; @@ -116,7 +84,7 @@ static int get_dns_addr(struct in_addr *pdns_addr) static int get_dns_addr(struct in_addr *pdns_addr) { char buff[512]; - char buff2[257]; + char buff2[256]; FILE *f; int found = 0; struct in_addr tmp_addr; @@ -168,10 +136,7 @@ static void slirp_cleanup(void) } #endif -static void slirp_state_save(QEMUFile *f, void *opaque); -static int slirp_state_load(QEMUFile *f, void *opaque, int version_id); - -void slirp_init(int restrict, char *special_ip) +void slirp_init(void) { // debug_init("/tmp/slirp.log", DEBUG_DEFAULT); @@ -184,7 +149,6 @@ void slirp_init(int restrict, char *special_ip) #endif link_up = 1; - slirp_restrict = restrict; if_init(); ip_init(); @@ -200,13 +164,9 @@ void slirp_init(int restrict, char *special_ip) fprintf (stderr, "Warning: No DNS servers found\n"); } - if (special_ip) - slirp_special_ip = special_ip; - - inet_aton(slirp_special_ip, &special_addr); + inet_aton(CTL_SPECIAL, &special_addr); alias_addr.s_addr = special_addr.s_addr | htonl(CTL_ALIAS); getouraddr(); - register_savevm("slirp", 0, 1, slirp_state_save, slirp_state_load, NULL); } #define CONN_CANFSEND(so) (((so)->so_state & (SS_FCANTSENDMORE|SS_ISFCONNECTED)) == SS_ISFCONNECTED) @@ -262,7 +222,7 @@ void slirp_select_fill(int *pnfds, * in the fragment queue, or there are TCP connections active */ do_slowtimo = ((tcb.so_next != &tcb) || - (&ipq.ip_link != ipq.ip_link.next)); + ((struct ipasfrag *)&ipq != (struct ipasfrag *)ipq.next)); for (so = tcb.so_next; so != &tcb; so = so_next) { so_next = so->so_next; @@ -594,7 +554,7 @@ struct arphdr unsigned char ar_tip[4]; /* target IP address */ }; -static void arp_input(const uint8_t *pkt, int pkt_len) +void arp_input(const uint8_t *pkt, int pkt_len) { struct ethhdr *eh = (struct ethhdr *)pkt; struct arphdr *ah = (struct arphdr *)(pkt + ETH_HLEN); @@ -637,13 +597,6 @@ static void arp_input(const uint8_t *pkt, int pkt_len) slirp_output(arp_reply, sizeof(arp_reply)); } break; - case ARPOP_REPLY: - /* reply to request of client mac address ? */ - if (!memcmp(client_ethaddr, zero_ethaddr, ETH_ALEN) && - !memcmp(ah->ar_sip, &client_ipaddr.s_addr, 4)) { - memcpy(client_ethaddr, ah->ar_sha, ETH_ALEN); - } - break; default: break; } @@ -667,9 +620,6 @@ void slirp_input(const uint8_t *pkt, int pkt_len) if (!m) return; /* Note: we add to align the IP header */ - if (M_FREEROOM(m) < pkt_len + 2) { - m_inc(m, pkt_len + 2); - } m->m_len = pkt_len + 2; memcpy(m->m_data + 2, pkt, pkt_len); @@ -691,47 +641,14 @@ void if_encap(const uint8_t *ip_data, int ip_data_len) if (ip_data_len + ETH_HLEN > sizeof(buf)) return; - - if (!memcmp(client_ethaddr, zero_ethaddr, ETH_ALEN)) { - uint8_t arp_req[ETH_HLEN + sizeof(struct arphdr)]; - struct ethhdr *reh = (struct ethhdr *)arp_req; - struct arphdr *rah = (struct arphdr *)(arp_req + ETH_HLEN); - const struct ip *iph = (const struct ip *)ip_data; - /* If the client addr is not known, there is no point in - sending the packet to it. Normally the sender should have - done an ARP request to get its MAC address. Here we do it - in place of sending the packet and we hope that the sender - will retry sending its packet. */ - memset(reh->h_dest, 0xff, ETH_ALEN); - memcpy(reh->h_source, special_ethaddr, ETH_ALEN - 1); - reh->h_source[5] = CTL_ALIAS; - reh->h_proto = htons(ETH_P_ARP); - rah->ar_hrd = htons(1); - rah->ar_pro = htons(ETH_P_IP); - rah->ar_hln = ETH_ALEN; - rah->ar_pln = 4; - rah->ar_op = htons(ARPOP_REQUEST); - /* source hw addr */ - memcpy(rah->ar_sha, special_ethaddr, ETH_ALEN - 1); - rah->ar_sha[5] = CTL_ALIAS; - /* source IP */ - memcpy(rah->ar_sip, &alias_addr, 4); - /* target hw addr (none) */ - memset(rah->ar_tha, 0, ETH_ALEN); - /* target IP */ - memcpy(rah->ar_tip, &iph->ip_dst, 4); - client_ipaddr = iph->ip_dst; - slirp_output(arp_req, sizeof(arp_req)); - } else { - memcpy(eh->h_dest, client_ethaddr, ETH_ALEN); - memcpy(eh->h_source, special_ethaddr, ETH_ALEN - 1); - /* XXX: not correct */ - eh->h_source[5] = CTL_ALIAS; - eh->h_proto = htons(ETH_P_IP); - memcpy(buf + sizeof(struct ethhdr), ip_data, ip_data_len); - slirp_output(buf, ip_data_len + ETH_HLEN); - } + memcpy(eh->h_dest, client_ethaddr, ETH_ALEN); + memcpy(eh->h_source, special_ethaddr, ETH_ALEN - 1); + /* XXX: not correct */ + eh->h_source[5] = CTL_ALIAS; + eh->h_proto = htons(ETH_P_IP); + memcpy(buf + sizeof(struct ethhdr), ip_data, ip_data_len); + slirp_output(buf, ip_data_len + ETH_HLEN); } int slirp_redir(int is_udp, int host_port, @@ -749,291 +666,9 @@ int slirp_redir(int is_udp, int host_port, return 0; } -int slirp_add_exec(int do_pty, const void *args, int addr_low_byte, +int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, int guest_port) { return add_exec(&exec_list, do_pty, (char *)args, addr_low_byte, htons(guest_port)); } - -ssize_t slirp_send(struct socket *so, const void *buf, size_t len, int flags) -{ - if (so->s == -1 && so->extra) { - qemu_chr_write(so->extra, buf, len); - return len; - } - - return send(so->s, buf, len, flags); -} - -static struct socket *slirp_find_ctl_socket(int addr_low_byte, int guest_port) -{ - struct socket *so; - - for (so = tcb.so_next; so != &tcb; so = so->so_next) { - if ((so->so_faddr.s_addr & htonl(0xffffff00)) == - special_addr.s_addr - && (ntohl(so->so_faddr.s_addr) & 0xff) == - addr_low_byte - && htons(so->so_fport) == guest_port) - return so; - } - - return NULL; -} - -size_t slirp_socket_can_recv(int addr_low_byte, int guest_port) -{ - struct iovec iov[2]; - struct socket *so; - - if (!link_up) - return 0; - - so = slirp_find_ctl_socket(addr_low_byte, guest_port); - - if (!so || so->so_state & SS_NOFDREF) - return 0; - - if (!CONN_CANFRCV(so) || so->so_snd.sb_cc >= (so->so_snd.sb_datalen/2)) - return 0; - - return sopreprbuf(so, iov, NULL); -} - -void slirp_socket_recv(int addr_low_byte, int guest_port, const uint8_t *buf, - int size) -{ - int ret; - struct socket *so = slirp_find_ctl_socket(addr_low_byte, guest_port); - - if (!so) - return; - - ret = soreadbuf(so, (const char *)buf, size); - - if (ret > 0) - tcp_output(sototcpcb(so)); -} - -static void slirp_tcp_save(QEMUFile *f, struct tcpcb *tp) -{ - int i; - - qemu_put_sbe16(f, tp->t_state); - for (i = 0; i < TCPT_NTIMERS; i++) - qemu_put_sbe16(f, tp->t_timer[i]); - qemu_put_sbe16(f, tp->t_rxtshift); - qemu_put_sbe16(f, tp->t_rxtcur); - qemu_put_sbe16(f, tp->t_dupacks); - qemu_put_be16(f, tp->t_maxseg); - qemu_put_sbyte(f, tp->t_force); - qemu_put_be16(f, tp->t_flags); - qemu_put_be32(f, tp->snd_una); - qemu_put_be32(f, tp->snd_nxt); - qemu_put_be32(f, tp->snd_up); - qemu_put_be32(f, tp->snd_wl1); - qemu_put_be32(f, tp->snd_wl2); - qemu_put_be32(f, tp->iss); - qemu_put_be32(f, tp->snd_wnd); - qemu_put_be32(f, tp->rcv_wnd); - qemu_put_be32(f, tp->rcv_nxt); - qemu_put_be32(f, tp->rcv_up); - qemu_put_be32(f, tp->irs); - qemu_put_be32(f, tp->rcv_adv); - qemu_put_be32(f, tp->snd_max); - qemu_put_be32(f, tp->snd_cwnd); - qemu_put_be32(f, tp->snd_ssthresh); - qemu_put_sbe16(f, tp->t_idle); - qemu_put_sbe16(f, tp->t_rtt); - qemu_put_be32(f, tp->t_rtseq); - qemu_put_sbe16(f, tp->t_srtt); - qemu_put_sbe16(f, tp->t_rttvar); - qemu_put_be16(f, tp->t_rttmin); - qemu_put_be32(f, tp->max_sndwnd); - qemu_put_byte(f, tp->t_oobflags); - qemu_put_byte(f, tp->t_iobc); - qemu_put_sbe16(f, tp->t_softerror); - qemu_put_byte(f, tp->snd_scale); - qemu_put_byte(f, tp->rcv_scale); - qemu_put_byte(f, tp->request_r_scale); - qemu_put_byte(f, tp->requested_s_scale); - qemu_put_be32(f, tp->ts_recent); - qemu_put_be32(f, tp->ts_recent_age); - qemu_put_be32(f, tp->last_ack_sent); -} - -static void slirp_sbuf_save(QEMUFile *f, struct sbuf *sbuf) -{ - uint32_t off; - - qemu_put_be32(f, sbuf->sb_cc); - qemu_put_be32(f, sbuf->sb_datalen); - off = (uint32_t)(sbuf->sb_wptr - sbuf->sb_data); - qemu_put_sbe32(f, off); - off = (uint32_t)(sbuf->sb_rptr - sbuf->sb_data); - qemu_put_sbe32(f, off); - qemu_put_buffer(f, (unsigned char*)sbuf->sb_data, sbuf->sb_datalen); -} - -static void slirp_socket_save(QEMUFile *f, struct socket *so) -{ - qemu_put_be32(f, so->so_urgc); - qemu_put_be32(f, so->so_faddr.s_addr); - qemu_put_be32(f, so->so_laddr.s_addr); - qemu_put_be16(f, so->so_fport); - qemu_put_be16(f, so->so_lport); - qemu_put_byte(f, so->so_iptos); - qemu_put_byte(f, so->so_emu); - qemu_put_byte(f, so->so_type); - qemu_put_be32(f, so->so_state); - slirp_sbuf_save(f, &so->so_rcv); - slirp_sbuf_save(f, &so->so_snd); - slirp_tcp_save(f, so->so_tcpcb); -} - -static void slirp_state_save(QEMUFile *f, void *opaque) -{ - struct ex_list *ex_ptr; - - for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) - if (ex_ptr->ex_pty == 3) { - struct socket *so; - so = slirp_find_ctl_socket(ex_ptr->ex_addr, ntohs(ex_ptr->ex_fport)); - if (!so) - continue; - - qemu_put_byte(f, 42); - slirp_socket_save(f, so); - } - qemu_put_byte(f, 0); -} - -static void slirp_tcp_load(QEMUFile *f, struct tcpcb *tp) -{ - int i; - - tp->t_state = qemu_get_sbe16(f); - for (i = 0; i < TCPT_NTIMERS; i++) - tp->t_timer[i] = qemu_get_sbe16(f); - tp->t_rxtshift = qemu_get_sbe16(f); - tp->t_rxtcur = qemu_get_sbe16(f); - tp->t_dupacks = qemu_get_sbe16(f); - tp->t_maxseg = qemu_get_be16(f); - tp->t_force = qemu_get_sbyte(f); - tp->t_flags = qemu_get_be16(f); - tp->snd_una = qemu_get_be32(f); - tp->snd_nxt = qemu_get_be32(f); - tp->snd_up = qemu_get_be32(f); - tp->snd_wl1 = qemu_get_be32(f); - tp->snd_wl2 = qemu_get_be32(f); - tp->iss = qemu_get_be32(f); - tp->snd_wnd = qemu_get_be32(f); - tp->rcv_wnd = qemu_get_be32(f); - tp->rcv_nxt = qemu_get_be32(f); - tp->rcv_up = qemu_get_be32(f); - tp->irs = qemu_get_be32(f); - tp->rcv_adv = qemu_get_be32(f); - tp->snd_max = qemu_get_be32(f); - tp->snd_cwnd = qemu_get_be32(f); - tp->snd_ssthresh = qemu_get_be32(f); - tp->t_idle = qemu_get_sbe16(f); - tp->t_rtt = qemu_get_sbe16(f); - tp->t_rtseq = qemu_get_be32(f); - tp->t_srtt = qemu_get_sbe16(f); - tp->t_rttvar = qemu_get_sbe16(f); - tp->t_rttmin = qemu_get_be16(f); - tp->max_sndwnd = qemu_get_be32(f); - tp->t_oobflags = qemu_get_byte(f); - tp->t_iobc = qemu_get_byte(f); - tp->t_softerror = qemu_get_sbe16(f); - tp->snd_scale = qemu_get_byte(f); - tp->rcv_scale = qemu_get_byte(f); - tp->request_r_scale = qemu_get_byte(f); - tp->requested_s_scale = qemu_get_byte(f); - tp->ts_recent = qemu_get_be32(f); - tp->ts_recent_age = qemu_get_be32(f); - tp->last_ack_sent = qemu_get_be32(f); - tcp_template(tp); -} - -static int slirp_sbuf_load(QEMUFile *f, struct sbuf *sbuf) -{ - uint32_t off, sb_cc, sb_datalen; - - sb_cc = qemu_get_be32(f); - sb_datalen = qemu_get_be32(f); - - sbreserve(sbuf, sb_datalen); - - if (sbuf->sb_datalen != sb_datalen) - return -ENOMEM; - - sbuf->sb_cc = sb_cc; - - off = qemu_get_sbe32(f); - sbuf->sb_wptr = sbuf->sb_data + off; - off = qemu_get_sbe32(f); - sbuf->sb_rptr = sbuf->sb_data + off; - qemu_get_buffer(f, (unsigned char*)sbuf->sb_data, sbuf->sb_datalen); - - return 0; -} - -static int slirp_socket_load(QEMUFile *f, struct socket *so) -{ - if (tcp_attach(so) < 0) - return -ENOMEM; - - so->so_urgc = qemu_get_be32(f); - so->so_faddr.s_addr = qemu_get_be32(f); - so->so_laddr.s_addr = qemu_get_be32(f); - so->so_fport = qemu_get_be16(f); - so->so_lport = qemu_get_be16(f); - so->so_iptos = qemu_get_byte(f); - so->so_emu = qemu_get_byte(f); - so->so_type = qemu_get_byte(f); - so->so_state = qemu_get_be32(f); - if (slirp_sbuf_load(f, &so->so_rcv) < 0) - return -ENOMEM; - if (slirp_sbuf_load(f, &so->so_snd) < 0) - return -ENOMEM; - slirp_tcp_load(f, so->so_tcpcb); - - return 0; -} - -static int slirp_state_load(QEMUFile *f, void *opaque, int version_id) -{ - struct ex_list *ex_ptr; - int r; - - while ((r = qemu_get_byte(f))) { - int ret; - struct socket *so = socreate(); - - if (!so) - return -ENOMEM; - - ret = slirp_socket_load(f, so); - - if (ret < 0) - return ret; - - if ((so->so_faddr.s_addr & htonl(0xffffff00)) != special_addr.s_addr) - return -EINVAL; - - for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) - if (ex_ptr->ex_pty == 3 && - (ntohl(so->so_faddr.s_addr) & 0xff) == ex_ptr->ex_addr && - so->so_fport == ex_ptr->ex_fport) - break; - - if (!ex_ptr) - return -EINVAL; - - so->extra = (void *)ex_ptr->ex_exec; - } - - return 0; -} diff --git a/BasiliskII/src/slirp/slirp.h b/BasiliskII/src/slirp/slirp.h index 6f8a7f60..b8d756e5 100644 --- a/BasiliskII/src/slirp/slirp.h +++ b/BasiliskII/src/slirp/slirp.h @@ -32,7 +32,6 @@ typedef char *caddr_t; #define WIN32_LEAN_AND_MEAN # include # include -# include # include # include @@ -103,7 +102,7 @@ typedef unsigned char u_int8_t; # include # include #else -# ifdef HAVE_SYS_TIME_H +# if HAVE_SYS_TIME_H # include # else # include @@ -120,12 +119,13 @@ typedef unsigned char u_int8_t; #include #endif -#undef _P +#ifndef _P #ifndef NO_PROTOTYPES # define _P(x) x #else # define _P(x) () #endif +#endif #ifndef _WIN32 #include @@ -265,6 +265,14 @@ void if_start _P((struct ttys *)); void lprint _P((const char *, ...)); +#if SIZEOF_CHAR_P == 4 +# define insque_32 insque +# define remque_32 remque +#else + inline void insque_32 _P((void *, void *)); + inline void remque_32 _P((void *)); +#endif + #ifndef _WIN32 #include #endif diff --git a/BasiliskII/src/slirp/slirp_config.h b/BasiliskII/src/slirp/slirp_config.h index dbc8dfd4..e7e95dd5 100644 --- a/BasiliskII/src/slirp/slirp_config.h +++ b/BasiliskII/src/slirp/slirp_config.h @@ -128,10 +128,10 @@ #undef HAVE_SYS_STROPTS_H /* Define to whatever your compiler thinks inline should be */ -//#define inline inline +#define inline inline /* Define to whatever your compiler thinks const should be */ -//#define const const +#define const const /* Define if your compiler doesn't like prototypes */ #undef NO_PROTOTYPES @@ -170,7 +170,7 @@ #undef HAVE_SETENV /* Define if you have index() */ -#define HAVE_INDEX +#undef HAVE_INDEX /* Define if you have bcmp() */ #undef HAVE_BCMP @@ -182,7 +182,7 @@ #define HAVE_MEMMOVE /* Define if you have gethostid */ -#define HAVE_GETHOSTID +#undef HAVE_GETHOSTID /* Define if you DON'T have unix-domain sockets */ #undef NO_UNIX_SOCKETS diff --git a/BasiliskII/src/slirp/socket.c b/BasiliskII/src/slirp/socket.c index 9def541d..0c15132e 100644 --- a/BasiliskII/src/slirp/socket.c +++ b/BasiliskII/src/slirp/socket.c @@ -5,10 +5,10 @@ * terms and conditions of the copyright. */ -#include "qemu-common.h" #define WANT_SYS_IOCTL_H #include #include "ip_icmp.h" +#include "main.h" #ifdef __sun__ #include #endif @@ -91,24 +91,32 @@ sofree(so) free(so); } -size_t sopreprbuf(struct socket *so, struct iovec *iov, int *np) +/* + * Read from so's socket into sb_snd, updating all relevant sbuf fields + * NOTE: This will only be called if it is select()ed for reading, so + * a read() of 0 (or less) means it's disconnected + */ +int +soread(so) + struct socket *so; { - int n, lss, total; + int n, nn, lss, total; struct sbuf *sb = &so->so_snd; int len = sb->sb_datalen - sb->sb_cc; + struct iovec iov[2]; int mss = so->so_tcpcb->t_maxseg; - DEBUG_CALL("sopreprbuf"); + DEBUG_CALL("soread"); DEBUG_ARG("so = %lx", (long )so); + /* + * No need to check if there's enough room to read. + * soread wouldn't have been called if there weren't + */ + len = sb->sb_datalen - sb->sb_cc; - if (len <= 0) - return 0; - iov[0].iov_base = sb->sb_wptr; - iov[1].iov_base = NULL; - iov[1].iov_len = 0; if (sb->sb_wptr < sb->sb_rptr) { iov[0].iov_len = sb->sb_rptr - sb->sb_wptr; /* Should never succeed, but... */ @@ -146,33 +154,6 @@ size_t sopreprbuf(struct socket *so, struct iovec *iov, int *np) n = 1; } } - if (np) - *np = n; - - return iov[0].iov_len + (n - 1) * iov[1].iov_len; -} - -/* - * Read from so's socket into sb_snd, updating all relevant sbuf fields - * NOTE: This will only be called if it is select()ed for reading, so - * a read() of 0 (or less) means it's disconnected - */ -int -soread(so) - struct socket *so; -{ - int n, nn; - struct sbuf *sb = &so->so_snd; - struct iovec iov[2]; - - DEBUG_CALL("soread"); - DEBUG_ARG("so = %lx", (long )so); - - /* - * No need to check if there's enough room to read. - * soread wouldn't have been called if there weren't - */ - sopreprbuf(so, iov, &n); #ifdef HAVE_READV nn = readv(so->s, (struct iovec *)iov, n); @@ -219,48 +200,6 @@ soread(so) return nn; } -int soreadbuf(struct socket *so, const char *buf, int size) -{ - int n, nn, copy = size; - struct sbuf *sb = &so->so_snd; - struct iovec iov[2]; - - DEBUG_CALL("soreadbuf"); - DEBUG_ARG("so = %lx", (long )so); - - /* - * No need to check if there's enough room to read. - * soread wouldn't have been called if there weren't - */ - if (sopreprbuf(so, iov, &n) < size) - goto err; - - nn = MIN(iov[0].iov_len, copy); - memcpy(iov[0].iov_base, buf, nn); - - copy -= nn; - buf += nn; - - if (copy == 0) - goto done; - - memcpy(iov[1].iov_base, buf, copy); - -done: - /* Update fields */ - sb->sb_cc += size; - sb->sb_wptr += size; - if (sb->sb_wptr >= (sb->sb_data + sb->sb_datalen)) - sb->sb_wptr -= sb->sb_datalen; - return size; -err: - - sofcantrcvmore(so); - tcp_sockclosed(sototcpcb(so)); - fprintf(stderr, "soreadbuf buffer to small"); - return -1; -} - /* * Get urgent data * @@ -314,7 +253,7 @@ sosendoob(so) if (sb->sb_rptr < sb->sb_wptr) { /* We can send it directly */ - n = slirp_send(so, sb->sb_rptr, so->so_urgc, (MSG_OOB)); /* |MSG_DONTWAIT)); */ + n = send(so->s, sb->sb_rptr, so->so_urgc, (MSG_OOB)); /* |MSG_DONTWAIT)); */ so->so_urgc -= n; DEBUG_MISC((dfd, " --- sent %d bytes urgent data, %d urgent bytes left\n", n, so->so_urgc)); @@ -335,7 +274,7 @@ sosendoob(so) so->so_urgc -= n; len += n; } - n = slirp_send(so, buff, len, (MSG_OOB)); /* |MSG_DONTWAIT)); */ + n = send(so->s, buff, len, (MSG_OOB)); /* |MSG_DONTWAIT)); */ #ifdef DEBUG if (n != len) DEBUG_ERROR((dfd, "Didn't send all data urgently XXXXX\n")); @@ -381,8 +320,6 @@ sowrite(so) len = sb->sb_cc; iov[0].iov_base = sb->sb_rptr; - iov[1].iov_base = NULL; - iov[1].iov_len = 0; if (sb->sb_rptr < sb->sb_wptr) { iov[0].iov_len = sb->sb_wptr - sb->sb_rptr; /* Should never succeed, but... */ @@ -407,7 +344,7 @@ sowrite(so) DEBUG_MISC((dfd, " ... wrote nn = %d bytes\n", nn)); #else - nn = slirp_send(so, iov[0].iov_base, iov[0].iov_len,0); + nn = send(so->s, iov[0].iov_base, iov[0].iov_len,0); #endif /* This should never happen, but people tell me it does *shrug* */ if (nn < 0 && (errno == EAGAIN || errno == EINTR)) @@ -424,7 +361,7 @@ sowrite(so) #ifndef HAVE_READV if (n == 2 && nn == iov[0].iov_len) { int ret; - ret = slirp_send(so, iov[1].iov_base, iov[1].iov_len,0); + ret = send(so->s, iov[1].iov_base, iov[1].iov_len,0); if (ret > 0) nn += ret; } @@ -455,7 +392,7 @@ sorecvfrom(so) struct socket *so; { struct sockaddr_in addr; - socklen_t addrlen = sizeof(struct sockaddr_in); + int addrlen = sizeof(struct sockaddr_in); DEBUG_CALL("sorecvfrom"); DEBUG_ARG("so = %lx", (long)so); @@ -608,8 +545,7 @@ solisten(port, laddr, lport, flags) { struct sockaddr_in addr; struct socket *so; - int s, opt = 1; - socklen_t addrlen = sizeof(addr); + int s, addrlen = sizeof(addr), opt = 1; DEBUG_CALL("solisten"); DEBUG_ARG("port = %d", port); @@ -782,3 +718,4 @@ sofwdrain(so) else sofcantsendmore(so); } + diff --git a/BasiliskII/src/slirp/socket.h b/BasiliskII/src/slirp/socket.h index 72b473d6..94fb8d8c 100644 --- a/BasiliskII/src/slirp/socket.h +++ b/BasiliskII/src/slirp/socket.h @@ -73,6 +73,14 @@ struct socket { extern struct socket tcb; + +#if defined(DECLARE_IOVEC) && !defined(HAVE_READV) +struct iovec { + char *iov_base; + size_t iov_len; +}; +#endif + struct socket * solookup _P((struct socket *, struct in_addr, u_int, struct in_addr, u_int)); struct socket * socreate _P((void)); void sofree _P((struct socket *)); @@ -87,7 +95,5 @@ void soisfconnecting _P((register struct socket *)); void soisfconnected _P((register struct socket *)); void soisfdisconnected _P((struct socket *)); void sofwdrain _P((struct socket *)); -size_t sopreprbuf(struct socket *so, struct iovec *iov, int *np); -int soreadbuf(struct socket *so, const char *buf, int size); #endif /* _SOCKET_H_ */ diff --git a/BasiliskII/src/slirp/tcp.h b/BasiliskII/src/slirp/tcp.h index 40570326..11150766 100644 --- a/BasiliskII/src/slirp/tcp.h +++ b/BasiliskII/src/slirp/tcp.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/tcp_input.c b/BasiliskII/src/slirp/tcp_input.c index d7805b53..17a9387f 100644 --- a/BasiliskII/src/slirp/tcp_input.c +++ b/BasiliskII/src/slirp/tcp_input.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -67,7 +71,7 @@ tcp_seq tcp_iss; /* tcp initial send seq # */ #ifdef TCP_ACK_HACK #define TCP_REASS(tp, ti, m, so, flags) {\ if ((ti)->ti_seq == (tp)->rcv_nxt && \ - tcpfrag_list_empty(tp) && \ + (tp)->seg_next == (tcpiphdrp_32)(tp) && \ (tp)->t_state == TCPS_ESTABLISHED) {\ if (ti->ti_flags & TH_PUSH) \ tp->t_flags |= TF_ACKNOW; \ @@ -90,7 +94,7 @@ tcp_seq tcp_iss; /* tcp initial send seq # */ #else #define TCP_REASS(tp, ti, m, so, flags) { \ if ((ti)->ti_seq == (tp)->rcv_nxt && \ - tcpfrag_list_empty(tp) && \ + (tp)->seg_next == (tcpiphdrp_32)(tp) && \ (tp)->t_state == TCPS_ESTABLISHED) { \ tp->t_flags |= TF_DELACK; \ (tp)->rcv_nxt += (ti)->ti_len; \ @@ -130,8 +134,8 @@ tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, /* * Find a segment which begins after this one does. */ - for (q = tcpfrag_list_first(tp); !tcpfrag_list_end(q, tp); - q = tcpiphdr_next(q)) + for (q = (struct tcpiphdr *)tp->seg_next; q != (struct tcpiphdr *)tp; + q = (struct tcpiphdr *)q->ti_next) if (SEQ_GT(q->ti_seq, ti->ti_seq)) break; @@ -140,9 +144,9 @@ tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, * our data already. If so, drop the data from the incoming * segment. If it provides all of our data, drop us. */ - if (!tcpfrag_list_end(tcpiphdr_prev(q), tp)) { + if ((struct tcpiphdr *)q->ti_prev != (struct tcpiphdr *)tp) { register int i; - q = tcpiphdr_prev(q); + q = (struct tcpiphdr *)q->ti_prev; /* conversion to int (in i) handles seq wraparound */ i = q->ti_seq + q->ti_len - ti->ti_seq; if (i > 0) { @@ -162,36 +166,36 @@ tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, ti->ti_len -= i; ti->ti_seq += i; } - q = tcpiphdr_next(q); + q = (struct tcpiphdr *)(q->ti_next); } STAT(tcpstat.tcps_rcvoopack++); STAT(tcpstat.tcps_rcvoobyte += ti->ti_len); - ti->ti_mbuf = m; + REASS_MBUF(ti) = (mbufp_32) m; /* XXX */ /* * While we overlap succeeding segments trim them or, * if they are completely covered, dequeue them. */ - while (!tcpfrag_list_end(q, tp)) { + while (q != (struct tcpiphdr *)tp) { register int i = (ti->ti_seq + ti->ti_len) - q->ti_seq; if (i <= 0) break; if (i < q->ti_len) { q->ti_seq += i; q->ti_len -= i; - m_adj(q->ti_mbuf, i); + m_adj((struct mbuf *) REASS_MBUF(q), i); break; } - q = tcpiphdr_next(q); - m = tcpiphdr_prev(q)->ti_mbuf; - remque(tcpiphdr2qlink(tcpiphdr_prev(q))); + q = (struct tcpiphdr *)q->ti_next; + m = (struct mbuf *) REASS_MBUF((struct tcpiphdr *)q->ti_prev); + remque_32((void *)(q->ti_prev)); m_freem(m); } /* * Stick new segment in its place. */ - insque(tcpiphdr2qlink(ti), tcpiphdr2qlink(tcpiphdr_prev(q))); + insque_32(ti, (void *)(q->ti_prev)); present: /* @@ -200,17 +204,17 @@ present: */ if (!TCPS_HAVEESTABLISHED(tp->t_state)) return (0); - ti = tcpfrag_list_first(tp); - if (tcpfrag_list_end(ti, tp) || ti->ti_seq != tp->rcv_nxt) + ti = (struct tcpiphdr *) tp->seg_next; + if (ti == (struct tcpiphdr *)tp || ti->ti_seq != tp->rcv_nxt) return (0); if (tp->t_state == TCPS_SYN_RECEIVED && ti->ti_len) return (0); do { tp->rcv_nxt += ti->ti_len; flags = ti->ti_flags & TH_FIN; - remque(tcpiphdr2qlink(ti)); - m = ti->ti_mbuf; - ti = tcpiphdr_next(ti); + remque_32(ti); + m = (struct mbuf *) REASS_MBUF(ti); /* XXX */ + ti = (struct tcpiphdr *)ti->ti_next; /* if (so->so_state & SS_FCANTRCVMORE) */ if (so->so_state & SS_FCANTSENDMORE) m_freem(m); @@ -249,7 +253,6 @@ tcp_input(m, iphlen, inso) u_long tiwin; int ret; /* int ts_present = 0; */ - struct ex_list *ex_ptr; DEBUG_CALL("tcp_input"); DEBUG_ARGS((dfd," m = %8lx iphlen = %2d inso = %lx\n", @@ -298,8 +301,7 @@ tcp_input(m, iphlen, inso) * Checksum extended TCP header and data. */ tlen = ((struct ip *)ti)->ip_len; - tcpiphdr2qlink(ti)->next = tcpiphdr2qlink(ti)->prev = 0; - memset(&ti->ti_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr)); + ti->ti_next = ti->ti_prev = 0; ti->ti_x1 = 0; ti->ti_len = htons((u_int16_t)tlen); len = sizeof(struct ip ) + tlen; @@ -361,15 +363,6 @@ tcp_input(m, iphlen, inso) m->m_data += sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); m->m_len -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); - if (slirp_restrict) { - for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) - if (ex_ptr->ex_fport == ti->ti_dport && - (ntohl(ti->ti_dst.s_addr) & 0xff) == ex_ptr->ex_addr) - break; - - if (!ex_ptr) - goto drop; - } /* * Locate pcb for segment. */ @@ -557,7 +550,7 @@ findso: return; } } else if (ti->ti_ack == tp->snd_una && - tcpfrag_list_empty(tp) && + tp->seg_next == (tcpiphdrp_32)tp && ti->ti_len <= sbspace(&so->so_rcv)) { /* * this is a pure, in-sequence data packet @@ -653,6 +646,7 @@ findso: #endif { /* May be an add exec */ + struct ex_list *ex_ptr; for(ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) { if(ex_ptr->ex_fport == so->so_fport && lastbyte == ex_ptr->ex_addr) { diff --git a/BasiliskII/src/slirp/tcp_output.c b/BasiliskII/src/slirp/tcp_output.c index 4a7bdbce..dba4ed7a 100644 --- a/BasiliskII/src/slirp/tcp_output.c +++ b/BasiliskII/src/slirp/tcp_output.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/tcp_subr.c b/BasiliskII/src/slirp/tcp_subr.c index b30dffdc..ba1296d4 100644 --- a/BasiliskII/src/slirp/tcp_subr.c +++ b/BasiliskII/src/slirp/tcp_subr.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -69,7 +73,7 @@ tcp_template(tp) struct socket *so = tp->t_socket; register struct tcpiphdr *n = &tp->t_template; - n->ti_mbuf = NULL; + n->ti_next = n->ti_prev = 0; n->ti_x1 = 0; n->ti_pr = IPPROTO_TCP; n->ti_len = htons(sizeof (struct tcpiphdr) - sizeof (struct ip)); @@ -152,7 +156,7 @@ tcp_respond(tp, ti, m, ack, seq, flags) tlen += sizeof (struct tcpiphdr); m->m_len = tlen; - ti->ti_mbuf = 0; + ti->ti_next = ti->ti_prev = 0; ti->ti_x1 = 0; ti->ti_seq = htonl(seq); ti->ti_ack = htonl(ack); @@ -192,7 +196,7 @@ tcp_newtcpcb(so) return ((struct tcpcb *)0); memset((char *) tp, 0, sizeof(struct tcpcb)); - tp->seg_next = tp->seg_prev = (struct tcpiphdr*)tp; + tp->seg_next = tp->seg_prev = (tcpiphdrp_32)tp; tp->t_maxseg = TCP_MSS; tp->t_flags = TCP_DO_RFC1323 ? (TF_REQ_SCALE|TF_REQ_TSTMP) : 0; @@ -268,11 +272,11 @@ tcp_close(tp) DEBUG_ARG("tp = %lx", (long )tp); /* free the reassembly queue, if any */ - t = tcpfrag_list_first(tp); - while (!tcpfrag_list_end(t, tp)) { - t = tcpiphdr_next(t); - m = tcpiphdr_prev(t)->ti_mbuf; - remque(tcpiphdr2qlink(tcpiphdr_prev(t))); + t = (struct tcpiphdr *) tp->seg_next; + while (t != (struct tcpiphdr *)tp) { + t = (struct tcpiphdr *)t->ti_next; + m = (struct mbuf *) REASS_MBUF((struct tcpiphdr *)t->ti_prev); + remque_32((struct tcpiphdr *) t->ti_prev); m_freem(m); } /* It's static */ @@ -443,7 +447,7 @@ tcp_connect(inso) { struct socket *so; struct sockaddr_in addr; - socklen_t addrlen = sizeof(struct sockaddr_in); + int addrlen = sizeof(struct sockaddr_in); struct tcpcb *tp; int s, opt; @@ -625,7 +629,7 @@ tcp_emu(so, m) struct mbuf *m; { u_int n1, n2, n3, n4, n5, n6; - char buff[257]; + char buff[256]; u_int32_t laddr; u_int lport; char *bptr; @@ -645,7 +649,7 @@ tcp_emu(so, m) { struct socket *tmpso; struct sockaddr_in addr; - socklen_t addrlen = sizeof(struct sockaddr_in); + int addrlen = sizeof(struct sockaddr_in); struct sbuf *so_rcv = &so->so_rcv; memcpy(so_rcv->sb_wptr, m->m_data, m->m_len); @@ -669,9 +673,7 @@ tcp_emu(so, m) } } } - so_rcv->sb_cc = snprintf(so_rcv->sb_data, - so_rcv->sb_datalen, - "%d,%d\r\n", n1, n2); + so_rcv->sb_cc = sprintf(so_rcv->sb_data, "%d,%d\r\n", n1, n2); so_rcv->sb_rptr = so_rcv->sb_data; so_rcv->sb_wptr = so_rcv->sb_data + so_rcv->sb_cc; } @@ -1005,9 +1007,8 @@ do_prompt: n4 = (laddr & 0xff); m->m_len = bptr - m->m_data; /* Adjust length */ - m->m_len += snprintf(bptr, m->m_hdr.mh_size - m->m_len, - "ORT %d,%d,%d,%d,%d,%d\r\n%s", - n1, n2, n3, n4, n5, n6, x==7?buff:""); + m->m_len += sprintf(bptr,"ORT %d,%d,%d,%d,%d,%d\r\n%s", + n1, n2, n3, n4, n5, n6, x==7?buff:""); return 1; } else if ((bptr = (char *)strstr(m->m_data, "27 Entering")) != NULL) { /* @@ -1037,9 +1038,8 @@ do_prompt: n4 = (laddr & 0xff); m->m_len = bptr - m->m_data; /* Adjust length */ - m->m_len += snprintf(bptr, m->m_hdr.mh_size - m->m_len, - "27 Entering Passive Mode (%d,%d,%d,%d,%d,%d)\r\n%s", - n1, n2, n3, n4, n5, n6, x==7?buff:""); + m->m_len += sprintf(bptr,"27 Entering Passive Mode (%d,%d,%d,%d,%d,%d)\r\n%s", + n1, n2, n3, n4, n5, n6, x==7?buff:""); return 1; } @@ -1062,8 +1062,7 @@ do_prompt: } if (m->m_data[m->m_len-1] == '\0' && lport != 0 && (so = solisten(0, so->so_laddr.s_addr, htons(lport), SS_FACCEPTONCE)) != NULL) - m->m_len = snprintf(m->m_data, m->m_hdr.mh_size, "%d", - ntohs(so->so_fport)) + 1; + m->m_len = sprintf(m->m_data, "%d", ntohs(so->so_fport))+1; return 1; case EMU_IRC: @@ -1080,28 +1079,25 @@ do_prompt: return 1; m->m_len = bptr - m->m_data; /* Adjust length */ - m->m_len += snprintf(bptr, m->m_hdr.mh_size, - "DCC CHAT chat %lu %u%c\n", - (unsigned long)ntohl(so->so_faddr.s_addr), - ntohs(so->so_fport), 1); + m->m_len += sprintf(bptr, "DCC CHAT chat %lu %u%c\n", + (unsigned long)ntohl(so->so_faddr.s_addr), + ntohs(so->so_fport), 1); } else if (sscanf(bptr, "DCC SEND %256s %u %u %u", buff, &laddr, &lport, &n1) == 4) { if ((so = solisten(0, htonl(laddr), htons(lport), SS_FACCEPTONCE)) == NULL) return 1; m->m_len = bptr - m->m_data; /* Adjust length */ - m->m_len += snprintf(bptr, m->m_hdr.mh_size, - "DCC SEND %s %lu %u %u%c\n", buff, - (unsigned long)ntohl(so->so_faddr.s_addr), - ntohs(so->so_fport), n1, 1); + m->m_len += sprintf(bptr, "DCC SEND %s %lu %u %u%c\n", + buff, (unsigned long)ntohl(so->so_faddr.s_addr), + ntohs(so->so_fport), n1, 1); } else if (sscanf(bptr, "DCC MOVE %256s %u %u %u", buff, &laddr, &lport, &n1) == 4) { if ((so = solisten(0, htonl(laddr), htons(lport), SS_FACCEPTONCE)) == NULL) return 1; m->m_len = bptr - m->m_data; /* Adjust length */ - m->m_len += snprintf(bptr, m->m_hdr.mh_size, - "DCC MOVE %s %lu %u %u%c\n", buff, - (unsigned long)ntohl(so->so_faddr.s_addr), - ntohs(so->so_fport), n1, 1); + m->m_len += sprintf(bptr, "DCC MOVE %s %lu %u %u%c\n", + buff, (unsigned long)ntohl(so->so_faddr.s_addr), + ntohs(so->so_fport), n1, 1); } return 1; @@ -1277,11 +1273,6 @@ tcp_ctl(so) for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) { if (ex_ptr->ex_fport == so->so_fport && command == ex_ptr->ex_addr) { - if (ex_ptr->ex_pty == 3) { - so->s = -1; - so->extra = (void *)ex_ptr->ex_exec; - return 1; - } do_pty = ex_ptr->ex_pty; goto do_exec; } @@ -1294,8 +1285,8 @@ tcp_ctl(so) /* FALLTHROUGH */ case CTL_ALIAS: - sb->sb_cc = snprintf(sb->sb_wptr, sb->sb_datalen - (sb->sb_wptr - sb->sb_data), - "Error: No application configured.\r\n"); + sb->sb_cc = sprintf(sb->sb_wptr, + "Error: No application configured.\r\n"); sb->sb_wptr += sb->sb_cc; return(0); diff --git a/BasiliskII/src/slirp/tcp_timer.c b/BasiliskII/src/slirp/tcp_timer.c index 47f01bb9..244bad6a 100644 --- a/BasiliskII/src/slirp/tcp_timer.c +++ b/BasiliskII/src/slirp/tcp_timer.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/tcp_timer.h b/BasiliskII/src/slirp/tcp_timer.h index 791ee49d..f251846b 100644 --- a/BasiliskII/src/slirp/tcp_timer.h +++ b/BasiliskII/src/slirp/tcp_timer.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/tcp_var.h b/BasiliskII/src/slirp/tcp_var.h index d4af1c8d..82380f93 100644 --- a/BasiliskII/src/slirp/tcp_var.h +++ b/BasiliskII/src/slirp/tcp_var.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -36,12 +40,18 @@ #include "tcpip.h" #include "tcp_timer.h" +#if SIZEOF_CHAR_P == 4 + typedef struct tcpiphdr *tcpiphdrp_32; +#else + typedef u_int32_t tcpiphdrp_32; +#endif + /* * Tcp control block, one per tcp; fields: */ struct tcpcb { - struct tcpiphdr *seg_next; /* sequencing queue */ - struct tcpiphdr *seg_prev; + tcpiphdrp_32 seg_next; /* sequencing queue */ + tcpiphdrp_32 seg_prev; short t_state; /* state of this connection */ short t_timer[TCPT_NTIMERS]; /* tcp timers */ short t_rxtshift; /* log(2) of rexmt exp. backoff */ @@ -160,6 +170,21 @@ struct tcpcb { #define TCP_REXMTVAL(tp) \ (((tp)->t_srtt >> TCP_RTT_SHIFT) + (tp)->t_rttvar) +/* XXX + * We want to avoid doing m_pullup on incoming packets but that + * means avoiding dtom on the tcp reassembly code. That in turn means + * keeping an mbuf pointer in the reassembly queue (since we might + * have a cluster). As a quick hack, the source & destination + * port numbers (which are no longer needed once we've located the + * tcpcb) are overlayed with an mbuf pointer. + */ +#if SIZEOF_CHAR_P == 4 +typedef struct mbuf *mbufp_32; +#else +typedef u_int32_t mbufp_32; +#endif +#define REASS_MBUF(ti) (*(mbufp_32 *)&((ti)->ti_t)) + #ifdef LOG_ENABLED /* * TCP statistics. diff --git a/BasiliskII/src/slirp/tcpip.h b/BasiliskII/src/slirp/tcpip.h index 7974ce3d..82708b09 100644 --- a/BasiliskII/src/slirp/tcpip.h +++ b/BasiliskII/src/slirp/tcpip.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -40,7 +44,8 @@ struct tcpiphdr { struct ipovly ti_i; /* overlaid ip structure */ struct tcphdr ti_t; /* tcp header */ }; -#define ti_mbuf ti_i.ih_mbuf.mptr +#define ti_next ti_i.ih_next +#define ti_prev ti_i.ih_prev #define ti_x1 ti_i.ih_x1 #define ti_pr ti_i.ih_pr #define ti_len ti_i.ih_len @@ -57,14 +62,6 @@ struct tcpiphdr { #define ti_sum ti_t.th_sum #define ti_urp ti_t.th_urp -#define tcpiphdr2qlink(T) ((struct qlink*)(((char*)(T)) - sizeof(struct qlink))) -#define qlink2tcpiphdr(Q) ((struct tcpiphdr*)(((char*)(Q)) + sizeof(struct qlink))) -#define tcpiphdr_next(T) qlink2tcpiphdr(tcpiphdr2qlink(T)->next) -#define tcpiphdr_prev(T) qlink2tcpiphdr(tcpiphdr2qlink(T)->prev) -#define tcpfrag_list_first(T) qlink2tcpiphdr((T)->seg_next) -#define tcpfrag_list_end(F, T) (tcpiphdr2qlink(F) == (struct qlink*)(T)) -#define tcpfrag_list_empty(T) ((T)->seg_next == (struct tcpiphdr*)(T)) - /* * Just a clean way to get to the first byte * of the packet diff --git a/BasiliskII/src/slirp/tftp.c b/BasiliskII/src/slirp/tftp.c index 4ad55048..562ae895 100644 --- a/BasiliskII/src/slirp/tftp.c +++ b/BasiliskII/src/slirp/tftp.c @@ -23,7 +23,6 @@ */ #include -#include "qemu-common.h" // for pstrcpy struct tftp_session { int in_use; @@ -149,10 +148,8 @@ static int tftp_send_oack(struct tftp_session *spt, m->m_data += sizeof(struct udpiphdr); tp->tp_op = htons(TFTP_OACK); - n += snprintf((char *)tp->x.tp_buf + n, sizeof(tp->x.tp_buf) - n, "%s", - key) + 1; - n += snprintf((char *)tp->x.tp_buf + n, sizeof(tp->x.tp_buf) - n, "%u", - value) + 1; + n += sprintf(tp->x.tp_buf + n, "%s", key) + 1; + n += sprintf(tp->x.tp_buf + n, "%u", value) + 1; saddr.sin_addr = recv_tp->ip.ip_dst; saddr.sin_port = recv_tp->udp.uh_dport; @@ -192,7 +189,7 @@ static int tftp_send_error(struct tftp_session *spt, tp->tp_op = htons(TFTP_ERROR); tp->x.tp_error.tp_error_code = htons(errorcode); - pstrcpy((char *)tp->x.tp_error.tp_msg, sizeof(tp->x.tp_error.tp_msg), msg); + strcpy(tp->x.tp_error.tp_msg, msg); saddr.sin_addr = recv_tp->ip.ip_dst; saddr.sin_port = recv_tp->udp.uh_dport; @@ -327,8 +324,8 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen) /* do sanity checks on the filename */ if ((spt->filename[0] != '/') - || (spt->filename[strlen((char *)spt->filename) - 1] == '/') - || strstr((char *)spt->filename, "/../")) { + || (spt->filename[strlen(spt->filename) - 1] == '/') + || strstr(spt->filename, "/../")) { tftp_send_error(spt, 2, "Access violation", tp); return; } @@ -355,7 +352,7 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen) while (k < n) { const char *key, *value; - key = (char *)src + k; + key = src + k; k += strlen(key) + 1; if (k >= n) { @@ -363,7 +360,7 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen) return; } - value = (char *)src + k; + value = src + k; k += strlen(value) + 1; if (strcmp(key, "tsize") == 0) { diff --git a/BasiliskII/src/slirp/udp.c b/BasiliskII/src/slirp/udp.c index 8d3bdd2c..c48923b0 100644 --- a/BasiliskII/src/slirp/udp.c +++ b/BasiliskII/src/slirp/udp.c @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -132,7 +136,8 @@ udp_input(m, iphlen) * Checksum extended UDP header and data. */ if (UDPCKSUM && uh->uh_sum) { - memset(&((struct ipovly *)ip)->ih_mbuf, 0, sizeof(struct mbuf_ptr)); + ((struct ipovly *)ip)->ih_next = 0; + ((struct ipovly *)ip)->ih_prev = 0; ((struct ipovly *)ip)->ih_x1 = 0; ((struct ipovly *)ip)->ih_len = uh->uh_ulen; /* keep uh_sum for ICMP reply @@ -153,9 +158,6 @@ udp_input(m, iphlen) goto bad; } - if (slirp_restrict) - goto bad; - /* * handle TFTP */ @@ -278,7 +280,7 @@ int udp_output2(struct socket *so, struct mbuf *m, * and addresses and length put into network format. */ ui = mtod(m, struct udpiphdr *); - memset(&ui->ui_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr)); + ui->ui_next = ui->ui_prev = 0; ui->ui_x1 = 0; ui->ui_pr = IPPROTO_UDP; ui->ui_len = htons(m->m_len - sizeof(struct ip)); /* + sizeof (struct udphdr)); */ @@ -317,11 +319,9 @@ int udp_output(struct socket *so, struct mbuf *m, saddr = *addr; if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) { + saddr.sin_addr.s_addr = so->so_faddr.s_addr; if ((so->so_faddr.s_addr & htonl(0x000000ff)) == htonl(0xff)) saddr.sin_addr.s_addr = alias_addr.s_addr; - else if (addr->sin_addr.s_addr == loopback_addr.s_addr || - (ntohl(so->so_faddr.s_addr) & 0xff) != CTL_ALIAS) - saddr.sin_addr.s_addr = so->so_faddr.s_addr; } daddr.sin_addr = so->so_laddr; daddr.sin_port = so->so_lport; @@ -408,7 +408,7 @@ static void udp_emu(struct socket *so, struct mbuf *m) { struct sockaddr_in addr; - socklen_t addrlen = sizeof(addr); + int addrlen = sizeof(addr); #ifdef EMULATE_TALK CTL_MSG_OLD *omsg; CTL_MSG *nmsg; @@ -473,14 +473,14 @@ struct cu_header { type = omsg->type; OTOSIN(omsg, ctl_addr)->sin_port = addr.sin_port; OTOSIN(omsg, ctl_addr)->sin_addr = our_addr; - pstrcpy(omsg->l_name, NAME_SIZE_OLD, getlogin()); + strncpy(omsg->l_name, getlogin(), NAME_SIZE_OLD); } else { /* new talk */ omsg = (CTL_MSG_OLD *) buff; nmsg = mtod(m, CTL_MSG *); type = nmsg->type; OTOSIN(nmsg, ctl_addr)->sin_port = addr.sin_port; OTOSIN(nmsg, ctl_addr)->sin_addr = our_addr; - pstrcpy(nmsg->l_name, NAME_SIZE_OLD, getlogin()); + strncpy(nmsg->l_name, getlogin(), NAME_SIZE_OLD); } if (type == LOOK_UP) @@ -639,7 +639,7 @@ udp_listen(port, laddr, lport, flags) { struct sockaddr_in addr; struct socket *so; - socklen_t addrlen = sizeof(struct sockaddr_in), opt = 1; + int addrlen = sizeof(struct sockaddr_in), opt = 1; if ((so = socreate()) == NULL) { free(so); diff --git a/BasiliskII/src/slirp/udp.h b/BasiliskII/src/slirp/udp.h index 51a07a2f..4f69b098 100644 --- a/BasiliskII/src/slirp/udp.h +++ b/BasiliskII/src/slirp/udp.h @@ -10,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -56,7 +60,8 @@ struct udpiphdr { struct ipovly ui_i; /* overlaid ip structure */ struct udphdr ui_u; /* udp header */ }; -#define ui_mbuf ui_i.ih_mbuf.mptr +#define ui_next ui_i.ih_next +#define ui_prev ui_i.ih_prev #define ui_x1 ui_i.ih_x1 #define ui_pr ui_i.ih_pr #define ui_len ui_i.ih_len From 605c811a4ad9bdb8a742f8c80dfdc21c00a0a3ab Mon Sep 17 00:00:00 2001 From: jvernet Date: Wed, 4 Oct 2017 18:22:48 +0200 Subject: [PATCH 76/85] Revert "SLIRP 0.9.1" This reverts commit 4682bb80a1afd69e365a0e448fcba7dd68f8c242. --- BasiliskII/src/slirp/COPYRIGHT | 5 +- BasiliskII/src/slirp/bootp.c | 48 +- BasiliskII/src/slirp/bootp.h | 10 +- BasiliskII/src/slirp/cksum.c | 20 +- BasiliskII/src/slirp/debug.c | 142 ++-- BasiliskII/src/slirp/debug.h | 16 +- BasiliskII/src/slirp/icmp_var.h | 8 +- BasiliskII/src/slirp/if.c | 97 ++- BasiliskII/src/slirp/if.h | 37 +- BasiliskII/src/slirp/ip.h | 52 +- BasiliskII/src/slirp/ip_icmp.c | 84 +-- BasiliskII/src/slirp/ip_icmp.h | 22 +- BasiliskII/src/slirp/ip_input.c | 101 ++- BasiliskII/src/slirp/ip_output.c | 51 +- BasiliskII/src/slirp/libslirp.h | 24 +- BasiliskII/src/slirp/main.h | 5 +- BasiliskII/src/slirp/mbuf.c | 95 ++- BasiliskII/src/slirp/mbuf.h | 33 +- BasiliskII/src/slirp/misc.c | 375 ++++------ BasiliskII/src/slirp/misc.h | 48 +- BasiliskII/src/slirp/sbuf.c | 64 +- BasiliskII/src/slirp/sbuf.h | 17 +- BasiliskII/src/slirp/slirp.c | 306 ++++---- BasiliskII/src/slirp/slirp.h | 178 ++--- BasiliskII/src/slirp/slirp_config.h | 85 +-- BasiliskII/src/slirp/socket.c | 224 +++--- BasiliskII/src/slirp/socket.h | 47 +- BasiliskII/src/slirp/tcp.h | 24 +- BasiliskII/src/slirp/tcp_input.c | 1036 ++++++++++++++------------- BasiliskII/src/slirp/tcp_output.c | 116 ++- BasiliskII/src/slirp/tcp_subr.c | 418 +++++------ BasiliskII/src/slirp/tcp_timer.c | 73 +- BasiliskII/src/slirp/tcp_timer.h | 19 +- BasiliskII/src/slirp/tcp_var.h | 9 +- BasiliskII/src/slirp/tcpip.h | 6 +- BasiliskII/src/slirp/tftp.c | 149 +--- BasiliskII/src/slirp/tftp.h | 15 +- BasiliskII/src/slirp/udp.c | 209 +++--- BasiliskII/src/slirp/udp.h | 37 +- 39 files changed, 2006 insertions(+), 2299 deletions(-) diff --git a/BasiliskII/src/slirp/COPYRIGHT b/BasiliskII/src/slirp/COPYRIGHT index 3f331ee0..b7d6568e 100644 --- a/BasiliskII/src/slirp/COPYRIGHT +++ b/BasiliskII/src/slirp/COPYRIGHT @@ -16,7 +16,7 @@ The copyright terms and conditions: ---BEGIN--- Copyright (c) 1995,1996 Danny Gasparovski. All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -25,9 +25,6 @@ The copyright terms and conditions: 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this software - must display the following acknowledgment: - This product includes software developed by Danny Gasparovski. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY diff --git a/BasiliskII/src/slirp/bootp.c b/BasiliskII/src/slirp/bootp.c index 3ae3db20..a51b80c9 100644 --- a/BasiliskII/src/slirp/bootp.c +++ b/BasiliskII/src/slirp/bootp.c @@ -1,8 +1,8 @@ /* * QEMU BOOTP/DHCP server - * + * * Copyright (c) 2004 Fabrice Bellard - * + * * 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 @@ -38,17 +38,8 @@ typedef struct { BOOTPClient bootp_clients[NB_ADDR]; -const char *bootp_filename; - static const uint8_t rfc1533_cookie[] = { RFC1533_COOKIE }; -#ifdef DEBUG -#define dprintf(fmt, args...) \ -if (slirp_debug & DBG_CALL) { fprintf(dfd, fmt, ## args); fflush(dfd); } -#else -#define dprintf(fmt, args...) -#endif - static BOOTPClient *get_new_addr(struct in_addr *paddr) { BOOTPClient *bc; @@ -89,7 +80,7 @@ static void dhcp_decode(const uint8_t *buf, int size, const uint8_t *p, *p_end; int len, tag; - *pmsg_type = 0; + *pmsg_type = 0; p = buf; p_end = buf + size; @@ -101,7 +92,7 @@ static void dhcp_decode(const uint8_t *buf, int size, while (p < p_end) { tag = p[0]; if (tag == RFC1533_PAD) { - p++; + p++; } else if (tag == RFC1533_END) { break; } else { @@ -109,7 +100,6 @@ static void dhcp_decode(const uint8_t *buf, int size, if (p >= p_end) break; len = *p++; - dprintf("dhcp: tag=0x%02x len=%d\n", tag, len); switch(tag) { case RFC2132_MSG_TYPE: @@ -136,20 +126,19 @@ static void bootp_reply(struct bootp_t *bp) /* extract exact DHCP msg type */ dhcp_decode(bp->bp_vend, DHCP_OPT_LEN, &dhcp_msg_type); - dprintf("bootp packet op=%d msgtype=%d\n", bp->bp_op, dhcp_msg_type); - + if (dhcp_msg_type == 0) dhcp_msg_type = DHCPREQUEST; /* Force reply for old BOOTP clients */ - - if (dhcp_msg_type != DHCPDISCOVER && + + if (dhcp_msg_type != DHCPDISCOVER && dhcp_msg_type != DHCPREQUEST) return; /* XXX: this is a hack to get the client mac address */ memcpy(client_ethaddr, bp->bp_hwaddr, 6); - + if ((m = m_get()) == NULL) return; - m->m_data += IF_MAXLINKHDR; + m->m_data += if_maxlinkhdr; rbp = (struct bootp_t *)m->m_data; m->m_data += sizeof(struct udpiphdr); memset(rbp, 0, sizeof(struct bootp_t)); @@ -157,10 +146,8 @@ static void bootp_reply(struct bootp_t *bp) if (dhcp_msg_type == DHCPDISCOVER) { new_addr: bc = get_new_addr(&daddr.sin_addr); - if (!bc) { - dprintf("no address left\n"); + if (!bc) return; - } memcpy(bc->macaddr, client_ethaddr, 6); } else { bc = find_addr(&daddr.sin_addr, bp->bp_hwaddr); @@ -171,11 +158,6 @@ static void bootp_reply(struct bootp_t *bp) } } - if (bootp_filename) - snprintf(rbp->bp_file, sizeof(rbp->bp_file), "%s", bootp_filename); - - dprintf("offered addr=%08x\n", ntohl(daddr.sin_addr.s_addr)); - saddr.sin_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_ALIAS); saddr.sin_port = htons(BOOTP_SERVER); @@ -203,7 +185,7 @@ static void bootp_reply(struct bootp_t *bp) *q++ = 1; *q++ = DHCPACK; } - + if (dhcp_msg_type == DHCPDISCOVER || dhcp_msg_type == DHCPREQUEST) { *q++ = RFC2132_SRV_ID; @@ -217,12 +199,12 @@ static void bootp_reply(struct bootp_t *bp) *q++ = 0xff; *q++ = 0xff; *q++ = 0x00; - + *q++ = RFC1533_GATEWAY; *q++ = 4; memcpy(q, &saddr.sin_addr, 4); q += 4; - + *q++ = RFC1533_DNS; *q++ = 4; dns_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_DNS); @@ -244,8 +226,8 @@ static void bootp_reply(struct bootp_t *bp) } } *q++ = RFC1533_END; - - m->m_len = sizeof(struct bootp_t) - + + m->m_len = sizeof(struct bootp_t) - sizeof(struct ip) - sizeof(struct udphdr); udp_output2(NULL, m, &saddr, &daddr, IPTOS_LOWDELAY); } diff --git a/BasiliskII/src/slirp/bootp.h b/BasiliskII/src/slirp/bootp.h index e48f53f3..54a86ca2 100644 --- a/BasiliskII/src/slirp/bootp.h +++ b/BasiliskII/src/slirp/bootp.h @@ -90,6 +90,10 @@ #define BOOTP_VENDOR_LEN 64 #define DHCP_OPT_LEN 312 +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(1) +#endif + struct bootp_t { struct ip ip; struct udphdr udp; @@ -108,6 +112,10 @@ struct bootp_t { uint8_t bp_sname[64]; uint8_t bp_file[128]; uint8_t bp_vend[DHCP_OPT_LEN]; -}; +} PACKED__; + +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(PACK_RESET) +#endif void bootp_input(struct mbuf *m); diff --git a/BasiliskII/src/slirp/cksum.c b/BasiliskII/src/slirp/cksum.c index b98373b5..66d3f230 100644 --- a/BasiliskII/src/slirp/cksum.c +++ b/BasiliskII/src/slirp/cksum.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -41,7 +37,7 @@ * * This routine is very heavily used in the network * code and should be modified for each CPU to be as fast as possible. - * + * * XXX Since we will never span more than 1 mbuf, we can optimise this */ @@ -63,13 +59,13 @@ int cksum(struct mbuf *m, int len) u_int16_t s[2]; u_int32_t l; } l_util; - + if (m->m_len == 0) goto cont; w = mtod(m, u_int16_t *); - + mlen = m->m_len; - + if (len < mlen) mlen = len; len -= mlen; @@ -107,7 +103,7 @@ int cksum(struct mbuf *m, int len) while ((mlen -= 2) >= 0) { sum += *w++; } - + if (byte_swapped) { REDUCE; sum <<= 8; @@ -117,11 +113,11 @@ int cksum(struct mbuf *m, int len) sum += s_util.s; mlen = 0; } else - + mlen = -1; } else if (mlen == -1) s_util.c[0] = *(u_int8_t *)w; - + cont: #ifdef DEBUG if (len) { diff --git a/BasiliskII/src/slirp/debug.c b/BasiliskII/src/slirp/debug.c index 7c8581d6..916b9a8e 100644 --- a/BasiliskII/src/slirp/debug.c +++ b/BasiliskII/src/slirp/debug.c @@ -1,8 +1,8 @@ /* * Copyright (c) 1995 Danny Gasparovski. * Portions copyright (c) 2000 Kelly Price. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -16,11 +16,8 @@ int dostats = 0; #endif int slirp_debug = 0; -extern char *strerror _P((int)); - -/* Carry over one item from main.c so that the tty's restored. +/* Carry over one item from main.c so that the tty's restored. * Only done when the tty being used is /dev/tty --RedWolf */ -#ifndef CONFIG_QEMU extern struct termios slirp_tty_settings; extern int slirp_tty_restore; @@ -33,7 +30,7 @@ debug_init(file, dbg) /* Close the old debugging file */ if (dfd) fclose(dfd); - + dfd = fopen(file,"w"); if (dfd != NULL) { #if 0 @@ -59,7 +56,7 @@ dump_packet(dat, n) { u_char *pptr = (u_char *)dat; int j,k; - + n /= 16; n++; DEBUG_MISC((dfd, "PACKET DUMPED: \n")); @@ -71,30 +68,28 @@ dump_packet(dat, n) } } #endif -#endif -#ifdef LOG_ENABLED #if 0 /* * Statistic routines - * + * * These will print statistics to the screen, the debug file (dfd), or * a buffer, depending on "type", so that the stats can be sent over * the link as well. */ -static void +void ttystats(ttyp) struct ttys *ttyp; { struct slirp_ifstats *is = &ttyp->ifstats; char buff[512]; - + lprint(" \r\n"); - - if (IF_COMP & IF_COMPRESS) + + if (if_comp & IF_COMPRESS) strcpy(buff, "on"); - else if (IF_COMP & IF_NOCOMPRESS) + else if (if_comp & IF_NOCOMPRESS) strcpy(buff, "off"); else strcpy(buff, "off (for now)"); @@ -122,20 +117,20 @@ ttystats(ttyp) lprint(" %6d bad input packets\r\n", is->in_mbad); } -static void -allttystats(void) +void +allttystats() { struct ttys *ttyp; - + for (ttyp = ttys; ttyp; ttyp = ttyp->next) ttystats(ttyp); } #endif -static void -ipstats(void) +void +ipstats() { - lprint(" \r\n"); + lprint(" \r\n"); lprint("IP stats:\r\n"); lprint(" %6d total packets received (%d were unaligned)\r\n", @@ -156,14 +151,14 @@ ipstats(void) lprint(" %6d total packets delivered\r\n", ipstat.ips_delivered); } -#ifndef CONFIG_QEMU -static void -vjstats(void) +#if 0 +void +vjstats() { lprint(" \r\n"); - + lprint("VJ compression stats:\r\n"); - + lprint(" %6d outbound packets (%d compressed)\r\n", comp_s.sls_packets, comp_s.sls_compressed); lprint(" %6d searches for connection stats (%d misses)\r\n", @@ -175,13 +170,13 @@ vjstats(void) } #endif -static void -tcpstats(void) +void +tcpstats() { lprint(" \r\n"); lprint("TCP stats:\r\n"); - + lprint(" %6d packets sent\r\n", tcpstat.tcps_sndtotal); lprint(" %6d data packets (%d bytes)\r\n", tcpstat.tcps_sndpack, tcpstat.tcps_sndbyte); @@ -194,8 +189,8 @@ tcpstats(void) lprint(" %6d window update packets\r\n", tcpstat.tcps_sndwinup); lprint(" %6d control (SYN/FIN/RST) packets\r\n", tcpstat.tcps_sndctrl); lprint(" %6d times tcp_output did nothing\r\n", tcpstat.tcps_didnuttin); - - lprint(" %6d packets received\r\n", tcpstat.tcps_rcvtotal); + + lprint(" %6d packets received\r\n", tcpstat.tcps_rcvtotal); lprint(" %6d acks (for %d bytes)\r\n", tcpstat.tcps_rcvackpack, tcpstat.tcps_rcvackbyte); lprint(" %6d duplicate acks\r\n", tcpstat.tcps_rcvdupack); @@ -204,7 +199,7 @@ tcpstats(void) tcpstat.tcps_rcvpack, tcpstat.tcps_rcvbyte); lprint(" %6d completely duplicate packets (%d bytes)\r\n", tcpstat.tcps_rcvduppack, tcpstat.tcps_rcvdupbyte); - + lprint(" %6d packets with some duplicate data (%d bytes duped)\r\n", tcpstat.tcps_rcvpartduppack, tcpstat.tcps_rcvpartdupbyte); lprint(" %6d out-of-order packets (%d bytes)\r\n", @@ -217,7 +212,7 @@ tcpstats(void) lprint(" %6d discarded for bad checksums\r\n", tcpstat.tcps_rcvbadsum); lprint(" %6d discarded for bad header offset fields\r\n", tcpstat.tcps_rcvbadoff); - + lprint(" %6d connection requests\r\n", tcpstat.tcps_connattempt); lprint(" %6d connection accepts\r\n", tcpstat.tcps_accepts); lprint(" %6d connections established (including accepts)\r\n", tcpstat.tcps_connects); @@ -236,15 +231,15 @@ tcpstats(void) lprint(" %6d correct ACK header predictions\r\n", tcpstat.tcps_predack); lprint(" %6d correct data packet header predictions\n", tcpstat.tcps_preddat); lprint(" %6d TCP cache misses\r\n", tcpstat.tcps_socachemiss); - - + + /* lprint(" Packets received too short: %d\r\n", tcpstat.tcps_rcvshort); */ /* lprint(" Segments dropped due to PAWS: %d\r\n", tcpstat.tcps_pawsdrop); */ } -static void -udpstats(void) +void +udpstats() { lprint(" \r\n"); @@ -257,8 +252,8 @@ udpstats(void) lprint(" %6d datagrams sent\r\n", udpstat.udps_opackets); } -static void -icmpstats(void) +void +icmpstats() { lprint(" \r\n"); lprint("ICMP stats:\r\n"); @@ -270,23 +265,23 @@ icmpstats(void) lprint(" %6d ICMP packets sent in reply\r\n", icmpstat.icps_reflect); } -static void -mbufstats(void) +void +mbufstats() { struct mbuf *m; int i; - + lprint(" \r\n"); - + lprint("Mbuf stats:\r\n"); lprint(" %6d mbufs allocated (%d max)\r\n", mbuf_alloced, mbuf_max); - + i = 0; for (m = m_freelist.m_next; m != &m_freelist; m = m->m_next) i++; lprint(" %6d mbufs on free list\r\n", i); - + i = 0; for (m = m_usedlist.m_next; m != &m_usedlist; m = m->m_next) i++; @@ -294,55 +289,59 @@ mbufstats(void) lprint(" %6d mbufs queued as packets\r\n\r\n", if_queued); } -static void -sockstats(void) +void +sockstats() { + char addr[INET_ADDRSTRLEN]; char buff[256]; int n; struct socket *so; lprint(" \r\n"); - + lprint( "Proto[state] Sock Local Address, Port Remote Address, Port RecvQ SendQ\r\n"); - + for (so = tcb.so_next; so != &tcb; so = so->so_next) { - + n = sprintf(buff, "tcp[%s]", so->so_tcpcb?tcpstates[so->so_tcpcb->t_state]:"NONE"); while (n < 17) buff[n++] = ' '; buff[17] = 0; lprint("%s %3d %15s %5d ", buff, so->s, - inet_ntoa(so->so_laddr), ntohs(so->so_lport)); + inet_ntop(AF_INET, &so->so_laddr, addr, sizeof(addr)), + ntohs(so->so_lport)); lprint("%15s %5d %5d %5d\r\n", - inet_ntoa(so->so_faddr), ntohs(so->so_fport), + inet_ntop(AF_INET, &so->so_faddr, addr, sizeof(addr)), + ntohs(so->so_fport), so->so_rcv.sb_cc, so->so_snd.sb_cc); } - + for (so = udb.so_next; so != &udb; so = so->so_next) { - + n = sprintf(buff, "udp[%d sec]", (so->so_expire - curtime) / 1000); while (n < 17) buff[n++] = ' '; buff[17] = 0; lprint("%s %3d %15s %5d ", buff, so->s, - inet_ntoa(so->so_laddr), ntohs(so->so_lport)); + inet_ntop(AF_INET, &so->so_laddr, addr, sizeof(addr)), + ntohs(so->so_lport)); lprint("%15s %5d %5d %5d\r\n", - inet_ntoa(so->so_faddr), ntohs(so->so_fport), + inet_ntop(AF_INET, &so->so_faddr, addr, sizeof(addr)), + ntohs(so->so_fport), so->so_rcv.sb_cc, so->so_snd.sb_cc); } } -#endif -#ifndef CONFIG_QEMU +#if 0 void slirp_exit(exit_status) int exit_status; { struct ttys *ttyp; - + DEBUG_CALL("slirp_exit"); DEBUG_ARG("exit_status = %d", exit_status); @@ -351,7 +350,7 @@ slirp_exit(exit_status) if (!dfd) debug_init("slirp_stats", 0xf); lprint_arg = (char **)&dfd; - + ipstats(); tcpstats(); udpstats(); @@ -361,35 +360,20 @@ slirp_exit(exit_status) allttystats(); vjstats(); } - + for (ttyp = ttys; ttyp; ttyp = ttyp->next) tty_detached(ttyp, 1); - + if (slirp_forked) { /* Menendez time */ if (kill(getppid(), SIGQUIT) < 0) lprint("Couldn't kill parent process %ld!\n", (long) getppid()); } - + /* Restore the terminal if we gotta */ if(slirp_tty_restore) tcsetattr(0,TCSANOW, &slirp_tty_settings); /* NOW DAMMIT! */ exit(exit_status); } #endif - -void -slirp_stats(void) -{ -#ifdef LOG_ENABLED - ipstats(); - tcpstats(); - udpstats(); - icmpstats(); - mbufstats(); - sockstats(); -#else - lprint("SLIRP statistics code not compiled.\n"); -#endif -} diff --git a/BasiliskII/src/slirp/debug.h b/BasiliskII/src/slirp/debug.h index 8a523b2e..c5d42195 100644 --- a/BasiliskII/src/slirp/debug.h +++ b/BasiliskII/src/slirp/debug.h @@ -1,7 +1,7 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -36,5 +36,15 @@ extern int slirp_debug; #endif -void debug_init _P((char *, int)); +void debug_init(char *, int); +//void ttystats(struct ttys *); +void allttystats(void); +void ipstats(void); +void vjstats(void); +void tcpstats(void); +void udpstats(void); +void icmpstats(void); +void mbufstats(void); +void sockstats(void); +void slirp_exit(int); diff --git a/BasiliskII/src/slirp/icmp_var.h b/BasiliskII/src/slirp/icmp_var.h index cd865b79..9af222fb 100644 --- a/BasiliskII/src/slirp/icmp_var.h +++ b/BasiliskII/src/slirp/icmp_var.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -64,8 +60,6 @@ struct icmpstat { { "stats", CTLTYPE_STRUCT }, \ } -#ifdef LOG_ENABLED extern struct icmpstat icmpstat; -#endif #endif diff --git a/BasiliskII/src/slirp/if.c b/BasiliskII/src/slirp/if.c index 67a7b6ff..9185dcf6 100644 --- a/BasiliskII/src/slirp/if.c +++ b/BasiliskII/src/slirp/if.c @@ -7,7 +7,12 @@ #include -int if_queued = 0; /* Number of packets queued so far */ +size_t if_mtu, if_mru; +int if_comp; +int if_maxlinkhdr; +int if_queued = 0; /* Number of packets queued so far */ +int if_thresh = 10; /* Number of packets queued before we start sending + * (to prevent allocing too many mbufs) */ struct mbuf if_fastq; /* fast queue (for interactive data) */ struct mbuf if_batchq; /* queue for non-interactive data */ @@ -36,6 +41,23 @@ ifs_remque(ifm) void if_init() { +#if 0 + /* + * Set if_maxlinkhdr to 48 because it's 40 bytes for TCP/IP, + * and 8 bytes for PPP, but need to have it on an 8byte boundary + */ +#ifdef USE_PPP + if_maxlinkhdr = 48; +#else + if_maxlinkhdr = 40; +#endif +#else + /* 2 for alignment, 14 for ethernet, 40 for TCP/IP */ + if_maxlinkhdr = 2 + 14 + 40; +#endif + if_mtu = 1500; + if_mru = 1500; + if_comp = IF_AUTOCOMP; if_fastq.ifq_next = if_fastq.ifq_prev = &if_fastq; if_batchq.ifq_next = if_batchq.ifq_prev = &if_batchq; // sl_compress_init(&comp_s); @@ -55,12 +77,12 @@ writen(fd, bptr, n) { int ret; int total; - + /* This should succeed most of the time */ ret = send(fd, bptr, n,0); if (ret == n || ret <= 0) return ret; - + /* Didn't write everything, go into the loop */ total = ret; while (n > total) { @@ -75,7 +97,7 @@ writen(fd, bptr, n) /* * if_input - read() the tty, do "top level" processing (ie: check for any escapes), * and pass onto (*ttyp->if_input) - * + * * XXXXX Any zeros arriving by themselves are NOT placed into the arriving packet. */ #define INBUFF_SIZE 2048 /* XXX */ @@ -85,16 +107,17 @@ if_input(ttyp) { u_char if_inbuff[INBUFF_SIZE]; int if_n; - + DEBUG_CALL("if_input"); DEBUG_ARG("ttyp = %lx", (long)ttyp); - + if_n = recv(ttyp->fd, (char *)if_inbuff, INBUFF_SIZE,0); - + DEBUG_MISC((dfd, " read %d bytes\n", if_n)); - + if (if_n <= 0) { - if (if_n == 0 || (errno != EINTR && errno != EAGAIN)) { + int error = WSAGetLastError(); + if (if_n == 0 || (error != WSAEINTR && error != EAGAIN)) { if (ttyp->up) link_up--; tty_detached(ttyp, 0); @@ -116,19 +139,19 @@ if_input(ttyp) } } ttyp->ones = ttyp->zeros = 0; - + (*ttyp->if_input)(ttyp, if_inbuff, if_n); } -#endif - +#endif + /* * if_output: Queue packet into an output queue. - * There are 2 output queue's, if_fastq and if_batchq. + * There are 2 output queue's, if_fastq and if_batchq. * Each output queue is a doubly linked list of double linked lists * of mbufs, each list belonging to one "session" (socket). This * way, we can output packets fairly by sending one packet from each * session, instead of all the packets from one session, then all packets - * from the next session, etc. Packets on the if_fastq get absolute + * from the next session, etc. Packets on the if_fastq get absolute * priority, but if one session hogs the link, it gets "downgraded" * to the batchq until it runs out of packets, then it'll return * to the fastq (eg. if the user does an ls -alR in a telnet session, @@ -141,11 +164,11 @@ if_output(so, ifm) { struct mbuf *ifq; int on_fastq = 1; - + DEBUG_CALL("if_output"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("ifm = %lx", (long)ifm); - + /* * First remove the mbuf from m_usedlist, * since we're gonna use m_next and m_prev ourselves @@ -155,9 +178,9 @@ if_output(so, ifm) remque(ifm); ifm->m_flags &= ~M_USEDLIST; } - + /* - * See if there's already a batchq list for this session. + * See if there's already a batchq list for this session. * This can include an interactive session, which should go on fastq, * but gets too greedy... hence it'll be downgraded from fastq to batchq. * We mustn't put this packet back on the fastq (or we'll send it out of order) @@ -171,7 +194,7 @@ if_output(so, ifm) goto diddit; } } - + /* No match, check which queue to put it on */ if (so && (so->so_iptos & IPTOS_LOWDELAY)) { ifq = if_fastq.ifq_prev; @@ -187,15 +210,15 @@ if_output(so, ifm) } } else ifq = if_batchq.ifq_prev; - + /* Create a new doubly linked list for this session */ ifm->ifq_so = so; ifs_init(ifm); insque(ifm, ifq); - + diddit: ++if_queued; - + if (so) { /* Update *_queued */ so->so_queued++; @@ -207,12 +230,12 @@ diddit: * have been sent over the link * (XXX These are arbitrary numbers, probably not optimal..) */ - if (on_fastq && ((so->so_nqueued >= 6) && + if (on_fastq && ((so->so_nqueued >= 6) && (so->so_nqueued - so->so_queued) >= 3)) { - + /* Remove from current queue... */ remque(ifm->ifs_next); - + /* ...And insert in the new. That'll teach ya! */ insque(ifm->ifs_next, &if_batchq); } @@ -245,16 +268,16 @@ void if_start(void) { struct mbuf *ifm, *ifqt; - + DEBUG_CALL("if_start"); - + if (if_queued == 0) return; /* Nothing to do */ - + again: - /* check if we can really output */ - if (!slirp_can_output()) - return; + /* check if we can really output */ + if (!slirp_can_output()) + return; /* * See which queue to get next packet from @@ -268,7 +291,7 @@ if_start(void) ifm = next_m; else ifm = if_batchq.ifq_next; - + /* Set which packet to send on next iteration */ next_m = ifm->ifq_next; } @@ -276,24 +299,24 @@ if_start(void) ifqt = ifm->ifq_prev; remque(ifm); --if_queued; - + /* If there are more packets for this session, re-queue them */ if (ifm->ifs_next != /* ifm->ifs_prev != */ ifm) { insque(ifm->ifs_next, ifqt); ifs_remque(ifm); } - + /* Update so_queued */ if (ifm->ifq_so) { if (--ifm->ifq_so->so_queued == 0) /* If there's no more queued, reset nqueued */ ifm->ifq_so->so_nqueued = 0; } - + /* Encapsulate the packet for sending */ - if_encap(ifm->m_data, ifm->m_len); + if_encap((uint8_t*)ifm->m_data, ifm->m_len); - m_free(ifm); + m_free(ifm); if (if_queued) goto again; diff --git a/BasiliskII/src/slirp/if.h b/BasiliskII/src/slirp/if.h index bed7152f..a2564ab1 100644 --- a/BasiliskII/src/slirp/if.h +++ b/BasiliskII/src/slirp/if.h @@ -1,7 +1,7 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -13,26 +13,15 @@ #define IF_AUTOCOMP 0x04 /* Autodetect (default) */ #define IF_NOCIDCOMP 0x08 /* CID compression */ -#define IF_MTU 1500 -#define IF_MRU 1500 -#define IF_COMP IF_AUTOCOMP /* Flags for compression */ - -#if 0 -/* - * Set if_maxlinkhdr to 48 because it's 40 bytes for TCP/IP, - * and 8 bytes for PPP, but need to have it on an 8byte boundary - */ -#ifdef USE_PPP -#define IF_MAXLINKHDR 48 -#else -#define IF_MAXLINKHDR 40 -#endif -#else - /* 2 for alignment, 14 for ethernet, 40 for TCP/IP */ -#define IF_MAXLINKHDR (2 + 14 + 40) -#endif - +/* Needed for FreeBSD */ +#undef if_mtu +extern size_t if_mtu; +extern size_t if_mru; /* MTU and MRU */ +extern int if_comp; /* Flags for compression */ +extern int if_maxlinkhdr; extern int if_queued; /* Number of packets queued so far */ +extern int if_thresh; /* Number of packets queued before we start sending + * (to prevent allocing too many mbufs) */ extern struct mbuf if_fastq; /* fast queue (for interactive data) */ extern struct mbuf if_batchq; /* queue for non-interactive data */ @@ -40,7 +29,6 @@ extern struct mbuf *next_m; #define ifs_init(ifm) ((ifm)->ifs_next = (ifm)->ifs_prev = (ifm)) -#ifdef LOG_ENABLED /* Interface statistics */ struct slirp_ifstats { u_int out_pkts; /* Output packets */ @@ -51,13 +39,12 @@ struct slirp_ifstats { u_int in_bytes; /* Input bytes */ u_int in_errpkts; /* Input Error Packets */ u_int in_errbytes; /* Input Error Bytes */ - + u_int bytes_saved; /* Number of bytes that compression "saved" */ /* ie: number of bytes that didn't need to be sent over the link * because of compression */ - + u_int in_mbad; /* Bad incoming packets */ }; -#endif #endif diff --git a/BasiliskII/src/slirp/ip.h b/BasiliskII/src/slirp/ip.h index a8cdb0d3..e0c7de96 100644 --- a/BasiliskII/src/slirp/ip.h +++ b/BasiliskII/src/slirp/ip.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -76,12 +72,16 @@ typedef u_int32_t n_long; /* long as received from the net */ /* * Structure of an internet header, naked of options. */ +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(1) +#endif + struct ip { #ifdef WORDS_BIGENDIAN - u_int ip_v:4, /* version */ + u_char ip_v:4, /* version */ ip_hl:4; /* header length */ #else - u_int ip_hl:4, /* header length */ + u_char ip_hl:4, /* header length */ ip_v:4; /* version */ #endif u_int8_t ip_tos; /* type of service */ @@ -95,7 +95,11 @@ struct ip { u_int8_t ip_p; /* protocol */ u_int16_t ip_sum; /* checksum */ struct in_addr ip_src,ip_dst; /* source and dest address */ -}; +} PACKED__; + +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(PACK_RESET) +#endif #define IP_MAXPACKET 65535 /* maximum packet size */ @@ -139,15 +143,19 @@ struct ip { /* * Time stamp option structure. */ +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(1) +#endif + struct ip_timestamp { u_int8_t ipt_code; /* IPOPT_TS */ u_int8_t ipt_len; /* size of structure (variable) */ u_int8_t ipt_ptr; /* index of current entry */ #ifdef WORDS_BIGENDIAN - u_int ipt_oflw:4, /* overflow counter */ + u_char ipt_oflw:4, /* overflow counter */ ipt_flg:4; /* flags, see below */ #else - u_int ipt_flg:4, /* flags, see below */ + u_char ipt_flg:4, /* flags, see below */ ipt_oflw:4; /* overflow counter */ #endif union ipt_timestamp { @@ -157,7 +165,11 @@ struct ip_timestamp { n_long ipt_time; } ipt_ta[1]; } ipt_timestamp; -}; +} PACKED__; + +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(PACK_RESET) +#endif /* flag bits for ipt_flg */ #define IPOPT_TS_TSONLY 0 /* timestamps only */ @@ -204,6 +216,10 @@ typedef caddr32_t ipasfragp_32; /* * Overlay for ip header used by other protocols (tcp, udp). */ +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(1) +#endif + struct ipovly { caddr32_t ih_next, ih_prev; /* for protocol sequence q's */ u_int8_t ih_x1; /* (unused) */ @@ -211,7 +227,11 @@ struct ipovly { u_int16_t ih_len; /* protocol length */ struct in_addr ih_src; /* source internet address */ struct in_addr ih_dst; /* destination internet address */ -}; +} PACKED__; + +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(PACK_RESET) +#endif /* * Ip reassembly queue structure. Each fragment @@ -237,10 +257,10 @@ struct ipq { */ struct ipasfrag { #ifdef WORDS_BIGENDIAN - u_int ip_v:4, + u_char ip_v:4, ip_hl:4; #else - u_int ip_hl:4, + u_char ip_hl:4, ip_v:4; #endif /* BUG : u_int changed to u_int8_t. @@ -272,7 +292,6 @@ struct ipoption { int8_t ipopt_list[MAX_IPOPTLEN]; /* options proper */ }; -#ifdef LOG_ENABLED /* * Structure attached to inpcb.ip_moptions and * passed to ip_output when IP multicast options are in use. @@ -307,9 +326,8 @@ struct ipstat { }; extern struct ipstat ipstat; -#endif - extern struct ipq ipq; /* ip reass. queue */ extern u_int16_t ip_id; /* ip packet ctr, for ids */ +extern int ip_defttl; /* default IP ttl */ #endif diff --git a/BasiliskII/src/slirp/ip_icmp.c b/BasiliskII/src/slirp/ip_icmp.c index d1da0a2f..55376a8b 100644 --- a/BasiliskII/src/slirp/ip_icmp.c +++ b/BasiliskII/src/slirp/ip_icmp.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -37,16 +33,14 @@ #include "slirp.h" #include "ip_icmp.h" -#ifdef LOG_ENABLED struct icmpstat icmpstat; -#endif /* The message sent when emulating PING */ -/* Be nice and tell them it's just a pseudo-ping packet */ -const char icmp_ping_msg[] = "This is a pseudo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n"; +/* Be nice and tell them it's just a psuedo-ping packet */ +char icmp_ping_msg[] = "This is a psuedo-PING packet used by Slirp to emulate ICMP ECHO-REQUEST packets.\n"; /* list of actions for icmp_error() on RX of an icmp message */ -static const int icmp_flush[19] = { +static int icmp_flush[19] = { /* ECHO REPLY (0) */ 0, 1, 1, @@ -65,7 +59,7 @@ static const int icmp_flush[19] = { /* INFO (15) */ 0, /* INFO REPLY (16) */ 0, /* ADDR MASK (17) */ 0, -/* ADDR MASK REPLY (18) */ 0 +/* ADDR MASK REPLY (18) */ 0 }; /* @@ -80,19 +74,19 @@ icmp_input(m, hlen) register struct ip *ip=mtod(m, struct ip *); int icmplen=ip->ip_len; /* int code; */ - + DEBUG_CALL("icmp_input"); DEBUG_ARG("m = %lx", (long )m); - DEBUG_ARG("m_len = %d", m->m_len); - - STAT(icmpstat.icps_received++); + DEBUG_ARG("m_len = %zu", m->m_len); + icmpstat.icps_received++; + /* * Locate icmp structure in mbuf, and check * that its not corrupted and of at least minimum length. */ if (icmplen < ICMP_MINLEN) { /* min 8 bytes payload */ - STAT(icmpstat.icps_tooshort++); + icmpstat.icps_tooshort++; freeit: m_freem(m); goto end_error; @@ -102,12 +96,12 @@ icmp_input(m, hlen) m->m_data += hlen; icp = mtod(m, struct icmp *); if (cksum(m, icmplen)) { - STAT(icmpstat.icps_checksum++); + icmpstat.icps_checksum++; goto freeit; } m->m_len += hlen; m->m_data -= hlen; - + /* icmpstat.icps_inhist[icp->icmp_type]++; */ /* code = icp->icmp_code; */ @@ -123,7 +117,7 @@ icmp_input(m, hlen) struct sockaddr_in addr; if ((so = socreate()) == NULL) goto freeit; if(udp_attach(so) == -1) { - DEBUG_MISC((dfd,"icmp_input udp_attach errno = %d-%s\n", + DEBUG_MISC((dfd,"icmp_input udp_attach errno = %d-%s\n", errno,strerror(errno))); sofree(so); m_free(m); @@ -137,7 +131,7 @@ icmp_input(m, hlen) so->so_iptos = ip->ip_tos; so->so_type = IPPROTO_ICMP; so->so_state = SS_ISFCONNECTED; - + /* Send the packet */ addr.sin_family = AF_INET; if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) { @@ -159,7 +153,7 @@ icmp_input(m, hlen) (struct sockaddr *)&addr, sizeof(addr)) == -1) { DEBUG_MISC((dfd,"icmp_input udp sendto tx errno = %d-%s\n", errno,strerror(errno))); - icmp_error(m, ICMP_UNREACH,ICMP_UNREACH_NET, 0,strerror(errno)); + icmp_error(m, ICMP_UNREACH,ICMP_UNREACH_NET, 0,strerror(errno)); udp_detach(so); } } /* if ip->ip_dst.s_addr == alias_addr.s_addr */ @@ -172,12 +166,12 @@ icmp_input(m, hlen) case ICMP_TSTAMP: case ICMP_MASKREQ: case ICMP_REDIRECT: - STAT(icmpstat.icps_notsupp++); + icmpstat.icps_notsupp++; m_freem(m); break; - + default: - STAT(icmpstat.icps_badtype++); + icmpstat.icps_badtype++; m_freem(m); } /* swith */ @@ -201,18 +195,18 @@ end_error: * mbuf *msrc is used as a template, but is NOT m_free()'d. * It is reported as the bad ip packet. The header should * be fully correct and in host byte order. - * ICMP fragmentation is illegal. All machines must accept 576 bytes in one + * ICMP fragmentation is illegal. All machines must accept 576 bytes in one * packet. The maximum payload is 576-20(ip hdr)-8(icmp hdr)=548 */ #define ICMP_MAXDATALEN (IP_MSS-28) void -icmp_error(msrc, type, code, minsize, message) - struct mbuf *msrc; - u_char type; - u_char code; - int minsize; - char *message; +icmp_error( + struct mbuf *msrc, + u_char type, + u_char code, + int minsize, + char *message) { unsigned hlen, shlen, s_ip_len; register struct ip *ip; @@ -221,17 +215,17 @@ icmp_error(msrc, type, code, minsize, message) DEBUG_CALL("icmp_error"); DEBUG_ARG("msrc = %lx", (long )msrc); - DEBUG_ARG("msrc_len = %d", msrc->m_len); + DEBUG_ARG("msrc_len = %zu", msrc->m_len); if(type!=ICMP_UNREACH && type!=ICMP_TIMXCEED) goto end_error; /* check msrc */ if(!msrc) goto end_error; ip = mtod(msrc, struct ip *); -#if DEBUG - { char bufa[20], bufb[20]; - strcpy(bufa, inet_ntoa(ip->ip_src)); - strcpy(bufb, inet_ntoa(ip->ip_dst)); +#if DEBUG + { char bufa[INET_ADDRSTRLEN], bufb[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, &ip->ip_src, bufa, sizeof(bufa)); + inet_ntop(AF_INET, &ip->ip_dst, bufb, sizeof(bufb)); DEBUG_MISC((dfd, " %.16s to %.16s\n", bufa, bufb)); } #endif @@ -250,7 +244,7 @@ icmp_error(msrc, type, code, minsize, message) /* make a copy */ if(!(m=m_get())) goto end_error; /* get mbuf */ - { int new_m_size; + { u_int new_m_size; new_m_size=sizeof(struct ip )+ICMP_MINLEN+msrc->m_len+ICMP_MAXDATALEN; if(new_m_size>m->m_size) m_inc(m, new_m_size); } @@ -260,9 +254,9 @@ icmp_error(msrc, type, code, minsize, message) /* make the header of the reply packet */ ip = mtod(m, struct ip *); hlen= sizeof(struct ip ); /* no options in reply */ - + /* fill in icmp */ - m->m_data += hlen; + m->m_data += hlen; m->m_len -= hlen; icp = mtod(m, struct icmp *); @@ -271,7 +265,7 @@ icmp_error(msrc, type, code, minsize, message) else if(s_ip_len>ICMP_MAXDATALEN) /* maximum size */ s_ip_len=ICMP_MAXDATALEN; - m->m_len=ICMP_MINLEN+s_ip_len; /* 8 bytes ICMP header */ + m->m_len=ICMP_MINLEN+s_ip_len; /* 8 bytes ICMP header */ /* min. size = 8+sizeof(struct ip)+8 */ @@ -305,8 +299,8 @@ icmp_error(msrc, type, code, minsize, message) /* fill in ip */ ip->ip_hl = hlen >> 2; - ip->ip_len = m->m_len; - + ip->ip_len = (u_int16_t)m->m_len; + ip->ip_tos=((ip->ip_tos & 0x1E) | 0xC0); /* high priority for errors */ ip->ip_ttl = MAXTTL; @@ -315,8 +309,8 @@ icmp_error(msrc, type, code, minsize, message) ip->ip_src = alias_addr; (void ) ip_output((struct socket *)NULL, m); - - STAT(icmpstat.icps_reflect++); + + icmpstat.icps_reflect++; end_error: return; @@ -373,5 +367,5 @@ icmp_reflect(m) (void ) ip_output((struct socket *)NULL, m); - STAT(icmpstat.icps_reflect++); + icmpstat.icps_reflect++; } diff --git a/BasiliskII/src/slirp/ip_icmp.h b/BasiliskII/src/slirp/ip_icmp.h index 8c9b5a1b..683dc87f 100644 --- a/BasiliskII/src/slirp/ip_icmp.h +++ b/BasiliskII/src/slirp/ip_icmp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -47,6 +43,10 @@ typedef u_int32_t n_time; /* * Structure of an icmp header. */ +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(1) +#endif + struct icmp { u_char icmp_type; /* type of message, see below */ u_char icmp_code; /* type sub code */ @@ -92,7 +92,11 @@ struct icmp { #define icmp_ip icmp_dun.id_ip.idi_ip #define icmp_mask icmp_dun.id_mask #define icmp_data icmp_dun.id_data -}; +} PACKED__; + +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(PACK_RESET) +#endif /* * Lower bounds on packet lengths for various types. @@ -157,8 +161,8 @@ struct icmp { (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) -void icmp_input _P((struct mbuf *, int)); -void icmp_error _P((struct mbuf *, u_char, u_char, int, char *)); -void icmp_reflect _P((struct mbuf *)); +void icmp_input(struct mbuf *, int); +void icmp_error(struct mbuf *, u_char, u_char, int, char *); +void icmp_reflect(struct mbuf *); #endif diff --git a/BasiliskII/src/slirp/ip_input.c b/BasiliskII/src/slirp/ip_input.c index b0468402..cac8493b 100644 --- a/BasiliskII/src/slirp/ip_input.c +++ b/BasiliskII/src/slirp/ip_input.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -37,7 +33,7 @@ /* * Changes and additions relating to SLiRP are * Copyright (c) 1995 Danny Gasparovski. - * + * * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -45,19 +41,10 @@ #include #include "ip_icmp.h" -#ifdef LOG_ENABLED +int ip_defttl; struct ipstat ipstat; -#endif - struct ipq ipq; -static struct ip *ip_reass(register struct ipasfrag *ip, - register struct ipq *fp); -static void ip_freef(struct ipq *fp); -static void ip_enq(register struct ipasfrag *p, - register struct ipasfrag *prev); -static void ip_deq(register struct ipasfrag *p); - /* * IP initialization: fill in IP protocol switch table. * All protocols not implemented in kernel go to raw IP protocol handler. @@ -69,6 +56,7 @@ ip_init() ip_id = tt.tv_sec & 0xffff; udp_init(); tcp_init(); + ip_defttl = IPDEFTTL; } /* @@ -80,38 +68,38 @@ ip_input(m) struct mbuf *m; { register struct ip *ip; - int hlen; - + u_int hlen; + DEBUG_CALL("ip_input"); DEBUG_ARG("m = %lx", (long)m); - DEBUG_ARG("m_len = %d", m->m_len); - - STAT(ipstat.ips_total++); + DEBUG_ARG("m_len = %zu", m->m_len); + ipstat.ips_total++; + if (m->m_len < sizeof (struct ip)) { - STAT(ipstat.ips_toosmall++); + ipstat.ips_toosmall++; return; } - + ip = mtod(m, struct ip *); - + if (ip->ip_v != IPVERSION) { - STAT(ipstat.ips_badvers++); + ipstat.ips_badvers++; goto bad; } hlen = ip->ip_hl << 2; if (hlenm->m_len) {/* min header length */ - STAT(ipstat.ips_badhlen++); /* or packet too short */ + ipstat.ips_badhlen++; /* or packet too short */ goto bad; } /* keep ip header intact for ICMP reply - * ip->ip_sum = cksum(m, hlen); - * if (ip->ip_sum) { + * ip->ip_sum = cksum(m, hlen); + * if (ip->ip_sum) { */ if(cksum(m,hlen)) { - STAT(ipstat.ips_badsum++); + ipstat.ips_badsum++; goto bad; } @@ -120,7 +108,7 @@ ip_input(m) */ NTOHS(ip->ip_len); if (ip->ip_len < hlen) { - STAT(ipstat.ips_badlen++); + ipstat.ips_badlen++; goto bad; } NTOHS(ip->ip_id); @@ -133,7 +121,7 @@ ip_input(m) * Drop packet if shorter than we expect. */ if (m->m_len < ip->ip_len) { - STAT(ipstat.ips_tooshort++); + ipstat.ips_tooshort++; goto bad; } /* Should drop packet if mbuf too long? hmmm... */ @@ -162,7 +150,7 @@ ip_input(m) * (We could look in the reassembly queue to see * if the packet was previously fragmented, * but it's not worth the time; just let them time out.) - * + * * XXX This should fail, don't fragment yet */ if (ip->ip_off &~ IP_DF) { @@ -189,7 +177,7 @@ ip_input(m) ip->ip_len -= hlen; if (ip->ip_off & IP_MF) ((struct ipasfrag *)ip)->ipf_mff |= 1; - else + else ((struct ipasfrag *)ip)->ipf_mff &= ~1; ip->ip_off <<= 3; @@ -200,11 +188,11 @@ ip_input(m) * attempt reassembly; if it succeeds, proceed. */ if (((struct ipasfrag *)ip)->ipf_mff & 1 || ip->ip_off) { - STAT(ipstat.ips_fragments++); + ipstat.ips_fragments++; ip = ip_reass((struct ipasfrag *)ip, fp); if (ip == 0) return; - STAT(ipstat.ips_reassembled++); + ipstat.ips_reassembled++; m = dtom(ip); } else if (fp) @@ -216,7 +204,7 @@ ip_input(m) /* * Switch out to protocol's input routine. */ - STAT(ipstat.ips_delivered++); + ipstat.ips_delivered++; switch (ip->ip_p) { case IPPROTO_TCP: tcp_input(m, hlen, (struct socket *)NULL); @@ -228,7 +216,7 @@ ip_input(m) icmp_input(m, hlen); break; default: - STAT(ipstat.ips_noproto++); + ipstat.ips_noproto++; m_free(m); } return; @@ -243,14 +231,16 @@ bad: * reassembly of this datagram already exists, then it * is given as fp; otherwise have to make a chain. */ -static struct ip * -ip_reass(register struct ipasfrag *ip, register struct ipq *fp) +struct ip * +ip_reass(ip, fp) + register struct ipasfrag *ip; + register struct ipq *fp; { register struct mbuf *m = dtom(ip); register struct ipasfrag *q; int hlen = ip->ip_hl << 2; int i, next; - + DEBUG_CALL("ip_reass"); DEBUG_ARG("ip = %lx", (long)ip); DEBUG_ARG("fp = %lx", (long)fp); @@ -281,7 +271,7 @@ ip_reass(register struct ipasfrag *ip, register struct ipq *fp) q = (struct ipasfrag *)fp; goto insert; } - + /* * Find a segment which begins after this one does. */ @@ -375,7 +365,7 @@ insert: ip = (struct ipasfrag *)(m->m_ext + delta); } - /* DEBUG_ARG("ip = %lx", (long)ip); + /* DEBUG_ARG("ip = %lx", (long)ip); * ip=(struct ipasfrag *)m->m_data; */ ip->ip_len = next; @@ -391,7 +381,7 @@ insert: return ((struct ip *)ip); dropfrag: - STAT(ipstat.ips_fragdropped++); + ipstat.ips_fragdropped++; m_freem(m); return (0); } @@ -400,8 +390,9 @@ dropfrag: * Free a fragment reassembly header and all * associated datagrams. */ -static void -ip_freef(struct ipq *fp) +void +ip_freef(fp) + struct ipq *fp; { register struct ipasfrag *q, *p; @@ -419,8 +410,9 @@ ip_freef(struct ipq *fp) * Put an ip fragment on a reassembly chain. * Like insque, but pointers in middle of structure. */ -static void -ip_enq(register struct ipasfrag *p, register struct ipasfrag *prev) +void +ip_enq(p, prev) + register struct ipasfrag *p, *prev; { DEBUG_CALL("ip_enq"); DEBUG_ARG("prev = %lx", (long)prev); @@ -433,8 +425,9 @@ ip_enq(register struct ipasfrag *p, register struct ipasfrag *prev) /* * To ip_enq as remque is to insque. */ -static void -ip_deq(register struct ipasfrag *p) +void +ip_deq(p) + register struct ipasfrag *p; { ((struct ipasfrag *)(p->ipf_prev))->ipf_next = p->ipf_next; ((struct ipasfrag *)(p->ipf_next))->ipf_prev = p->ipf_prev; @@ -449,9 +442,9 @@ void ip_slowtimo() { register struct ipq *fp; - + DEBUG_CALL("ip_slowtimo"); - + fp = (struct ipq *) ipq.next; if (fp == 0) return; @@ -460,7 +453,7 @@ ip_slowtimo() --fp->ipq_ttl; fp = (struct ipq *) fp->next; if (((struct ipq *)(fp->prev))->ipq_ttl == 0) { - STAT(ipstat.ips_fragtimeout++); + ipstat.ips_fragtimeout++; ip_freef((struct ipq *) fp->prev); } } @@ -667,7 +660,7 @@ bad: /* Not yet */ icmp_error(m, type, code, 0, 0); - STAT(ipstat.ips_badoptions++); + ipstat.ips_badoptions++; return (1); } @@ -695,6 +688,6 @@ ip_stripoptions(m, mopt) i = m->m_len - (sizeof (struct ip) + olen); memcpy(opts, opts + olen, (unsigned)i); m->m_len -= olen; - + ip->ip_hl = sizeof(struct ip) >> 2; } diff --git a/BasiliskII/src/slirp/ip_output.c b/BasiliskII/src/slirp/ip_output.c index a8a6067b..fb9a9420 100644 --- a/BasiliskII/src/slirp/ip_output.c +++ b/BasiliskII/src/slirp/ip_output.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -46,10 +42,6 @@ u_int16_t ip_id; -/* Number of packets queued before we start sending - * (to prevent allocing too many mbufs) */ -#define IF_THRESH 10 - /* * IP output. The packet in mbuf chain m contains a skeletal IP * header (with len, off, ttl, proto, tos, src, dst). @@ -63,13 +55,14 @@ ip_output(so, m0) { register struct ip *ip; register struct mbuf *m = m0; - register int hlen = sizeof(struct ip ); - int len, off, error = 0; + register u_int hlen = sizeof(struct ip); + u_int len, off; + int error = 0; DEBUG_CALL("ip_output"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("m0 = %lx", (long)m0); - + /* We do no options */ /* if (opt) { * m = ip_insertoptions(m, opt, &len); @@ -84,23 +77,23 @@ ip_output(so, m0) ip->ip_off &= IP_DF; ip->ip_id = htons(ip_id++); ip->ip_hl = hlen >> 2; - STAT(ipstat.ips_localout++); + ipstat.ips_localout++; /* * Verify that we have any chance at all of being able to queue * the packet or packet fragments */ /* XXX Hmmm... */ -/* if (if_queued > IF_THRESH && towrite <= 0) { +/* if (if_queued > if_thresh && towrite <= 0) { * error = ENOBUFS; * goto bad; * } */ - + /* * If small enough for interface, can just send directly. */ - if ((u_int16_t)ip->ip_len <= IF_MTU) { + if ((u_int16_t)ip->ip_len <= if_mtu) { ip->ip_len = htons((u_int16_t)ip->ip_len); ip->ip_off = htons((u_int16_t)ip->ip_off); ip->ip_sum = 0; @@ -116,11 +109,11 @@ ip_output(so, m0) */ if (ip->ip_off & IP_DF) { error = -1; - STAT(ipstat.ips_cantfrag++); + ipstat.ips_cantfrag++; goto bad; } - - len = (IF_MTU - hlen) &~ 7; /* ip databytes per packet */ + + len = (if_mtu - hlen) &~ 7; /* ip databytes per packet */ if (len < 8) { error = -1; goto bad; @@ -136,18 +129,18 @@ ip_output(so, m0) */ m0 = m; mhlen = sizeof (struct ip); - for (off = hlen + len; off < (u_int16_t)ip->ip_len; off += len) { + for (off = hlen + len; off < ip->ip_len; off += len) { register struct ip *mhip; m = m_get(); if (m == 0) { error = -1; - STAT(ipstat.ips_odropped++); + ipstat.ips_odropped++; goto sendorfree; } - m->m_data += IF_MAXLINKHDR; + m->m_data += if_maxlinkhdr; mhip = mtod(m, struct ip *); *mhip = *ip; - + /* No options */ /* if (hlen > sizeof (struct ip)) { * mhlen = ip_optcopy(ip, mhip) + sizeof (struct ip); @@ -160,28 +153,28 @@ ip_output(so, m0) mhip->ip_off |= IP_MF; if (off + len >= (u_int16_t)ip->ip_len) len = (u_int16_t)ip->ip_len - off; - else + else mhip->ip_off |= IP_MF; mhip->ip_len = htons((u_int16_t)(len + mhlen)); - + if (m_copy(m, m0, off, len) < 0) { error = -1; goto sendorfree; } - + mhip->ip_off = htons((u_int16_t)mhip->ip_off); mhip->ip_sum = 0; mhip->ip_sum = cksum(m, mhlen); *mnext = m; mnext = &m->m_nextpkt; - STAT(ipstat.ips_ofragments++); + ipstat.ips_ofragments++; } /* * Update first fragment by trimming what's been copied out * and updating header, then send each fragment (in order). */ m = m0; - m_adj(m, hlen + firstlen - (u_int16_t)ip->ip_len); + m_adj(m, hlen + firstlen - ip->ip_len); ip->ip_len = htons((u_int16_t)m->m_len); ip->ip_off = htons((u_int16_t)(ip->ip_off | IP_MF)); ip->ip_sum = 0; @@ -197,7 +190,7 @@ sendorfree: } if (error == 0) - STAT(ipstat.ips_fragmented++); + ipstat.ips_fragmented++; } done: diff --git a/BasiliskII/src/slirp/libslirp.h b/BasiliskII/src/slirp/libslirp.h index 7e4cfa98..8a1aa31e 100644 --- a/BasiliskII/src/slirp/libslirp.h +++ b/BasiliskII/src/slirp/libslirp.h @@ -1,33 +1,39 @@ #ifndef _LIBSLIRP_H #define _LIBSLIRP_H +#ifdef _WIN32 +#include +int inet_aton(const char *cp, struct in_addr *ia); +#else +#include +#include +#endif + #ifdef __cplusplus extern "C" { #endif -void slirp_init(void); +int slirp_init(void); -void slirp_select_fill(int *pnfds, - fd_set *readfds, fd_set *writefds, fd_set *xfds); +int slirp_select_fill(int *pnfds, + fd_set *readfds, fd_set *writefds, fd_set *xfds); void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds); -void slirp_input(const uint8_t *pkt, int pkt_len); +void slirp_input(const uint8 *pkt, int pkt_len); /* you must provide the following functions: */ int slirp_can_output(void); -void slirp_output(const uint8_t *pkt, int pkt_len); +void slirp_output(const uint8 *pkt, int pkt_len); -int slirp_redir(int is_udp, int host_port, +int slirp_redir(int is_udp, int host_port, struct in_addr guest_addr, int guest_port); -int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, +int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, int guest_port); extern const char *tftp_prefix; extern char slirp_hostname[33]; -void slirp_stats(void); - #ifdef __cplusplus } #endif diff --git a/BasiliskII/src/slirp/main.h b/BasiliskII/src/slirp/main.h index c01addac..181b6ae8 100644 --- a/BasiliskII/src/slirp/main.h +++ b/BasiliskII/src/slirp/main.h @@ -1,7 +1,7 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -42,6 +42,7 @@ extern char *username; extern char *socket_path; extern int towrite_max; extern int ppp_exit; +extern int so_options; extern int tcp_keepintvl; extern uint8_t client_ethaddr[6]; diff --git a/BasiliskII/src/slirp/mbuf.c b/BasiliskII/src/slirp/mbuf.c index 5d125542..5a16fab8 100644 --- a/BasiliskII/src/slirp/mbuf.c +++ b/BasiliskII/src/slirp/mbuf.c @@ -15,49 +15,54 @@ * the flags */ +#include #include struct mbuf *mbutl; char *mclrefcnt; int mbuf_alloced = 0; struct mbuf m_freelist, m_usedlist; -#define MBUF_THRESH 30 +int mbuf_thresh = 30; int mbuf_max = 0; +size_t msize; -/* - * Find a nice value for msize - * XXX if_maxlinkhdr already in mtu - */ -#define MSIZE (IF_MTU + IF_MAXLINKHDR + sizeof(struct m_hdr ) + 6) - -void -m_init() +void m_init() { m_freelist.m_next = m_freelist.m_prev = &m_freelist; m_usedlist.m_next = m_usedlist.m_prev = &m_usedlist; + msize_init(); +} + +void msize_init() +{ + /* + * Find a nice value for msize + * XXX if_maxlinkhdr already in mtu + */ + msize = (if_mtu>if_mru?if_mtu:if_mru) + + if_maxlinkhdr + sizeof(struct m_hdr ) + 6; } /* * Get an mbuf from the free list, if there are none * malloc one - * + * * Because fragmentation can occur if we alloc new mbufs and * free old mbufs, we mark all mbufs above mbuf_thresh as M_DOFREE, * which tells m_free to actually free() it */ -struct mbuf * -m_get() +struct mbuf *m_get() { register struct mbuf *m; int flags = 0; - + DEBUG_CALL("m_get"); - + if (m_freelist.m_next == &m_freelist) { - m = (struct mbuf *)malloc(MSIZE); + m = (struct mbuf *)malloc(msize); if (m == NULL) goto end_error; mbuf_alloced++; - if (mbuf_alloced > MBUF_THRESH) + if (mbuf_alloced > mbuf_thresh) flags = M_DOFREE; if (mbuf_alloced > mbuf_max) mbuf_max = mbuf_alloced; @@ -65,13 +70,13 @@ m_get() m = m_freelist.m_next; remque(m); } - + /* Insert it in the used list */ insque(m,&m_usedlist); m->m_flags = (flags | M_USEDLIST); - + /* Initialise it */ - m->m_size = MSIZE - sizeof(struct m_hdr); + m->m_size = msize - sizeof(struct m_hdr); m->m_data = m->m_dat; m->m_len = 0; m->m_nextpkt = 0; @@ -81,19 +86,17 @@ end_error: return m; } -void -m_free(m) - struct mbuf *m; +void m_free(struct mbuf *m) { - + DEBUG_CALL("m_free"); DEBUG_ARG("m = %lx", (long )m); - + if(m) { /* Remove from m_usedlist */ if (m->m_flags & M_USEDLIST) remque(m); - + /* If it's M_EXT, free() it */ if (m->m_flags & M_EXT) free(m->m_ext); @@ -116,16 +119,14 @@ m_free(m) * the other.. if result is too big for one mbuf, malloc() * an M_EXT data segment */ -void -m_cat(m, n) - register struct mbuf *m, *n; +void m_cat(register struct mbuf *m, register struct mbuf *n) { /* * If there's no room, realloc */ if (M_FREEROOM(m) < n->m_len) m_inc(m,m->m_size+MINCSIZE); - + memcpy(m->m_data+m->m_len, n->m_data, n->m_len); m->m_len += n->m_len; @@ -134,23 +135,20 @@ m_cat(m, n) /* make m size bytes large */ -void -m_inc(m, size) - struct mbuf *m; - int size; +void m_inc(struct mbuf *m, u_int size) { - int datasize; + int datasize; /* some compiles throw up on gotos. This one we can fake. */ if(m->m_size>size) return; if (m->m_flags & M_EXT) { - datasize = m->m_data - m->m_ext; + datasize = m->m_data - m->m_ext; m->m_ext = (char *)realloc(m->m_ext,size); /* if (m->m_ext == NULL) * return (struct mbuf *)NULL; - */ - m->m_data = m->m_ext + datasize; + */ + m->m_data = m->m_ext + datasize; } else { char *dat; datasize = m->m_data - m->m_dat; @@ -159,22 +157,19 @@ m_inc(m, size) * return (struct mbuf *)NULL; */ memcpy(dat, m->m_dat, m->m_size); - + m->m_ext = dat; m->m_data = m->m_ext + datasize; m->m_flags |= M_EXT; } - + m->m_size = size; } -void -m_adj(m, len) - struct mbuf *m; - int len; +void m_adj(struct mbuf *m, int len) { if (m == NULL) return; @@ -194,9 +189,7 @@ m_adj(m, len) * Copy len bytes from m, starting off bytes into n */ int -m_copy(n, m, off, len) - struct mbuf *n, *m; - int off, len; +m_copy(struct mbuf *n, struct mbuf *m, u_int off, u_int len) { if (len > M_FREEROOM(n)) return -1; @@ -212,12 +205,10 @@ m_copy(n, m, off, len) * XXX This is a kludge, I should eliminate the need for it * Fortunately, it's not used often */ -struct mbuf * -dtom(dat) - void *dat; +struct mbuf *dtom(void *dat) { struct mbuf *m; - + DEBUG_CALL("dtom"); DEBUG_ARG("dat = %lx", (long )dat); @@ -231,9 +222,9 @@ dtom(dat) return m; } } - + DEBUG_ERROR((dfd, "dtom failed")); - + return (struct mbuf *)0; } diff --git a/BasiliskII/src/slirp/mbuf.h b/BasiliskII/src/slirp/mbuf.h index f9f21325..11b252bb 100644 --- a/BasiliskII/src/slirp/mbuf.h +++ b/BasiliskII/src/slirp/mbuf.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -67,14 +63,14 @@ struct m_hdr { struct mbuf *mh_prevpkt; /* Flags aren't used in the output queue */ int mh_flags; /* Misc flags */ - int mh_size; /* Size of data */ + size_t mh_size; /* Size of data */ struct socket *mh_so; - + caddr_t mh_data; /* Location of data */ - int mh_len; /* Amount of data in this mbuf */ + size_t mh_len; /* Amount of data in this mbuf */ }; -/* +/* * How much room is in the mbuf, from m_data to the end of the mbuf */ #define M_ROOM(m) ((m->m_flags & M_EXT)? \ @@ -126,7 +122,7 @@ struct mbuf { struct mbstat { int mbs_alloced; /* Number of mbufs allocated */ - + }; extern struct mbstat mbstat; @@ -134,13 +130,14 @@ extern int mbuf_alloced; extern struct mbuf m_freelist, m_usedlist; extern int mbuf_max; -void m_init _P((void)); -struct mbuf * m_get _P((void)); -void m_free _P((struct mbuf *)); -void m_cat _P((register struct mbuf *, register struct mbuf *)); -void m_inc _P((struct mbuf *, int)); -void m_adj _P((struct mbuf *, int)); -int m_copy _P((struct mbuf *, struct mbuf *, int, int)); -struct mbuf * dtom _P((void *)); +void m_init(void); +void msize_init(void); +struct mbuf * m_get(void); +void m_free(struct mbuf *); +void m_cat(register struct mbuf *, register struct mbuf *); +void m_inc(struct mbuf *, u_int); +void m_adj(struct mbuf *, int); +int m_copy(struct mbuf *, struct mbuf *, u_int, u_int); +struct mbuf * dtom(void *); #endif diff --git a/BasiliskII/src/slirp/misc.c b/BasiliskII/src/slirp/misc.c index 14808fe2..b80caf66 100644 --- a/BasiliskII/src/slirp/misc.c +++ b/BasiliskII/src/slirp/misc.c @@ -1,24 +1,23 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * + * * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ #define WANT_SYS_IOCTL_H +#include #include -u_int curtime, time_fasttimo, last_slowtimo; +u_int curtime, time_fasttimo, last_slowtimo, detach_time; +u_int detach_wait = 600000; /* 10 minutes */ #if 0 int x_port = -1; int x_display = 0; int x_screen = 0; -int -show_x(buff, inso) - char *buff; - struct socket *inso; +int show_x(char *buff, struct socket *inso) { if (x_port < 0) { lprint("X Redir: X not being redirected.\r\n"); @@ -30,7 +29,7 @@ show_x(buff, inso) if (x_display) lprint("X Redir: Redirecting to display %d\r\n", x_display); } - + return CFG_OK; } @@ -38,15 +37,10 @@ show_x(buff, inso) /* * XXX Allow more than one X redirection? */ -void -redir_x(inaddr, start_port, display, screen) - u_int32_t inaddr; - int start_port; - int display; - int screen; +void redir_x(u_int32_t inaddr, int start_port, int display, int screen) { int i; - + if (x_port >= 0) { lprint("X Redir: X already being redirected.\r\n"); show_x(0, 0); @@ -67,34 +61,33 @@ redir_x(inaddr, start_port, display, screen) #endif #ifndef HAVE_INET_ATON -int -inet_aton(cp, ia) - const char *cp; - struct in_addr *ia; +int inet_aton(const char *cp, struct in_addr *ia) { - u_int32_t addr = inet_addr(cp); - if (addr == 0xffffffff) - return 0; - ia->s_addr = addr; - return 1; + return inet_pton(AF_INET, cp, &ia->s_addr); } #endif /* * Get our IP address and put it in our_addr */ -void -getouraddr() +void getouraddr() { char buff[256]; - struct hostent *he = NULL; - if (gethostname(buff,256) == 0) - he = gethostbyname(buff); - if (he) - our_addr = *(struct in_addr *)he->h_addr; - if (our_addr.s_addr == 0) - our_addr.s_addr = loopback_addr.s_addr; + if (gethostname(buff, sizeof(buff)) == 0) + { + struct addrinfo hints = { 0 }; + hints.ai_flags = AI_NUMERICHOST; + hints.ai_family = AF_INET; + struct addrinfo* ai; + if (getaddrinfo(buff, NULL, &hints, &ai) == 0) + { + our_addr = *(struct in_addr *)ai->ai_addr->sa_data; + freeaddrinfo(ai); + } + } + if (our_addr.s_addr == 0) + our_addr.s_addr = loopback_addr.s_addr; } #if SIZEOF_CHAR_P == 8 @@ -104,10 +97,7 @@ struct quehead_32 { u_int32_t qh_rlink; }; -inline void -insque_32(a, b) - void *a; - void *b; +inline void insque_32(void *a, void *b) { register struct quehead_32 *element = (struct quehead_32 *) a; register struct quehead_32 *head = (struct quehead_32 *) b; @@ -118,9 +108,7 @@ insque_32(a, b) = (u_int32_t)element; } -inline void -remque_32(a) - void *a; +inline void remque_32(void *a) { register struct quehead_32 *element = (struct quehead_32 *) a; ((struct quehead_32 *)(element->qh_link))->qh_rlink = element->qh_rlink; @@ -135,9 +123,7 @@ struct quehead { struct quehead *qh_rlink; }; -inline void -insque(a, b) - void *a, *b; +void insque(void *a, void *b) { register struct quehead *element = (struct quehead *) a; register struct quehead *head = (struct quehead *) b; @@ -148,9 +134,7 @@ insque(a, b) = (struct quehead *)element; } -inline void -remque(a) - void *a; +void remque(void *a) { register struct quehead *element = (struct quehead *) a; ((struct quehead *)(element->qh_link))->qh_rlink = element->qh_rlink; @@ -162,22 +146,16 @@ remque(a) /* #endif */ -int -add_exec(ex_ptr, do_pty, exec, addr, port) - struct ex_list **ex_ptr; - int do_pty; - char *exec; - int addr; - int port; +int add_exec(struct ex_list **ex_ptr, int do_pty, char *exec, int addr, int port) { struct ex_list *tmp_ptr; - + /* First, check if the port is "bound" */ for (tmp_ptr = *ex_ptr; tmp_ptr; tmp_ptr = tmp_ptr->ex_next) { if (port == tmp_ptr->ex_fport && addr == tmp_ptr->ex_addr) return -1; } - + tmp_ptr = *ex_ptr; *ex_ptr = (struct ex_list *)malloc(sizeof(struct ex_list)); (*ex_ptr)->ex_fport = port; @@ -197,9 +175,7 @@ add_exec(ex_ptr, do_pty, exec, addr, port) extern int sys_nerr; extern char *sys_errlist[]; -char * -strerror(error) - int error; +char *strerror(int error) { if (error < sys_nerr) return sys_errlist[error]; @@ -212,8 +188,7 @@ strerror(error) #ifdef _WIN32 -int -fork_exec(struct socket *so, const char *ex, int do_pty) +int fork_exec(struct socket *so, char *ex, int do_pty) { /* not implemented */ return 0; @@ -221,16 +196,13 @@ fork_exec(struct socket *so, const char *ex, int do_pty) #else -#ifndef CONFIG_QEMU -int -slirp_openpty(amaster, aslave) - int *amaster, *aslave; +int slirp_openpty(int *amaster, int *aslave) { register int master, slave; #ifdef HAVE_GRANTPT char *ptr; - + if ((master = open("/dev/ptmx", O_RDWR)) < 0 || grantpt(master) < 0 || unlockpt(master) < 0 || @@ -238,7 +210,7 @@ slirp_openpty(amaster, aslave) close(master); return -1; } - + if ((slave = open(ptr, O_RDWR)) < 0 || ioctl(slave, I_PUSH, "ptem") < 0 || ioctl(slave, I_PUSH, "ldterm") < 0 || @@ -247,16 +219,16 @@ slirp_openpty(amaster, aslave) close(slave); return -1; } - + *amaster = master; *aslave = slave; return 0; - + #else - + static char line[] = "/dev/ptyXX"; register const char *cp1, *cp2; - + for (cp1 = "pqrsPQRS"; *cp1; cp1++) { line[8] = *cp1; for (cp2 = "0123456789abcdefghijklmnopqrstuv"; *cp2; cp2++) { @@ -286,7 +258,6 @@ slirp_openpty(amaster, aslave) return (-1); #endif } -#endif /* * XXX This is ugly @@ -294,57 +265,53 @@ slirp_openpty(amaster, aslave) * process, which connects to this socket, after which we * exec the wanted program. If something (strange) happens, * the accept() call could block us forever. - * + * * do_pty = 0 Fork/exec inetd style * do_pty = 1 Fork/exec using slirp.telnetd * do_ptr = 2 Fork/exec using pty */ -int -fork_exec(struct socket *so, const char *ex, int do_pty) +int fork_exec(struct socket *so, char *ex, int do_pty) { int s; struct sockaddr_in addr; - int addrlen = sizeof(addr); + socklen_t addrlen = sizeof(addr); int opt; - int master = -1; + int master; char *argv[256]; #if 0 char buff[256]; #endif /* don't want to clobber the original */ char *bptr; - const char *curarg; + char *curarg; int c, i, ret; - + DEBUG_CALL("fork_exec"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("ex = %lx", (long)ex); DEBUG_ARG("do_pty = %lx", (long)do_pty); - + if (do_pty == 2) { -#if 0 if (slirp_openpty(&master, &s) == -1) { lprint("Error: openpty failed: %s\n", strerror(errno)); return 0; } -#else - return 0; -#endif } else { + memset(&addr, 0, sizeof(struct sockaddr_in)); addr.sin_family = AF_INET; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; - + if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0 || bind(s, (struct sockaddr *)&addr, addrlen) < 0 || listen(s, 1) < 0) { lprint("Error: inet socket: %s\n", strerror(errno)); closesocket(s); - + return 0; } } - + switch(fork()) { case -1: lprint("Error: fork failed: %s\n", strerror(errno)); @@ -352,7 +319,7 @@ fork_exec(struct socket *so, const char *ex, int do_pty) if (do_pty == 2) close(master); return 0; - + case 0: /* Set the DISPLAY */ if (do_pty == 2) { @@ -374,7 +341,7 @@ fork_exec(struct socket *so, const char *ex, int do_pty) ret = connect(s, (struct sockaddr *)&addr, addrlen); } while (ret < 0 && errno == EINTR); } - + #if 0 if (x_port >= 0) { #ifdef HAVE_SETENV @@ -385,13 +352,13 @@ fork_exec(struct socket *so, const char *ex, int do_pty) putenv(buff); #endif } -#endif +#endif dup2(s, 0); dup2(s, 1); dup2(s, 2); - for (s = getdtablesize() - 1; s >= 3; s--) + for (s = 3; s <= 255; s++) close(s); - + i = 0; bptr = strdup(ex); /* No need to free() this */ if (do_pty == 1) { @@ -409,21 +376,21 @@ fork_exec(struct socket *so, const char *ex, int do_pty) *bptr++ = (char)0; argv[i++] = strdup(curarg); } while (c); - + argv[i] = 0; execvp(argv[0], argv); - + /* Ooops, failed, let's tell the user why */ { char buff[256]; - - sprintf(buff, "Error: execvp of %s failed: %s\n", + + sprintf(buff, "Error: execvp of %s failed: %s\n", argv[0], strerror(errno)); write(2, buff, strlen(buff)+1); } close(0); close(1); close(2); /* XXX */ exit(1); - + default: if (do_pty == 2) { close(s); @@ -446,36 +413,32 @@ fork_exec(struct socket *so, const char *ex, int do_pty) setsockopt(so->s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(int)); } fd_nonblock(so->s); - + /* Append the telnet options now */ if (so->so_m != 0 && do_pty == 1) { sbappend(so, so->so_m); so->so_m = 0; } - + return 1; } } #endif #ifndef HAVE_STRDUP -char * -strdup(str) - const char *str; +char *strdup(const char *str) { char *bptr; - + bptr = (char *)malloc(strlen(str)+1); strcpy(bptr, str); - + return bptr; } #endif #if 0 -void -snooze_hup(num) - int num; +void snooze_hup(int num) { int s, ret; #ifndef NO_UNIX_SOCKETS @@ -483,7 +446,7 @@ snooze_hup(num) #endif struct sockaddr_in sock_in; char buff[256]; - + ret = -1; if (slirp_socket_passwd) { s = socket(AF_INET, SOCK_STREAM, 0); @@ -513,51 +476,48 @@ snooze_hup(num) #endif slirp_exit(0); } - - -void -snooze() + + +void snooze() { sigset_t s; int i; - + /* Don't need our data anymore */ /* XXX This makes SunOS barf */ /* brk(0); */ - + /* Close all fd's */ for (i = 255; i >= 0; i--) close(i); - + signal(SIGQUIT, slirp_exit); signal(SIGHUP, snooze_hup); sigemptyset(&s); - + /* Wait for any signal */ sigsuspend(&s); - + /* Just in case ... */ exit(255); } -void -relay(s) - int s; +void relay(int s) { char buf[8192]; int n; fd_set readfds; struct ttys *ttyp; - + /* Don't need our data anymore */ /* XXX This makes SunOS barf */ /* brk(0); */ - + signal(SIGQUIT, slirp_exit); signal(SIGHUP, slirp_exit); signal(SIGINT, slirp_exit); signal(SIGTERM, slirp_exit); - + /* Fudge to get term_raw and term_restore to work */ if (NULL == (ttyp = tty_attach (0, slirp_tty))) { lprint ("Error: tty_attach failed in misc.c:relay()\r\n"); @@ -566,18 +526,18 @@ relay(s) ttyp->fd = 0; ttyp->flags |= TTY_CTTY; term_raw(ttyp); - + while (1) { FD_ZERO(&readfds); - + FD_SET(0, &readfds); FD_SET(s, &readfds); - + n = select(s+1, &readfds, (fd_set *)0, (fd_set *)0, (struct timeval *)0); - + if (n <= 0) slirp_exit(0); - + if (FD_ISSET(0, &readfds)) { n = read(0, buf, 8192); if (n <= 0) @@ -586,7 +546,7 @@ relay(s) if (n <= 0) slirp_exit(0); } - + if (FD_ISSET(s, &readfds)) { n = read(s, buf, 8192); if (n <= 0) @@ -596,43 +556,20 @@ relay(s) slirp_exit(0); } } - + /* Just in case.... */ exit(1); } #endif -#ifdef CONFIG_QEMU -extern void term_vprintf(const char *fmt, va_list ap); +int (*lprint_print)(void *, const char *, va_list); +char *lprint_ptr, *lprint_ptr2, **lprint_arg; void lprint(const char *format, ...) -{ - va_list args; - - va_start(args, format); - term_vprintf(format, args); - va_end(args); -} -#else -int (*lprint_print) _P((void *, const char *, va_list)); -char *lprint_ptr, *lprint_ptr2, **lprint_arg; - -void -#ifdef __STDC__ -lprint(const char *format, ...) -#else -lprint(va_alist) va_dcl -#endif { va_list args; - -#ifdef __STDC__ - va_start(args, format); -#else - char *format; - va_start(args); - format = va_arg(args, char *); -#endif + + va_start(args, format); #if 0 /* If we're printing to an sbuf, make sure there's enough room */ /* XXX +100? */ @@ -642,33 +579,33 @@ lprint(va_alist) va_dcl int deltaw = lprint_sb->sb_wptr - lprint_sb->sb_data; int deltar = lprint_sb->sb_rptr - lprint_sb->sb_data; int deltap = lprint_ptr - lprint_sb->sb_data; - + lprint_sb->sb_data = (char *)realloc(lprint_sb->sb_data, lprint_sb->sb_datalen + TCP_SNDSPACE); - + /* Adjust all values */ lprint_sb->sb_wptr = lprint_sb->sb_data + deltaw; lprint_sb->sb_rptr = lprint_sb->sb_data + deltar; lprint_ptr = lprint_sb->sb_data + deltap; - + lprint_sb->sb_datalen += TCP_SNDSPACE; } } -#endif +#endif if (lprint_print) lprint_ptr += (*lprint_print)(*lprint_arg, format, args); - + /* Check if they want output to be logged to file as well */ if (lfd) { - /* + /* * Remove \r's * otherwise you'll get ^M all over the file */ int len = strlen(format); char *bptr1, *bptr2; - + bptr1 = bptr2 = strdup(format); - + while (len--) { if (*bptr1 == '\r') memcpy(bptr1, bptr1+1, len+1); @@ -681,9 +618,7 @@ lprint(va_alist) va_dcl va_end(args); } -void -add_emu(buff) - char *buff; +void add_emu(char *buff) { u_int lport, fport; u_int8_t tos = 0, emu = 0; @@ -691,12 +626,12 @@ add_emu(buff) char *buff3 = buff4; struct emu_t *emup; struct socket *so; - + if (sscanf(buff, "%256s %256s", buff2, buff1) != 2) { lprint("Error: Bad arguments\r\n"); return; } - + if (sscanf(buff1, "%d:%d", &lport, &fport) != 2) { lport = 0; if (sscanf(buff1, "%d", &fport) != 1) { @@ -704,7 +639,7 @@ add_emu(buff) return; } } - + if (sscanf(buff2, "%128[^:]:%128s", buff1, buff3) != 2) { buff3 = 0; if (sscanf(buff2, "%256s", buff1) != 1) { @@ -712,7 +647,7 @@ add_emu(buff) return; } } - + if (buff3) { if (strcmp(buff3, "lowdelay") == 0) tos = IPTOS_LOWDELAY; @@ -723,7 +658,7 @@ add_emu(buff) return; } } - + if (strcmp(buff1, "ftp") == 0) emu = EMU_FTP; else if (strcmp(buff1, "irc") == 0) @@ -734,7 +669,7 @@ add_emu(buff) lprint("Error: Unknown service\r\n"); return; } - + /* First, check that it isn't already emulated */ for (emup = tcpemu; emup; emup = emup->next) { if (emup->lport == lport && emup->fport == fport) { @@ -742,7 +677,7 @@ add_emu(buff) return; } } - + /* link it */ emup = (struct emu_t *)malloc(sizeof (struct emu_t)); emup->lport = (u_int16_t)lport; @@ -751,7 +686,7 @@ add_emu(buff) emup->emu = emu; emup->next = tcpemu; tcpemu = emup; - + /* And finally, mark all current sessions, if any, as being emulated */ for (so = tcb.so_next; so != &tcb; so = so->so_next) { if ((lport && lport == ntohs(so->so_lport)) || @@ -762,10 +697,9 @@ add_emu(buff) so->so_iptos = tos; } } - + lprint("Adding emulation for %s to port %d/%d\r\n", buff1, emup->lport, emup->fport); } -#endif #ifdef BAD_SPRINTF @@ -776,51 +710,33 @@ add_emu(buff) * Some BSD-derived systems have a sprintf which returns char * */ -int -vsprintf_len(string, format, args) - char *string; - const char *format; - va_list args; +int vsprintf_len(char *string, const char *format, va_list args) { vsprintf(string, format, args); return strlen(string); } -int -#ifdef __STDC__ -sprintf_len(char *string, const char *format, ...) -#else -sprintf_len(va_alist) va_dcl -#endif +int sprintf_len(char *string, const char *format, ...) { va_list args; -#ifdef __STDC__ va_start(args, format); -#else - char *string; - char *format; - va_start(args); - string = va_arg(args, char *); - format = va_arg(args, char *); -#endif vsprintf(string, format, args); + va_end(args); return strlen(string); } #endif -void -u_sleep(usec) - int usec; +void u_sleep(int usec) { struct timeval t; fd_set fdset; - + FD_ZERO(&fdset); - + t.tv_sec = 0; t.tv_usec = usec * 1000; - + select(0, &fdset, &fdset, &fdset, &t); } @@ -828,34 +744,30 @@ u_sleep(usec) * Set fd blocking and non-blocking */ -void -fd_nonblock(fd) - int fd; +void fd_nonblock(int fd) { -#ifdef FIONBIO - int opt = 1; - +#if defined USE_FIONBIO && defined FIONBIO + ioctlsockopt_t opt = 1; + ioctlsocket(fd, FIONBIO, &opt); #else int opt; - + opt = fcntl(fd, F_GETFL, 0); opt |= O_NONBLOCK; fcntl(fd, F_SETFL, opt); #endif } -void -fd_block(fd) - int fd; +void fd_block(int fd) { -#ifdef FIONBIO - int opt = 0; - +#if defined USE_FIONBIO && defined FIONBIO + ioctlsockopt_t opt = 0; + ioctlsocket(fd, FIONBIO, &opt); #else int opt; - + opt = fcntl(fd, F_GETFL, 0); opt &= ~O_NONBLOCK; fcntl(fd, F_SETFL, opt); @@ -867,22 +779,17 @@ fd_block(fd) /* * invoke RSH */ -int -rsh_exec(so,ns, user, host, args) - struct socket *so; - struct socket *ns; - char *user; - char *host; - char *args; +int rsh_exec(struct socket *so, struct socket *ns, + char *user, char *host, char *args) { int fd[2]; int fd0[2]; int s; char buff[256]; - + DEBUG_CALL("rsh_exec"); DEBUG_ARG("so = %lx", (long)so); - + if (pipe(fd)<0) { lprint("Error: pipe failed: %s\n", strerror(errno)); return 0; @@ -903,7 +810,7 @@ rsh_exec(so,ns, user, host, args) return 0; } #endif - + switch(fork()) { case -1: lprint("Error: fork failed: %s\n", strerror(errno)); @@ -912,11 +819,11 @@ rsh_exec(so,ns, user, host, args) close(fd0[0]); close(fd0[1]); return 0; - + case 0: close(fd[0]); close(fd0[0]); - + /* Set the DISPLAY */ if (x_port >= 0) { #ifdef HAVE_SETENV @@ -927,29 +834,29 @@ rsh_exec(so,ns, user, host, args) putenv(buff); #endif } - + dup2(fd0[1], 0); dup2(fd0[1], 1); dup2(fd[1], 2); for (s = 3; s <= 255; s++) close(s); - + execlp("rsh","rsh","-l", user, host, args, NULL); - + /* Ooops, failed, let's tell the user why */ - - sprintf(buff, "Error: execlp of %s failed: %s\n", + + sprintf(buff, "Error: execlp of %s failed: %s\n", "rsh", strerror(errno)); write(2, buff, strlen(buff)+1); close(0); close(1); close(2); /* XXX */ exit(1); - + default: close(fd[1]); close(fd0[1]); ns->s=fd[0]; so->s=fd0[0]; - + return 1; } } diff --git a/BasiliskII/src/slirp/misc.h b/BasiliskII/src/slirp/misc.h index e405e38d..381f5f3e 100644 --- a/BasiliskII/src/slirp/misc.h +++ b/BasiliskII/src/slirp/misc.h @@ -1,7 +1,7 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -12,22 +12,22 @@ struct ex_list { int ex_pty; /* Do we want a pty? */ int ex_addr; /* The last byte of the address */ int ex_fport; /* Port to telnet to */ - const char *ex_exec; /* Command line of what to exec */ + char *ex_exec; /* Command line of what to exec */ struct ex_list *ex_next; }; extern struct ex_list *exec_list; -extern u_int curtime, time_fasttimo, last_slowtimo; +extern u_int curtime, time_fasttimo, last_slowtimo, detach_time, detach_wait; -extern int (*lprint_print) _P((void *, const char *, va_list)); +extern int (*lprint_print)(void *, const char *, va_list); extern char *lprint_ptr, *lprint_ptr2, **lprint_arg; extern struct sbuf *lprint_sb; #ifndef HAVE_STRDUP -char *strdup _P((const char *)); +char *strdup(const char *); #endif -void do_wait _P((int)); +void do_wait(int); #define EMU_NONE 0x0 @@ -63,27 +63,25 @@ struct emu_t { struct emu_t *next; }; -#ifndef CONFIG_QEMU extern struct emu_t *tcpemu; -#endif extern int x_port, x_server, x_display; -int show_x _P((char *, struct socket *)); -void redir_x _P((u_int32_t, int, int, int)); -void getouraddr _P((void)); -inline void slirp_insque _P((void *, void *)); -inline void slirp_remque _P((void *)); -int add_exec _P((struct ex_list **, int, char *, int, int)); -int slirp_openpty _P((int *, int *)); -int fork_exec(struct socket *so, const char *ex, int do_pty); -void snooze_hup _P((int)); -void snooze _P((void)); -void relay _P((int)); -void add_emu _P((char *)); -void u_sleep _P((int)); -void fd_nonblock _P((int)); -void fd_block _P((int)); -int rsh_exec _P((struct socket *, struct socket *, char *, char *, char *)); +int show_x(char *, struct socket *); +void redir_x(u_int32_t, int, int, int); +void getouraddr(void); +void slirp_insque(void *, void *); +void slirp_remque(void *); +int add_exec(struct ex_list **, int, char *, int, int); +int slirp_openpty(int *, int *); +int fork_exec(struct socket *, char *, int); +void snooze_hup(int); +void snooze(void); +void relay(int); +void add_emu(char *); +void u_sleep(int); +void fd_nonblock(int); +void fd_block(int); +int rsh_exec(struct socket *, struct socket *, char *, char *, char *); #endif diff --git a/BasiliskII/src/slirp/sbuf.c b/BasiliskII/src/slirp/sbuf.c index 02c5fce0..278e3687 100644 --- a/BasiliskII/src/slirp/sbuf.c +++ b/BasiliskII/src/slirp/sbuf.c @@ -1,37 +1,31 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ +#include #include -static void sbappendsb(struct sbuf *sb, struct mbuf *m); - /* Done as a macro in socket.h */ /* int - * sbspace(struct sockbuff *sb) + * sbspace(struct sockbuff *sb) * { * return SB_DATALEN - sb->sb_cc; * } */ -void -sbfree(sb) - struct sbuf *sb; +void sbfree(struct sbuf *sb) { free(sb->sb_data); } -void -sbdrop(sb, num) - struct sbuf *sb; - int num; +void sbdrop(struct sbuf *sb, u_int num) { - /* + /* * We can only drop how much we have - * This should never succeed + * This should never succeed */ if(num > sb->sb_cc) num = sb->sb_cc; @@ -39,13 +33,10 @@ sbdrop(sb, num) sb->sb_rptr += num; if(sb->sb_rptr >= sb->sb_data + sb->sb_datalen) sb->sb_rptr -= sb->sb_datalen; - + } -void -sbreserve(sb, size) - struct sbuf *sb; - int size; +void sbreserve(struct sbuf *sb, size_t size) { if (sb->sb_data) { /* Already alloced, realloc if necessary */ @@ -73,24 +64,21 @@ sbreserve(sb, size) * this prevents an unnecessary copy of the data * (the socket is non-blocking, so we won't hang) */ -void -sbappend(so, m) - struct socket *so; - struct mbuf *m; +void sbappend(struct socket *so, struct mbuf *m) { int ret = 0; - + DEBUG_CALL("sbappend"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("m = %lx", (long)m); - DEBUG_ARG("m->m_len = %d", m->m_len); - + DEBUG_ARG("m->m_len = %zu", m->m_len); + /* Shouldn't happen, but... e.g. foreign host closes connection */ if (m->m_len <= 0) { m_free(m); return; } - + /* * If there is urgent data, call sosendoob * if not all was sent, sowrite will take care of the rest @@ -102,16 +90,16 @@ sbappend(so, m) sosendoob(so); return; } - + /* * We only write if there's nothing in the buffer, * ottherwise it'll arrive out of order, and hence corrupt */ if (!so->so_rcv.sb_cc) ret = send(so->s, m->m_data, m->m_len, 0); - + if (ret <= 0) { - /* + /* * Nothing was written * It's possible that the socket has closed, but * we don't need to check because if it has closed, @@ -135,11 +123,10 @@ sbappend(so, m) * Copy the data from m into sb * The caller is responsible to make sure there's enough room */ -static void -sbappendsb(struct sbuf *sb, struct mbuf *m) +void sbappendsb(struct sbuf *sb, struct mbuf *m) { int len, n, nn; - + len = m->m_len; if (sb->sb_wptr < sb->sb_rptr) { @@ -172,15 +159,10 @@ sbappendsb(struct sbuf *sb, struct mbuf *m) * Don't update the sbuf rptr, this will be * done in sbdrop when the data is acked */ -void -sbcopy(sb, off, len, to) - struct sbuf *sb; - int off; - int len; - char *to; +void sbcopy(struct sbuf *sb, u_int off, u_int len, char *to) { char *from; - + from = sb->sb_rptr + off; if (from >= sb->sb_data + sb->sb_datalen) from -= sb->sb_datalen; @@ -198,4 +180,4 @@ sbcopy(sb, off, len, to) memcpy(to+off,sb->sb_data,len); } } - + diff --git a/BasiliskII/src/slirp/sbuf.h b/BasiliskII/src/slirp/sbuf.h index a4f10362..04f7981c 100644 --- a/BasiliskII/src/slirp/sbuf.h +++ b/BasiliskII/src/slirp/sbuf.h @@ -1,13 +1,15 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ #ifndef _SBUF_H_ #define _SBUF_H_ +#include + #define sbflush(sb) sbdrop((sb),(sb)->sb_cc) #define sbspace(sb) ((sb)->sb_datalen - (sb)->sb_cc) @@ -21,10 +23,11 @@ struct sbuf { char *sb_data; /* Actual data */ }; -void sbfree _P((struct sbuf *)); -void sbdrop _P((struct sbuf *, int)); -void sbreserve _P((struct sbuf *, int)); -void sbappend _P((struct socket *, struct mbuf *)); -void sbcopy _P((struct sbuf *, int, int, char *)); +void sbfree(struct sbuf *); +void sbdrop(struct sbuf *, u_int); +void sbreserve(struct sbuf *, size_t); +void sbappend(struct socket *, struct mbuf *); +void sbappendsb(struct sbuf *, struct mbuf *); +void sbcopy(struct sbuf *, u_int, u_int, char *); #endif diff --git a/BasiliskII/src/slirp/slirp.c b/BasiliskII/src/slirp/slirp.c index 303f4825..dc2fdc65 100644 --- a/BasiliskII/src/slirp/slirp.c +++ b/BasiliskII/src/slirp/slirp.c @@ -12,7 +12,7 @@ struct in_addr special_addr; /* virtual address alias for host */ struct in_addr alias_addr; -static const uint8_t special_ethaddr[6] = { +const uint8_t special_ethaddr[6] = { 0x52, 0x54, 0x00, 0x12, 0x35, 0x00 }; @@ -38,10 +38,10 @@ static int get_dns_addr(struct in_addr *pdns_addr) DWORD ret; IP_ADDR_STRING *pIPAddr; struct in_addr tmp_addr; - + FixedInfo = (FIXED_INFO *)GlobalAlloc(GPTR, sizeof(FIXED_INFO)); BufLen = sizeof(FIXED_INFO); - + if (ERROR_BUFFER_OVERFLOW == GetNetworkParams(FixedInfo, &BufLen)) { if (FixedInfo) { GlobalFree(FixedInfo); @@ -49,7 +49,7 @@ static int get_dns_addr(struct in_addr *pdns_addr) } FixedInfo = GlobalAlloc(GPTR, BufLen); } - + if ((ret = GetNetworkParams(FixedInfo, &BufLen)) != ERROR_SUCCESS) { printf("GetNetworkParams failed. ret = %08x\n", (u_int)ret ); if (FixedInfo) { @@ -58,14 +58,14 @@ static int get_dns_addr(struct in_addr *pdns_addr) } return -1; } - + pIPAddr = &(FixedInfo->DnsServerList); inet_aton(pIPAddr->IpAddress.String, &tmp_addr); *pdns_addr = tmp_addr; #if 0 printf( "DNS Servers:\n" ); printf( "DNS Addr:%s\n", pIPAddr->IpAddress.String ); - + pIPAddr = FixedInfo -> DnsServerList.Next; while ( pIPAddr ) { printf( "DNS Addr:%s\n", pIPAddr ->IpAddress.String ); @@ -84,18 +84,16 @@ static int get_dns_addr(struct in_addr *pdns_addr) static int get_dns_addr(struct in_addr *pdns_addr) { char buff[512]; - char buff2[256]; + char buff2[256+1]; FILE *f; int found = 0; struct in_addr tmp_addr; - + f = fopen("/etc/resolv.conf", "r"); if (!f) return -1; -#ifdef DEBUG lprint("IP address of your DNS(s): "); -#endif while (fgets(buff, 512, f) != NULL) { if (sscanf(buff, "nameserver%*[ \t]%256s", buff2) == 1) { if (!inet_aton(buff2, &tmp_addr)) @@ -105,20 +103,13 @@ static int get_dns_addr(struct in_addr *pdns_addr) /* If it's the first one, set it to dns_addr */ if (!found) *pdns_addr = tmp_addr; -#ifdef DEBUG else lprint(", "); -#endif if (++found > 3) { -#ifdef DEBUG lprint("(more)"); -#endif break; - } -#ifdef DEBUG - else + } else lprint("%s", inet_ntoa(tmp_addr)); -#endif } } fclose(f); @@ -130,16 +121,16 @@ static int get_dns_addr(struct in_addr *pdns_addr) #endif #ifdef _WIN32 -static void slirp_cleanup(void) +void slirp_cleanup(void) { WSACleanup(); } #endif -void slirp_init(void) +int slirp_init(void) { // debug_init("/tmp/slirp.log", DEBUG_DEFAULT); - + #ifdef _WIN32 { WSADATA Data; @@ -159,14 +150,13 @@ void slirp_init(void) /* set default addresses */ inet_aton("127.0.0.1", &loopback_addr); - if (get_dns_addr(&dns_addr) < 0) { - dns_addr = loopback_addr; - fprintf (stderr, "Warning: No DNS servers found\n"); - } + if (get_dns_addr(&dns_addr) < 0) + return -1; inet_aton(CTL_SPECIAL, &special_addr); - alias_addr.s_addr = special_addr.s_addr | htonl(CTL_ALIAS); - getouraddr(); + alias_addr.s_addr = special_addr.s_addr | htonl(CTL_ALIAS); + getouraddr(); + return 0; } #define CONN_CANFSEND(so) (((so)->so_state & (SS_FCANTSENDMORE|SS_ISFCONNECTED)) == SS_ISFCONNECTED) @@ -189,57 +179,56 @@ static void updtime(void) static void updtime(void) { gettimeofday(&tt, 0); - + curtime = (u_int)tt.tv_sec * (u_int)1000; curtime += (u_int)tt.tv_usec / (u_int)1000; - + if ((tt.tv_usec % 1000) >= 500) curtime++; } #endif -void slirp_select_fill(int *pnfds, - fd_set *readfds, fd_set *writefds, fd_set *xfds) +int slirp_select_fill(int *pnfds, + fd_set *readfds, fd_set *writefds, fd_set *xfds) { struct socket *so, *so_next; - struct timeval timeout; int nfds; - int tmp_time; + int timeout, tmp_time; /* fail safe */ global_readfds = NULL; global_writefds = NULL; global_xfds = NULL; - + nfds = *pnfds; /* * First, TCP sockets */ do_slowtimo = 0; if (link_up) { - /* + /* * *_slowtimo needs calling if there are IP fragments * in the fragment queue, or there are TCP connections active */ do_slowtimo = ((tcb.so_next != &tcb) || ((struct ipasfrag *)&ipq != (struct ipasfrag *)ipq.next)); - + for (so = tcb.so_next; so != &tcb; so = so_next) { so_next = so->so_next; - + /* * See if we need a tcp_fasttimo */ if (time_fasttimo == 0 && so->so_tcpcb->t_flags & TF_DELACK) - time_fasttimo = curtime; /* Flag when we want a fasttimo */ - + time_fasttimo = curtime; /* Flag when we want a fasttimo */ + /* * NOFDREF can include still connecting to local-host, * newly socreated() sockets etc. Don't want to select these. */ if (so->so_state & SS_NOFDREF || so->s == -1) - continue; - + continue; + /* * Set for reading sockets which are accepting */ @@ -248,7 +237,7 @@ void slirp_select_fill(int *pnfds, UPD_NFDS(so->s); continue; } - + /* * Set for writing sockets which are connecting */ @@ -257,7 +246,7 @@ void slirp_select_fill(int *pnfds, UPD_NFDS(so->s); continue; } - + /* * Set for writing if we are connected, can send more, and * we have something to send @@ -266,7 +255,7 @@ void slirp_select_fill(int *pnfds, FD_SET(so->s, writefds); UPD_NFDS(so->s); } - + /* * Set for reading (and urgent data) if we are connected, can * receive more, and we have room for it XXX /2 ? @@ -277,13 +266,13 @@ void slirp_select_fill(int *pnfds, UPD_NFDS(so->s); } } - + /* * UDP sockets */ for (so = udb.so_next; so != &udb; so = so_next) { so_next = so->so_next; - + /* * See if it's timed out */ @@ -294,7 +283,7 @@ void slirp_select_fill(int *pnfds, } else do_slowtimo = 1; /* Let socket expire */ } - + /* * When UDP packets are received from over the * link, they're sendto()'d straight away, so @@ -311,51 +300,58 @@ void slirp_select_fill(int *pnfds, } } } - + /* * Setup timeout to use minimum CPU usage, especially when idle */ - /* - * First, see the timeout needed by *timo - */ - timeout.tv_sec = 0; - timeout.tv_usec = -1; - /* - * If a slowtimo is needed, set timeout to 500ms from the last - * slow timeout. If a fast timeout is needed, set timeout within - * 200ms of when it was requested. - */ - if (do_slowtimo) { - /* XXX + 10000 because some select()'s aren't that accurate */ - timeout.tv_usec = ((500 - (curtime - last_slowtimo)) * 1000) + 10000; - if (timeout.tv_usec < 0) - timeout.tv_usec = 0; - else if (timeout.tv_usec > 510000) - timeout.tv_usec = 510000; + timeout = -1; + /* + * If a slowtimo is needed, set timeout to 5ms from the last + * slow timeout. If a fast timeout is needed, set timeout within + * 2ms of when it was requested. + */ +# define SLOW_TIMO 5 +# define FAST_TIMO 2 + if (do_slowtimo) { + timeout = (SLOW_TIMO - (curtime - last_slowtimo)) * 1000; + if (timeout < 0) + timeout = 0; + else if (timeout > (SLOW_TIMO * 1000)) + timeout = SLOW_TIMO * 1000; + /* Can only fasttimo if we also slowtimo */ if (time_fasttimo) { - tmp_time = (200 - (curtime - time_fasttimo)) * 1000; + tmp_time = (FAST_TIMO - (curtime - time_fasttimo)) * 1000; if (tmp_time < 0) - tmp_time = 0; - + tmp_time = 0; + /* Choose the smallest of the 2 */ - if (tmp_time < timeout.tv_usec) - timeout.tv_usec = (u_int)tmp_time; + if (tmp_time < timeout) + timeout = tmp_time; } } - *pnfds = nfds; -} + *pnfds = nfds; + + /* + * Adjust the timeout to make the minimum timeout + * 2ms (XXX?) to lessen the CPU load + */ + if (timeout < (FAST_TIMO * 1000)) + timeout = FAST_TIMO * 1000; + + return timeout; +} void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) { - struct socket *so, *so_next; - int ret; + struct socket *so, *so_next; + int ret; - global_readfds = readfds; - global_writefds = writefds; - global_xfds = xfds; + global_readfds = readfds; + global_writefds = writefds; + global_xfds = xfds; /* Update time */ updtime(); @@ -364,11 +360,11 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) * See if anything has timed out */ if (link_up) { - if (time_fasttimo && ((curtime - time_fasttimo) >= 2)) { + if (time_fasttimo && ((curtime - time_fasttimo) >= FAST_TIMO)) { tcp_fasttimo(); time_fasttimo = 0; } - if (do_slowtimo && ((curtime - last_slowtimo) >= 499)) { + if (do_slowtimo && ((curtime - last_slowtimo) >= SLOW_TIMO)) { ip_slowtimo(); tcp_slowtimo(); last_slowtimo = curtime; @@ -390,7 +386,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) * (and they can crash the program) */ if (so->so_state & SS_NOFDREF || so->s == -1) - continue; + continue; /* * Check for URG data @@ -398,7 +394,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) * test for readfds below if this succeeds */ if (FD_ISSET(so->s, xfds)) - sorecvoob(so); + sorecvoob(so); /* * Check sockets for reading */ @@ -414,82 +410,88 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) /* Output it if we read something */ if (ret > 0) - tcp_output(sototcpcb(so)); + tcp_output(sototcpcb(so)); } /* * Check sockets for writing */ if (FD_ISSET(so->s, writefds)) { - /* - * Check for non-blocking, still-connecting sockets - */ - if (so->so_state & SS_ISFCONNECTING) { - /* Connected */ - so->so_state &= ~SS_ISFCONNECTING; + /* + * Check for non-blocking, still-connecting sockets + */ + if (so->so_state & SS_ISFCONNECTING) { + /* Connected */ + so->so_state &= ~SS_ISFCONNECTING; - ret = send(so->s, &ret, 0, 0); - if (ret < 0) { - /* XXXXX Must fix, zero bytes is a NOP */ - if (errno == EAGAIN || errno == EWOULDBLOCK || - errno == EINPROGRESS || errno == ENOTCONN) - continue; + ret = send(so->s, (char*)&ret, 0, 0); + if (ret < 0) { + /* XXXXX Must fix, zero bytes is a NOP */ + int error = WSAGetLastError(); + if (error == EAGAIN || error == WSAEWOULDBLOCK || + error == WSAEINPROGRESS || error == WSAENOTCONN) + continue; - /* else failed */ - so->so_state = SS_NOFDREF; - } - /* else so->so_state &= ~SS_ISFCONNECTING; */ + /* else failed */ + so->so_state = SS_NOFDREF; + } + /* else so->so_state &= ~SS_ISFCONNECTING; */ - /* - * Continue tcp_input - */ - tcp_input((struct mbuf *)NULL, sizeof(struct ip), so); - /* continue; */ - } else - ret = sowrite(so); - /* - * XXXXX If we wrote something (a lot), there - * could be a need for a window update. - * In the worst case, the remote will send - * a window probe to get things going again - */ + /* + * Continue tcp_input + */ + tcp_input((struct mbuf *)NULL, sizeof(struct ip), so); + /* continue; */ + } + else + ret = sowrite(so); + /* + * XXXXX If we wrote something (a lot), there + * could be a need for a window update. + * In the worst case, the remote will send + * a window probe to get things going again + */ } /* * Probe a still-connecting, non-blocking socket * to check if it's still alive - */ + */ #ifdef PROBE_CONN if (so->so_state & SS_ISFCONNECTING) { - ret = recv(so->s, (char *)&ret, 0,0); + ret = recv(so->s, (char *)&ret, 0, 0); - if (ret < 0) { - /* XXX */ - if (errno == EAGAIN || errno == EWOULDBLOCK || - errno == EINPROGRESS || errno == ENOTCONN) - continue; /* Still connecting, continue */ + if (ret < 0) { + /* XXX */ + int error = WSAGetLastError(); + if (error == EAGAIN || error == WSAEWOULDBLOCK || + error == WSAEINPROGRESS || error == WSAENOTCONN) + continue; /* Still connecting, continue */ - /* else failed */ - so->so_state = SS_NOFDREF; + /* else failed */ + so->so_state = SS_NOFDREF; - /* tcp_input will take care of it */ - } else { - ret = send(so->s, &ret, 0,0); - if (ret < 0) { - /* XXX */ - if (errno == EAGAIN || errno == EWOULDBLOCK || - errno == EINPROGRESS || errno == ENOTCONN) - continue; - /* else failed */ - so->so_state = SS_NOFDREF; - } else - so->so_state &= ~SS_ISFCONNECTING; + /* tcp_input will take care of it */ + } + else { + ret = send(so->s, &ret, 0, 0); + if (ret < 0) { + /* XXX */ + int error = WSAGetLastError(); + if (error == EAGAIN || error == WSAEWOULDBLOCK || + error == WSAEINPROGRESS || error == WSAENOTCONN) + continue; + /* else failed */ + so->so_state = SS_NOFDREF; + } + else + so->so_state &= ~SS_ISFCONNECTING; - } - tcp_input((struct mbuf *)NULL, sizeof(struct ip),so); - } /* SS_ISFCONNECTING */ + } + tcp_input((struct mbuf *)NULL, sizeof(struct ip), so); + } /* SS_ISFCONNECTING */ #endif - } + } /* * Now UDP sockets. @@ -500,25 +502,25 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) so_next = so->so_next; if (so->s != -1 && FD_ISSET(so->s, readfds)) { - sorecvfrom(so); - } + sorecvfrom(so); + } } - } +} /* * See if we can start outputting */ if (if_queued && link_up) - if_start(); + if_start(); /* clear global file descriptor sets. * these reside on the stack in vl.c * so they're unusable if we're not in * slirp_select_fill or slirp_select_poll. */ - global_readfds = NULL; - global_writefds = NULL; - global_xfds = NULL; + global_readfds = NULL; + global_writefds = NULL; + global_xfds = NULL; } #define ETH_ALEN 6 @@ -530,7 +532,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) #define ARPOP_REQUEST 1 /* ARP request */ #define ARPOP_REPLY 2 /* ARP reply */ -struct ethhdr +struct ethhdr { unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ unsigned char h_source[ETH_ALEN]; /* source ether addr */ @@ -568,7 +570,7 @@ void arp_input(const uint8_t *pkt, int pkt_len) switch(ar_op) { case ARPOP_REQUEST: if (!memcmp(ah->ar_tip, &special_addr, 3)) { - if (ah->ar_tip[3] == CTL_DNS || ah->ar_tip[3] == CTL_ALIAS) + if (ah->ar_tip[3] == CTL_DNS || ah->ar_tip[3] == CTL_ALIAS) goto arp_ok; for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) { if (ex_ptr->ex_addr == ah->ar_tip[3]) @@ -609,8 +611,8 @@ void slirp_input(const uint8_t *pkt, int pkt_len) if (pkt_len < ETH_HLEN) return; - - proto = ntohs(*(uint16_t *)(pkt + 12)); + + proto = (pkt[12] << 8) | pkt[13]; switch(proto) { case ETH_P_ARP: arp_input(pkt, pkt_len); @@ -651,24 +653,24 @@ void if_encap(const uint8_t *ip_data, int ip_data_len) slirp_output(buf, ip_data_len + ETH_HLEN); } -int slirp_redir(int is_udp, int host_port, +int slirp_redir(int is_udp, int host_port, struct in_addr guest_addr, int guest_port) { if (is_udp) { - if (!udp_listen(htons(host_port), guest_addr.s_addr, + if (!udp_listen(htons(host_port), guest_addr.s_addr, htons(guest_port), 0)) return -1; } else { - if (!solisten(htons(host_port), guest_addr.s_addr, + if (!solisten(htons(host_port), guest_addr.s_addr, htons(guest_port), 0)) return -1; } return 0; } -int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, +int slirp_add_exec(int do_pty, const char *args, int addr_low_byte, int guest_port) { - return add_exec(&exec_list, do_pty, (char *)args, + return add_exec(&exec_list, do_pty, (char *)args, addr_low_byte, htons(guest_port)); } diff --git a/BasiliskII/src/slirp/slirp.h b/BasiliskII/src/slirp/slirp.h index b8d756e5..b845caa7 100644 --- a/BasiliskII/src/slirp/slirp.h +++ b/BasiliskII/src/slirp/slirp.h @@ -3,21 +3,12 @@ #define CONFIG_QEMU -//#define DEBUG 1 - -// Uncomment the following line to enable SLIRP statistics printing in Qemu -//#define LOG_ENABLED - -#ifdef LOG_ENABLED -#define STAT(expr) expr -#else -#define STAT(expr) do { } while(0) -#endif +#define DEBUG 1 #ifndef CONFIG_QEMU #include "version.h" #endif -#include "config-host.h" +#include "config.h" #include "slirp_config.h" #ifdef _WIN32 @@ -28,20 +19,31 @@ typedef uint16_t u_int16_t; typedef uint32_t u_int32_t; typedef uint64_t u_int64_t; typedef char *caddr_t; +typedef int socklen_t; +typedef unsigned long ioctlsockopt_t; -#define WIN32_LEAN_AND_MEAN -# include # include +# include # include # include -# define EWOULDBLOCK WSAEWOULDBLOCK -# define EINPROGRESS WSAEINPROGRESS -# define ENOTCONN WSAENOTCONN -# define EHOSTUNREACH WSAEHOSTUNREACH -# define ENETUNREACH WSAENETUNREACH -# define ECONNREFUSED WSAECONNREFUSED +# define USE_FIONBIO 1 + +/* Basilisk II Router defines those */ +# define udp_read_completion slirp_udp_read_completion +# define write_udp slirp_write_udp +# define init_udp slirp_init_udp +# define final_udp slirp_final_udp #else +# define WSAGetLastError() (int)(errno) +# define WSASetLastError(e) (void)(errno = (e)) +# define WSAEWOULDBLOCK EWOULDBLOCK +# define WSAEINPROGRESS EINPROGRESS +# define WSAENOTCONN ENOTCONN +# define WSAEHOSTUNREACH EHOSTUNREACH +# define WSAENETUNREACH ENETUNREACH +# define WSAECONNREFUSED ECONNREFUSED +typedef int ioctlsockopt_t; # define ioctlsocket ioctl # define closesocket(s) close(s) # define O_BINARY 0 @@ -51,8 +53,13 @@ typedef char *caddr_t; #ifdef HAVE_SYS_BITYPES_H # include #endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifndef _WIN32 #include +#endif #ifdef NEED_TYPEDEFS typedef char int8_t; @@ -83,6 +90,11 @@ typedef unsigned char u_int8_t; # endif #endif /* NEED_TYPEDEFS */ +/* Basilisk II types glue */ +typedef u_int8_t uint8; +typedef u_int16_t uint16; +typedef u_int32_t uint32; + #ifdef HAVE_UNISTD_H # include #endif @@ -117,17 +129,6 @@ typedef unsigned char u_int8_t; #ifndef _WIN32 #include -#endif - -#ifndef _P -#ifndef NO_PROTOTYPES -# define _P(x) x -#else -# define _P(x) () -#endif -#endif - -#ifndef _WIN32 #include #include #endif @@ -138,20 +139,23 @@ typedef unsigned char u_int8_t; /* Systems lacking strdup() definition in . */ #if defined(ultrix) -char *strdup _P((const char *)); +char *strdup(const char *); #endif /* Systems lacking malloc() definition in . */ #if defined(ultrix) || defined(hcx) -void *malloc _P((size_t arg)); -void free _P((void *ptr)); +void *malloc(size_t arg); +void free(void *ptr); #endif #ifndef HAVE_INET_ATON -int inet_aton _P((const char *cp, struct in_addr *ia)); +int inet_aton(const char *cp, struct in_addr *ia); #endif #include +#ifdef _WIN32 +#include +#endif #ifndef NO_UNIX_SOCKETS #include #endif @@ -183,11 +187,7 @@ int inet_aton _P((const char *cp, struct in_addr *ia)); #include #endif -#ifdef __STDC__ #include -#else -#include -#endif #include @@ -202,6 +202,20 @@ int inet_aton _P((const char *cp, struct in_addr *ia)); #include "debug.h" +#if defined __GNUC__ +#define PACKED__ __attribute__ ((packed)) +#elif defined _MSC_VER +#define PRAGMA_PACK_SUPPORTED 1 +#define PACK_RESET +#define PACKED__ +#elif defined __sgi +#define PRAGMA_PACK_SUPPORTED 1 +#define PACK_RESET 0 +#define PACKED__ +#else +#error "Packed attribute or pragma shall be supported" +#endif + #include "ip.h" #include "tcp.h" #include "tcp_timer.h" @@ -232,45 +246,47 @@ extern struct ttys *ttys_unit[MAX_INTERFACES]; #endif #ifndef FULL_BOLT -void if_start _P((void)); +void if_start(void); #else -void if_start _P((struct ttys *)); +void if_start(struct ttys *); #endif #ifdef BAD_SPRINTF # define vsprintf vsprintf_len # define sprintf sprintf_len - extern int vsprintf_len _P((char *, const char *, va_list)); - extern int sprintf_len _P((char *, const char *, ...)); + extern int vsprintf_len(char *, const char *, va_list); + extern int sprintf_len(char *, const char *, ...); #endif #ifdef DECLARE_SPRINTF # ifndef BAD_SPRINTF - extern int vsprintf _P((char *, const char *, va_list)); + extern int vsprintf(char *, const char *, va_list); # endif - extern int vfprintf _P((FILE *, const char *, va_list)); + extern int vfprintf(FILE *, const char *, va_list); #endif #ifndef HAVE_STRERROR - extern char *strerror _P((int error)); + extern char *strerror(int error); #endif #ifndef HAVE_INDEX - char *index _P((const char *, int)); + char *index(const char *, int); #endif #ifndef HAVE_GETHOSTID - long gethostid _P((void)); + long gethostid(void); #endif -void lprint _P((const char *, ...)); +void lprint(const char *, ...); + +extern int do_echo; #if SIZEOF_CHAR_P == 4 # define insque_32 insque # define remque_32 remque #else - inline void insque_32 _P((void *, void *)); - inline void remque_32 _P((void *)); + extern inline void insque_32(void *, void *); + extern inline void remque_32(void *); #endif #ifndef _WIN32 @@ -279,46 +295,51 @@ void lprint _P((const char *, ...)); #define DEFAULT_BAUD 115200 -#define SO_OPTIONS DO_KEEPALIVE -#define TCP_MAXIDLE (TCPTV_KEEPCNT * TCPTV_KEEPINTVL) - /* cksum.c */ int cksum(struct mbuf *m, int len); /* if.c */ -void if_init _P((void)); -void if_output _P((struct socket *, struct mbuf *)); +void if_init(void); +void if_output(struct socket *, struct mbuf *); /* ip_input.c */ -void ip_init _P((void)); -void ip_input _P((struct mbuf *)); -void ip_slowtimo _P((void)); -void ip_stripoptions _P((register struct mbuf *, struct mbuf *)); +void ip_init(void); +void ip_input(struct mbuf *); +struct ip * ip_reass(register struct ipasfrag *, register struct ipq *); +void ip_freef(struct ipq *); +void ip_enq(register struct ipasfrag *, register struct ipasfrag *); +void ip_deq(register struct ipasfrag *); +void ip_slowtimo(void); +void ip_stripoptions(register struct mbuf *, struct mbuf *); /* ip_output.c */ -int ip_output _P((struct socket *, struct mbuf *)); +int ip_output(struct socket *, struct mbuf *); /* tcp_input.c */ -void tcp_input _P((register struct mbuf *, int, struct socket *)); -int tcp_mss _P((register struct tcpcb *, u_int)); +int tcp_reass(register struct tcpcb *, register struct tcpiphdr *, struct mbuf *); +void tcp_input(register struct mbuf *, int, struct socket *); +void tcp_dooptions(struct tcpcb *, u_char *, int, struct tcpiphdr *); +void tcp_xmit_timer(register struct tcpcb *, int); +u_int tcp_mss(register struct tcpcb *, u_int); /* tcp_output.c */ -int tcp_output _P((register struct tcpcb *)); -void tcp_setpersist _P((register struct tcpcb *)); +int tcp_output(register struct tcpcb *); +void tcp_setpersist(register struct tcpcb *); /* tcp_subr.c */ -void tcp_init _P((void)); -void tcp_template _P((struct tcpcb *)); -void tcp_respond _P((struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int)); -struct tcpcb * tcp_newtcpcb _P((struct socket *)); -struct tcpcb * tcp_close _P((register struct tcpcb *)); -void tcp_sockclosed _P((struct tcpcb *)); -int tcp_fconnect _P((struct socket *)); -void tcp_connect _P((struct socket *)); -int tcp_attach _P((struct socket *)); -u_int8_t tcp_tos _P((struct socket *)); -int tcp_emu _P((struct socket *, struct mbuf *)); -int tcp_ctl _P((struct socket *)); +void tcp_init(void); +void tcp_template(struct tcpcb *); +void tcp_respond(struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int); +struct tcpcb * tcp_newtcpcb(struct socket *); +struct tcpcb * tcp_close(register struct tcpcb *); +void tcp_drain(void); +void tcp_sockclosed(struct tcpcb *); +int tcp_fconnect(struct socket *); +void tcp_connect(struct socket *); +int tcp_attach(struct socket *); +u_int8_t tcp_tos(struct socket *); +int tcp_emu(struct socket *, struct mbuf *); +int tcp_ctl(struct socket *); struct tcpcb *tcp_drop(struct tcpcb *tp, int err); #ifdef USE_PPP @@ -334,9 +355,4 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err); #define max(x,y) ((x) > (y) ? (x) : (y)) #endif -#ifdef _WIN32 -#undef errno -#define errno (WSAGetLastError()) -#endif - #endif diff --git a/BasiliskII/src/slirp/slirp_config.h b/BasiliskII/src/slirp/slirp_config.h index e7e95dd5..237268fa 100644 --- a/BasiliskII/src/slirp/slirp_config.h +++ b/BasiliskII/src/slirp/slirp_config.h @@ -40,11 +40,6 @@ */ #undef USE_LOWCPU -/* Define this if your compiler doesn't like prototypes */ -#ifndef __STDC__ -#define NO_PROTOTYPES -#endif - /*********************************************************/ /* * Autoconf defined configuration options @@ -54,40 +49,11 @@ /* Ignore this */ #undef DUMMY_PPP -/* Define if you have unistd.h */ -#define HAVE_UNISTD_H - -/* Define if you have stdlib.h */ -#define HAVE_STDLIB_H - -/* Define if you have sys/ioctl.h */ -#undef HAVE_SYS_IOCTL_H -#ifndef _WIN32 -#define HAVE_SYS_IOCTL_H -#endif - -/* Define if you have sys/filio.h */ -#undef HAVE_SYS_FILIO_H -#ifdef __APPLE__ -#define HAVE_SYS_FILIO_H -#endif - -/* Define if you have strerror */ -#define HAVE_STRERROR - -/* Define if you have strdup() */ -#define HAVE_STRDUP - -/* Define according to how time.h should be included */ +/* XXX: Define according to how time.h should be included */ +#undef TIME_WITH_SYS_TIME #define TIME_WITH_SYS_TIME 0 #undef HAVE_SYS_TIME_H -/* Define if you have sys/bitypes.h */ -#undef HAVE_SYS_BITYPES_H - -/* Define if the machine is big endian */ -//#undef WORDS_BIGENDIAN - /* Define if your sprintf returns char * instead of int */ #undef BAD_SPRINTF @@ -103,56 +69,17 @@ /* Define if a declaration of sprintf/fprintf is needed */ #undef DECLARE_SPRINTF -/* Define if you have a POSIX.1 sys/wait.h */ -#undef HAVE_SYS_WAIT_H - -/* Define if you have sys/select.h */ -#undef HAVE_SYS_SELECT_H -#ifndef _WIN32 -#define HAVE_SYS_SELECT_H -#endif - -/* Define if you have strings.h */ -#define HAVE_STRING_H - -/* Define if you have arpa/inet.h */ -#undef HAVE_ARPA_INET_H -#ifndef _WIN32 -#define HAVE_ARPA_INET_H -#endif - -/* Define if you have sys/signal.h */ -#undef HAVE_SYS_SIGNAL_H - /* Define if you have sys/stropts.h */ #undef HAVE_SYS_STROPTS_H -/* Define to whatever your compiler thinks inline should be */ -#define inline inline - -/* Define to whatever your compiler thinks const should be */ -#define const const - -/* Define if your compiler doesn't like prototypes */ -#undef NO_PROTOTYPES - /* Define if you don't have u_int32_t etc. typedef'd */ #undef NEED_TYPEDEFS #ifdef __sun__ #define NEED_TYPEDEFS #endif -/* Define to sizeof(char) */ -#define SIZEOF_CHAR 1 - -/* Define to sizeof(short) */ -#define SIZEOF_SHORT 2 - -/* Define to sizeof(int) */ -#define SIZEOF_INT 4 - /* Define to sizeof(char *) */ -#define SIZEOF_CHAR_P (HOST_LONG_BITS / 8) +#define SIZEOF_CHAR_P SIZEOF_VOID_P /* Define if you have random() */ #undef HAVE_RANDOM @@ -160,12 +87,6 @@ /* Define if you have srandom() */ #undef HAVE_SRANDOM -/* Define if you have inet_aton */ -#undef HAVE_INET_ATON -#ifndef _WIN32 -#define HAVE_INET_ATON -#endif - /* Define if you have setenv */ #undef HAVE_SETENV diff --git a/BasiliskII/src/slirp/socket.c b/BasiliskII/src/slirp/socket.c index 0c15132e..42ba31b2 100644 --- a/BasiliskII/src/slirp/socket.c +++ b/BasiliskII/src/slirp/socket.c @@ -1,11 +1,12 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ #define WANT_SYS_IOCTL_H +#include #include #include "ip_icmp.h" #include "main.h" @@ -13,16 +14,18 @@ #include #endif -static void sofcantrcvmore(struct socket *so); -static void sofcantsendmore(struct socket *so); +#ifdef _WIN32 +#define IS_EAGAIN(e) ((e) == WSAEINTR || (e) == EAGAIN) +#else +#define IS_EAGAIN(e) ((e) == EAGAIN) +#endif -#if 0 -static void +void so_init() { /* Nothing yet */ } -#endif + struct socket * solookup(head, laddr, lport, faddr, fport) @@ -33,19 +36,19 @@ solookup(head, laddr, lport, faddr, fport) u_int fport; { struct socket *so; - + for (so = head->so_next; so != head; so = so->so_next) { - if (so->so_lport == lport && + if (so->so_lport == lport && so->so_laddr.s_addr == laddr.s_addr && so->so_faddr.s_addr == faddr.s_addr && so->so_fport == fport) break; } - + if (so == head) return (struct socket *)NULL; return so; - + } /* @@ -57,7 +60,7 @@ struct socket * socreate() { struct socket *so; - + so = (struct socket *)malloc(sizeof(struct socket)); if(so) { memset(so, 0, sizeof(struct socket)); @@ -82,10 +85,10 @@ sofree(so) tcp_last_so = &tcb; else if (so == udp_last_so) udp_last_so = &udb; - + m_free(so->so_m); - - if(so->so_next && so->so_prev) + + if(so->so_next && so->so_prev) remque(so); /* crashes if so is not in a queue */ free(so); @@ -100,22 +103,23 @@ int soread(so) struct socket *so; { - int n, nn, lss, total; + int n, nn; + u_int lss, total; struct sbuf *sb = &so->so_snd; - int len = sb->sb_datalen - sb->sb_cc; + u_int len = sb->sb_datalen - sb->sb_cc; struct iovec iov[2]; - int mss = so->so_tcpcb->t_maxseg; - + u_int mss = so->so_tcpcb->t_maxseg; + DEBUG_CALL("soread"); DEBUG_ARG("so = %lx", (long )so); - - /* + + /* * No need to check if there's enough room to read. * soread wouldn't have been called if there weren't */ - + len = sb->sb_datalen - sb->sb_cc; - + iov[0].iov_base = sb->sb_wptr; if (sb->sb_wptr < sb->sb_rptr) { iov[0].iov_len = sb->sb_rptr - sb->sb_wptr; @@ -154,15 +158,16 @@ soread(so) n = 1; } } - + #ifdef HAVE_READV nn = readv(so->s, (struct iovec *)iov, n); DEBUG_MISC((dfd, " ... read nn = %d bytes\n", nn)); #else nn = recv(so->s, iov[0].iov_base, iov[0].iov_len,0); -#endif +#endif if (nn <= 0) { - if (nn < 0 && (errno == EINTR || errno == EAGAIN)) + int error = WSAGetLastError(); + if (nn < 0 && IS_EAGAIN(error)) return 0; else { DEBUG_MISC((dfd, " --- soread() disconnected, nn = %d, errno = %d-%s\n", nn, errno,strerror(errno))); @@ -171,7 +176,7 @@ soread(so) return -1; } } - + #ifndef HAVE_READV /* * If there was no error, try and read the second time round @@ -188,10 +193,10 @@ soread(so) if (ret > 0) nn += ret; } - + DEBUG_MISC((dfd, " ... read nn = %d bytes\n", nn)); #endif - + /* Update fields */ sb->sb_cc += nn; sb->sb_wptr += nn; @@ -199,10 +204,10 @@ soread(so) sb->sb_wptr -= sb->sb_datalen; return nn; } - + /* * Get urgent data - * + * * When the socket is created, we set it SO_OOBINLINE, * so when OOB data arrives, we soread() it and everything * in the send buffer is sent as urgent data @@ -215,13 +220,13 @@ sorecvoob(so) DEBUG_CALL("sorecvoob"); DEBUG_ARG("so = %lx", (long)so); - + /* * We take a guess at how much urgent data has arrived. * In most situations, when urgent data arrives, the next * read() should get all the urgent data. This guess will * be wrong however if more data arrives just after the - * urgent data, or the read() doesn't return all the + * urgent data, or the read() doesn't return all the * urgent data. */ soread(so); @@ -241,24 +246,24 @@ sosendoob(so) { struct sbuf *sb = &so->so_rcv; char buff[2048]; /* XXX Shouldn't be sending more oob data than this */ - + int n, len; - + DEBUG_CALL("sosendoob"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("sb->sb_cc = %d", sb->sb_cc); - + if (so->so_urgc > 2048) so->so_urgc = 2048; /* XXXX */ - + if (sb->sb_rptr < sb->sb_wptr) { /* We can send it directly */ n = send(so->s, sb->sb_rptr, so->so_urgc, (MSG_OOB)); /* |MSG_DONTWAIT)); */ so->so_urgc -= n; - + DEBUG_MISC((dfd, " --- sent %d bytes urgent data, %d urgent bytes left\n", n, so->so_urgc)); } else { - /* + /* * Since there's no sendv or sendtov like writev, * we must copy all data to a linear buffer then * send it all @@ -278,20 +283,20 @@ sosendoob(so) #ifdef DEBUG if (n != len) DEBUG_ERROR((dfd, "Didn't send all data urgently XXXXX\n")); -#endif +#endif DEBUG_MISC((dfd, " ---2 sent %d bytes urgent data, %d urgent bytes left\n", n, so->so_urgc)); } - + sb->sb_cc -= n; sb->sb_rptr += n; if (sb->sb_rptr >= (sb->sb_data + sb->sb_datalen)) sb->sb_rptr -= sb->sb_datalen; - + return n; } /* - * Write data from so_rcv to so's socket, + * Write data from so_rcv to so's socket, * updating all sbuf field as necessary */ int @@ -300,12 +305,12 @@ sowrite(so) { int n,nn; struct sbuf *sb = &so->so_rcv; - int len = sb->sb_cc; + u_int len = sb->sb_cc; struct iovec iov[2]; - + DEBUG_CALL("sowrite"); DEBUG_ARG("so = %lx", (long)so); - + if (so->so_urgc) { sosendoob(so); if (sb->sb_cc == 0) @@ -316,9 +321,9 @@ sowrite(so) * No need to check if there's something to write, * sowrite wouldn't have been called otherwise */ - + len = sb->sb_cc; - + iov[0].iov_base = sb->sb_rptr; if (sb->sb_rptr < sb->sb_wptr) { iov[0].iov_len = sb->sb_wptr - sb->sb_rptr; @@ -341,14 +346,17 @@ sowrite(so) #ifdef HAVE_READV nn = writev(so->s, (const struct iovec *)iov, n); - + DEBUG_MISC((dfd, " ... wrote nn = %d bytes\n", nn)); #else nn = send(so->s, iov[0].iov_base, iov[0].iov_len,0); #endif /* This should never happen, but people tell me it does *shrug* */ - if (nn < 0 && (errno == EAGAIN || errno == EINTR)) - return 0; + if (nn < 0) { + int error = WSAGetLastError(); + if (IS_EAGAIN(error)) + return 0; + } if (nn <= 0) { DEBUG_MISC((dfd, " --- sowrite disconnected, so->so_state = %x, errno = %d\n", @@ -357,7 +365,7 @@ sowrite(so) tcp_sockclosed(sototcpcb(so)); return -1; } - + #ifndef HAVE_READV if (n == 2 && nn == iov[0].iov_len) { int ret; @@ -367,20 +375,20 @@ sowrite(so) } DEBUG_MISC((dfd, " ... wrote nn = %d bytes\n", nn)); #endif - + /* Update sbuf */ sb->sb_cc -= nn; sb->sb_rptr += nn; if (sb->sb_rptr >= (sb->sb_data + sb->sb_datalen)) sb->sb_rptr -= sb->sb_datalen; - + /* * If in DRAIN mode, and there's no more data, set * it CANTSENDMORE */ if ((so->so_state & SS_FWDRAIN) && sb->sb_cc == 0) sofcantsendmore(so); - + return nn; } @@ -392,25 +400,26 @@ sorecvfrom(so) struct socket *so; { struct sockaddr_in addr; - int addrlen = sizeof(struct sockaddr_in); - + socklen_t addrlen = sizeof(struct sockaddr_in); + DEBUG_CALL("sorecvfrom"); DEBUG_ARG("so = %lx", (long)so); - + if (so->so_type == IPPROTO_ICMP) { /* This is a "ping" reply */ char buff[256]; int len; - - len = recvfrom(so->s, buff, 256, 0, + + len = recvfrom(so->s, buff, 256, 0, (struct sockaddr *)&addr, &addrlen); /* XXX Check if reply is "correct"? */ - + if(len == -1 || len == 0) { u_char code=ICMP_UNREACH_PORT; - if(errno == EHOSTUNREACH) code=ICMP_UNREACH_HOST; - else if(errno == ENETUNREACH) code=ICMP_UNREACH_NET; - + int error = WSAGetLastError(); + if(error == WSAEHOSTUNREACH) code=ICMP_UNREACH_HOST; + else if(error == WSAENETUNREACH) code=ICMP_UNREACH_NET; + DEBUG_MISC((dfd," udp icmp rx errno = %d-%s\n", errno,strerror(errno))); icmp_error(so->so_m, ICMP_UNREACH,code, 0,strerror(errno)); @@ -422,36 +431,38 @@ sorecvfrom(so) udp_detach(so); } else { /* A "normal" UDP packet */ struct mbuf *m; - int len, n; + u_int len; + ioctlsockopt_t n; if (!(m = m_get())) return; - m->m_data += IF_MAXLINKHDR; - - /* + m->m_data += if_maxlinkhdr; + + /* * XXX Shouldn't FIONREAD packets destined for port 53, * but I don't know the max packet size for DNS lookups */ len = M_FREEROOM(m); /* if (so->so_fport != htons(53)) { */ ioctlsocket(so->s, FIONREAD, &n); - + if (n > len) { n = (m->m_data - m->m_dat) + m->m_len + n + 1; m_inc(m, n); len = M_FREEROOM(m); } /* } */ - + m->m_len = recvfrom(so->s, m->m_data, len, 0, (struct sockaddr *)&addr, &addrlen); - DEBUG_MISC((dfd, " did recvfrom %d, errno = %d-%s\n", + DEBUG_MISC((dfd, " did recvfrom %zu, errno = %d-%s\n", m->m_len, errno,strerror(errno))); if(m->m_len<0) { u_char code=ICMP_UNREACH_PORT; - if(errno == EHOSTUNREACH) code=ICMP_UNREACH_HOST; - else if(errno == ENETUNREACH) code=ICMP_UNREACH_NET; - + int error = WSAGetLastError(); + if(error == WSAEHOSTUNREACH) code=ICMP_UNREACH_HOST; + else if(error == WSAENETUNREACH) code=ICMP_UNREACH_NET; + DEBUG_MISC((dfd," rx error, tx icmp ICMP_UNREACH:%i\n", code)); icmp_error(so->so_m, ICMP_UNREACH,code, 0,strerror(errno)); m_free(m); @@ -474,8 +485,8 @@ sorecvfrom(so) * m->m_len = 0; * } */ - - /* + + /* * If this packet was destined for CTL_ADDR, * make it look like that's where it came from, done by udp_output */ @@ -498,7 +509,7 @@ sosendto(so, m) DEBUG_CALL("sosendto"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("m = %lx", (long)m); - + addr.sin_family = AF_INET; if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) { /* It's an alias */ @@ -515,14 +526,16 @@ sosendto(so, m) addr.sin_addr = so->so_faddr; addr.sin_port = so->so_fport; - DEBUG_MISC((dfd, " sendto()ing, addr.sin_port=%d, addr.sin_addr.s_addr=%.16s\n", ntohs(addr.sin_port), inet_ntoa(addr.sin_addr))); - + char addrstr[INET_ADDRSTRLEN]; + DEBUG_MISC((dfd, " sendto()ing, addr.sin_port=%d, addr.sin_addr.s_addr=%.16s\n", + ntohs(addr.sin_port), inet_ntop(AF_INET, &addr.sin_addr, addrstr, sizeof(addrstr)))); + /* Don't care what port we get */ ret = sendto(so->s, m->m_data, m->m_len, 0, (struct sockaddr *)&addr, sizeof (struct sockaddr)); if (ret < 0) return -1; - + /* * Kill the socket if there's no reply in 4 minutes, * but only if it's an expirable socket @@ -545,58 +558,57 @@ solisten(port, laddr, lport, flags) { struct sockaddr_in addr; struct socket *so; - int s, addrlen = sizeof(addr), opt = 1; + int s; + socklen_t addrlen = sizeof(addr); + int opt = 1; DEBUG_CALL("solisten"); DEBUG_ARG("port = %d", port); DEBUG_ARG("laddr = %x", laddr); DEBUG_ARG("lport = %d", lport); DEBUG_ARG("flags = %x", flags); - + if ((so = socreate()) == NULL) { /* free(so); Not sofree() ??? free(NULL) == NOP */ return NULL; } - + /* Don't tcp_attach... we don't need so_snd nor so_rcv */ if ((so->so_tcpcb = tcp_newtcpcb(so)) == NULL) { free(so); return NULL; } insque(so,&tcb); - - /* + + /* * SS_FACCEPTONCE sockets must time out. */ if (flags & SS_FACCEPTONCE) so->so_tcpcb->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT*2; - + so->so_state = (SS_FACCEPTCONN|flags); so->so_lport = lport; /* Kept in network format */ so->so_laddr.s_addr = laddr; /* Ditto */ - + + memset(&addr, 0, sizeof(struct sockaddr_in)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_port = port; - + if (((s = socket(AF_INET,SOCK_STREAM,0)) < 0) || (setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int)) < 0) || (bind(s,(struct sockaddr *)&addr, sizeof(addr)) < 0) || (listen(s,1) < 0)) { - int tmperrno = errno; /* Don't clobber the real reason we failed */ - + int error = WSAGetLastError(); /* Don't clobber the real reason we failed */ + close(s); sofree(so); /* Restore the real errno */ -#ifdef _WIN32 - WSASetLastError(tmperrno); -#else - errno = tmperrno; -#endif + WSASetLastError(error); return NULL; } setsockopt(s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(int)); - + getsockname(s,(struct sockaddr *)&addr,&addrlen); so->so_fport = addr.sin_port; if (addr.sin_addr.s_addr == 0 || addr.sin_addr.s_addr == loopback_addr.s_addr) @@ -608,32 +620,30 @@ solisten(port, laddr, lport, flags) return so; } -#if 0 -/* +/* * Data is available in so_rcv * Just write() the data to the socket * XXX not yet... */ -static void +void sorwakeup(so) struct socket *so; { /* sowrite(so); */ /* FD_CLR(so->s,&writefds); */ } - + /* * Data has been freed in so_snd * We have room for a read() if we want to * For now, don't read, it'll be done in the main loop */ -static void +void sowwakeup(so) struct socket *so; { /* Nothing, yet */ } -#endif /* * Various session state calls @@ -658,8 +668,9 @@ soisfconnected(so) so->so_state |= SS_ISFCONNECTED; /* Clobber other states */ } -static void -sofcantrcvmore(struct socket *so) +void +sofcantrcvmore(so) + struct socket *so; { if ((so->so_state & SS_NOFDREF) == 0) { shutdown(so->s,0); @@ -674,8 +685,9 @@ sofcantrcvmore(struct socket *so) so->so_state |= SS_FCANTRCVMORE; } -static void -sofcantsendmore(struct socket *so) +void +sofcantsendmore(so) + struct socket *so; { if ((so->so_state & SS_NOFDREF) == 0) { shutdown(so->s,1); /* send FIN to fhost */ diff --git a/BasiliskII/src/slirp/socket.h b/BasiliskII/src/slirp/socket.h index 94fb8d8c..3b0fee16 100644 --- a/BasiliskII/src/slirp/socket.h +++ b/BasiliskII/src/slirp/socket.h @@ -1,7 +1,7 @@ /* * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -33,21 +33,21 @@ struct socket { struct in_addr so_laddr; /* local host table entry */ u_int16_t so_fport; /* foreign port */ u_int16_t so_lport; /* local port */ - + u_int8_t so_iptos; /* Type of service */ u_int8_t so_emu; /* Is the socket emulated? */ - + u_char so_type; /* Type of socket, UDP or TCP */ int so_state; /* internal state flags SS_*, below */ - + struct tcpcb *so_tcpcb; /* pointer to TCP protocol control block */ u_int so_expire; /* When the socket will expire */ - + int so_queued; /* Number of packets queued from this socket */ int so_nqueued; /* Number of packets queued in a row * Used to determine when to "downgrade" a session * from fastq to batchq */ - + struct sbuf so_rcv; /* Receive buffer */ struct sbuf so_snd; /* Send buffer */ void * extra; /* Extra pointer */ @@ -81,19 +81,24 @@ struct iovec { }; #endif -struct socket * solookup _P((struct socket *, struct in_addr, u_int, struct in_addr, u_int)); -struct socket * socreate _P((void)); -void sofree _P((struct socket *)); -int soread _P((struct socket *)); -void sorecvoob _P((struct socket *)); -int sosendoob _P((struct socket *)); -int sowrite _P((struct socket *)); -void sorecvfrom _P((struct socket *)); -int sosendto _P((struct socket *, struct mbuf *)); -struct socket * solisten _P((u_int, u_int32_t, u_int, int)); -void soisfconnecting _P((register struct socket *)); -void soisfconnected _P((register struct socket *)); -void soisfdisconnected _P((struct socket *)); -void sofwdrain _P((struct socket *)); +void so_init(void); +struct socket * solookup(struct socket *, struct in_addr, u_int, struct in_addr, u_int); +struct socket * socreate(void); +void sofree(struct socket *); +int soread(struct socket *); +void sorecvoob(struct socket *); +int sosendoob(struct socket *); +int sowrite(struct socket *); +void sorecvfrom(struct socket *); +int sosendto(struct socket *, struct mbuf *); +struct socket * solisten(u_int, u_int32_t, u_int, int); +void sorwakeup(struct socket *); +void sowwakeup(struct socket *); +void soisfconnecting(register struct socket *); +void soisfconnected(register struct socket *); +void sofcantrcvmore(struct socket *); +void sofcantsendmore(struct socket *); +void soisfdisconnected(struct socket *); +void sofwdrain(struct socket *); #endif /* _SOCKET_H_ */ diff --git a/BasiliskII/src/slirp/tcp.h b/BasiliskII/src/slirp/tcp.h index 11150766..24e7914a 100644 --- a/BasiliskII/src/slirp/tcp.h +++ b/BasiliskII/src/slirp/tcp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -42,6 +38,8 @@ typedef u_int32_t tcp_seq; #define PR_SLOWHZ 2 /* 2 slow timeouts per second (approx) */ #define PR_FASTHZ 5 /* 5 fast timeouts per second (not important) */ +extern size_t tcp_rcvspace; +extern size_t tcp_sndspace; extern struct socket *tcp_last_so; #define TCP_SNDSPACE 8192 @@ -51,16 +49,20 @@ extern struct socket *tcp_last_so; * TCP header. * Per RFC 793, September, 1981. */ +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(1) +#endif + struct tcphdr { u_int16_t th_sport; /* source port */ u_int16_t th_dport; /* destination port */ tcp_seq th_seq; /* sequence number */ tcp_seq th_ack; /* acknowledgement number */ #ifdef WORDS_BIGENDIAN - u_int th_off:4, /* data offset */ + u_char th_off:4, /* data offset */ th_x2:4; /* (unused) */ #else - u_int th_x2:4, /* (unused) */ + u_char th_x2:4, /* (unused) */ th_off:4; /* data offset */ #endif u_int8_t th_flags; @@ -73,7 +75,11 @@ struct tcphdr { u_int16_t th_win; /* window */ u_int16_t th_sum; /* checksum */ u_int16_t th_urp; /* urgent pointer */ -}; +} PACKED__; + +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(PACK_RESET) +#endif #include "tcp_var.h" @@ -170,6 +176,6 @@ struct tcphdr { extern tcp_seq tcp_iss; /* tcp initial send seq # */ -extern const char * const tcpstates[]; +extern char *tcpstates[]; #endif diff --git a/BasiliskII/src/slirp/tcp_input.c b/BasiliskII/src/slirp/tcp_input.c index 17a9387f..5c06f16f 100644 --- a/BasiliskII/src/slirp/tcp_input.c +++ b/BasiliskII/src/slirp/tcp_input.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -37,17 +33,18 @@ /* * Changes and additions relating to SLiRP * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ +#include #include #include "ip_icmp.h" struct socket tcb; -#define TCPREXMTTHRESH 3 +int tcprexmtthresh = 3; struct socket *tcp_last_so = &tcb; tcp_seq tcp_iss; /* tcp initial send seq # */ @@ -79,8 +76,8 @@ tcp_seq tcp_iss; /* tcp initial send seq # */ tp->t_flags |= TF_DELACK; \ (tp)->rcv_nxt += (ti)->ti_len; \ flags = (ti)->ti_flags & TH_FIN; \ - STAT(tcpstat.tcps_rcvpack++); \ - STAT(tcpstat.tcps_rcvbyte += (ti)->ti_len); \ + tcpstat.tcps_rcvpack++;\ + tcpstat.tcps_rcvbyte += (ti)->ti_len;\ if (so->so_emu) { \ if (tcp_emu((so),(m))) sbappend((so), (m)); \ } else \ @@ -99,8 +96,8 @@ tcp_seq tcp_iss; /* tcp initial send seq # */ tp->t_flags |= TF_DELACK; \ (tp)->rcv_nxt += (ti)->ti_len; \ flags = (ti)->ti_flags & TH_FIN; \ - STAT(tcpstat.tcps_rcvpack++); \ - STAT(tcpstat.tcps_rcvbyte += (ti)->ti_len); \ + tcpstat.tcps_rcvpack++;\ + tcpstat.tcps_rcvbyte += (ti)->ti_len;\ if (so->so_emu) { \ if (tcp_emu((so),(m))) sbappend(so, (m)); \ } else \ @@ -112,18 +109,14 @@ tcp_seq tcp_iss; /* tcp initial send seq # */ } \ } #endif -static void tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, - struct tcpiphdr *ti); -static void tcp_xmit_timer(register struct tcpcb *tp, int rtt); -static int -tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, - struct mbuf *m) +int +tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, struct mbuf *m) { register struct tcpiphdr *q; struct socket *so = tp->t_socket; int flags; - + /* * Call with ti==0 after become established to * force pre-ESTABLISHED data up to user socket. @@ -151,8 +144,8 @@ tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, i = q->ti_seq + q->ti_len - ti->ti_seq; if (i > 0) { if (i >= ti->ti_len) { - STAT(tcpstat.tcps_rcvduppack++); - STAT(tcpstat.tcps_rcvdupbyte += ti->ti_len); + tcpstat.tcps_rcvduppack++; + tcpstat.tcps_rcvdupbyte += ti->ti_len; m_freem(m); /* * Try to present any queued data @@ -168,8 +161,8 @@ tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, } q = (struct tcpiphdr *)(q->ti_next); } - STAT(tcpstat.tcps_rcvoopack++); - STAT(tcpstat.tcps_rcvoobyte += ti->ti_len); + tcpstat.tcps_rcvoopack++; + tcpstat.tcps_rcvoobyte += ti->ti_len; REASS_MBUF(ti) = (mbufp_32) m; /* XXX */ /* @@ -233,13 +226,9 @@ present: * TCP input routine, follows pages 65-76 of the * protocol specification dated September, 1981 very closely. */ -void -tcp_input(m, iphlen, inso) - register struct mbuf *m; - int iphlen; - struct socket *inso; +void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) { - struct ip save_ip, *ip; + struct ip save_ip, *ip; register struct tcpiphdr *ti; caddr_t optp = NULL; int optlen = 0; @@ -247,16 +236,18 @@ tcp_input(m, iphlen, inso) register struct tcpcb *tp = 0; register int tiflags; struct socket *so = 0; - int todrop, acked, ourfinisacked, needoutput = 0; -/* int dropsocket = 0; */ + int todrop; + u_int acked; + int ourfinisacked, needoutput = 0; + /* int dropsocket = 0; */ int iss = 0; u_long tiwin; int ret; -/* int ts_present = 0; */ + /* int ts_present = 0; */ DEBUG_CALL("tcp_input"); - DEBUG_ARGS((dfd," m = %8lx iphlen = %2d inso = %lx\n", - (long )m, iphlen, (long )inso )); + DEBUG_ARGS((dfd, " m = %8lx iphlen = %2d inso = %lx\n", + (long)m, iphlen, (long)inso)); /* * If called with m == 0, then we're continuing the connect @@ -276,15 +267,15 @@ tcp_input(m, iphlen, inso) } - STAT(tcpstat.tcps_rcvtotal++); + tcpstat.tcps_rcvtotal++; /* * Get IP and TCP header together in first mbuf. * Note: IP leaves IP header in first mbuf. */ ti = mtod(m, struct tcpiphdr *); - if (iphlen > sizeof(struct ip )) { - ip_stripoptions(m, (struct mbuf *)0); - iphlen=sizeof(struct ip ); + if (iphlen > sizeof(struct ip)) { + ip_stripoptions(m, (struct mbuf *)0); + iphlen = sizeof(struct ip); } /* XXX Check if too short */ @@ -293,24 +284,28 @@ tcp_input(m, iphlen, inso) * Save a copy of the IP header in case we want restore it * for sending an ICMP error message in response. */ - ip=mtod(m, struct ip *); + ip = mtod(m, struct ip *); save_ip = *ip; - save_ip.ip_len+= iphlen; + save_ip.ip_len += iphlen; /* * Checksum extended TCP header and data. */ tlen = ((struct ip *)ti)->ip_len; - ti->ti_next = ti->ti_prev = 0; + //ti->ti_next = ti->ti_prev = 0; + + tcpiphdr2qlink(ti)->next = tcpiphdr2qlink(ti)->prev = 0; + memset(&ti->ti_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr)); + ti->ti_x1 = 0; ti->ti_len = htons((u_int16_t)tlen); - len = sizeof(struct ip ) + tlen; + len = sizeof(struct ip) + tlen; /* keep checksum for ICMP reply * ti->ti_sum = cksum(m, len); * if (ti->ti_sum) { */ - if(cksum(m, len)) { - STAT(tcpstat.tcps_rcvbadsum++); - goto drop; + if (cksum(m, len)) { + tcpstat.tcps_rcvbadsum++; + goto drop; } /* @@ -318,15 +313,15 @@ tcp_input(m, iphlen, inso) * pull out TCP options and adjust length. XXX */ off = ti->ti_off << 2; - if (off < sizeof (struct tcphdr) || off > tlen) { - STAT(tcpstat.tcps_rcvbadoff++); - goto drop; + if (off < sizeof(struct tcphdr) || off > tlen) { + tcpstat.tcps_rcvbadoff++; + goto drop; } tlen -= off; ti->ti_len = tlen; - if (off > sizeof (struct tcphdr)) { - optlen = off - sizeof (struct tcphdr); - optp = mtod(m, caddr_t) + sizeof (struct tcpiphdr); + if (off > sizeof(struct tcphdr)) { + optlen = off - sizeof(struct tcphdr); + optp = mtod(m, caddr_t) + sizeof(struct tcpiphdr); /* * Do quick retrieval of timestamp options ("options @@ -335,17 +330,17 @@ tcp_input(m, iphlen, inso) * quickly get the values now and not bother calling * tcp_dooptions(), etc. */ -/* if ((optlen == TCPOLEN_TSTAMP_APPA || - * (optlen > TCPOLEN_TSTAMP_APPA && - * optp[TCPOLEN_TSTAMP_APPA] == TCPOPT_EOL)) && - * *(u_int32_t *)optp == htonl(TCPOPT_TSTAMP_HDR) && - * (ti->ti_flags & TH_SYN) == 0) { - * ts_present = 1; - * ts_val = ntohl(*(u_int32_t *)(optp + 4)); - * ts_ecr = ntohl(*(u_int32_t *)(optp + 8)); - * optp = NULL; / * we've parsed the options * / - * } - */ + /* if ((optlen == TCPOLEN_TSTAMP_APPA || + * (optlen > TCPOLEN_TSTAMP_APPA && + * optp[TCPOLEN_TSTAMP_APPA] == TCPOPT_EOL)) && + * *(u_int32_t *)optp == htonl(TCPOPT_TSTAMP_HDR) && + * (ti->ti_flags & TH_SYN) == 0) { + * ts_present = 1; + * ts_val = ntohl(*(u_int32_t *)(optp + 4)); + * ts_ecr = ntohl(*(u_int32_t *)(optp + 8)); + * optp = NULL; / * we've parsed the options * / + * } + */ } tiflags = ti->ti_flags; @@ -360,8 +355,8 @@ tcp_input(m, iphlen, inso) /* * Drop TCP, IP headers and TCP options. */ - m->m_data += sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); - m->m_len -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); + m->m_data += sizeof(struct tcpiphdr) + off - sizeof(struct tcphdr); + m->m_len -= sizeof(struct tcpiphdr) + off - sizeof(struct tcphdr); /* * Locate pcb for segment. @@ -369,14 +364,14 @@ tcp_input(m, iphlen, inso) findso: so = tcp_last_so; if (so->so_fport != ti->ti_dport || - so->so_lport != ti->ti_sport || - so->so_laddr.s_addr != ti->ti_src.s_addr || - so->so_faddr.s_addr != ti->ti_dst.s_addr) { + so->so_lport != ti->ti_sport || + so->so_laddr.s_addr != ti->ti_src.s_addr || + so->so_faddr.s_addr != ti->ti_dst.s_addr) { so = solookup(&tcb, ti->ti_src, ti->ti_sport, - ti->ti_dst, ti->ti_dport); + ti->ti_dst, ti->ti_dport); if (so) tcp_last_so = so; - STAT(tcpstat.tcps_socachemiss++); + ++tcpstat.tcps_socachemiss; } /* @@ -393,41 +388,41 @@ findso: * as if it was LISTENING, and continue... */ if (so == 0) { - if ((tiflags & (TH_SYN|TH_FIN|TH_RST|TH_URG|TH_ACK)) != TH_SYN) - goto dropwithreset; + if ((tiflags & (TH_SYN | TH_FIN | TH_RST | TH_URG | TH_ACK)) != TH_SYN) + goto dropwithreset; - if ((so = socreate()) == NULL) - goto dropwithreset; - if (tcp_attach(so) < 0) { - free(so); /* Not sofree (if it failed, it's not insqued) */ - goto dropwithreset; - } + if ((so = socreate()) == NULL) + goto dropwithreset; + if (tcp_attach(so) < 0) { + free(so); /* Not sofree (if it failed, it's not insqued) */ + goto dropwithreset; + } - sbreserve(&so->so_snd, TCP_SNDSPACE); - sbreserve(&so->so_rcv, TCP_RCVSPACE); + sbreserve(&so->so_snd, tcp_sndspace); + sbreserve(&so->so_rcv, tcp_rcvspace); - /* tcp_last_so = so; */ /* XXX ? */ - /* tp = sototcpcb(so); */ + /* tcp_last_so = so; */ /* XXX ? */ + /* tp = sototcpcb(so); */ - so->so_laddr = ti->ti_src; - so->so_lport = ti->ti_sport; - so->so_faddr = ti->ti_dst; - so->so_fport = ti->ti_dport; + so->so_laddr = ti->ti_src; + so->so_lport = ti->ti_sport; + so->so_faddr = ti->ti_dst; + so->so_fport = ti->ti_dport; - if ((so->so_iptos = tcp_tos(so)) == 0) - so->so_iptos = ((struct ip *)ti)->ip_tos; + if ((so->so_iptos = tcp_tos(so)) == 0) + so->so_iptos = ((struct ip *)ti)->ip_tos; - tp = sototcpcb(so); - tp->t_state = TCPS_LISTEN; + tp = sototcpcb(so); + tp->t_state = TCPS_LISTEN; } - /* - * If this is a still-connecting socket, this probably - * a retransmit of the SYN. Whether it's a retransmit SYN - * or something else, we nuke it. - */ - if (so->so_state & SS_ISFCONNECTING) - goto drop; + /* + * If this is a still-connecting socket, this probably + * a retransmit of the SYN. Whether it's a retransmit SYN + * or something else, we nuke it. + */ + if (so->so_state & SS_ISFCONNECTING) + goto drop; tp = sototcpcb(so); @@ -442,17 +437,17 @@ findso: * tiwin = ti->ti_win << tp->snd_scale; * else */ - tiwin = ti->ti_win; + tiwin = ti->ti_win; /* * Segment received on connection. * Reset idle time and keep-alive timer. */ tp->t_idle = 0; - if (SO_OPTIONS) - tp->t_timer[TCPT_KEEP] = TCPTV_KEEPINTVL; + if (so_options) + tp->t_timer[TCPT_KEEP] = tcp_keepintvl; else - tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_IDLE; + tp->t_timer[TCPT_KEEP] = tcp_keepidle; /* * Process options if not in LISTEN state, @@ -460,60 +455,60 @@ findso: */ if (optp && tp->t_state != TCPS_LISTEN) tcp_dooptions(tp, (u_char *)optp, optlen, ti); -/* , */ -/* &ts_present, &ts_val, &ts_ecr); */ + /* , */ + /* &ts_present, &ts_val, &ts_ecr); */ - /* - * Header prediction: check for the two common cases - * of a uni-directional data xfer. If the packet has - * no control flags, is in-sequence, the window didn't - * change and we're not retransmitting, it's a - * candidate. If the length is zero and the ack moved - * forward, we're the sender side of the xfer. Just - * free the data acked & wake any higher level process - * that was blocked waiting for space. If the length - * is non-zero and the ack didn't move, we're the - * receiver side. If we're getting packets in-order - * (the reassembly queue is empty), add the data to - * the socket buffer and note that we need a delayed ack. - * - * XXX Some of these tests are not needed - * eg: the tiwin == tp->snd_wnd prevents many more - * predictions.. with no *real* advantage.. - */ + /* + * Header prediction: check for the two common cases + * of a uni-directional data xfer. If the packet has + * no control flags, is in-sequence, the window didn't + * change and we're not retransmitting, it's a + * candidate. If the length is zero and the ack moved + * forward, we're the sender side of the xfer. Just + * free the data acked & wake any higher level process + * that was blocked waiting for space. If the length + * is non-zero and the ack didn't move, we're the + * receiver side. If we're getting packets in-order + * (the reassembly queue is empty), add the data to + * the socket buffer and note that we need a delayed ack. + * + * XXX Some of these tests are not needed + * eg: the tiwin == tp->snd_wnd prevents many more + * predictions.. with no *real* advantage.. + */ if (tp->t_state == TCPS_ESTABLISHED && - (tiflags & (TH_SYN|TH_FIN|TH_RST|TH_URG|TH_ACK)) == TH_ACK && -/* (!ts_present || TSTMP_GEQ(ts_val, tp->ts_recent)) && */ - ti->ti_seq == tp->rcv_nxt && - tiwin && tiwin == tp->snd_wnd && - tp->snd_nxt == tp->snd_max) { + (tiflags & (TH_SYN | TH_FIN | TH_RST | TH_URG | TH_ACK)) == TH_ACK && + /* (!ts_present || TSTMP_GEQ(ts_val, tp->ts_recent)) && */ + ti->ti_seq == tp->rcv_nxt && + tiwin && tiwin == tp->snd_wnd && + tp->snd_nxt == tp->snd_max) { /* * If last ACK falls within this segment's sequence numbers, * record the timestamp. */ -/* if (ts_present && SEQ_LEQ(ti->ti_seq, tp->last_ack_sent) && - * SEQ_LT(tp->last_ack_sent, ti->ti_seq + ti->ti_len)) { - * tp->ts_recent_age = tcp_now; - * tp->ts_recent = ts_val; - * } - */ + /* if (ts_present && SEQ_LEQ(ti->ti_seq, tp->last_ack_sent) && + * SEQ_LT(tp->last_ack_sent, ti->ti_seq + ti->ti_len)) { + * tp->ts_recent_age = tcp_now; + * tp->ts_recent = ts_val; + * } + */ if (ti->ti_len == 0) { if (SEQ_GT(ti->ti_ack, tp->snd_una) && - SEQ_LEQ(ti->ti_ack, tp->snd_max) && - tp->snd_cwnd >= tp->snd_wnd) { + SEQ_LEQ(ti->ti_ack, tp->snd_max) && + tp->snd_cwnd >= tp->snd_wnd) { /* * this is a pure ack for outstanding data. */ - STAT(tcpstat.tcps_predack++); -/* if (ts_present) - * tcp_xmit_timer(tp, tcp_now-ts_ecr+1); - * else - */ if (tp->t_rtt && - SEQ_GT(ti->ti_ack, tp->t_rtseq)) + ++tcpstat.tcps_predack; + /* if (ts_present) + * tcp_xmit_timer(tp, tcp_now-ts_ecr+1); + * else + */ if (tp->t_rtt && +SEQ_GT(ti->ti_ack, tp->t_rtseq)) tcp_xmit_timer(tp, tp->t_rtt); acked = ti->ti_ack - tp->snd_una; - STAT(tcpstat.tcps_rcvackpack++); - STAT(tcpstat.tcps_rcvackbyte += acked); + tcpstat.tcps_rcvackpack++; + tcpstat.tcps_rcvackbyte += acked; sbdrop(&so->so_snd, acked); tp->snd_una = ti->ti_ack; m_freem(m); @@ -536,37 +531,39 @@ findso: * There's room in so_snd, sowwakup will read() * from the socket if we can */ -/* if (so->so_snd.sb_flags & SB_NOTIFY) - * sowwakeup(so); - */ - /* - * This is called because sowwakeup might have - * put data into so_snd. Since we don't so sowwakeup, - * we don't need this.. XXX??? - */ + /* if (so->so_snd.sb_flags & SB_NOTIFY) + * sowwakeup(so); + */ + /* + * This is called because sowwakeup might have + * put data into so_snd. Since we don't so sowwakeup, + * we don't need this.. XXX??? + */ if (so->so_snd.sb_cc) (void) tcp_output(tp); return; } - } else if (ti->ti_ack == tp->snd_una && - tp->seg_next == (tcpiphdrp_32)tp && - ti->ti_len <= sbspace(&so->so_rcv)) { + } + else if (ti->ti_ack == tp->snd_una && + tp->seg_next == (tcpiphdrp_32)tp && + ti->ti_len <= sbspace(&so->so_rcv)) { /* * this is a pure, in-sequence data packet * with nothing on the reassembly queue and * we have enough buffer space to take it. */ - STAT(tcpstat.tcps_preddat++); + ++tcpstat.tcps_preddat; tp->rcv_nxt += ti->ti_len; - STAT(tcpstat.tcps_rcvpack++); - STAT(tcpstat.tcps_rcvbyte += ti->ti_len); + tcpstat.tcps_rcvpack++; + tcpstat.tcps_rcvbyte += ti->ti_len; /* * Add data to socket buffer. */ if (so->so_emu) { - if (tcp_emu(so,m)) sbappend(so, m); - } else + if (tcp_emu(so, m)) sbappend(so, m); + } + else sbappend(so, m); /* @@ -574,16 +571,16 @@ findso: * if we can actually write() to the socket * XXX Need to check? It's be NON_BLOCKING */ -/* sorwakeup(so); */ + /* sorwakeup(so); */ - /* - * If this is a short packet, then ACK now - with Nagel - * congestion avoidance sender won't send more until - * he gets an ACK. - * - * It is better to not delay acks at all to maximize - * TCP throughput. See RFC 2581. - */ + /* + * If this is a short packet, then ACK now - with Nagel + * congestion avoidance sender won't send more until + * he gets an ACK. + * + * It is better to not delay acks at all to maximize + * TCP throughput. See RFC 2581. + */ tp->t_flags |= TF_ACKNOW; tcp_output(tp); return; @@ -596,139 +593,145 @@ findso: * but not less than advertised window. */ { int win; - win = sbspace(&so->so_rcv); - if (win < 0) - win = 0; - tp->rcv_wnd = max(win, (int)(tp->rcv_adv - tp->rcv_nxt)); + win = sbspace(&so->so_rcv); + if (win < 0) + win = 0; + tp->rcv_wnd = max(win, (int)(tp->rcv_adv - tp->rcv_nxt)); } switch (tp->t_state) { - /* - * If the state is LISTEN then ignore segment if it contains an RST. - * If the segment contains an ACK then it is bad and send a RST. - * If it does not contain a SYN then it is not interesting; drop it. - * Don't bother responding if the destination was a broadcast. - * Otherwise initialize tp->rcv_nxt, and tp->irs, select an initial - * tp->iss, and send a segment: - * - * Also initialize tp->snd_nxt to tp->iss+1 and tp->snd_una to tp->iss. - * Fill in remote peer address fields if not previously specified. - * Enter SYN_RECEIVED state, and process any other fields of this - * segment in this state. - */ + /* + * If the state is LISTEN then ignore segment if it contains an RST. + * If the segment contains an ACK then it is bad and send a RST. + * If it does not contain a SYN then it is not interesting; drop it. + * Don't bother responding if the destination was a broadcast. + * Otherwise initialize tp->rcv_nxt, and tp->irs, select an initial + * tp->iss, and send a segment: + * + * Also initialize tp->snd_nxt to tp->iss+1 and tp->snd_una to tp->iss. + * Fill in remote peer address fields if not previously specified. + * Enter SYN_RECEIVED state, and process any other fields of this + * segment in this state. + */ case TCPS_LISTEN: { - if (tiflags & TH_RST) - goto drop; - if (tiflags & TH_ACK) - goto dropwithreset; - if ((tiflags & TH_SYN) == 0) - goto drop; + if (tiflags & TH_RST) + goto drop; + if (tiflags & TH_ACK) + goto dropwithreset; + if ((tiflags & TH_SYN) == 0) + goto drop; - /* - * This has way too many gotos... - * But a bit of spaghetti code never hurt anybody :) - */ + /* + * This has way too many gotos... + * But a bit of spaghetti code never hurt anybody :) + */ - /* - * If this is destined for the control address, then flag to - * tcp_ctl once connected, otherwise connect - */ - if ((so->so_faddr.s_addr&htonl(0xffffff00)) == special_addr.s_addr) { - int lastbyte=ntohl(so->so_faddr.s_addr) & 0xff; - if (lastbyte!=CTL_ALIAS && lastbyte!=CTL_DNS) { + /* + * If this is destined for the control address, then flag to + * tcp_ctl once connected, otherwise connect + */ + if ((so->so_faddr.s_addr&htonl(0xffffff00)) == special_addr.s_addr) { + int lastbyte = ntohl(so->so_faddr.s_addr) & 0xff; + if (lastbyte != CTL_ALIAS && lastbyte != CTL_DNS) { #if 0 - if(lastbyte==CTL_CMD || lastbyte==CTL_EXEC) { - /* Command or exec adress */ - so->so_state |= SS_CTL; - } else + if (lastbyte == CTL_CMD || lastbyte == CTL_EXEC) { + /* Command or exec adress */ + so->so_state |= SS_CTL; + } + else #endif - { - /* May be an add exec */ - struct ex_list *ex_ptr; - for(ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) { - if(ex_ptr->ex_fport == so->so_fport && - lastbyte == ex_ptr->ex_addr) { - so->so_state |= SS_CTL; - break; - } + { + /* May be an add exec */ + struct ex_list *ex_ptr; + for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) { + if (ex_ptr->ex_fport == so->so_fport && + lastbyte == ex_ptr->ex_addr) { + so->so_state |= SS_CTL; + break; + } + } + } + if (so->so_state & SS_CTL) goto cont_input; + } + /* CTL_ALIAS: Do nothing, tcp_fconnect will be called on it */ } - } - if(so->so_state & SS_CTL) goto cont_input; - } - /* CTL_ALIAS: Do nothing, tcp_fconnect will be called on it */ - } - if (so->so_emu & EMU_NOCONNECT) { - so->so_emu &= ~EMU_NOCONNECT; - goto cont_input; - } + if (so->so_emu & EMU_NOCONNECT) { + so->so_emu &= ~EMU_NOCONNECT; + goto cont_input; + } - if((tcp_fconnect(so) == -1) && (errno != EINPROGRESS) && (errno != EWOULDBLOCK)) { - u_char code=ICMP_UNREACH_NET; - DEBUG_MISC((dfd," tcp fconnect errno = %d-%s\n", - errno,strerror(errno))); - if(errno == ECONNREFUSED) { - /* ACK the SYN, send RST to refuse the connection */ - tcp_respond(tp, ti, m, ti->ti_seq+1, (tcp_seq)0, - TH_RST|TH_ACK); - } else { - if(errno == EHOSTUNREACH) code=ICMP_UNREACH_HOST; - HTONL(ti->ti_seq); /* restore tcp header */ - HTONL(ti->ti_ack); - HTONS(ti->ti_win); - HTONS(ti->ti_urp); - m->m_data -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); - m->m_len += sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); - *ip=save_ip; - icmp_error(m, ICMP_UNREACH,code, 0,strerror(errno)); - } - tp = tcp_close(tp); - m_free(m); - } else { - /* - * Haven't connected yet, save the current mbuf - * and ti, and return - * XXX Some OS's don't tell us whether the connect() - * succeeded or not. So we must time it out. - */ - so->so_m = m; - so->so_ti = ti; - tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; - tp->t_state = TCPS_SYN_RECEIVED; - } - return; + if (tcp_fconnect(so) == -1) { + int error = WSAGetLastError(); + if ((error != WSAEINPROGRESS) && (error != WSAEWOULDBLOCK)) { + u_char code = ICMP_UNREACH_NET; + DEBUG_MISC((dfd, " tcp fconnect errno = %d-%s\n", + errno, strerror(errno))); + if (error == WSAECONNREFUSED) { + /* ACK the SYN, send RST to refuse the connection */ + tcp_respond(tp, ti, m, ti->ti_seq + 1, (tcp_seq)0, + TH_RST | TH_ACK); + } + else { + if (error == WSAEHOSTUNREACH) code = ICMP_UNREACH_HOST; + HTONL(ti->ti_seq); /* restore tcp header */ + HTONL(ti->ti_ack); + HTONS(ti->ti_win); + HTONS(ti->ti_urp); + m->m_data -= sizeof(struct tcpiphdr) + off - sizeof(struct tcphdr); + m->m_len += sizeof(struct tcpiphdr) + off - sizeof(struct tcphdr); + *ip = save_ip; + icmp_error(m, ICMP_UNREACH, code, 0, strerror(errno)); + } + tp = tcp_close(tp); + m_free(m); + return; + } + } + + /* + * Haven't connected yet, save the current mbuf + * and ti, and return + * XXX Some OS's don't tell us whether the connect() + * succeeded or not. So we must time it out. + */ + so->so_m = m; + so->so_ti = ti; + tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; + tp->t_state = TCPS_SYN_RECEIVED; + return; cont_conn: - /* m==NULL - * Check if the connect succeeded - */ - if (so->so_state & SS_NOFDREF) { - tp = tcp_close(tp); - goto dropwithreset; - } + /* m==NULL + * Check if the connect succeeded + */ + if (so->so_state & SS_NOFDREF) { + tp = tcp_close(tp); + goto dropwithreset; + } cont_input: - tcp_template(tp); + tcp_template(tp); - if (optp) - tcp_dooptions(tp, (u_char *)optp, optlen, ti); - /* , */ - /* &ts_present, &ts_val, &ts_ecr); */ + if (optp) + tcp_dooptions(tp, (u_char *)optp, optlen, ti); + /* , */ + /* &ts_present, &ts_val, &ts_ecr); */ - if (iss) - tp->iss = iss; - else - tp->iss = tcp_iss; - tcp_iss += TCP_ISSINCR/2; - tp->irs = ti->ti_seq; - tcp_sendseqinit(tp); - tcp_rcvseqinit(tp); - tp->t_flags |= TF_ACKNOW; - tp->t_state = TCPS_SYN_RECEIVED; - tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; - STAT(tcpstat.tcps_accepts++); - goto trimthenstep6; + if (iss) + tp->iss = iss; + else + tp->iss = tcp_iss; + tcp_iss += TCP_ISSINCR / 2; + tp->irs = ti->ti_seq; + tcp_sendseqinit(tp); + tcp_rcvseqinit(tp); + tp->t_flags |= TF_ACKNOW; + tp->t_state = TCPS_SYN_RECEIVED; + tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; + tcpstat.tcps_accepts++; + goto trimthenstep6; } /* case TCPS_LISTEN */ /* @@ -745,13 +748,13 @@ findso: */ case TCPS_SYN_SENT: if ((tiflags & TH_ACK) && - (SEQ_LEQ(ti->ti_ack, tp->iss) || - SEQ_GT(ti->ti_ack, tp->snd_max))) + (SEQ_LEQ(ti->ti_ack, tp->iss) || + SEQ_GT(ti->ti_ack, tp->snd_max))) goto dropwithreset; if (tiflags & TH_RST) { if (tiflags & TH_ACK) - tp = tcp_drop(tp,0); /* XXX Check t_softerror! */ + tp = tcp_drop(tp, 0); /* XXX Check t_softerror! */ goto drop; } @@ -768,7 +771,7 @@ findso: tcp_rcvseqinit(tp); tp->t_flags |= TF_ACKNOW; if (tiflags & TH_ACK && SEQ_GT(tp->snd_una, tp->iss)) { - STAT(tcpstat.tcps_connects++); + tcpstat.tcps_connects++; soisfconnected(so); tp->t_state = TCPS_ESTABLISHED; @@ -779,7 +782,7 @@ findso: * tp->rcv_scale = tp->request_r_scale; * } */ - (void) tcp_reass(tp, (struct tcpiphdr *)0, + (void)tcp_reass(tp, (struct tcpiphdr *)0, (struct mbuf *)0); /* * if we didn't have to retransmit the SYN, @@ -787,10 +790,11 @@ findso: */ if (tp->t_rtt) tcp_xmit_timer(tp, tp->t_rtt); - } else + } + else tp->t_state = TCPS_SYN_RECEIVED; -trimthenstep6: + trimthenstep6: /* * Advance ti->ti_seq to correspond to first data byte. * If data, trim to stay within window, @@ -802,8 +806,8 @@ trimthenstep6: m_adj(m, -todrop); ti->ti_len = tp->rcv_wnd; tiflags &= ~TH_FIN; - STAT(tcpstat.tcps_rcvpackafterwin++); - STAT(tcpstat.tcps_rcvbyteafterwin += todrop); + tcpstat.tcps_rcvpackafterwin++; + tcpstat.tcps_rcvbyteafterwin += todrop; } tp->snd_wl1 = ti->ti_seq - 1; tp->rcv_up = ti->ti_seq; @@ -819,31 +823,31 @@ trimthenstep6: * RFC 1323 PAWS: If we have a timestamp reply on this segment * and it's less than ts_recent, drop it. */ -/* if (ts_present && (tiflags & TH_RST) == 0 && tp->ts_recent && - * TSTMP_LT(ts_val, tp->ts_recent)) { - * - */ /* Check to see if ts_recent is over 24 days old. */ -/* if ((int)(tcp_now - tp->ts_recent_age) > TCP_PAWS_IDLE) { - */ /* - * * Invalidate ts_recent. If this segment updates - * * ts_recent, the age will be reset later and ts_recent - * * will get a valid value. If it does not, setting - * * ts_recent to zero will at least satisfy the - * * requirement that zero be placed in the timestamp - * * echo reply when ts_recent isn't valid. The - * * age isn't reset until we get a valid ts_recent - * * because we don't want out-of-order segments to be - * * dropped when ts_recent is old. - * */ -/* tp->ts_recent = 0; - * } else { - * tcpstat.tcps_rcvduppack++; - * tcpstat.tcps_rcvdupbyte += ti->ti_len; - * tcpstat.tcps_pawsdrop++; - * goto dropafterack; - * } - * } - */ + /* if (ts_present && (tiflags & TH_RST) == 0 && tp->ts_recent && + * TSTMP_LT(ts_val, tp->ts_recent)) { + * + */ /* Check to see if ts_recent is over 24 days old. */ + /* if ((int)(tcp_now - tp->ts_recent_age) > TCP_PAWS_IDLE) { + */ /* + * * Invalidate ts_recent. If this segment updates + * * ts_recent, the age will be reset later and ts_recent + * * will get a valid value. If it does not, setting + * * ts_recent to zero will at least satisfy the + * * requirement that zero be placed in the timestamp + * * echo reply when ts_recent isn't valid. The + * * age isn't reset until we get a valid ts_recent + * * because we don't want out-of-order segments to be + * * dropped when ts_recent is old. + * */ + /* tp->ts_recent = 0; + * } else { + * tcpstat.tcps_rcvduppack++; + * tcpstat.tcps_rcvdupbyte += ti->ti_len; + * tcpstat.tcps_pawsdrop++; + * goto dropafterack; + * } + * } + */ todrop = tp->rcv_nxt - ti->ti_seq; if (todrop > 0) { @@ -860,7 +864,7 @@ trimthenstep6: * Following if statement from Stevens, vol. 2, p. 960. */ if (todrop > ti->ti_len - || (todrop == ti->ti_len && (tiflags & TH_FIN) == 0)) { + || (todrop == ti->ti_len && (tiflags & TH_FIN) == 0)) { /* * Any valid FIN must be to the left of the window. * At this point the FIN must be a duplicate or out @@ -874,11 +878,12 @@ trimthenstep6: */ tp->t_flags |= TF_ACKNOW; todrop = ti->ti_len; - STAT(tcpstat.tcps_rcvduppack++); - STAT(tcpstat.tcps_rcvdupbyte += todrop); - } else { - STAT(tcpstat.tcps_rcvpartduppack++); - STAT(tcpstat.tcps_rcvpartdupbyte += todrop); + tcpstat.tcps_rcvduppack++; + tcpstat.tcps_rcvdupbyte += todrop; + } + else { + tcpstat.tcps_rcvpartduppack++; + tcpstat.tcps_rcvpartdupbyte += todrop; } m_adj(m, todrop); ti->ti_seq += todrop; @@ -895,9 +900,9 @@ trimthenstep6: * user processes are gone, then RST the other end. */ if ((so->so_state & SS_NOFDREF) && - tp->t_state > TCPS_CLOSE_WAIT && ti->ti_len) { + tp->t_state > TCPS_CLOSE_WAIT && ti->ti_len) { tp = tcp_close(tp); - STAT(tcpstat.tcps_rcvafterclose++); + tcpstat.tcps_rcvafterclose++; goto dropwithreset; } @@ -905,11 +910,11 @@ trimthenstep6: * If segment ends after window, drop trailing data * (and PUSH and FIN); if nothing left, just ACK. */ - todrop = (ti->ti_seq+ti->ti_len) - (tp->rcv_nxt+tp->rcv_wnd); + todrop = (ti->ti_seq + ti->ti_len) - (tp->rcv_nxt + tp->rcv_wnd); if (todrop > 0) { - STAT(tcpstat.tcps_rcvpackafterwin++); + tcpstat.tcps_rcvpackafterwin++; if (todrop >= ti->ti_len) { - STAT(tcpstat.tcps_rcvbyteafterwin += ti->ti_len); + tcpstat.tcps_rcvbyteafterwin += ti->ti_len; /* * If a new connection request is received * while in TIME_WAIT, drop the old connection @@ -917,8 +922,8 @@ trimthenstep6: * are above the previous ones. */ if (tiflags & TH_SYN && - tp->t_state == TCPS_TIME_WAIT && - SEQ_GT(ti->ti_seq, tp->rcv_nxt)) { + tp->t_state == TCPS_TIME_WAIT && + SEQ_GT(ti->ti_seq, tp->rcv_nxt)) { iss = tp->rcv_nxt + TCP_ISSINCR; tp = tcp_close(tp); goto findso; @@ -932,54 +937,56 @@ trimthenstep6: */ if (tp->rcv_wnd == 0 && ti->ti_seq == tp->rcv_nxt) { tp->t_flags |= TF_ACKNOW; - STAT(tcpstat.tcps_rcvwinprobe++); - } else + tcpstat.tcps_rcvwinprobe++; + } + else goto dropafterack; - } else - STAT(tcpstat.tcps_rcvbyteafterwin += todrop); + } + else + tcpstat.tcps_rcvbyteafterwin += todrop; m_adj(m, -todrop); ti->ti_len -= todrop; - tiflags &= ~(TH_PUSH|TH_FIN); + tiflags &= ~(TH_PUSH | TH_FIN); } /* * If last ACK falls within this segment's sequence numbers, * record its timestamp. */ -/* if (ts_present && SEQ_LEQ(ti->ti_seq, tp->last_ack_sent) && - * SEQ_LT(tp->last_ack_sent, ti->ti_seq + ti->ti_len + - * ((tiflags & (TH_SYN|TH_FIN)) != 0))) { - * tp->ts_recent_age = tcp_now; - * tp->ts_recent = ts_val; - * } - */ + /* if (ts_present && SEQ_LEQ(ti->ti_seq, tp->last_ack_sent) && + * SEQ_LT(tp->last_ack_sent, ti->ti_seq + ti->ti_len + + * ((tiflags & (TH_SYN|TH_FIN)) != 0))) { + * tp->ts_recent_age = tcp_now; + * tp->ts_recent = ts_val; + * } + */ - /* - * If the RST bit is set examine the state: - * SYN_RECEIVED STATE: - * If passive open, return to LISTEN state. - * If active open, inform user that connection was refused. - * ESTABLISHED, FIN_WAIT_1, FIN_WAIT2, CLOSE_WAIT STATES: - * Inform user that connection was reset, and close tcb. - * CLOSING, LAST_ACK, TIME_WAIT STATES - * Close the tcb. - */ + /* + * If the RST bit is set examine the state: + * SYN_RECEIVED STATE: + * If passive open, return to LISTEN state. + * If active open, inform user that connection was refused. + * ESTABLISHED, FIN_WAIT_1, FIN_WAIT2, CLOSE_WAIT STATES: + * Inform user that connection was reset, and close tcb. + * CLOSING, LAST_ACK, TIME_WAIT STATES + * Close the tcb. + */ if (tiflags&TH_RST) switch (tp->t_state) { case TCPS_SYN_RECEIVED: -/* so->so_error = ECONNREFUSED; */ + /* so->so_error = ECONNREFUSED; */ goto close; case TCPS_ESTABLISHED: case TCPS_FIN_WAIT_1: case TCPS_FIN_WAIT_2: case TCPS_CLOSE_WAIT: -/* so->so_error = ECONNRESET; */ - close: - tp->t_state = TCPS_CLOSED; - STAT(tcpstat.tcps_drops++); - tp = tcp_close(tp); - goto drop; + /* so->so_error = ECONNRESET; */ + close: + tp->t_state = TCPS_CLOSED; + tcpstat.tcps_drops++; + tp = tcp_close(tp); + goto drop; case TCPS_CLOSING: case TCPS_LAST_ACK: @@ -993,7 +1000,7 @@ trimthenstep6: * error and we send an RST and drop the connection. */ if (tiflags & TH_SYN) { - tp = tcp_drop(tp,0); + tp = tcp_drop(tp, 0); goto dropwithreset; } @@ -1006,17 +1013,17 @@ trimthenstep6: * Ack processing. */ switch (tp->t_state) { - /* - * In SYN_RECEIVED state if the ack ACKs our SYN then enter - * ESTABLISHED state and continue processing, otherwise - * send an RST. una<=ack<=max - */ + /* + * In SYN_RECEIVED state if the ack ACKs our SYN then enter + * ESTABLISHED state and continue processing, otherwise + * send an RST. una<=ack<=max + */ case TCPS_SYN_RECEIVED: if (SEQ_GT(tp->snd_una, ti->ti_ack) || - SEQ_GT(ti->ti_ack, tp->snd_max)) + SEQ_GT(ti->ti_ack, tp->snd_max)) goto dropwithreset; - STAT(tcpstat.tcps_connects++); + tcpstat.tcps_connects++; tp->t_state = TCPS_ESTABLISHED; /* * The sent SYN is ack'ed with our sequence number +1 @@ -1025,21 +1032,24 @@ trimthenstep6: * SS_CTL since the buffer is empty otherwise. * tp->snd_una++; or: */ - tp->snd_una=ti->ti_ack; + tp->snd_una = ti->ti_ack; if (so->so_state & SS_CTL) { - /* So tcp_ctl reports the right state */ - ret = tcp_ctl(so); - if (ret == 1) { - soisfconnected(so); - so->so_state &= ~SS_CTL; /* success XXX */ - } else if (ret == 2) { - so->so_state = SS_NOFDREF; /* CTL_CMD */ - } else { - needoutput = 1; - tp->t_state = TCPS_FIN_WAIT_1; - } - } else { - soisfconnected(so); + /* So tcp_ctl reports the right state */ + ret = tcp_ctl(so); + if (ret == 1) { + soisfconnected(so); + so->so_state &= ~SS_CTL; /* success XXX */ + } + else if (ret == 2) { + so->so_state = SS_NOFDREF; /* CTL_CMD */ + } + else { + needoutput = 1; + tp->t_state = TCPS_FIN_WAIT_1; + } + } + else { + soisfconnected(so); } /* Do window scaling? */ @@ -1049,7 +1059,7 @@ trimthenstep6: * tp->rcv_scale = tp->request_r_scale; * } */ - (void) tcp_reass(tp, (struct tcpiphdr *)0, (struct mbuf *)0); + (void)tcp_reass(tp, (struct tcpiphdr *)0, (struct mbuf *)0); tp->snd_wl1 = ti->ti_seq - 1; /* Avoid ack processing; snd_una==ti_ack => dup ack */ goto synrx_to_est; @@ -1073,9 +1083,9 @@ trimthenstep6: if (SEQ_LEQ(ti->ti_ack, tp->snd_una)) { if (ti->ti_len == 0 && tiwin == tp->snd_wnd) { - STAT(tcpstat.tcps_rcvdupack++); - DEBUG_MISC((dfd," dup ack m = %lx so = %lx \n", - (long )m, (long )so)); + tcpstat.tcps_rcvdupack++; + DEBUG_MISC((dfd, " dup ack m = %lx so = %lx \n", + (long)m, (long)so)); /* * If we have outstanding data (other than * a window probe), this is a completely @@ -1101,12 +1111,12 @@ trimthenstep6: * network. */ if (tp->t_timer[TCPT_REXMT] == 0 || - ti->ti_ack != tp->snd_una) + ti->ti_ack != tp->snd_una) tp->t_dupacks = 0; - else if (++tp->t_dupacks == TCPREXMTTHRESH) { + else if (++tp->t_dupacks == tcprexmtthresh) { tcp_seq onxt = tp->snd_nxt; u_int win = - min(tp->snd_wnd, tp->snd_cwnd) / 2 / + min(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_maxseg; if (win < 2) @@ -1116,18 +1126,20 @@ trimthenstep6: tp->t_rtt = 0; tp->snd_nxt = ti->ti_ack; tp->snd_cwnd = tp->t_maxseg; - (void) tcp_output(tp); + (void)tcp_output(tp); tp->snd_cwnd = tp->snd_ssthresh + - tp->t_maxseg * tp->t_dupacks; + tp->t_maxseg * tp->t_dupacks; if (SEQ_GT(onxt, tp->snd_nxt)) tp->snd_nxt = onxt; goto drop; - } else if (tp->t_dupacks > TCPREXMTTHRESH) { + } + else if (tp->t_dupacks > tcprexmtthresh) { tp->snd_cwnd += tp->t_maxseg; - (void) tcp_output(tp); + (void)tcp_output(tp); goto drop; } - } else + } + else tp->t_dupacks = 0; break; } @@ -1136,17 +1148,17 @@ trimthenstep6: * If the congestion window was inflated to account * for the other side's cached packets, retract it. */ - if (tp->t_dupacks > TCPREXMTTHRESH && - tp->snd_cwnd > tp->snd_ssthresh) + if (tp->t_dupacks > tcprexmtthresh && + tp->snd_cwnd > tp->snd_ssthresh) tp->snd_cwnd = tp->snd_ssthresh; tp->t_dupacks = 0; if (SEQ_GT(ti->ti_ack, tp->snd_max)) { - STAT(tcpstat.tcps_rcvacktoomuch++); + tcpstat.tcps_rcvacktoomuch++; goto dropafterack; } acked = ti->ti_ack - tp->snd_una; - STAT(tcpstat.tcps_rcvackpack++); - STAT(tcpstat.tcps_rcvackbyte += acked); + tcpstat.tcps_rcvackpack++; + tcpstat.tcps_rcvackbyte += acked; /* * If we have a timestamp reply, update smoothed @@ -1157,12 +1169,12 @@ trimthenstep6: * timer backoff (cf., Phil Karn's retransmit alg.). * Recompute the initial retransmit timer. */ -/* if (ts_present) - * tcp_xmit_timer(tp, tcp_now-ts_ecr+1); - * else - */ - if (tp->t_rtt && SEQ_GT(ti->ti_ack, tp->t_rtseq)) - tcp_xmit_timer(tp,tp->t_rtt); + /* if (ts_present) + * tcp_xmit_timer(tp, tcp_now-ts_ecr+1); + * else + */ + if (tp->t_rtt && SEQ_GT(ti->ti_ack, tp->t_rtseq)) + tcp_xmit_timer(tp, tp->t_rtt); /* * If all outstanding data is acked, stop retransmit @@ -1173,7 +1185,8 @@ trimthenstep6: if (ti->ti_ack == tp->snd_max) { tp->t_timer[TCPT_REXMT] = 0; needoutput = 1; - } else if (tp->t_timer[TCPT_PERSIST] == 0) + } + else if (tp->t_timer[TCPT_PERSIST] == 0) tp->t_timer[TCPT_REXMT] = tp->t_rxtcur; /* * When new data is acked, open the congestion window. @@ -1183,18 +1196,19 @@ trimthenstep6: * (maxseg^2 / cwnd per packet). */ { - register u_int cw = tp->snd_cwnd; - register u_int incr = tp->t_maxseg; + register u_int cw = tp->snd_cwnd; + register u_int incr = tp->t_maxseg; - if (cw > tp->snd_ssthresh) - incr = incr * incr / cw; - tp->snd_cwnd = min(cw + incr, TCP_MAXWIN<snd_scale); + if (cw > tp->snd_ssthresh) + incr = incr * incr / cw; + tp->snd_cwnd = min(cw + incr, (u_int32_t) (TCP_MAXWIN << tp->snd_scale)); } if (acked > so->so_snd.sb_cc) { tp->snd_wnd -= so->so_snd.sb_cc; - sbdrop(&so->so_snd, (int )so->so_snd.sb_cc); + sbdrop(&so->so_snd, so->so_snd.sb_cc); ourfinisacked = 1; - } else { + } + else { sbdrop(&so->so_snd, acked); tp->snd_wnd -= acked; ourfinisacked = 0; @@ -1203,20 +1217,20 @@ trimthenstep6: * XXX sowwakup is called when data is acked and there's room for * for more data... it should read() the socket */ -/* if (so->so_snd.sb_flags & SB_NOTIFY) - * sowwakeup(so); - */ + /* if (so->so_snd.sb_flags & SB_NOTIFY) + * sowwakeup(so); + */ tp->snd_una = ti->ti_ack; if (SEQ_LT(tp->snd_nxt, tp->snd_una)) tp->snd_nxt = tp->snd_una; switch (tp->t_state) { - /* - * In FIN_WAIT_1 STATE in addition to the processing - * for the ESTABLISHED state if our FIN is now acknowledged - * then enter FIN_WAIT_2. - */ + /* + * In FIN_WAIT_1 STATE in addition to the processing + * for the ESTABLISHED state if our FIN is now acknowledged + * then enter FIN_WAIT_2. + */ case TCPS_FIN_WAIT_1: if (ourfinisacked) { /* @@ -1228,18 +1242,18 @@ trimthenstep6: */ if (so->so_state & SS_FCANTRCVMORE) { soisfdisconnected(so); - tp->t_timer[TCPT_2MSL] = TCP_MAXIDLE; + tp->t_timer[TCPT_2MSL] = tcp_maxidle; } tp->t_state = TCPS_FIN_WAIT_2; } break; - /* - * In CLOSING STATE in addition to the processing for - * the ESTABLISHED state if the ACK acknowledges our FIN - * then enter the TIME-WAIT state, otherwise ignore - * the segment. - */ + /* + * In CLOSING STATE in addition to the processing for + * the ESTABLISHED state if the ACK acknowledges our FIN + * then enter the TIME-WAIT state, otherwise ignore + * the segment. + */ case TCPS_CLOSING: if (ourfinisacked) { tp->t_state = TCPS_TIME_WAIT; @@ -1249,12 +1263,12 @@ trimthenstep6: } break; - /* - * In LAST_ACK, we may still be waiting for data to drain - * and/or to be acked, as well as for the ack of our FIN. - * If our FIN is now acknowledged, delete the TCB, - * enter the closed state and return. - */ + /* + * In LAST_ACK, we may still be waiting for data to drain + * and/or to be acked, as well as for the ack of our FIN. + * If our FIN is now acknowledged, delete the TCB, + * enter the closed state and return. + */ case TCPS_LAST_ACK: if (ourfinisacked) { tp = tcp_close(tp); @@ -1262,11 +1276,11 @@ trimthenstep6: } break; - /* - * In TIME_WAIT state the only thing that should arrive - * is a retransmission of the remote FIN. Acknowledge - * it and restart the finack timer. - */ + /* + * In TIME_WAIT state the only thing that should arrive + * is a retransmission of the remote FIN. Acknowledge + * it and restart the finack timer. + */ case TCPS_TIME_WAIT: tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL; goto dropafterack; @@ -1279,13 +1293,13 @@ step6: * Don't look at window if no ACK: TAC's send garbage on first SYN. */ if ((tiflags & TH_ACK) && - (SEQ_LT(tp->snd_wl1, ti->ti_seq) || - (tp->snd_wl1 == ti->ti_seq && (SEQ_LT(tp->snd_wl2, ti->ti_ack) || - (tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd))))) { + (SEQ_LT(tp->snd_wl1, ti->ti_seq) || + (tp->snd_wl1 == ti->ti_seq && (SEQ_LT(tp->snd_wl2, ti->ti_ack) || + (tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd))))) { /* keep track of pure window updates */ if (ti->ti_len == 0 && - tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd) - STAT(tcpstat.tcps_rcvwinupd++); + tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd) + tcpstat.tcps_rcvwinupd++; tp->snd_wnd = tiwin; tp->snd_wl1 = ti->ti_seq; tp->snd_wl2 = ti->ti_ack; @@ -1298,7 +1312,7 @@ step6: * Process segments with URG. */ if ((tiflags & TH_URG) && ti->ti_urp && - TCPS_HAVERCVDFIN(tp->t_state) == 0) { + TCPS_HAVERCVDFIN(tp->t_state) == 0) { /* * This is a kludge, but if we receive and accept * random urgent pointers, we'll crash in @@ -1324,21 +1338,22 @@ step6: * of data past the urgent section as the original * spec states (in one of two places). */ - if (SEQ_GT(ti->ti_seq+ti->ti_urp, tp->rcv_up)) { + if (SEQ_GT(ti->ti_seq + ti->ti_urp, tp->rcv_up)) { tp->rcv_up = ti->ti_seq + ti->ti_urp; - so->so_urgc = so->so_rcv.sb_cc + + so->so_urgc = so->so_rcv.sb_cc + (tp->rcv_up - tp->rcv_nxt); /* -1; */ tp->rcv_up = ti->ti_seq + ti->ti_urp; } - } else + } + else /* * If no out of band data is expected, * pull receive urgent pointer along * with the receive window. */ if (SEQ_GT(tp->rcv_nxt, tp->rcv_up)) - tp->rcv_up = tp->rcv_nxt; + tp->rcv_up = tp->rcv_nxt; dodata: /* @@ -1350,7 +1365,7 @@ dodata: * connection then we just ignore the text. */ if ((ti->ti_len || (tiflags&TH_FIN)) && - TCPS_HAVERCVDFIN(tp->t_state) == 0) { + TCPS_HAVERCVDFIN(tp->t_state) == 0) { TCP_REASS(tp, ti, m, so, tiflags); /* * Note the amount of data that peer has sent into @@ -1358,7 +1373,8 @@ dodata: * buffer size. */ len = so->so_rcv.sb_datalen - (tp->rcv_adv - tp->rcv_nxt); - } else { + } + else { m_free(m); tiflags &= ~TH_FIN; } @@ -1372,13 +1388,13 @@ dodata: /* * If we receive a FIN we can't send more data, * set it SS_FDRAIN - * Shutdown the socket if there is no rx data in the + * Shutdown the socket if there is no rx data in the * buffer. * soread() is called on completion of shutdown() and * will got to TCPS_LAST_ACK, and use tcp_output() * to send the FIN. */ -/* sofcantrcvmore(so); */ + /* sofcantrcvmore(so); */ sofwdrain(so); tp->t_flags |= TF_ACKNOW; @@ -1386,31 +1402,31 @@ dodata: } switch (tp->t_state) { - /* - * In SYN_RECEIVED and ESTABLISHED STATES - * enter the CLOSE_WAIT state. - */ + /* + * In SYN_RECEIVED and ESTABLISHED STATES + * enter the CLOSE_WAIT state. + */ case TCPS_SYN_RECEIVED: case TCPS_ESTABLISHED: - if(so->so_emu == EMU_CTL) /* no shutdown on socket */ - tp->t_state = TCPS_LAST_ACK; - else - tp->t_state = TCPS_CLOSE_WAIT; - break; + if (so->so_emu == EMU_CTL) /* no shutdown on socket */ + tp->t_state = TCPS_LAST_ACK; + else + tp->t_state = TCPS_CLOSE_WAIT; + break; - /* - * If still in FIN_WAIT_1 STATE FIN has not been acked so - * enter the CLOSING state. - */ + /* + * If still in FIN_WAIT_1 STATE FIN has not been acked so + * enter the CLOSING state. + */ case TCPS_FIN_WAIT_1: tp->t_state = TCPS_CLOSING; break; - /* - * In FIN_WAIT_2 state enter the TIME_WAIT state, - * starting the time-wait timer, turning off the other - * standard timers. - */ + /* + * In FIN_WAIT_2 state enter the TIME_WAIT state, + * starting the time-wait timer, turning off the other + * standard timers. + */ case TCPS_FIN_WAIT_2: tp->t_state = TCPS_TIME_WAIT; tcp_canceltimers(tp); @@ -1418,9 +1434,9 @@ dodata: soisfdisconnected(so); break; - /* - * In TIME_WAIT state restart the 2 MSL time_wait timer. - */ + /* + * In TIME_WAIT state restart the 2 MSL time_wait timer. + */ case TCPS_TIME_WAIT: tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL; break; @@ -1434,15 +1450,15 @@ dodata: * * See above. */ -/* if (ti->ti_len && (unsigned)ti->ti_len < tp->t_maxseg) { - */ -/* if ((ti->ti_len && (unsigned)ti->ti_len < tp->t_maxseg && - * (so->so_iptos & IPTOS_LOWDELAY) == 0) || - * ((so->so_iptos & IPTOS_LOWDELAY) && - * ((struct tcpiphdr_2 *)ti)->first_char == (char)27)) { - */ + /* if (ti->ti_len && (unsigned)ti->ti_len < tp->t_maxseg) { + */ + /* if ((ti->ti_len && (unsigned)ti->ti_len < tp->t_maxseg && + * (so->so_iptos & IPTOS_LOWDELAY) == 0) || + * ((so->so_iptos & IPTOS_LOWDELAY) && + * ((struct tcpiphdr_2 *)ti)->first_char == (char)27)) { + */ if (ti->ti_len && (unsigned)ti->ti_len <= 5 && - ((struct tcpiphdr_2 *)ti)->first_char == (char)27) { + ((struct tcpiphdr_2 *)ti)->first_char == (char)27) { tp->t_flags |= TF_ACKNOW; } @@ -1450,7 +1466,7 @@ dodata: * Return any desired output. */ if (needoutput || (tp->t_flags & TF_ACKNOW)) { - (void) tcp_output(tp); + (void)tcp_output(tp); } return; @@ -1463,7 +1479,7 @@ dropafterack: goto drop; m_freem(m); tp->t_flags |= TF_ACKNOW; - (void) tcp_output(tp); + (void)tcp_output(tp); return; dropwithreset: @@ -1472,8 +1488,8 @@ dropwithreset: tcp_respond(tp, ti, m, (tcp_seq)0, ti->ti_ack, TH_RST); else { if (tiflags & TH_SYN) ti->ti_len++; - tcp_respond(tp, ti, m, ti->ti_seq+ti->ti_len, (tcp_seq)0, - TH_RST|TH_ACK); + tcp_respond(tp, ti, m, ti->ti_seq + ti->ti_len, (tcp_seq)0, + TH_RST | TH_ACK); } return; @@ -1491,7 +1507,7 @@ drop: /* int *ts_present; * u_int32_t *ts_val, *ts_ecr; */ -static void +void tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti) { u_int16_t mss; @@ -1523,7 +1539,7 @@ tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti) continue; memcpy((char *) &mss, (char *) cp + 2, sizeof(mss)); NTOHS(mss); - (void) tcp_mss(tp, mss); /* sets t_maxseg */ + tcp_mss(tp, mss); /* sets t_maxseg */ break; /* case TCPOPT_WINDOW: @@ -1544,7 +1560,7 @@ tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti) * memcpy((char *) ts_ecr, (char *)cp + 6, sizeof(*ts_ecr)); * NTOHL(*ts_ecr); * - */ /* + */ /* * * A timestamp received in a SYN makes * * it ok to send timestamp requests and replies. * */ @@ -1568,14 +1584,10 @@ tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti) #ifdef notdef -void -tcp_pulloutofband(so, ti, m) - struct socket *so; - struct tcpiphdr *ti; - register struct mbuf *m; +void tcp_pulloutofband(struct socket *so, struct tcpiphdr *ti, register struct mbuf *m) { int cnt = ti->ti_urp - 1; - + while (cnt >= 0) { if (m->m_len > cnt) { char *cp = mtod(m, caddr_t) + cnt; @@ -1602,16 +1614,15 @@ tcp_pulloutofband(so, ti, m) * and update averages and current timeout. */ -static void -tcp_xmit_timer(register struct tcpcb *tp, int rtt) +void tcp_xmit_timer(register struct tcpcb *tp, int rtt) { register short delta; DEBUG_CALL("tcp_xmit_timer"); DEBUG_ARG("tp = %lx", (long)tp); DEBUG_ARG("rtt = %d", rtt); - - STAT(tcpstat.tcps_rttupdated++); + + tcpstat.tcps_rttupdated++; if (tp->t_srtt != 0) { /* * srtt is stored as fixed point with 3 bits after the @@ -1639,7 +1650,7 @@ tcp_xmit_timer(register struct tcpcb *tp, int rtt) if ((tp->t_rttvar += delta) <= 0) tp->t_rttvar = 1; } else { - /* + /* * No rtt measurement yet - use the unsmoothed rtt. * Set the variance to half the rtt (so our first * retransmit happens at 3*rtt). @@ -1663,7 +1674,7 @@ tcp_xmit_timer(register struct tcpcb *tp, int rtt) */ TCPT_RANGESET(tp->t_rxtcur, TCP_REXMTVAL(tp), (short)tp->t_rttmin, TCPTV_REXMTMAX); /* XXX */ - + /* * We received an ack for a packet that wasn't retransmitted; * it is probably safe to discard any error indications we've @@ -1690,35 +1701,28 @@ tcp_xmit_timer(register struct tcpcb *tp, int rtt) * parameters from pre-set or cached values in the routing entry. */ -int -tcp_mss(tp, offer) - register struct tcpcb *tp; - u_int offer; +u_int tcp_mss(register struct tcpcb *tp, u_int offer) { struct socket *so = tp->t_socket; - int mss; - + u_int mss; + DEBUG_CALL("tcp_mss"); DEBUG_ARG("tp = %lx", (long)tp); DEBUG_ARG("offer = %d", offer); - - mss = min(IF_MTU, IF_MRU) - sizeof(struct tcpiphdr); + + mss = min(if_mtu, if_mru) - sizeof(struct tcpiphdr); if (offer) mss = min(mss, offer); mss = max(mss, 32); if (mss < tp->t_maxseg || offer != 0) tp->t_maxseg = mss; - + tp->snd_cwnd = mss; - - sbreserve(&so->so_snd, TCP_SNDSPACE + ((TCP_SNDSPACE % mss) ? - (mss - (TCP_SNDSPACE % mss)) : - 0)); - sbreserve(&so->so_rcv, TCP_RCVSPACE + ((TCP_RCVSPACE % mss) ? - (mss - (TCP_RCVSPACE % mss)) : - 0)); - + + sbreserve(&so->so_snd, tcp_sndspace+((tcp_sndspace%mss)?(mss-(tcp_sndspace%mss)):0)); + sbreserve(&so->so_rcv, tcp_rcvspace+((tcp_rcvspace%mss)?(mss-(tcp_rcvspace%mss)):0)); + DEBUG_MISC((dfd, " returning mss = %d\n", mss)); - + return mss; } diff --git a/BasiliskII/src/slirp/tcp_output.c b/BasiliskII/src/slirp/tcp_output.c index dba4ed7a..01df0118 100644 --- a/BasiliskII/src/slirp/tcp_output.c +++ b/BasiliskII/src/slirp/tcp_output.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -37,8 +33,8 @@ /* * Changes and additions relating to SLiRP * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ @@ -48,16 +44,16 @@ * Since this is only used in "stats socket", we give meaning * names instead of the REAL names */ -const char * const tcpstates[] = { +char *tcpstates[] = { /* "CLOSED", "LISTEN", "SYN_SENT", "SYN_RCVD", */ "REDIRECT", "LISTEN", "SYN_SENT", "SYN_RCVD", "ESTABLISHED", "CLOSE_WAIT", "FIN_WAIT_1", "CLOSING", "LAST_ACK", "FIN_WAIT_2", "TIME_WAIT", }; -static const u_char tcp_outflags[TCP_NSTATES] = { +u_char tcp_outflags[TCP_NSTATES] = { TH_RST|TH_ACK, 0, TH_SYN, TH_SYN|TH_ACK, - TH_ACK, TH_ACK, TH_FIN|TH_ACK, TH_FIN|TH_ACK, + TH_ACK, TH_ACK, TH_FIN|TH_ACK, TH_FIN|TH_ACK, TH_FIN|TH_ACK, TH_ACK, TH_ACK, }; @@ -67,9 +63,7 @@ static const u_char tcp_outflags[TCP_NSTATES] = { /* * Tcp output routine: figure out what should be sent and send it. */ -int -tcp_output(tp) - register struct tcpcb *tp; +int tcp_output(register struct tcpcb *tp) { register struct socket *so = tp->t_socket; register long len, win; @@ -79,10 +73,10 @@ tcp_output(tp) u_char opt[MAX_TCPOPTLEN]; unsigned optlen, hdrlen; int idle, sendalot; - + DEBUG_CALL("tcp_output"); DEBUG_ARG("tp = %lx", (long )tp); - + /* * Determine length of data that should be transmitted, * and flags that will be used. @@ -103,9 +97,9 @@ again: win = min(tp->snd_wnd, tp->snd_cwnd); flags = tcp_outflags[tp->t_state]; - + DEBUG_MISC((dfd, " --- tcp_output flags = 0x%x\n",flags)); - + /* * If in persist timeout with window of 0, send 1 byte. * Otherwise, if window is small but nonzero @@ -130,7 +124,7 @@ again: * to send then the probe will be the FIN * itself. */ - if (off < so->so_snd.sb_cc) + if (off < (int)so->so_snd.sb_cc) flags &= ~TH_FIN; win = 1; } else { @@ -158,7 +152,7 @@ again: tp->snd_nxt = tp->snd_una; } } - + if (len > tp->t_maxseg) { len = tp->t_maxseg; sendalot = 1; @@ -200,17 +194,17 @@ again: * window, then want to send a window update to peer. */ if (win > 0) { - /* + /* * "adv" is the amount we can increase the window, * taking into account that we are limited by * TCP_MAXWIN << tp->rcv_scale. */ - long adv = min(win, (long)TCP_MAXWIN << tp->rcv_scale) - + long adv = min(win, TCP_MAXWIN << tp->rcv_scale) - (tp->rcv_adv - tp->rcv_nxt); - if (adv >= (long) (2 * tp->t_maxseg)) + if (adv >= (long)(2 * tp->t_maxseg)) goto send; - if (2 * adv >= (long) so->so_rcv.sb_datalen) + if (2 * adv >= (long)so->so_rcv.sb_datalen) goto send; } @@ -263,8 +257,8 @@ again: /* * No reason to send a segment, just return. */ - STAT(tcpstat.tcps_didnuttin++); - + tcpstat.tcps_didnuttin++; + return (0); send: @@ -302,9 +296,9 @@ send: */ } } - + /* - * Send a timestamp and echo-reply if this is a SYN and our side + * Send a timestamp and echo-reply if this is a SYN and our side * wants to use timestamps (TF_REQ_TSTMP is set) or both our side * and our peer have sent timestamps in our SYN's. */ @@ -322,7 +316,7 @@ send: * } */ hdrlen += optlen; - + /* * Adjust data length if insertion of options will * bump the packet length beyond the t_maxseg length. @@ -339,13 +333,13 @@ send: */ if (len) { if (tp->t_force && len == 1) - STAT(tcpstat.tcps_sndprobe++); + tcpstat.tcps_sndprobe++; else if (SEQ_LT(tp->snd_nxt, tp->snd_max)) { - STAT(tcpstat.tcps_sndrexmitpack++); - STAT(tcpstat.tcps_sndrexmitbyte += len); + tcpstat.tcps_sndrexmitpack++; + tcpstat.tcps_sndrexmitbyte += len; } else { - STAT(tcpstat.tcps_sndpack++); - STAT(tcpstat.tcps_sndbyte += len); + tcpstat.tcps_sndpack++; + tcpstat.tcps_sndbyte += len; } m = m_get(); @@ -354,16 +348,16 @@ send: error = 1; goto out; } - m->m_data += IF_MAXLINKHDR; + m->m_data += if_maxlinkhdr; m->m_len = hdrlen; - - /* + + /* * This will always succeed, since we make sure our mbufs * are big enough to hold one MSS packet + header + ... etc. */ /* if (len <= MHLEN - hdrlen - max_linkhdr) { */ - sbcopy(&so->so_snd, off, (int) len, mtod(m, caddr_t) + hdrlen); + sbcopy(&so->so_snd, off, len, mtod(m, caddr_t) + hdrlen); m->m_len += len; /* } else { @@ -382,13 +376,13 @@ send: flags |= TH_PUSH; } else { if (tp->t_flags & TF_ACKNOW) - STAT(tcpstat.tcps_sndacks++); + tcpstat.tcps_sndacks++; else if (flags & (TH_SYN|TH_FIN|TH_RST)) - STAT(tcpstat.tcps_sndctrl++); + tcpstat.tcps_sndctrl++; else if (SEQ_GT(tp->snd_up, tp->snd_una)) - STAT(tcpstat.tcps_sndurg++); + tcpstat.tcps_sndurg++; else - STAT(tcpstat.tcps_sndwinup++); + tcpstat.tcps_sndwinup++; m = m_get(); if (m == NULL) { @@ -396,12 +390,12 @@ send: error = 1; goto out; } - m->m_data += IF_MAXLINKHDR; + m->m_data += if_maxlinkhdr; m->m_len = hdrlen; } ti = mtod(m, struct tcpiphdr *); - + memcpy((caddr_t)ti, &tp->t_template, sizeof (struct tcpiphdr)); /* @@ -409,7 +403,7 @@ send: * window for use in delaying messages about window sizes. * If resending a FIN, be sure not to use a new sequence number. */ - if (flags & TH_FIN && tp->t_flags & TF_SENTFIN && + if (flags & TH_FIN && tp->t_flags & TF_SENTFIN && tp->snd_nxt == tp->snd_max) tp->snd_nxt--; /* @@ -439,17 +433,17 @@ send: * Calculate receive window. Don't shrink window, * but avoid silly window syndrome. */ - if (win < (long)(so->so_rcv.sb_datalen / 4) && win < (long)tp->t_maxseg) + if (win < (so->so_rcv.sb_datalen / 4) && win < tp->t_maxseg) win = 0; - if (win > (long)TCP_MAXWIN << tp->rcv_scale) - win = (long)TCP_MAXWIN << tp->rcv_scale; - if (win < (long)(tp->rcv_adv - tp->rcv_nxt)) - win = (long)(tp->rcv_adv - tp->rcv_nxt); + if (win > (u_long) (TCP_MAXWIN << tp->rcv_scale)) + win = (u_long) (TCP_MAXWIN << tp->rcv_scale); + if (win < (tp->rcv_adv - tp->rcv_nxt)) + win = (tp->rcv_adv - tp->rcv_nxt); ti->ti_win = htons((u_int16_t) (win>>tp->rcv_scale)); - + if (SEQ_GT(tp->snd_up, tp->snd_una)) { ti->ti_urp = htons((u_int16_t)(tp->snd_up - ntohl(ti->ti_seq))); -#ifdef notdef +#ifdef notdef if (SEQ_GT(tp->snd_up, tp->snd_nxt)) { ti->ti_urp = htons((u_int16_t)(tp->snd_up - tp->snd_nxt)); #endif @@ -500,7 +494,7 @@ send: if (tp->t_rtt == 0) { tp->t_rtt = 1; tp->t_rtseq = startseq; - STAT(tcpstat.tcps_segstimed++); + tcpstat.tcps_segstimed++; } } @@ -531,14 +525,14 @@ send: * the template, but need a way to checksum without them. */ m->m_len = hdrlen + len; /* XXX Needed? m_len should be correct */ - + { + + ((struct ip *)ti)->ip_len = (u_int16_t) m->m_len; - ((struct ip *)ti)->ip_len = m->m_len; - - ((struct ip *)ti)->ip_ttl = IPDEFTTL; + ((struct ip *)ti)->ip_ttl = ip_defttl; ((struct ip *)ti)->ip_tos = so->so_iptos; - + /* #if BSD >= 43 */ /* Don't do IP options... */ /* error = ip_output(m, tp->t_inpcb->inp_options, &tp->t_inpcb->inp_route, @@ -547,7 +541,7 @@ send: error = ip_output(so, m); /* #else - * error = ip_output(m, (struct mbuf *)0, &tp->t_inpcb->inp_route, + * error = ip_output(m, (struct mbuf *)0, &tp->t_inpcb->inp_route, * so->so_options & SO_DONTROUTE); * #endif */ @@ -567,7 +561,7 @@ out: */ return (error); } - STAT(tcpstat.tcps_sndtotal++); + tcpstat.tcps_sndtotal++; /* * Data sent (as far as we can tell). @@ -585,9 +579,7 @@ out: return (0); } -void -tcp_setpersist(tp) - register struct tcpcb *tp; +void tcp_setpersist(register struct tcpcb *tp) { int t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1; diff --git a/BasiliskII/src/slirp/tcp_subr.c b/BasiliskII/src/slirp/tcp_subr.c index ba1296d4..70e04b5e 100644 --- a/BasiliskII/src/slirp/tcp_subr.c +++ b/BasiliskII/src/slirp/tcp_subr.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -37,26 +33,37 @@ /* * Changes and additions relating to SLiRP * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ #define WANT_SYS_IOCTL_H +#include #include /* patchable/settable parameters for tcp */ -/* Don't do rfc1323 performance enhancements */ -#define TCP_DO_RFC1323 0 +int tcp_mssdflt = TCP_MSS; +int tcp_rttdflt = TCPTV_SRTTDFLT / PR_SLOWHZ; +int tcp_do_rfc1323 = 0; /* Don't do rfc1323 performance enhancements */ +size_t tcp_rcvspace; /* You may want to change this */ +size_t tcp_sndspace; /* Keep small if you have an error prone link */ /* * Tcp initialization */ -void -tcp_init() +void tcp_init() { tcp_iss = 1; /* wrong */ tcb.so_next = tcb.so_prev = &tcb; + + /* tcp_rcvspace = our Window we advertise to the remote */ + tcp_rcvspace = TCP_RCVSPACE; + tcp_sndspace = TCP_SNDSPACE; + + /* Make sure tcp_sndspace is at least 2*MSS */ + if (tcp_sndspace < 2*(min(if_mtu, if_mru) - sizeof(struct tcpiphdr))) + tcp_sndspace = 2*(min(if_mtu, if_mru) - sizeof(struct tcpiphdr)); } /* @@ -66,9 +73,7 @@ tcp_init() * necessary when the connection is used. */ /* struct tcpiphdr * */ -void -tcp_template(tp) - struct tcpcb *tp; +void tcp_template(struct tcpcb *tp) { struct socket *so = tp->t_socket; register struct tcpiphdr *n = &tp->t_template; @@ -81,7 +86,7 @@ tcp_template(tp) n->ti_dst = so->so_laddr; n->ti_sport = so->so_fport; n->ti_dport = so->so_lport; - + n->ti_seq = 0; n->ti_ack = 0; n->ti_x2 = 0; @@ -105,13 +110,8 @@ tcp_template(tp) * In any case the ack and sequence number of the transmitted * segment are as specified by the parameters. */ -void -tcp_respond(tp, ti, m, ack, seq, flags) - struct tcpcb *tp; - register struct tcpiphdr *ti; - register struct mbuf *m; - tcp_seq ack, seq; - int flags; +void tcp_respond(struct tcpcb *tp, register struct tcpiphdr *ti, + register struct mbuf *m, tcp_seq ack, tcp_seq seq, int flags) { register int tlen; int win = 0; @@ -123,7 +123,7 @@ tcp_respond(tp, ti, m, ack, seq, flags) DEBUG_ARG("ack = %u", ack); DEBUG_ARG("seq = %u", seq); DEBUG_ARG("flags = %x", flags); - + if (tp) win = sbspace(&tp->t_socket->so_rcv); if (m == 0) { @@ -134,17 +134,17 @@ tcp_respond(tp, ti, m, ack, seq, flags) #else tlen = 0; #endif - m->m_data += IF_MAXLINKHDR; + m->m_data += if_maxlinkhdr; *mtod(m, struct tcpiphdr *) = *ti; ti = mtod(m, struct tcpiphdr *); flags = TH_ACK; } else { - /* + /* * ti points into m so the next line is just making * the mbuf point to ti */ m->m_data = (caddr_t)ti; - + m->m_len = sizeof (struct tcpiphdr); tlen = 0; #define xchg(a,b,type) { type t; t=a; a=b; b=t; } @@ -172,11 +172,11 @@ tcp_respond(tp, ti, m, ack, seq, flags) ti->ti_sum = cksum(m, tlen); ((struct ip *)ti)->ip_len = tlen; - if(flags & TH_RST) + if(flags & TH_RST) ((struct ip *)ti)->ip_ttl = MAXTTL; - else - ((struct ip *)ti)->ip_ttl = IPDEFTTL; - + else + ((struct ip *)ti)->ip_ttl = ip_defttl; + (void) ip_output((struct socket *)0, m); } @@ -185,40 +185,38 @@ tcp_respond(tp, ti, m, ack, seq, flags) * empty reassembly queue and hooking it to the argument * protocol control block. */ -struct tcpcb * -tcp_newtcpcb(so) - struct socket *so; +struct tcpcb *tcp_newtcpcb(struct socket *so) { register struct tcpcb *tp; - + tp = (struct tcpcb *)malloc(sizeof(*tp)); if (tp == NULL) return ((struct tcpcb *)0); - + memset((char *) tp, 0, sizeof(struct tcpcb)); tp->seg_next = tp->seg_prev = (tcpiphdrp_32)tp; - tp->t_maxseg = TCP_MSS; - - tp->t_flags = TCP_DO_RFC1323 ? (TF_REQ_SCALE|TF_REQ_TSTMP) : 0; + tp->t_maxseg = tcp_mssdflt; + + tp->t_flags = tcp_do_rfc1323 ? (TF_REQ_SCALE|TF_REQ_TSTMP) : 0; tp->t_socket = so; - + /* * Init srtt to TCPTV_SRTTBASE (0), so we can tell that we have no * rtt estimate. Set rttvar so that srtt + 2 * rttvar gives * reasonable initial retransmit time. */ tp->t_srtt = TCPTV_SRTTBASE; - tp->t_rttvar = TCPTV_SRTTDFLT << 2; + tp->t_rttvar = tcp_rttdflt * PR_SLOWHZ << 2; tp->t_rttmin = TCPTV_MIN; - TCPT_RANGESET(tp->t_rxtcur, + TCPT_RANGESET(tp->t_rxtcur, ((TCPTV_SRTTBASE >> 2) + (TCPTV_SRTTDFLT << 2)) >> 1, TCPTV_MIN, TCPTV_REXMTMAX); tp->snd_cwnd = TCP_MAXWIN << TCP_MAX_WINSHIFT; tp->snd_ssthresh = TCP_MAXWIN << TCP_MAX_WINSHIFT; tp->t_state = TCPS_CLOSED; - + so->so_tcpcb = tp; return (tp); @@ -229,7 +227,7 @@ tcp_newtcpcb(so) * the specified error. If connection is synchronized, * then send a RST to peer. */ -struct tcpcb *tcp_drop(struct tcpcb *tp, int err) +struct tcpcb *tcp_drop(struct tcpcb *tp, int err) { /* tcp_drop(tp, errno) register struct tcpcb *tp; @@ -240,13 +238,13 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err) DEBUG_CALL("tcp_drop"); DEBUG_ARG("tp = %lx", (long)tp); DEBUG_ARG("errno = %d", errno); - + if (TCPS_HAVERCVDSYN(tp->t_state)) { tp->t_state = TCPS_CLOSED; (void) tcp_output(tp); - STAT(tcpstat.tcps_drops++); + tcpstat.tcps_drops++; } else - STAT(tcpstat.tcps_conndrops++); + tcpstat.tcps_conndrops++; /* if (errno == ETIMEDOUT && tp->t_softerror) * errno = tp->t_softerror; */ @@ -260,9 +258,7 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err) * discard internet protocol block * wake up any sleepers */ -struct tcpcb * -tcp_close(tp) - register struct tcpcb *tp; +struct tcpcb *tcp_close(register struct tcpcb *tp) { register struct tcpiphdr *t; struct socket *so = tp->t_socket; @@ -270,7 +266,7 @@ tcp_close(tp) DEBUG_CALL("tcp_close"); DEBUG_ARG("tp = %lx", (long )tp); - + /* free the reassembly queue, if any */ t = (struct tcpiphdr *) tp->seg_next; while (t != (struct tcpiphdr *)tp) { @@ -294,13 +290,11 @@ tcp_close(tp) sbfree(&so->so_rcv); sbfree(&so->so_snd); sofree(so); - STAT(tcpstat.tcps_closed++); + tcpstat.tcps_closed++; return ((struct tcpcb *)0); } -#ifdef notdef -void -tcp_drain() +void tcp_drain() { /* XXX */ } @@ -309,10 +303,10 @@ tcp_drain() * When a source quench is received, close congestion window * to one segment. We will gradually open it again as we proceed. */ -void -tcp_quench(i, errno) - int errno; +#ifdef notdef + +void tcp_quench(int i, int errno) { struct tcpcb *tp = intotcpcb(inp); @@ -336,14 +330,12 @@ tcp_quench(i, errno) * for peer to send FIN or not respond to keep-alives, etc. * We can let the user exit from the close as soon as the FIN is acked. */ -void -tcp_sockclosed(tp) - struct tcpcb *tp; +void tcp_sockclosed(struct tcpcb *tp) { DEBUG_CALL("tcp_sockclosed"); DEBUG_ARG("tp = %lx", (long)tp); - + switch (tp->t_state) { case TCPS_CLOSED: @@ -369,34 +361,34 @@ tcp_sockclosed(tp) tcp_output(tp); } -/* +/* * Connect to a host on the Internet * Called by tcp_input * Only do a connect, the tcp fields will be set in tcp_input * return 0 if there's a result of the connect, * else return -1 means we're still connecting * The return value is almost always -1 since the socket is - * nonblocking. Connect returns after the SYN is sent, and does + * nonblocking. Connect returns after the SYN is sent, and does * not wait for ACK+SYN. */ -int tcp_fconnect(so) - struct socket *so; +int tcp_fconnect(struct socket *so) { int ret=0; - + DEBUG_CALL("tcp_fconnect"); DEBUG_ARG("so = %lx", (long )so); if( (ret=so->s=socket(AF_INET,SOCK_STREAM,0)) >= 0) { int opt, s=so->s; struct sockaddr_in addr; + memset(&addr, 0, sizeof(struct sockaddr_in)); fd_nonblock(s); opt = 1; setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(opt )); opt = 1; setsockopt(s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(opt )); - + addr.sin_family = AF_INET; if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr) { /* It's an alias */ @@ -413,12 +405,14 @@ int tcp_fconnect(so) addr.sin_addr = so->so_faddr; addr.sin_port = so->so_fport; + char addrstr[INET_ADDRSTRLEN]; DEBUG_MISC((dfd, " connect()ing, addr.sin_port=%d, " - "addr.sin_addr.s_addr=%.16s\n", - ntohs(addr.sin_port), inet_ntoa(addr.sin_addr))); + "addr.sin_addr.s_addr=%.16s\n", + ntohs(addr.sin_port), inet_ntop(AF_INET, &addr.sin_addr, + addrstr, sizeof(addrstr)))); /* We don't care what port we get */ ret = connect(s,(struct sockaddr *)&addr,sizeof (addr)); - + /* * If it's not in progress, it failed, so we just return 0, * without clearing SS_NOFDREF @@ -431,29 +425,27 @@ int tcp_fconnect(so) /* * Accept the socket and connect to the local-host - * + * * We have a problem. The correct thing to do would be * to first connect to the local-host, and only if the * connection is accepted, then do an accept() here. - * But, a) we need to know who's trying to connect + * But, a) we need to know who's trying to connect * to the socket to be able to SYN the local-host, and * b) we are already connected to the foreign host by * the time it gets to accept(), so... We simply accept * here and SYN the local-host. - */ -void -tcp_connect(inso) - struct socket *inso; + */ +void tcp_connect(struct socket *inso) { struct socket *so; struct sockaddr_in addr; - int addrlen = sizeof(struct sockaddr_in); + socklen_t addrlen = sizeof(struct sockaddr_in); struct tcpcb *tp; int s, opt; DEBUG_CALL("tcp_connect"); DEBUG_ARG("inso = %lx", (long)inso); - + /* * If it's an SS_ACCEPTONCE socket, no need to socreate() * another socket, just use the accept() socket. @@ -474,8 +466,8 @@ tcp_connect(inso) so->so_laddr = inso->so_laddr; so->so_lport = inso->so_lport; } - - (void) tcp_mss(sototcpcb(so), 0); + + tcp_mss(sototcpcb(so), 0); if ((s = accept(inso->s,(struct sockaddr *)&addr,&addrlen)) < 0) { tcp_close(sototcpcb(so)); /* This will sofree() as well */ @@ -488,13 +480,13 @@ tcp_connect(inso) setsockopt(s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(int)); opt = 1; setsockopt(s,IPPROTO_TCP,TCP_NODELAY,(char *)&opt,sizeof(int)); - + so->so_fport = addr.sin_port; so->so_faddr = addr.sin_addr; /* Translate connections from localhost to the real hostname */ if (so->so_faddr.s_addr == 0 || so->so_faddr.s_addr == loopback_addr.s_addr) so->so_faddr = alias_addr; - + /* Close the accept() socket, set right state */ if (inso->so_state & SS_FACCEPTONCE) { closesocket(so->s); /* If we only accept once, close the accept() socket */ @@ -502,12 +494,12 @@ tcp_connect(inso) /* if it's not FACCEPTONCE, it's already NOFDREF */ } so->s = s; - + so->so_iptos = tcp_tos(so); tp = sototcpcb(so); tcp_template(tp); - + /* Compute window scaling to request. */ /* while (tp->request_r_scale < TCP_MAX_WINSHIFT && * (TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat) @@ -515,11 +507,11 @@ tcp_connect(inso) */ /* soisconnecting(so); */ /* NOFDREF used instead */ - STAT(tcpstat.tcps_connattempt++); - + tcpstat.tcps_connattempt++; + tp->t_state = TCPS_SYN_SENT; tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; - tp->iss = tcp_iss; + tp->iss = tcp_iss; tcp_iss += TCP_ISSINCR/2; tcp_sendseqinit(tp); tcp_output(tp); @@ -528,13 +520,11 @@ tcp_connect(inso) /* * Attach a TCPCB to a socket. */ -int -tcp_attach(so) - struct socket *so; +int tcp_attach(struct socket *so) { if ((so->so_tcpcb = tcp_newtcpcb(so)) == NULL) return -1; - + insque(so, &tcb); return 0; @@ -543,7 +533,7 @@ tcp_attach(so) /* * Set the socket's type of service field */ -static const struct tos_t tcptos[] = { +struct tos_t tcptos[] = { {0, 20, IPTOS_THROUGHPUT, 0}, /* ftp data */ {21, 21, IPTOS_LOWDELAY, EMU_FTP}, /* ftp control */ {0, 23, IPTOS_LOWDELAY, 0}, /* telnet */ @@ -559,21 +549,16 @@ static const struct tos_t tcptos[] = { {0, 0, 0, 0} }; -#ifdef CONFIG_QEMU -static -#endif struct emu_t *tcpemu = 0; - + /* * Return TOS according to the above table */ -u_int8_t -tcp_tos(so) - struct socket *so; +u_int8_t tcp_tos(struct socket *so) { int i = 0; struct emu_t *emup; - + while(tcptos[i].tos) { if ((tcptos[i].fport && (ntohs(so->so_fport) == tcptos[i].fport)) || (tcptos[i].lport && (ntohs(so->so_lport) == tcptos[i].lport))) { @@ -582,7 +567,7 @@ tcp_tos(so) } i++; } - + /* Nope, lets see if there's a user-added one */ for (emup = tcpemu; emup; emup = emup->next) { if ((emup->fport && (ntohs(so->so_fport) == emup->fport)) || @@ -591,73 +576,68 @@ tcp_tos(so) return emup->tos; } } - + return 0; } -#if 0 int do_echo = -1; -#endif /* * Emulate programs that try and connect to us * This includes ftp (the data connection is * initiated by the server) and IRC (DCC CHAT and * DCC SEND) for now - * + * * NOTE: It's possible to crash SLiRP by sending it * unstandard strings to emulate... if this is a problem, * more checks are needed here * * XXX Assumes the whole command came in one packet - * + * * XXX Some ftp clients will have their TOS set to * LOWDELAY and so Nagel will kick in. Because of this, * we'll get the first letter, followed by the rest, so * we simply scan for ORT instead of PORT... * DCC doesn't have this problem because there's other stuff * in the packet before the DCC command. - * - * Return 1 if the mbuf m is still valid and should be + * + * Return 1 if the mbuf m is still valid and should be * sbappend()ed - * + * * NOTE: if you return 0 you MUST m_free() the mbuf! */ -int -tcp_emu(so, m) - struct socket *so; - struct mbuf *m; +int tcp_emu(struct socket *so, struct mbuf *m) { u_int n1, n2, n3, n4, n5, n6; char buff[256]; u_int32_t laddr; u_int lport; char *bptr; - + DEBUG_CALL("tcp_emu"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("m = %lx", (long)m); - + switch(so->so_emu) { int x, i; - + case EMU_IDENT: /* * Identification protocol as per rfc-1413 */ - + { struct socket *tmpso; struct sockaddr_in addr; - int addrlen = sizeof(struct sockaddr_in); + socklen_t addrlen = sizeof(struct sockaddr_in); struct sbuf *so_rcv = &so->so_rcv; - + memcpy(so_rcv->sb_wptr, m->m_data, m->m_len); so_rcv->sb_wptr += m->m_len; so_rcv->sb_rptr += m->m_len; m->m_data[m->m_len] = 0; /* NULL terminate */ if (strchr(m->m_data, '\r') || strchr(m->m_data, '\n')) { - if (sscanf(so_rcv->sb_data, "%u%*[ ,]%u", &n1, &n2) == 2) { + if (sscanf(so_rcv->sb_data, "%d%*[ ,]%d", &n1, &n2) == 2) { HTONS(n1); HTONS(n2); /* n2 is the one on our host */ @@ -680,7 +660,7 @@ tcp_emu(so, m) m_free(m); return 0; } - + #if 0 case EMU_RLOGIN: /* @@ -695,7 +675,7 @@ tcp_emu(so, m) char term[100]; struct sbuf *so_snd = &so->so_snd; struct sbuf *so_rcv = &so->so_rcv; - + /* First check if they have a priveladged port, or too much data has arrived */ if (ntohs(so->so_lport) > 1023 || ntohs(so->so_lport) < 512 || (m->m_len + so_rcv->sb_wptr) > (so_rcv->sb_data + so_rcv->sb_datalen)) { @@ -706,13 +686,13 @@ tcp_emu(so, m) m_free(m); return 0; } - + /* Append the current data */ memcpy(so_rcv->sb_wptr, m->m_data, m->m_len); so_rcv->sb_wptr += m->m_len; so_rcv->sb_rptr += m->m_len; m_free(m); - + /* * Check if we have all the initial options, * and build argument list to rlogin while we're here @@ -744,10 +724,10 @@ tcp_emu(so, m) } } } - + if (n != 4) return 0; - + /* We have it, set our term variable and fork_exec() */ #ifdef HAVE_SETENV setenv("TERM", term, 1); @@ -757,15 +737,15 @@ tcp_emu(so, m) fork_exec(so, args, 2); term[0] = 0; so->so_emu = 0; - + /* And finally, send the client a 0 character */ so_snd->sb_wptr[0] = 0; so_snd->sb_wptr++; so_snd->sb_cc++; - + return 0; } - + case EMU_RSH: /* * rsh emulation @@ -779,7 +759,7 @@ tcp_emu(so, m) char *args; struct sbuf *so_snd = &so->so_snd; struct sbuf *so_rcv = &so->so_rcv; - + /* First check if they have a priveladged port, or too much data has arrived */ if (ntohs(so->so_lport) > 1023 || ntohs(so->so_lport) < 512 || (m->m_len + so_rcv->sb_wptr) > (so_rcv->sb_data + so_rcv->sb_datalen)) { @@ -790,13 +770,13 @@ tcp_emu(so, m) m_free(m); return 0; } - + /* Append the current data */ memcpy(so_rcv->sb_wptr, m->m_data, m->m_len); so_rcv->sb_wptr += m->m_len; so_rcv->sb_rptr += m->m_len; m_free(m); - + /* * Check if we have all the initial options, * and build argument list to rlogin while we're here @@ -827,20 +807,20 @@ tcp_emu(so, m) ns->so_laddr=so->so_laddr; ns->so_lport=htons(port); - (void) tcp_mss(sototcpcb(ns), 0); + tcp_mss(sototcpcb(ns), 0); ns->so_faddr=so->so_faddr; ns->so_fport=htons(IPPORT_RESERVED-1); /* Use a fake port. */ - if (ns->so_faddr.s_addr == 0 || + if (ns->so_faddr.s_addr == 0 || ns->so_faddr.s_addr == loopback_addr.s_addr) ns->so_faddr = alias_addr; ns->so_iptos = tcp_tos(ns); tp = sototcpcb(ns); - + tcp_template(tp); - + /* Compute window scaling to request. */ /* while (tp->request_r_scale < TCP_MAX_WINSHIFT && * (TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat) @@ -849,11 +829,11 @@ tcp_emu(so, m) /*soisfconnecting(ns);*/ - STAT(tcpstat.tcps_connattempt++); - + tcpstat.tcps_connattempt++; + tp->t_state = TCPS_SYN_SENT; tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; - tp->iss = tcp_iss; + tp->iss = tcp_iss; tcp_iss += TCP_ISSINCR/2; tcp_sendseqinit(tp); tcp_output(tp); @@ -869,19 +849,19 @@ tcp_emu(so, m) } } } - + if (n != 4) return 0; - + rsh_exec(so,so->extra, user, inet_ntoa(so->so_faddr), args); so->so_emu = 0; so->extra=NULL; - + /* And finally, send the client a 0 character */ so_snd->sb_wptr[0] = 0; so_snd->sb_wptr++; so_snd->sb_cc++; - + return 0; } @@ -890,7 +870,7 @@ tcp_emu(so, m) int num; struct sbuf *so_snd = &so->so_snd; struct sbuf *so_rcv = &so->so_rcv; - + /* * If there is binary data here, we save it in so->so_m */ @@ -905,16 +885,16 @@ tcp_emu(so, m) } } } /* if(so->so_m==NULL) */ - + /* * Append the line */ sbappendsb(so_rcv, m); - + /* To avoid going over the edge of the buffer, we reset it */ if (so_snd->sb_cc == 0) so_snd->sb_wptr = so_snd->sb_rptr = so_snd->sb_data; - + /* * A bit of a hack: * If the first packet we get here is 1 byte long, then it @@ -933,13 +913,13 @@ tcp_emu(so, m) tcp_output(sototcpcb(so)); /* XXX */ } else m_free(m); - + num = 0; while (num < so->so_rcv.sb_cc) { if (*(so->so_rcv.sb_rptr + num) == '\n' || *(so->so_rcv.sb_rptr + num) == '\r') { int n; - + *(so_rcv->sb_rptr + num) = 0; if (ctl_password && !ctl_password_ok) { /* Need a password */ @@ -976,76 +956,76 @@ do_prompt: } return 0; } -#endif +#endif case EMU_FTP: /* ftp */ *(m->m_data+m->m_len) = 0; /* NULL terminate for strstr */ if ((bptr = (char *)strstr(m->m_data, "ORT")) != NULL) { /* * Need to emulate the PORT command - */ - x = sscanf(bptr, "ORT %u,%u,%u,%u,%u,%u\r\n%256[^\177]", + */ + x = sscanf(bptr, "ORT %d,%d,%d,%d,%d,%d\r\n%256[^\177]", &n1, &n2, &n3, &n4, &n5, &n6, buff); if (x < 6) return 1; - + laddr = htonl((n1 << 24) | (n2 << 16) | (n3 << 8) | (n4)); lport = htons((n5 << 8) | (n6)); - + if ((so = solisten(0, laddr, lport, SS_FACCEPTONCE)) == NULL) return 1; - + n6 = ntohs(so->so_fport); - + n5 = (n6 >> 8) & 0xff; n6 &= 0xff; - + laddr = ntohl(so->so_faddr.s_addr); - + n1 = ((laddr >> 24) & 0xff); n2 = ((laddr >> 16) & 0xff); n3 = ((laddr >> 8) & 0xff); n4 = (laddr & 0xff); - + m->m_len = bptr - m->m_data; /* Adjust length */ - m->m_len += sprintf(bptr,"ORT %d,%d,%d,%d,%d,%d\r\n%s", + m->m_len += sprintf(bptr,"ORT %d,%d,%d,%d,%d,%d\r\n%s", n1, n2, n3, n4, n5, n6, x==7?buff:""); return 1; } else if ((bptr = (char *)strstr(m->m_data, "27 Entering")) != NULL) { /* * Need to emulate the PASV response */ - x = sscanf(bptr, "27 Entering Passive Mode (%u,%u,%u,%u,%u,%u)\r\n%256[^\177]", + x = sscanf(bptr, "27 Entering Passive Mode (%d,%d,%d,%d,%d,%d)\r\n%256[^\177]", &n1, &n2, &n3, &n4, &n5, &n6, buff); if (x < 6) return 1; - + laddr = htonl((n1 << 24) | (n2 << 16) | (n3 << 8) | (n4)); lport = htons((n5 << 8) | (n6)); - + if ((so = solisten(0, laddr, lport, SS_FACCEPTONCE)) == NULL) return 1; - + n6 = ntohs(so->so_fport); - + n5 = (n6 >> 8) & 0xff; n6 &= 0xff; - + laddr = ntohl(so->so_faddr.s_addr); - + n1 = ((laddr >> 24) & 0xff); n2 = ((laddr >> 16) & 0xff); n3 = ((laddr >> 8) & 0xff); n4 = (laddr & 0xff); - + m->m_len = bptr - m->m_data; /* Adjust length */ m->m_len += sprintf(bptr,"27 Entering Passive Mode (%d,%d,%d,%d,%d,%d)\r\n%s", n1, n2, n3, n4, n5, n6, x==7?buff:""); - + return 1; } - + return 1; - + case EMU_KSH: /* * The kshell (Kerberos rsh) and shell services both pass @@ -1054,7 +1034,7 @@ do_prompt: * of the connection as a NUL-terminated decimal ASCII string. */ so->so_emu = 0; - for (lport = 0, i = 0; i < m->m_len-1; ++i) { + for (lport = 0, i = 0; i < (int) (m->m_len-1); ++i) { if (m->m_data[i] < '0' || m->m_data[i] > '9') return 1; /* invalid number */ lport *= 10; @@ -1064,7 +1044,7 @@ do_prompt: (so = solisten(0, so->so_laddr.s_addr, htons(lport), SS_FACCEPTONCE)) != NULL) m->m_len = sprintf(m->m_data, "%d", ntohs(so->so_fport))+1; return 1; - + case EMU_IRC: /* * Need to emulate DCC CHAT, DCC SEND and DCC MOVE @@ -1072,12 +1052,12 @@ do_prompt: *(m->m_data+m->m_len) = 0; /* NULL terminate the string for strstr */ if ((bptr = (char *)strstr(m->m_data, "DCC")) == NULL) return 1; - + /* The %256s is for the broken mIRC */ if (sscanf(bptr, "DCC CHAT %256s %u %u", buff, &laddr, &lport) == 3) { if ((so = solisten(0, htonl(laddr), htons(lport), SS_FACCEPTONCE)) == NULL) return 1; - + m->m_len = bptr - m->m_data; /* Adjust length */ m->m_len += sprintf(bptr, "DCC CHAT chat %lu %u%c\n", (unsigned long)ntohl(so->so_faddr.s_addr), @@ -1085,15 +1065,15 @@ do_prompt: } else if (sscanf(bptr, "DCC SEND %256s %u %u %u", buff, &laddr, &lport, &n1) == 4) { if ((so = solisten(0, htonl(laddr), htons(lport), SS_FACCEPTONCE)) == NULL) return 1; - + m->m_len = bptr - m->m_data; /* Adjust length */ - m->m_len += sprintf(bptr, "DCC SEND %s %lu %u %u%c\n", + m->m_len += sprintf(bptr, "DCC SEND %s %lu %u %u%c\n", buff, (unsigned long)ntohl(so->so_faddr.s_addr), ntohs(so->so_fport), n1, 1); } else if (sscanf(bptr, "DCC MOVE %256s %u %u %u", buff, &laddr, &lport, &n1) == 4) { if ((so = solisten(0, htonl(laddr), htons(lport), SS_FACCEPTONCE)) == NULL) return 1; - + m->m_len = bptr - m->m_data; /* Adjust length */ m->m_len += sprintf(bptr, "DCC MOVE %s %lu %u %u%c\n", buff, (unsigned long)ntohl(so->so_faddr.s_addr), @@ -1102,7 +1082,7 @@ do_prompt: return 1; case EMU_REALAUDIO: - /* + /* * RealAudio emulation - JP. We must try to parse the incoming * data and try to find the two characters that contain the * port number. Then we redirect an udp port and replace the @@ -1110,45 +1090,45 @@ do_prompt: * * The 1.0 beta versions of the player are not supported * any more. - * + * * A typical packet for player version 1.0 (release version): - * - * 0000:50 4E 41 00 05 + * + * 0000:50 4E 41 00 05 * 0000:00 01 00 02 1B D7 00 00 67 E6 6C DC 63 00 12 50 .....×..gælÜc..P * 0010:4E 43 4C 49 45 4E 54 20 31 30 31 20 41 4C 50 48 NCLIENT 101 ALPH * 0020:41 6C 00 00 52 00 17 72 61 66 69 6C 65 73 2F 76 Al..R..rafiles/v * 0030:6F 61 2F 65 6E 67 6C 69 73 68 5F 2E 72 61 79 42 oa/english_.rayB - * + * * Now the port number 0x1BD7 is found at offset 0x04 of the * Now the port number 0x1BD7 is found at offset 0x04 of the * second packet. This time we received five bytes first and * then the rest. You never know how many bytes you get. * * A typical packet for player version 2.0 (beta): - * + * * 0000:50 4E 41 00 06 00 02 00 00 00 01 00 02 1B C1 00 PNA...........Á. * 0010:00 67 75 78 F5 63 00 0A 57 69 6E 32 2E 30 2E 30 .guxõc..Win2.0.0 * 0020:2E 35 6C 00 00 52 00 1C 72 61 66 69 6C 65 73 2F .5l..R..rafiles/ * 0030:77 65 62 73 69 74 65 2F 32 30 72 65 6C 65 61 73 website/20releas * 0040:65 2E 72 61 79 53 00 00 06 36 42 e.rayS...6B - * + * * Port number 0x1BC1 is found at offset 0x0d. - * + * * This is just a horrible switch statement. Variable ra tells * us where we're going. */ - + bptr = m->m_data; while (bptr < m->m_data + m->m_len) { u_short p; static int ra = 0; - char ra_tbl[4]; - + char ra_tbl[4]; + ra_tbl[0] = 0x50; ra_tbl[1] = 0x4e; ra_tbl[2] = 0x41; ra_tbl[3] = 0; - + switch (ra) { case 0: case 2: @@ -1158,7 +1138,7 @@ do_prompt: continue; } break; - + case 1: /* * We may get 0x50 several times, ignore them @@ -1172,15 +1152,15 @@ do_prompt: continue; } break; - - case 4: - /* + + case 4: + /* * skip version number */ bptr++; break; - - case 5: + + case 5: /* * The difference between versions 1.0 and * 2.0 is here. For future versions of @@ -1190,19 +1170,19 @@ do_prompt: bptr += 8; else bptr += 4; - break; - + break; + case 6: /* This is the field containing the port * number that RA-player is listening to. */ - lport = (((u_char*)bptr)[0] << 8) + lport = (((u_char*)bptr)[0] << 8) + ((u_char *)bptr)[1]; - if (lport < 6970) + if (lport < 6970) lport += 256; /* don't know why */ if (lport < 6970 || lport > 7170) return 1; /* failed */ - + /* try to get udp port between 6970 - 7170 */ for (p = 6970; p < 7071; p++) { if (udp_listen( htons(p), @@ -1216,17 +1196,17 @@ do_prompt: p = 0; *(u_char *)bptr++ = (p >> 8) & 0xff; *(u_char *)bptr++ = p & 0xff; - ra = 0; + ra = 0; return 1; /* port redirected, we're done */ - break; - + break; + default: - ra = 0; + ra = 0; } ra++; } - return 1; - + return 1; + default: /* Ooops, not emulated, won't call tcp_emu again */ so->so_emu = 0; @@ -1239,19 +1219,17 @@ do_prompt: * Return 0 if this connections is to be closed, 1 otherwise, * return 2 if this is a command-line connection */ -int -tcp_ctl(so) - struct socket *so; +int tcp_ctl(struct socket *so) { struct sbuf *sb = &so->so_snd; int command; struct ex_list *ex_ptr; int do_pty; // struct socket *tmpso; - + DEBUG_CALL("tcp_ctl"); DEBUG_ARG("so = %lx", (long )so); - + #if 0 /* * Check if they're authorised @@ -1261,12 +1239,12 @@ tcp_ctl(so) sb->sb_wptr += sb->sb_cc; return 0; } -#endif +#endif command = (ntohl(so->so_faddr.s_addr) & 0xff); - + switch(command) { default: /* Check for exec's */ - + /* * Check if it's pty_exec */ @@ -1277,12 +1255,12 @@ tcp_ctl(so) goto do_exec; } } - + /* * Nothing bound.. */ /* tcp_fconnect(so); */ - + /* FALLTHROUGH */ case CTL_ALIAS: sb->sb_cc = sprintf(sb->sb_wptr, @@ -1293,12 +1271,12 @@ tcp_ctl(so) do_exec: DEBUG_MISC((dfd, " executing %s \n",ex_ptr->ex_exec)); return(fork_exec(so, ex_ptr->ex_exec, do_pty)); - + #if 0 case CTL_CMD: for (tmpso = tcb.so_next; tmpso != &tcb; tmpso = tmpso->so_next) { - if (tmpso->so_emu == EMU_CTL && - !(tmpso->so_tcpcb? + if (tmpso->so_emu == EMU_CTL && + !(tmpso->so_tcpcb? (tmpso->so_tcpcb->t_state & (TCPS_TIME_WAIT|TCPS_LAST_ACK)) :0)) { /* Ooops, control connection already active */ diff --git a/BasiliskII/src/slirp/tcp_timer.c b/BasiliskII/src/slirp/tcp_timer.c index 244bad6a..ab9aa580 100644 --- a/BasiliskII/src/slirp/tcp_timer.c +++ b/BasiliskII/src/slirp/tcp_timer.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -36,14 +32,14 @@ #include -#ifdef LOG_ENABLED +int tcp_keepidle = TCPTV_KEEP_IDLE; +int tcp_keepintvl = TCPTV_KEEPINTVL; +int tcp_maxidle; +int so_options = DO_KEEPALIVE; + struct tcpstat tcpstat; /* tcp statistics */ -#endif - u_int32_t tcp_now; /* for RFC 1323 timestamps */ -static struct tcpcb *tcp_timers(register struct tcpcb *tp, int timer); - /* * Fast timeout routine for processing delayed acks */ @@ -54,7 +50,7 @@ tcp_fasttimo() register struct tcpcb *tp; DEBUG_CALL("tcp_fasttimo"); - + so = tcb.so_next; if (so) for (; so != &tcb; so = so->so_next) @@ -62,7 +58,7 @@ tcp_fasttimo() (tp->t_flags & TF_DELACK)) { tp->t_flags &= ~TF_DELACK; tp->t_flags |= TF_ACKNOW; - STAT(tcpstat.tcps_delack++); + tcpstat.tcps_delack++; (void) tcp_output(tp); } } @@ -80,7 +76,8 @@ tcp_slowtimo() register int i; DEBUG_CALL("tcp_slowtimo"); - + + tcp_maxidle = TCPTV_KEEPCNT * tcp_keepintvl; /* * Search through tcb's and update active timers. */ @@ -126,19 +123,21 @@ tcp_canceltimers(tp) tp->t_timer[i] = 0; } -const int tcp_backoff[TCP_MAXRXTSHIFT + 1] = +int tcp_backoff[TCP_MAXRXTSHIFT + 1] = { 1, 2, 4, 8, 16, 32, 64, 64, 64, 64, 64, 64, 64 }; /* * TCP timer processing. */ -static struct tcpcb * -tcp_timers(register struct tcpcb *tp, int timer) +struct tcpcb * +tcp_timers(tp, timer) + register struct tcpcb *tp; + int timer; { register int rexmt; - + DEBUG_CALL("tcp_timers"); - + switch (timer) { /* @@ -149,8 +148,8 @@ tcp_timers(register struct tcpcb *tp, int timer) */ case TCPT_2MSL: if (tp->t_state != TCPS_TIME_WAIT && - tp->t_idle <= TCP_MAXIDLE) - tp->t_timer[TCPT_2MSL] = TCPTV_KEEPINTVL; + tp->t_idle <= tcp_maxidle) + tp->t_timer[TCPT_2MSL] = tcp_keepintvl; else tp = tcp_close(tp); break; @@ -161,12 +160,12 @@ tcp_timers(register struct tcpcb *tp, int timer) * to a longer retransmit interval and retransmit one segment. */ case TCPT_REXMT: - + /* * XXXXX If a packet has timed out, then remove all the queued * packets for that session. */ - + if (++tp->t_rxtshift > TCP_MAXRXTSHIFT) { /* * This is a hack to suit our terminal server here at the uni of canberra @@ -175,33 +174,33 @@ tcp_timers(register struct tcpcb *tp, int timer) * keep retransmitting it, it'll keep eating the zeroes, so we keep * retransmitting, and eventually the connection dies... * (this only happens on incoming data) - * + * * So, if we were gonna drop the connection from too many retransmits, * don't... instead halve the t_maxseg, which might break up the NULLs and * let them through - * + * * *sigh* */ - + tp->t_maxseg >>= 1; if (tp->t_maxseg < 32) { /* * We tried our best, now the connection must die! */ tp->t_rxtshift = TCP_MAXRXTSHIFT; - STAT(tcpstat.tcps_timeoutdrop++); + tcpstat.tcps_timeoutdrop++; tp = tcp_drop(tp, tp->t_softerror); /* tp->t_softerror : ETIMEDOUT); */ /* XXX */ return (tp); /* XXX */ } - + /* * Set rxtshift to 6, which is still at the maximum * backoff time */ tp->t_rxtshift = 6; } - STAT(tcpstat.tcps_rexmttimeo++); + tcpstat.tcps_rexmttimeo++; rexmt = TCP_REXMTVAL(tp) * tcp_backoff[tp->t_rxtshift]; TCPT_RANGESET(tp->t_rxtcur, rexmt, (short)tp->t_rttmin, TCPTV_REXMTMAX); /* XXX */ @@ -237,7 +236,7 @@ tcp_timers(register struct tcpcb *tp, int timer) * size increase exponentially with time. If the * window is larger than the path can handle, this * exponential growth results in dropped packet(s) - * almost immediately. To get more time between + * almost immediately. To get more time between * drops but still "push" the network to take advantage * of improving conditions, we switch from exponential * to linear window opening at some threshold size. @@ -264,7 +263,7 @@ tcp_timers(register struct tcpcb *tp, int timer) * Force a byte to be output, if possible. */ case TCPT_PERSIST: - STAT(tcpstat.tcps_persisttimeo++); + tcpstat.tcps_persisttimeo++; tcp_setpersist(tp); tp->t_force = 1; (void) tcp_output(tp); @@ -276,13 +275,13 @@ tcp_timers(register struct tcpcb *tp, int timer) * or drop connection if idle for too long. */ case TCPT_KEEP: - STAT(tcpstat.tcps_keeptimeo++); + tcpstat.tcps_keeptimeo++; if (tp->t_state < TCPS_ESTABLISHED) goto dropit; /* if (tp->t_socket->so_options & SO_KEEPALIVE && */ - if ((SO_OPTIONS) && tp->t_state <= TCPS_CLOSE_WAIT) { - if (tp->t_idle >= TCPTV_KEEP_IDLE + TCP_MAXIDLE) + if ((so_options) && tp->t_state <= TCPS_CLOSE_WAIT) { + if (tp->t_idle >= tcp_keepidle + tcp_maxidle) goto dropit; /* * Send a packet designed to force a response @@ -296,7 +295,7 @@ tcp_timers(register struct tcpcb *tp, int timer) * by the protocol spec, this requires the * correspondent TCP to respond. */ - STAT(tcpstat.tcps_keepprobe++); + tcpstat.tcps_keepprobe++; #ifdef TCP_COMPAT_42 /* * The keepalive packet must have nonzero length @@ -308,13 +307,13 @@ tcp_timers(register struct tcpcb *tp, int timer) tcp_respond(tp, &tp->t_template, (struct mbuf *)NULL, tp->rcv_nxt, tp->snd_una - 1, 0); #endif - tp->t_timer[TCPT_KEEP] = TCPTV_KEEPINTVL; + tp->t_timer[TCPT_KEEP] = tcp_keepintvl; } else - tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_IDLE; + tp->t_timer[TCPT_KEEP] = tcp_keepidle; break; dropit: - STAT(tcpstat.tcps_keepdrops++); + tcpstat.tcps_keepdrops++; tp = tcp_drop(tp, 0); /* ETIMEDOUT); */ break; } diff --git a/BasiliskII/src/slirp/tcp_timer.h b/BasiliskII/src/slirp/tcp_timer.h index f251846b..73fe2089 100644 --- a/BasiliskII/src/slirp/tcp_timer.h +++ b/BasiliskII/src/slirp/tcp_timer.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -126,12 +122,17 @@ char *tcptimers[] = (tv) = (tvmax); \ } -extern const int tcp_backoff[]; +extern int tcp_keepidle; /* time before keepalive probes begin */ +extern int tcp_keepintvl; /* time between keepalive probes */ +extern int tcp_maxidle; /* time to drop after starting probes */ +extern int tcp_ttl; /* time to live for TCP segs */ +extern int tcp_backoff[]; struct tcpcb; -void tcp_fasttimo _P((void)); -void tcp_slowtimo _P((void)); -void tcp_canceltimers _P((struct tcpcb *)); +void tcp_fasttimo(void); +void tcp_slowtimo(void); +void tcp_canceltimers(struct tcpcb *); +struct tcpcb * tcp_timers(register struct tcpcb *, int); #endif diff --git a/BasiliskII/src/slirp/tcp_var.h b/BasiliskII/src/slirp/tcp_var.h index 82380f93..c8e99ae0 100644 --- a/BasiliskII/src/slirp/tcp_var.h +++ b/BasiliskII/src/slirp/tcp_var.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -185,7 +181,6 @@ typedef u_int32_t mbufp_32; #endif #define REASS_MBUF(ti) (*(mbufp_32 *)&((ti)->ti_t)) -#ifdef LOG_ENABLED /* * TCP statistics. * Many of these should be kept per connection, @@ -248,8 +243,6 @@ struct tcpstat { }; extern struct tcpstat tcpstat; /* tcp statistics */ -#endif - extern u_int32_t tcp_now; /* for RFC 1323 timestamps */ #endif diff --git a/BasiliskII/src/slirp/tcpip.h b/BasiliskII/src/slirp/tcpip.h index 82708b09..dff5a3c9 100644 --- a/BasiliskII/src/slirp/tcpip.h +++ b/BasiliskII/src/slirp/tcpip.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/BasiliskII/src/slirp/tftp.c b/BasiliskII/src/slirp/tftp.c index 562ae895..3ba2971c 100644 --- a/BasiliskII/src/slirp/tftp.c +++ b/BasiliskII/src/slirp/tftp.c @@ -1,8 +1,8 @@ /* * tftp.c - a simple, read-only tftp server for qemu - * + * * Copyright (c) 2004 Magnus Damm - * + * * 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 @@ -26,15 +26,15 @@ struct tftp_session { int in_use; - unsigned char filename[TFTP_FILENAME_MAX]; - + char filename[TFTP_FILENAME_MAX]; + struct in_addr client_ip; u_int16_t client_port; - + int timestamp; }; -static struct tftp_session tftp_sessions[TFTP_SESSIONS_MAX]; +struct tftp_session tftp_sessions[TFTP_SESSIONS_MAX]; const char *tftp_prefix; @@ -102,15 +102,8 @@ static int tftp_read_data(struct tftp_session *spt, u_int16_t block_nr, { int fd; int bytes_read = 0; - char buffer[1024]; - int n; - n = snprintf(buffer, sizeof(buffer), "%s/%s", - tftp_prefix, spt->filename); - if (n >= sizeof(buffer)) - return -1; - - fd = open(buffer, O_RDONLY | O_BINARY); + fd = open(spt->filename, O_RDONLY | O_BINARY); if (fd < 0) { return -1; @@ -127,53 +120,13 @@ static int tftp_read_data(struct tftp_session *spt, u_int16_t block_nr, return bytes_read; } -static int tftp_send_oack(struct tftp_session *spt, - const char *key, uint32_t value, - struct tftp_t *recv_tp) -{ - struct sockaddr_in saddr, daddr; - struct mbuf *m; - struct tftp_t *tp; - int n = 0; - - m = m_get(); - - if (!m) - return -1; - - memset(m->m_data, 0, m->m_size); - - m->m_data += IF_MAXLINKHDR; - tp = (void *)m->m_data; - m->m_data += sizeof(struct udpiphdr); - - tp->tp_op = htons(TFTP_OACK); - n += sprintf(tp->x.tp_buf + n, "%s", key) + 1; - n += sprintf(tp->x.tp_buf + n, "%u", value) + 1; - - saddr.sin_addr = recv_tp->ip.ip_dst; - saddr.sin_port = recv_tp->udp.uh_dport; - - daddr.sin_addr = spt->client_ip; - daddr.sin_port = spt->client_port; - - m->m_len = sizeof(struct tftp_t) - 514 + n - - sizeof(struct ip) - sizeof(struct udphdr); - udp_output2(NULL, m, &saddr, &daddr, IPTOS_LOWDELAY); - - return 0; -} - - - -static int tftp_send_error(struct tftp_session *spt, +static int tftp_send_error(struct tftp_session *spt, u_int16_t errorcode, const char *msg, struct tftp_t *recv_tp) { struct sockaddr_in saddr, daddr; struct mbuf *m; struct tftp_t *tp; - int nobytes; m = m_get(); @@ -183,13 +136,14 @@ static int tftp_send_error(struct tftp_session *spt, memset(m->m_data, 0, m->m_size); - m->m_data += IF_MAXLINKHDR; + m->m_data += if_maxlinkhdr; tp = (void *)m->m_data; m->m_data += sizeof(struct udpiphdr); - + tp->tp_op = htons(TFTP_ERROR); tp->x.tp_error.tp_error_code = htons(errorcode); - strcpy(tp->x.tp_error.tp_msg, msg); + strncpy((char *)tp->x.tp_error.tp_msg, msg, sizeof(tp->x.tp_error.tp_msg)); + tp->x.tp_error.tp_msg[sizeof(tp->x.tp_error.tp_msg)-1] = 0; saddr.sin_addr = recv_tp->ip.ip_dst; saddr.sin_port = recv_tp->udp.uh_dport; @@ -197,9 +151,7 @@ static int tftp_send_error(struct tftp_session *spt, daddr.sin_addr = spt->client_ip; daddr.sin_port = spt->client_port; - nobytes = 2; - - m->m_len = sizeof(struct tftp_t) - 514 + 3 + strlen(msg) - + m->m_len = sizeof(struct tftp_t) - 514 + 3 + strlen(msg) - sizeof(struct ip) - sizeof(struct udphdr); udp_output2(NULL, m, &saddr, &daddr, IPTOS_LOWDELAY); @@ -209,7 +161,7 @@ static int tftp_send_error(struct tftp_session *spt, return 0; } -static int tftp_send_data(struct tftp_session *spt, +static int tftp_send_data(struct tftp_session *spt, u_int16_t block_nr, struct tftp_t *recv_tp) { @@ -230,10 +182,10 @@ static int tftp_send_data(struct tftp_session *spt, memset(m->m_data, 0, m->m_size); - m->m_data += IF_MAXLINKHDR; + m->m_data += if_maxlinkhdr; tp = (void *)m->m_data; m->m_data += sizeof(struct udpiphdr); - + tp->tp_op = htons(TFTP_DATA); tp->x.tp_data.tp_block_nr = htons(block_nr); @@ -255,7 +207,7 @@ static int tftp_send_data(struct tftp_session *spt, return -1; } - m->m_len = sizeof(struct tftp_t) - (512 - nobytes) - + m->m_len = sizeof(struct tftp_t) - (512 - nobytes) - sizeof(struct ip) - sizeof(struct udphdr); udp_output2(NULL, m, &saddr, &daddr, IPTOS_LOWDELAY); @@ -285,7 +237,7 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen) spt = &tftp_sessions[s]; src = tp->x.tp_buf; - dst = spt->filename; + dst = (u_int8_t *)spt->filename; n = pktlen - ((uint8_t *)&tp->x.tp_buf[0] - (uint8_t *)tp); /* get name */ @@ -297,30 +249,28 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen) else { return; } - + if (src[k] == '\0') { break; } } - + if (k >= n) { return; } - + k++; - + /* check mode */ if ((n - k) < 6) { return; } - + if (memcmp(&src[k], "octet\0", 6) != 0) { tftp_send_error(spt, 4, "Unsupported transfer mode", tp); return; } - k += 6; /* skipping octet */ - /* do sanity checks on the filename */ if ((spt->filename[0] != '/') @@ -332,60 +282,19 @@ static void tftp_handle_rrq(struct tftp_t *tp, int pktlen) /* only allow exported prefixes */ - if (!tftp_prefix) { + if (!tftp_prefix + || (strncmp(spt->filename, tftp_prefix, strlen(tftp_prefix)) != 0)) { tftp_send_error(spt, 2, "Access violation", tp); return; } /* check if the file exists */ - - if (tftp_read_data(spt, 0, spt->filename, 0) < 0) { + + if (tftp_read_data(spt, 0, (u_int8_t *)spt->filename, 0) < 0) { tftp_send_error(spt, 1, "File not found", tp); return; } - if (src[n - 1] != 0) { - tftp_send_error(spt, 2, "Access violation", tp); - return; - } - - while (k < n) { - const char *key, *value; - - key = src + k; - k += strlen(key) + 1; - - if (k >= n) { - tftp_send_error(spt, 2, "Access violation", tp); - return; - } - - value = src + k; - k += strlen(value) + 1; - - if (strcmp(key, "tsize") == 0) { - int tsize = atoi(value); - struct stat stat_p; - - if (tsize == 0 && tftp_prefix) { - char buffer[1024]; - int len; - - len = snprintf(buffer, sizeof(buffer), "%s/%s", - tftp_prefix, spt->filename); - - if (stat(buffer, &stat_p) == 0) - tsize = stat_p.st_size; - else { - tftp_send_error(spt, 1, "File not found", tp); - return; - } - } - - tftp_send_oack(spt, "tsize", tsize, tp); - } - } - tftp_send_data(spt, 1, tp); } @@ -399,8 +308,8 @@ static void tftp_handle_ack(struct tftp_t *tp, int pktlen) return; } - if (tftp_send_data(&tftp_sessions[s], - ntohs(tp->x.tp_data.tp_block_nr) + 1, + if (tftp_send_data(&tftp_sessions[s], + ntohs(tp->x.tp_data.tp_block_nr) + 1, tp) < 0) { return; } diff --git a/BasiliskII/src/slirp/tftp.h b/BasiliskII/src/slirp/tftp.h index 8f2675e0..b150a049 100644 --- a/BasiliskII/src/slirp/tftp.h +++ b/BasiliskII/src/slirp/tftp.h @@ -9,25 +9,32 @@ #define TFTP_DATA 3 #define TFTP_ACK 4 #define TFTP_ERROR 5 -#define TFTP_OACK 6 #define TFTP_FILENAME_MAX 512 +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(1) +#endif + struct tftp_t { struct ip ip; struct udphdr udp; u_int16_t tp_op; union { - struct { + struct { u_int16_t tp_block_nr; u_int8_t tp_buf[512]; } tp_data; - struct { + struct { u_int16_t tp_error_code; u_int8_t tp_msg[512]; } tp_error; u_int8_t tp_buf[512 + 2]; } x; -}; +} PACKED__; + +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(PACK_RESET) +#endif void tftp_input(struct mbuf *m); diff --git a/BasiliskII/src/slirp/udp.c b/BasiliskII/src/slirp/udp.c index c48923b0..9d805ff3 100644 --- a/BasiliskII/src/slirp/udp.c +++ b/BasiliskII/src/slirp/udp.c @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -37,31 +33,27 @@ /* * Changes and additions relating to SLiRP * Copyright (c) 1995 Danny Gasparovski. - * - * Please read the file COPYRIGHT for the + * + * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ +#include #include #include "ip_icmp.h" -#ifdef LOG_ENABLED struct udpstat udpstat; -#endif struct socket udb; -static u_int8_t udp_tos(struct socket *so); -static void udp_emu(struct socket *so, struct mbuf *m); - /* * UDP protocol implementation. * Per RFC 768, August, 1980. */ #ifndef COMPAT_42 -#define UDPCKSUM 1 +int udpcksum = 1; #else -#define UDPCKSUM 0 /* XXX */ +int udpcksum = 0; /* XXX */ #endif struct socket *udp_last_so = &udb; @@ -71,8 +63,8 @@ udp_init() { udb.so_next = udb.so_prev = &udb; } -/* m->m_data points at ip packet header - * m->m_len length ip packet +/* m->m_data points at ip packet header + * m->m_len length ip packet * ip->ip_len length data (IPDU) */ void @@ -84,14 +76,14 @@ udp_input(m, iphlen) register struct udphdr *uh; /* struct mbuf *opts = 0;*/ int len; - struct ip save_ip; + struct ip save_ip; struct socket *so; - + DEBUG_CALL("udp_input"); DEBUG_ARG("m = %lx", (long)m); DEBUG_ARG("iphlen = %d", iphlen); - - STAT(udpstat.udps_ipackets++); + + udpstat.udps_ipackets++; /* * Strip IP options, if any; should skip this, @@ -118,34 +110,34 @@ udp_input(m, iphlen) if (ip->ip_len != len) { if (len > ip->ip_len) { - STAT(udpstat.udps_badlen++); + udpstat.udps_badlen++; goto bad; } m_adj(m, len - ip->ip_len); ip->ip_len = len; } - + /* * Save a copy of the IP header in case we want restore it * for sending an ICMP error message in response. */ - save_ip = *ip; + save_ip = *ip; save_ip.ip_len+= iphlen; /* tcp_input subtracts this */ /* * Checksum extended UDP header and data. */ - if (UDPCKSUM && uh->uh_sum) { + if (udpcksum && uh->uh_sum) { ((struct ipovly *)ip)->ih_next = 0; ((struct ipovly *)ip)->ih_prev = 0; ((struct ipovly *)ip)->ih_x1 = 0; ((struct ipovly *)ip)->ih_len = uh->uh_ulen; /* keep uh_sum for ICMP reply - * uh->uh_sum = cksum(m, len + sizeof (struct ip)); - * if (uh->uh_sum) { + * uh->uh_sum = cksum(m, len + sizeof (struct ip)); + * if (uh->uh_sum) { */ if(cksum(m, len + sizeof(struct ip))) { - STAT(udpstat.udps_badsum++); + udpstat.udps_badsum++; goto bad; } } @@ -173,7 +165,7 @@ udp_input(m, iphlen) if (so->so_lport != uh->uh_sport || so->so_laddr.s_addr != ip->ip_src.s_addr) { struct socket *tmp; - + for (tmp = udb.so_next; tmp != &udb; tmp = tmp->so_next) { if (tmp->so_lport == uh->uh_sport && tmp->so_laddr.s_addr == ip->ip_src.s_addr) { @@ -186,11 +178,11 @@ udp_input(m, iphlen) if (tmp == &udb) { so = NULL; } else { - STAT(udpstat.udpps_pcbcachemiss++); + udpstat.udpps_pcbcachemiss++; udp_last_so = so; } } - + if (so == NULL) { /* * If there's no socket for this packet, @@ -198,22 +190,22 @@ udp_input(m, iphlen) */ if ((so = socreate()) == NULL) goto bad; if(udp_attach(so) == -1) { - DEBUG_MISC((dfd," udp_attach errno = %d-%s\n", + DEBUG_MISC((dfd," udp_attach errno = %d-%s\n", errno,strerror(errno))); sofree(so); goto bad; } - + /* * Setup fields */ /* udp_last_so = so; */ so->so_laddr = ip->ip_src; so->so_lport = uh->uh_sport; - + if ((so->so_iptos = udp_tos(so)) == 0) so->so_iptos = ip->ip_tos; - + /* * XXXXX Here, check if it's in udpexec_list, * and if it is, do the fork_exec() etc. @@ -238,7 +230,7 @@ udp_input(m, iphlen) m->m_data -= iphlen; *ip=save_ip; DEBUG_MISC((dfd,"udp tx errno = %d-%s\n",errno,strerror(errno))); - icmp_error(m, ICMP_UNREACH,ICMP_UNREACH_NET, 0,strerror(errno)); + icmp_error(m, ICMP_UNREACH,ICMP_UNREACH_NET, 0,strerror(errno)); } m_free(so->so_m); /* used for ICMP if error on sorecvfrom */ @@ -256,7 +248,7 @@ bad: return; } -int udp_output2(struct socket *so, struct mbuf *m, +int udp_output2(struct socket *so, struct mbuf *m, struct sockaddr_in *saddr, struct sockaddr_in *daddr, int iptos) { @@ -274,16 +266,19 @@ int udp_output2(struct socket *so, struct mbuf *m, */ m->m_data -= sizeof(struct udpiphdr); m->m_len += sizeof(struct udpiphdr); - + /* * Fill in mbuf with extended UDP header * and addresses and length put into network format. */ ui = mtod(m, struct udpiphdr *); - ui->ui_next = ui->ui_prev = 0; + //ui->ui_next = ui->ui_prev = 0; + + memset(&ui->ui_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr)); + ui->ui_x1 = 0; ui->ui_pr = IPPROTO_UDP; - ui->ui_len = htons(m->m_len - sizeof(struct ip)); /* + sizeof (struct udphdr)); */ + ui->ui_len = htons((u_short) (m->m_len - sizeof(struct ip))); /* + sizeof (struct udphdr)); */ /* XXXXX Check for from-one-location sockets, or from-any-location sockets */ ui->ui_src = saddr->sin_addr; ui->ui_dst = daddr->sin_addr; @@ -295,23 +290,23 @@ int udp_output2(struct socket *so, struct mbuf *m, * Stuff checksum and output datagram. */ ui->ui_sum = 0; - if (UDPCKSUM) { + if (udpcksum) { if ((ui->ui_sum = cksum(m, /* sizeof (struct udpiphdr) + */ m->m_len)) == 0) ui->ui_sum = 0xffff; } - ((struct ip *)ui)->ip_len = m->m_len; + ((struct ip *)ui)->ip_len = (u_int16_t) m->m_len; - ((struct ip *)ui)->ip_ttl = IPDEFTTL; + ((struct ip *)ui)->ip_ttl = ip_defttl; ((struct ip *)ui)->ip_tos = iptos; - - STAT(udpstat.udps_opackets++); - + + udpstat.udps_opackets++; + error = ip_output(so, m); - + return (error); } -int udp_output(struct socket *so, struct mbuf *m, +int udp_output(struct socket *so, struct mbuf *m, struct sockaddr_in *addr) { @@ -325,7 +320,7 @@ int udp_output(struct socket *so, struct mbuf *m, } daddr.sin_addr = so->so_laddr; daddr.sin_port = so->so_lport; - + return udp_output2(so, m, &saddr, &daddr, so->so_iptos); } @@ -334,25 +329,22 @@ udp_attach(so) struct socket *so; { struct sockaddr_in addr; - + if((so->s = socket(AF_INET,SOCK_DGRAM,0)) != -1) { /* * Here, we bind() the socket. Although not really needed * (sendto() on an unbound socket will bind it), it's done * here so that emulation of ytalk etc. don't have to do it */ + memset(&addr, 0, sizeof(struct sockaddr_in)); addr.sin_family = AF_INET; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; if(bind(so->s, (struct sockaddr *)&addr, sizeof(addr))<0) { - int lasterrno=errno; + int error = WSAGetLastError(); closesocket(so->s); so->s=-1; -#ifdef _WIN32 - WSASetLastError(lasterrno); -#else - errno=lasterrno; -#endif + WSASetLastError(error); } else { /* success, insert in queue */ so->so_expire = curtime + SO_EXPIRE; @@ -372,7 +364,7 @@ udp_detach(so) sofree(so); } -static const struct tos_t udptos[] = { +struct tos_t udptos[] = { {0, 53, IPTOS_LOWDELAY, 0}, /* DNS */ {517, 517, IPTOS_LOWDELAY, EMU_TALK}, /* talk */ {518, 518, IPTOS_LOWDELAY, EMU_NTALK}, /* ntalk */ @@ -380,11 +372,12 @@ static const struct tos_t udptos[] = { {0, 0, 0, 0} }; -static u_int8_t -udp_tos(struct socket *so) +u_int8_t +udp_tos(so) + struct socket *so; { int i = 0; - + while(udptos[i].tos) { if ((udptos[i].fport && ntohs(so->so_fport) == udptos[i].fport) || (udptos[i].lport && ntohs(so->so_lport) == udptos[i].lport)) { @@ -393,7 +386,7 @@ udp_tos(struct socket *so) } i++; } - + return 0; } @@ -404,27 +397,29 @@ udp_tos(struct socket *so) /* * Here, talk/ytalk/ntalk requests must be emulated */ -static void -udp_emu(struct socket *so, struct mbuf *m) +void +udp_emu(so, m) + struct socket *so; + struct mbuf *m; { struct sockaddr_in addr; - int addrlen = sizeof(addr); + socklen_t addrlen = sizeof(addr); #ifdef EMULATE_TALK CTL_MSG_OLD *omsg; CTL_MSG *nmsg; char buff[sizeof(CTL_MSG)]; u_char type; - + struct talk_request { struct talk_request *next; struct socket *udp_so; struct socket *tcp_so; } *req; - - static struct talk_request *req_tbl = 0; - + + static struct talk_request *req_tbl = 0; + #endif - + struct cu_header { uint16_t d_family; // destination family uint16_t d_port; // destination port @@ -451,7 +446,7 @@ struct cu_header { */ if (getsockname(so->s, (struct sockaddr *)&addr, &addrlen) < 0) return; - + #define IS_OLD (so->so_emu == EMU_TALK) #define COPY_MSG(dest, src) { dest->type = src->type; \ @@ -474,7 +469,7 @@ struct cu_header { OTOSIN(omsg, ctl_addr)->sin_port = addr.sin_port; OTOSIN(omsg, ctl_addr)->sin_addr = our_addr; strncpy(omsg->l_name, getlogin(), NAME_SIZE_OLD); - } else { /* new talk */ + } else { /* new talk */ omsg = (CTL_MSG_OLD *) buff; nmsg = mtod(m, CTL_MSG *); type = nmsg->type; @@ -482,10 +477,10 @@ struct cu_header { OTOSIN(nmsg, ctl_addr)->sin_addr = our_addr; strncpy(nmsg->l_name, getlogin(), NAME_SIZE_OLD); } - - if (type == LOOK_UP) + + if (type == LOOK_UP) return; /* for LOOK_UP this is enough */ - + if (IS_OLD) { /* make a copy of the message */ COPY_MSG(nmsg, omsg); nmsg->vers = 1; @@ -504,75 +499,75 @@ struct cu_header { * ports, 517 and 518. This is why we have two copies * of the message, one in old talk and one in new talk * format. - */ + */ if (type == ANNOUNCE) { int s; u_short temp_port; - + for(req = req_tbl; req; req = req->next) if (so == req->udp_so) break; /* found it */ - + if (!req) { /* no entry for so, create new */ req = (struct talk_request *) malloc(sizeof(struct talk_request)); req->udp_so = so; - req->tcp_so = solisten(0, - OTOSIN(omsg, addr)->sin_addr.s_addr, + req->tcp_so = solisten(0, + OTOSIN(omsg, addr)->sin_addr.s_addr, OTOSIN(omsg, addr)->sin_port, SS_FACCEPTONCE); req->next = req_tbl; req_tbl = req; - } - + } + /* replace port number in addr field */ addrlen = sizeof(addr); - getsockname(req->tcp_so->s, + getsockname(req->tcp_so->s, (struct sockaddr *) &addr, - &addrlen); + &addrlen); OTOSIN(omsg, addr)->sin_port = addr.sin_port; OTOSIN(omsg, addr)->sin_addr = our_addr; OTOSIN(nmsg, addr)->sin_port = addr.sin_port; - OTOSIN(nmsg, addr)->sin_addr = our_addr; - + OTOSIN(nmsg, addr)->sin_addr = our_addr; + /* send LEAVE_INVITEs */ temp_port = OTOSIN(omsg, ctl_addr)->sin_port; OTOSIN(omsg, ctl_addr)->sin_port = 0; OTOSIN(nmsg, ctl_addr)->sin_port = 0; - omsg->type = nmsg->type = LEAVE_INVITE; - + omsg->type = nmsg->type = LEAVE_INVITE; + s = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); addr.sin_addr = our_addr; addr.sin_family = AF_INET; addr.sin_port = htons(517); - sendto(s, (char *)omsg, sizeof(*omsg), 0, + sendto(s, (char *)omsg, sizeof(*omsg), 0, (struct sockaddr *)&addr, sizeof(addr)); addr.sin_port = htons(518); sendto(s, (char *)nmsg, sizeof(*nmsg), 0, (struct sockaddr *) &addr, sizeof(addr)); closesocket(s) ; - omsg->type = nmsg->type = ANNOUNCE; + omsg->type = nmsg->type = ANNOUNCE; OTOSIN(omsg, ctl_addr)->sin_port = temp_port; OTOSIN(nmsg, ctl_addr)->sin_port = temp_port; } - - /* + + /* * If it is a DELETE message, we send a copy to the * local daemons. Then we delete the entry corresponding * to our socket from the request table. */ - + if (type == DELETE) { struct talk_request *temp_req, *req_next; int s; u_short temp_port; - + temp_port = OTOSIN(omsg, ctl_addr)->sin_port; OTOSIN(omsg, ctl_addr)->sin_port = 0; OTOSIN(nmsg, ctl_addr)->sin_port = 0; - + s = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); addr.sin_addr = our_addr; addr.sin_family = AF_INET; @@ -583,7 +578,7 @@ struct cu_header { sendto(s, (char *)nmsg, sizeof(*nmsg), 0, (struct sockaddr *)&addr, sizeof(addr)); closesocket(s); - + OTOSIN(omsg, ctl_addr)->sin_port = temp_port; OTOSIN(nmsg, ctl_addr)->sin_port = temp_port; @@ -606,18 +601,18 @@ struct cu_header { } } } - - return; + + return; #endif - + case EMU_CUSEEME: - + /* * Cu-SeeMe emulation. * Hopefully the packet is more that 16 bytes long. We don't * do any other tests, just replace the address and port * fields. - */ + */ if (m->m_len >= sizeof (*cu_head)) { if (getsockname(so->s, (struct sockaddr *)&addr, &addrlen) < 0) return; @@ -625,7 +620,7 @@ struct cu_header { cu_head->s_port = addr.sin_port; cu_head->so_addr = our_addr.s_addr; } - + return; } } @@ -639,8 +634,9 @@ udp_listen(port, laddr, lport, flags) { struct sockaddr_in addr; struct socket *so; - int addrlen = sizeof(struct sockaddr_in), opt = 1; - + socklen_t addrlen = sizeof(struct sockaddr_in); + int opt = 1; + if ((so = socreate()) == NULL) { free(so); return NULL; @@ -649,6 +645,7 @@ udp_listen(port, laddr, lport, flags) so->so_expire = curtime + SO_EXPIRE; insque(so,&udb); + memset(&addr, 0, sizeof(struct sockaddr_in)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_port = port; @@ -659,20 +656,20 @@ udp_listen(port, laddr, lport, flags) } setsockopt(so->s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int)); /* setsockopt(so->s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(int)); */ - + getsockname(so->s,(struct sockaddr *)&addr,&addrlen); so->so_fport = addr.sin_port; if (addr.sin_addr.s_addr == 0 || addr.sin_addr.s_addr == loopback_addr.s_addr) so->so_faddr = alias_addr; else so->so_faddr = addr.sin_addr; - + so->so_lport = lport; so->so_laddr.s_addr = laddr; if (flags != SS_FACCEPTONCE) so->so_expire = 0; - + so->so_state = SS_ISFCONNECTED; - + return so; } diff --git a/BasiliskII/src/slirp/udp.h b/BasiliskII/src/slirp/udp.h index 4f69b098..7d844efe 100644 --- a/BasiliskII/src/slirp/udp.h +++ b/BasiliskII/src/slirp/udp.h @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -46,12 +42,20 @@ extern struct socket *udp_last_so; * Udp protocol header. * Per RFC 768, September, 1981. */ +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(1) +#endif + struct udphdr { u_int16_t uh_sport; /* source port */ u_int16_t uh_dport; /* destination port */ int16_t uh_ulen; /* udp length */ u_int16_t uh_sum; /* udp checksum */ -}; +} PACKED__; + +#ifdef PRAGMA_PACK_SUPPORTED +#pragma pack(PACK_RESET) +#endif /* * UDP kernel structures and variables. @@ -72,7 +76,6 @@ struct udpiphdr { #define ui_ulen ui_u.uh_ulen #define ui_sum ui_u.uh_sum -#ifdef LOG_ENABLED struct udpstat { /* input statistics: */ u_long udps_ipackets; /* total input packets */ @@ -86,7 +89,6 @@ struct udpstat { /* output statistics: */ u_long udps_opackets; /* total output packets */ }; -#endif /* * Names for UDP sysctl objects @@ -94,20 +96,19 @@ struct udpstat { #define UDPCTL_CHECKSUM 1 /* checksum UDP packets */ #define UDPCTL_MAXID 2 -#ifdef LOG_ENABLED extern struct udpstat udpstat; -#endif - extern struct socket udb; struct mbuf; -void udp_init _P((void)); -void udp_input _P((register struct mbuf *, int)); -int udp_output _P((struct socket *, struct mbuf *, struct sockaddr_in *)); -int udp_attach _P((struct socket *)); -void udp_detach _P((struct socket *)); -struct socket * udp_listen _P((u_int, u_int32_t, u_int, int)); -int udp_output2(struct socket *so, struct mbuf *m, +void udp_init(void); +void udp_input(register struct mbuf *, int); +int udp_output(struct socket *, struct mbuf *, struct sockaddr_in *); +int udp_attach(struct socket *); +void udp_detach(struct socket *); +u_int8_t udp_tos(struct socket *); +void udp_emu(struct socket *, struct mbuf *); +struct socket * udp_listen(u_int, u_int32_t, u_int, int); +int udp_output2(struct socket *so, struct mbuf *m, struct sockaddr_in *saddr, struct sockaddr_in *daddr, int iptos); #endif From dc0663b72d78655210ee7685bb8193ceec699969 Mon Sep 17 00:00:00 2001 From: jvernet Date: Wed, 4 Oct 2017 18:22:53 +0200 Subject: [PATCH 77/85] Revert "64 bits slirp ?" This reverts commit 000ec0f135c7509a13b3c2bacd26f9ce27503c80. --- BasiliskII/src/slirp/tcp_input.c | 6 +----- BasiliskII/src/slirp/udp.c | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/BasiliskII/src/slirp/tcp_input.c b/BasiliskII/src/slirp/tcp_input.c index 5c06f16f..032e5378 100644 --- a/BasiliskII/src/slirp/tcp_input.c +++ b/BasiliskII/src/slirp/tcp_input.c @@ -292,11 +292,7 @@ void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) * Checksum extended TCP header and data. */ tlen = ((struct ip *)ti)->ip_len; - //ti->ti_next = ti->ti_prev = 0; - - tcpiphdr2qlink(ti)->next = tcpiphdr2qlink(ti)->prev = 0; - memset(&ti->ti_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr)); - + ti->ti_next = ti->ti_prev = 0; ti->ti_x1 = 0; ti->ti_len = htons((u_int16_t)tlen); len = sizeof(struct ip) + tlen; diff --git a/BasiliskII/src/slirp/udp.c b/BasiliskII/src/slirp/udp.c index 9d805ff3..deedb1e7 100644 --- a/BasiliskII/src/slirp/udp.c +++ b/BasiliskII/src/slirp/udp.c @@ -272,10 +272,7 @@ int udp_output2(struct socket *so, struct mbuf *m, * and addresses and length put into network format. */ ui = mtod(m, struct udpiphdr *); - //ui->ui_next = ui->ui_prev = 0; - - memset(&ui->ui_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr)); - + ui->ui_next = ui->ui_prev = 0; ui->ui_x1 = 0; ui->ui_pr = IPPROTO_UDP; ui->ui_len = htons((u_short) (m->m_len - sizeof(struct ip))); /* + sizeof (struct udphdr)); */ From 38c6541edc781f90d3bcac324f9972170b8a4882 Mon Sep 17 00:00:00 2001 From: jvernet Date: Thu, 5 Oct 2017 19:15:27 +0200 Subject: [PATCH 78/85] 64 Bits Slirp At least it will not crash anymore --- .../BasiliskII.xcodeproj/project.pbxproj | 104 ++ BasiliskII/src/MacOSX/config.h | 2 +- BasiliskII/src/Unix/Darwin/lowmem | Bin 0 -> 13284 bytes BasiliskII/src/Unix/Darwin/pagezero | Bin 0 -> 4248 bytes BasiliskII/src/slirp/VERSION | 1 + BasiliskII/src/slirp/bootp.c | 0 BasiliskII/src/slirp/bootp.h | 2 +- BasiliskII/src/slirp/cksum.c | 0 BasiliskII/src/slirp/ctl.h | 0 BasiliskII/src/slirp/debug.c | 15 +- BasiliskII/src/slirp/debug.h | 22 +- BasiliskII/src/slirp/icmp_var.h | 0 BasiliskII/src/slirp/if.c | 9 +- BasiliskII/src/slirp/if.h | 4 +- BasiliskII/src/slirp/ip.h | 70 +- BasiliskII/src/slirp/ip_icmp.c | 26 +- BasiliskII/src/slirp/ip_icmp.h | 8 +- BasiliskII/src/slirp/ip_input.c | 156 +-- BasiliskII/src/slirp/ip_output.c | 9 +- BasiliskII/src/slirp/libslirp.h | 0 BasiliskII/src/slirp/main.h | 0 BasiliskII/src/slirp/mbuf.c | 37 +- BasiliskII/src/slirp/mbuf.h | 22 +- BasiliskII/src/slirp/misc.c | 192 +-- BasiliskII/src/slirp/misc.h | 38 +- BasiliskII/src/slirp/sbuf.c | 33 +- BasiliskII/src/slirp/sbuf.h | 14 +- BasiliskII/src/slirp/slirp.c | 190 ++- BasiliskII/src/slirp/slirp.h | 145 +-- BasiliskII/src/slirp/slirp_config.h | 8 + BasiliskII/src/slirp/socket.c | 53 +- BasiliskII/src/slirp/socket.h | 38 +- BasiliskII/src/slirp/tcp.h | 6 +- BasiliskII/src/slirp/tcp_input.c | 1060 ++++++++--------- BasiliskII/src/slirp/tcp_output.c | 30 +- BasiliskII/src/slirp/tcp_subr.c | 92 +- BasiliskII/src/slirp/tcp_timer.c | 0 BasiliskII/src/slirp/tcp_timer.h | 8 +- BasiliskII/src/slirp/tcp_var.h | 25 +- BasiliskII/src/slirp/tcpip.h | 11 +- BasiliskII/src/slirp/tftp.c | 3 + BasiliskII/src/slirp/tftp.h | 2 +- BasiliskII/src/slirp/udp.c | 17 +- BasiliskII/src/slirp/udp.h | 21 +- 44 files changed, 1333 insertions(+), 1140 deletions(-) create mode 100755 BasiliskII/src/Unix/Darwin/lowmem create mode 100755 BasiliskII/src/Unix/Darwin/pagezero mode change 100644 => 100755 BasiliskII/src/slirp/bootp.c mode change 100644 => 100755 BasiliskII/src/slirp/bootp.h mode change 100644 => 100755 BasiliskII/src/slirp/cksum.c mode change 100644 => 100755 BasiliskII/src/slirp/ctl.h mode change 100644 => 100755 BasiliskII/src/slirp/debug.c mode change 100644 => 100755 BasiliskII/src/slirp/debug.h mode change 100644 => 100755 BasiliskII/src/slirp/icmp_var.h mode change 100644 => 100755 BasiliskII/src/slirp/if.c mode change 100644 => 100755 BasiliskII/src/slirp/if.h mode change 100644 => 100755 BasiliskII/src/slirp/ip.h mode change 100644 => 100755 BasiliskII/src/slirp/ip_icmp.c mode change 100644 => 100755 BasiliskII/src/slirp/ip_icmp.h mode change 100644 => 100755 BasiliskII/src/slirp/ip_input.c mode change 100644 => 100755 BasiliskII/src/slirp/ip_output.c mode change 100644 => 100755 BasiliskII/src/slirp/libslirp.h mode change 100644 => 100755 BasiliskII/src/slirp/main.h mode change 100644 => 100755 BasiliskII/src/slirp/mbuf.c mode change 100644 => 100755 BasiliskII/src/slirp/mbuf.h mode change 100644 => 100755 BasiliskII/src/slirp/misc.c mode change 100644 => 100755 BasiliskII/src/slirp/misc.h mode change 100644 => 100755 BasiliskII/src/slirp/sbuf.c mode change 100644 => 100755 BasiliskII/src/slirp/sbuf.h mode change 100644 => 100755 BasiliskII/src/slirp/slirp.c mode change 100644 => 100755 BasiliskII/src/slirp/slirp.h mode change 100644 => 100755 BasiliskII/src/slirp/slirp_config.h mode change 100644 => 100755 BasiliskII/src/slirp/socket.c mode change 100644 => 100755 BasiliskII/src/slirp/socket.h mode change 100644 => 100755 BasiliskII/src/slirp/tcp.h mode change 100644 => 100755 BasiliskII/src/slirp/tcp_input.c mode change 100644 => 100755 BasiliskII/src/slirp/tcp_output.c mode change 100644 => 100755 BasiliskII/src/slirp/tcp_subr.c mode change 100644 => 100755 BasiliskII/src/slirp/tcp_timer.c mode change 100644 => 100755 BasiliskII/src/slirp/tcp_timer.h mode change 100644 => 100755 BasiliskII/src/slirp/tcp_var.h mode change 100644 => 100755 BasiliskII/src/slirp/tcpip.h mode change 100644 => 100755 BasiliskII/src/slirp/tftp.c mode change 100644 => 100755 BasiliskII/src/slirp/tftp.h mode change 100644 => 100755 BasiliskII/src/slirp/udp.c mode change 100644 => 100755 BasiliskII/src/slirp/udp.h diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index aaa57a80..ff97d3a7 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -7,6 +7,25 @@ objects = { /* Begin PBXBuildFile section */ + 4E4213FE1F85430F00377045 /* ether_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4E4213FA1F85430E00377045 /* ether_unix.cpp */; }; + 4E42142F1F854B1700377045 /* bootp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E42142E1F854B1700377045 /* bootp.c */; }; + 4E4214311F854B2C00377045 /* ip_output.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214301F854B2C00377045 /* ip_output.c */; }; + 4E4214421F854BB300377045 /* tcp_timer.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214321F854BB100377045 /* tcp_timer.c */; }; + 4E4214431F854BB300377045 /* tcp_input.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214331F854BB100377045 /* tcp_input.c */; }; + 4E4214441F854BB300377045 /* debug.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214341F854BB200377045 /* debug.c */; }; + 4E4214451F854BB300377045 /* tcp_subr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214351F854BB200377045 /* tcp_subr.c */; }; + 4E4214461F854BB300377045 /* cksum.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214361F854BB200377045 /* cksum.c */; }; + 4E4214471F854BB300377045 /* ip_input.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214371F854BB200377045 /* ip_input.c */; }; + 4E4214481F854BB300377045 /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214381F854BB200377045 /* socket.c */; }; + 4E4214491F854BB300377045 /* udp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214391F854BB200377045 /* udp.c */; }; + 4E42144A1F854BB300377045 /* sbuf.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E42143A1F854BB200377045 /* sbuf.c */; }; + 4E42144B1F854BB300377045 /* mbuf.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E42143B1F854BB200377045 /* mbuf.c */; }; + 4E42144C1F854BB300377045 /* tcp_output.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E42143C1F854BB200377045 /* tcp_output.c */; }; + 4E42144D1F854BB300377045 /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E42143D1F854BB200377045 /* misc.c */; }; + 4E42144E1F854BB300377045 /* if.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E42143E1F854BB300377045 /* if.c */; }; + 4E42144F1F854BB300377045 /* tftp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E42143F1F854BB300377045 /* tftp.c */; }; + 4E4214501F854BB300377045 /* slirp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214401F854BB300377045 /* slirp.c */; }; + 4E4214511F854BB300377045 /* ip_icmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214411F854BB300377045 /* ip_icmp.c */; }; 752F26F91F240E51001032B4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F26F81F240E51001032B4 /* Foundation.framework */; }; 752F26FB1F240E69001032B4 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F26FA1F240E69001032B4 /* IOKit.framework */; }; 752F27011F242BAF001032B4 /* prefs_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 752F27001F242BAF001032B4 /* prefs_sdl.cpp */; }; @@ -208,6 +227,25 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 4E4213FA1F85430E00377045 /* ether_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ether_unix.cpp; path = ../Unix/ether_unix.cpp; sourceTree = ""; }; + 4E42142E1F854B1700377045 /* bootp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bootp.c; path = ../../slirp/bootp.c; sourceTree = ""; }; + 4E4214301F854B2C00377045 /* ip_output.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ip_output.c; path = ../../slirp/ip_output.c; sourceTree = ""; }; + 4E4214321F854BB100377045 /* tcp_timer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tcp_timer.c; path = ../../slirp/tcp_timer.c; sourceTree = ""; }; + 4E4214331F854BB100377045 /* tcp_input.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tcp_input.c; path = ../../slirp/tcp_input.c; sourceTree = ""; }; + 4E4214341F854BB200377045 /* debug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = debug.c; path = ../../slirp/debug.c; sourceTree = ""; }; + 4E4214351F854BB200377045 /* tcp_subr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tcp_subr.c; path = ../../slirp/tcp_subr.c; sourceTree = ""; }; + 4E4214361F854BB200377045 /* cksum.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cksum.c; path = ../../slirp/cksum.c; sourceTree = ""; }; + 4E4214371F854BB200377045 /* ip_input.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ip_input.c; path = ../../slirp/ip_input.c; sourceTree = ""; }; + 4E4214381F854BB200377045 /* socket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = socket.c; path = ../../slirp/socket.c; sourceTree = ""; }; + 4E4214391F854BB200377045 /* udp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = udp.c; path = ../../slirp/udp.c; sourceTree = ""; }; + 4E42143A1F854BB200377045 /* sbuf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sbuf.c; path = ../../slirp/sbuf.c; sourceTree = ""; }; + 4E42143B1F854BB200377045 /* mbuf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mbuf.c; path = ../../slirp/mbuf.c; sourceTree = ""; }; + 4E42143C1F854BB200377045 /* tcp_output.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tcp_output.c; path = ../../slirp/tcp_output.c; sourceTree = ""; }; + 4E42143D1F854BB200377045 /* misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = misc.c; path = ../../slirp/misc.c; sourceTree = ""; }; + 4E42143E1F854BB300377045 /* if.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = if.c; path = ../../slirp/if.c; sourceTree = ""; }; + 4E42143F1F854BB300377045 /* tftp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tftp.c; path = ../../slirp/tftp.c; sourceTree = ""; }; + 4E4214401F854BB300377045 /* slirp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = slirp.c; path = ../../slirp/slirp.c; sourceTree = ""; }; + 4E4214411F854BB300377045 /* ip_icmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ip_icmp.c; path = ../../slirp/ip_icmp.c; sourceTree = ""; }; 752F26F81F240E51001032B4 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 752F26FA1F240E69001032B4 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 752F27001F242BAF001032B4 /* prefs_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = prefs_sdl.cpp; sourceTree = ""; }; @@ -409,6 +447,31 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 4E4214031F85448200377045 /* slirp */ = { + isa = PBXGroup; + children = ( + 4E4214301F854B2C00377045 /* ip_output.c */, + 4E4214361F854BB200377045 /* cksum.c */, + 4E4214341F854BB200377045 /* debug.c */, + 4E42143E1F854BB300377045 /* if.c */, + 4E4214411F854BB300377045 /* ip_icmp.c */, + 4E4214371F854BB200377045 /* ip_input.c */, + 4E42143B1F854BB200377045 /* mbuf.c */, + 4E42143D1F854BB200377045 /* misc.c */, + 4E42143A1F854BB200377045 /* sbuf.c */, + 4E4214401F854BB300377045 /* slirp.c */, + 4E4214381F854BB200377045 /* socket.c */, + 4E4214331F854BB100377045 /* tcp_input.c */, + 4E42143C1F854BB200377045 /* tcp_output.c */, + 4E4214351F854BB200377045 /* tcp_subr.c */, + 4E4214321F854BB100377045 /* tcp_timer.c */, + 4E42143F1F854BB300377045 /* tftp.c */, + 4E4214391F854BB200377045 /* udp.c */, + 4E42142E1F854B1700377045 /* bootp.c */, + ); + path = slirp; + sourceTree = ""; + }; 752F26F71F240E51001032B4 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -653,6 +716,7 @@ 7539E1E41F23B25E006B2DF2 /* src */ = { isa = PBXGroup; children = ( + 4E4214031F85448200377045 /* slirp */, 7539DFC91F23B25A006B2DF2 /* adb.cpp */, 7539DFCA1F23B25A006B2DF2 /* audio.cpp */, 7539DFCB1F23B25A006B2DF2 /* cdrom.cpp */, @@ -661,6 +725,7 @@ 7539E2811F23C52C006B2DF2 /* dummy */, 7539DFD51F23B25A006B2DF2 /* emul_op.cpp */, 7539DFD61F23B25A006B2DF2 /* ether.cpp */, + 4E4213FA1F85430E00377045 /* ether_unix.cpp */, 7539DFD71F23B25A006B2DF2 /* extfs.cpp */, 7539DFD81F23B25A006B2DF2 /* include */, 7539DFF81F23B25A006B2DF2 /* macos_util.cpp */, @@ -1035,7 +1100,9 @@ buildActionMask = 2147483647; files = ( 7539E19E1F23B25A006B2DF2 /* rounding.cpp in Sources */, + 4E42144F1F854BB300377045 /* tftp.c in Sources */, 7539E29D1F23C83F006B2DF2 /* sys_darwin.cpp in Sources */, + 4E4214481F854BB300377045 /* socket.c in Sources */, 7539E1291F23B25A006B2DF2 /* video_blit.cpp in Sources */, 7539E28E1F23C56F006B2DF2 /* clip_dummy.cpp in Sources */, 7539E1A01F23B25A006B2DF2 /* memory.cpp in Sources */, @@ -1043,22 +1110,32 @@ 7539E1741F23B25A006B2DF2 /* audio_sdl.cpp in Sources */, 753252EE1F535DD10024025B /* defs68k.c in Sources */, 7539E29F1F23C939006B2DF2 /* fpu_uae.cpp in Sources */, + 4E42144E1F854BB300377045 /* if.c in Sources */, 7539E1E21F23B25A006B2DF2 /* video.cpp in Sources */, 7539E18F1F23B25A006B2DF2 /* timer.cpp in Sources */, + 4E4214441F854BB300377045 /* debug.c in Sources */, 7539E1711F23B25A006B2DF2 /* rom_patches.cpp in Sources */, 7539E1281F23B25A006B2DF2 /* sigsegv.cpp in Sources */, + 4E42144B1F854BB300377045 /* mbuf.c in Sources */, + 4E4214501F854BB300377045 /* slirp.c in Sources */, 753253341F5368370024025B /* cpustbl.cpp in Sources */, 756C1B341F252FC100620917 /* utils_macosx.mm in Sources */, 753253321F5368370024025B /* cpuemu.cpp in Sources */, 7539E2701F23B32A006B2DF2 /* tinyxml2.cpp in Sources */, + 4E4214431F854BB300377045 /* tcp_input.c in Sources */, 7539E28F1F23C56F006B2DF2 /* ether_dummy.cpp in Sources */, + 4E4214311F854B2C00377045 /* ip_output.c in Sources */, + 4E4214421F854BB300377045 /* tcp_timer.c in Sources */, 7539E1721F23B25A006B2DF2 /* rsrc_patches.cpp in Sources */, + 4E4214491F854BB300377045 /* udp.c in Sources */, 7539E2931F23C56F006B2DF2 /* serial_dummy.cpp in Sources */, 7539E1981F23B25A006B2DF2 /* exceptions.cpp in Sources */, 75CBCF771F5DB65E00830063 /* video_sdl.cpp in Sources */, 7539E1901F23B25A006B2DF2 /* basilisk_glue.cpp in Sources */, 7539E2801F23C4CA006B2DF2 /* main_unix.cpp in Sources */, 7539E1E11F23B25A006B2DF2 /* user_strings.cpp in Sources */, + 4E4214451F854BB300377045 /* tcp_subr.c in Sources */, + 4E4214471F854BB300377045 /* ip_input.c in Sources */, 75CBCF751F5DB3AD00830063 /* video_sdl2.cpp in Sources */, 752F27011F242BAF001032B4 /* prefs_sdl.cpp in Sources */, 7539E2971F23C5FD006B2DF2 /* newcpu.cpp in Sources */, @@ -1066,8 +1143,11 @@ 753253331F5368370024025B /* cpustbl_nf.cpp in Sources */, 7539E16C1F23B25A006B2DF2 /* main.cpp in Sources */, 7539E26D1F23B32A006B2DF2 /* strlcpy.c in Sources */, + 4E4214511F854BB300377045 /* ip_icmp.c in Sources */, + 4E4214461F854BB300377045 /* cksum.c in Sources */, 7539E26E1F23B32A006B2DF2 /* sys_unix.cpp in Sources */, 7539E1271F23B25A006B2DF2 /* cdrom.cpp in Sources */, + 4E42144C1F854BB300377045 /* tcp_output.c in Sources */, 753253311F5368370024025B /* cpuemu_nf.cpp in Sources */, 7539E1261F23B25A006B2DF2 /* audio.cpp in Sources */, 7539E1701F23B25A006B2DF2 /* prefs.cpp in Sources */, @@ -1084,6 +1164,7 @@ 7539E23F1F23B32A006B2DF2 /* bincue_unix.cpp in Sources */, 7539E12C1F23B25A006B2DF2 /* emul_op.cpp in Sources */, 7539E19D1F23B25A006B2DF2 /* mathlib.cpp in Sources */, + 4E4213FE1F85430F00377045 /* ether_unix.cpp in Sources */, 752F27031F242F51001032B4 /* xpram_sdl.cpp in Sources */, 7539E16D1F23B25A006B2DF2 /* pict.c in Sources */, 7539E1251F23B25A006B2DF2 /* adb.cpp in Sources */, @@ -1092,8 +1173,11 @@ 7539E18D1F23B25A006B2DF2 /* slot_rom.cpp in Sources */, 7539E1731F23B25A006B2DF2 /* scsi.cpp in Sources */, 7539E12B1F23B25A006B2DF2 /* disk.cpp in Sources */, + 4E42144D1F854BB300377045 /* misc.c in Sources */, 7539E1E31F23B25A006B2DF2 /* xpram.cpp in Sources */, + 4E42142F1F854B1700377045 /* bootp.c in Sources */, 7539E24C1F23B32A006B2DF2 /* extfs_unix.cpp in Sources */, + 4E42144A1F854BB300377045 /* sbuf.c in Sources */, 7539E2681F23B32A006B2DF2 /* rpc_unix.cpp in Sources */, 7539E2911F23C56F006B2DF2 /* prefs_editor_dummy.cpp in Sources */, ); @@ -1320,11 +1404,21 @@ "$(LOCAL_LIBRARY_DIR)/Frameworks", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_USE_STANDARD_INCLUDE_SEARCHING = YES; + HEADER_SEARCH_PATHS = ( + "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", + ../MacOSX, + ../include, + ../uae_cpu, + ../UNIX, + ../slirp, + ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.7; PRODUCT_BUNDLE_IDENTIFIER = com.basiliskii.BasiliskII; PRODUCT_NAME = "$(TARGET_NAME)"; + WARNING_CFLAGS = "-Wconversion"; }; name = Debug; }; @@ -1339,11 +1433,21 @@ "$(LOCAL_LIBRARY_DIR)/Frameworks", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_USE_STANDARD_INCLUDE_SEARCHING = YES; + HEADER_SEARCH_PATHS = ( + "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", + ../MacOSX, + ../include, + ../uae_cpu, + ../UNIX, + ../slirp, + ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.7; PRODUCT_BUNDLE_IDENTIFIER = com.basiliskii.BasiliskII; PRODUCT_NAME = "$(TARGET_NAME)"; + WARNING_CFLAGS = "-Wconversion"; }; name = Release; }; diff --git a/BasiliskII/src/MacOSX/config.h b/BasiliskII/src/MacOSX/config.h index 5dbc78ab..f75200eb 100644 --- a/BasiliskII/src/MacOSX/config.h +++ b/BasiliskII/src/MacOSX/config.h @@ -458,7 +458,7 @@ #define HAVE_SINL 1 /* Define if slirp library is supported */ -/* #define HAVE_SLIRP 1 */ +#define HAVE_SLIRP 1 /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 diff --git a/BasiliskII/src/Unix/Darwin/lowmem b/BasiliskII/src/Unix/Darwin/lowmem new file mode 100755 index 0000000000000000000000000000000000000000..2117ff9acd26263273cb6ddbdd5e5fd7a3521f3a GIT binary patch literal 13284 zcmeHOZEO_B8QufjI4N)@!L3Q4tPpOUh7Ut9H53v%^)>4T2NOU=t;lk=&mYnG?s|6? zb}CcT!wJiBsns?WrAS38s@gM`cmV*XNm; z`|v@c{%Zg1NIUQQ&b;q4?>sYe7PHIM+qY)#(KOF|P3xJbX_^<$=>kpb)pTf@whWJf z$29A!pY(mp_smYV&Mls~=3On~lwknV+~eD~XReEg*XOpW;Wgx@Asy{As@pW{b|KCJ3N7mdYM==-Etf}5poztVsytE?K z23r(mGhgiC%vzgfC}_sI+8e?_GZK$}B3>F!(`CHCM8);|Y}$Y{&6aSMwL9}G(q(>y zDuy=mNf+WRN*j=-8T5ZzekHoZ+oxh^=i+g`i&Y=TOb9se1r<_1M=aOH@osNfmtnY|L*9Y4g);Dzp zn_#m%gok-Nw&IQP$&rfhTsX6DYu)8%OIM?<2#>b#KJk1xZL3gzcWBlD+v3Q_;-4pAOM_U7&P`-$VLre%#_R;47CN1{5J*hV^B#E=SsBTS zSMZN^BU!u#|E4$Wf@4Bd8up?wXlFI&&$uV}E$evd0-VeOIL?a-z(@=(H!R;2z^3d#Fm0^d_dY404@BeoP{t${_y}8fJS7HzsPfW6p;( zc!lEBpb{FPt?DvIOkL<}&@^p#l{h+lN>iziQr578Yff-cH*Hmy7>P^z{&&4Ad(fn* z^(eBsXA;|Az>r7`Q_}428K)j2S-u(DH-nHOhE%2f=d9m_R4SFbem4<^^$T)hcEJ@P z$dxW<^bjYJUcW;6=C2>834li=fRzFG2pTB)5SL{Nz;T9Q5CH3kq%!NbTI94W!}6OF z^14{Qi>%v?2hX-wr>O)(o$r{>W3&rts49hoWB)Z3NT9%Ng z;XzC(Wo+?{WzxMS24}iuGTrMk-BFHM01TwNiBQRkenDXIS7o}w&rZ@$rh5}k|RnELXIBZGJEUx`$v0!2Y2t0N06cLA3VI}%Iw8~bo&F$-1dze zu7vkh?~jL$CK+%{gst{?&yQG(#96TSj@nzDKm0qD+WtP?2YGvWJBnZLQD^P#RBECa zt4JJ7=r#IW&Gi{^-b35OBsMU72H|7TXW-)O6>sm)R4WcIHezoXIJ6geK!cU!0Uqwv zQDZF478<5DXm>5JdM}ZNYT(%YRJRO!6HiH~F~d#@m@Wcdpx-k1Sy)}eewnu6xnfv* zC2jW0!uNUjCePCM7UolR-lN>vB;CobVzuh%Td$+td*m+kvEx`TYeioLS60&ZLqO-# z_m62%W2$8UH6i-s(RYj#Z>CSO;&rS%ei-lPwy_H$LU4y&hK5r!1P;_j`4w_-UWGj& z=_8$1!7t$_sZ0!dEXAqd3xA!Kf&|hr@dL!BN8Bz)JWXL2%nHE~_s9`|>)9({@F?0J4819lH5V)dT@0&?gh&^RJN$ODMMyl--cC5s;v5z@~V ze)5342WK_!;|%^y?yv(ea);fT8Mcp_)!!qB?PO%T9QG6ek`*t>VSgd^xAe1<^pnFr z11~jfoWa`|+&$^6gWQm^dLwN75{%~Nb>5Xnpvd2I{H?{GSMOD8djGqr(l>#gDm^Fa z^P;{W>WiX&Th#oWOqC9b`W;bU67^-&nzkdkVn3AX-Ko+#$i7xKPJE1|Y~}0Pi5t|G zQ@cj3jM@mbuTUGH_BCqfsMS+@h1#>!PE&i1+E1t*qIR6xOVqv(tu(e(FOBI<;Xq6e zh2y$E5()UDdOWN*1ayB$4|E0^JL3L^U_ftf3kL4f@&oX~G45{*!M95fhW$-?W4OKD zA8Lw8SJ4y;w6q68aWO!1TQn9=JLw24g=fzDXW~B}h=%ouza@|pk;YIFdt>Mpsb@2k zBQ}ORf=wbY7Wc;iPp|y0a3sKy@79IvBXhbwnI65)-`Ki#ryg#2F3=dyAt)z@u2AC~ zv}{*LD0ie__+Wd08yIIs<8rg)N^Tau@7@H-$B%c*EYxun@UF{)cSwvDC8MMpa^*So zo_avZ5hbrFc|*yMm7G%Ywvr3*9-0FzR?Wx!>?Wx!>?Wx!>?Wx!>? zWx!>?Wx!?Nf5X6%RVCl%NK2|rehS|dh(;sYu4qwT6+ea*AIF;w_`Vw-v-dc-4HCuE zr$tLd1l+?>4Wyo}TsCxMRMU>I9zWL=-^G5mZjO8^v zi*dm*RxIy1-d1+Ky8pOB8<)fB@996FjrU^_UHbn;*`3N}4qgxMQ)NHDef9#M-x2d3 zh4(zP)BnHWVPzM=k^Q_thNLRW7LuJP6$m{=Zo^9pX zKgzRD<=OYbCfEFKdJ!JJk>F(~8R8q6`|ERQj1~Z5tE>81e9ylX8?~w+h}S8S zb%@Au;0v4;@!^S_20}oo(v8XBK`?WNS<8IOw_MZ|!Wir90ZPpV_h(HOtFQe&D@Rwy ztZ@Y3Y&4~kXer74JU&=2E9QIG^pUI}($zlBAhScI()!c5UQu!V@d7sfo^M;%BL}o? z)HAc>nS;M=zHUw3o(^tKnQtA@=gfENbwj85ot{-{2=8I8Sn0zq>hK(AIt7d&##>5N z=X>Cn0NZ$$u>0Bj|ML0&@PS^Sm^K!R^KrRYS)Q*Trkw#e$BQQ)cVBN_|N7?L#Qw7@ zTcvZzVI*8U*1}~IGY7kf@8vzdmu>7b25_%6_xNW#r`PU{{&$xfNmLu27{(lNIlp}Y z3;T`WryJ`f9g`ntjseGjW56-s7;p?Y1{?#90mp!2;D0c1FKm9h`hF+)#pccDKf-3Z zAMON{$`Zax_g=1@g-oNjx;A=3cC|2UF)>8DT345WN`r4{5 zmw%puzV1-9s*0APM`;qNYBX1g7Gs, - inet_ntop(AF_INET, &so->so_laddr, addr, sizeof(addr)), - ntohs(so->so_lport)); + inet_ntoa(so->so_laddr), ntohs(so->so_lport)); lprint("%15s %5d %5d %5d\r\n", - inet_ntop(AF_INET, &so->so_faddr, addr, sizeof(addr)), - ntohs(so->so_fport), + inet_ntoa(so->so_faddr), ntohs(so->so_fport), so->so_rcv.sb_cc, so->so_snd.sb_cc); } @@ -326,11 +325,9 @@ sockstats() buff[17] = 0; lprint("%s %3d %15s %5d ", buff, so->s, - inet_ntop(AF_INET, &so->so_laddr, addr, sizeof(addr)), - ntohs(so->so_lport)); + inet_ntoa(so->so_laddr), ntohs(so->so_lport)); lprint("%15s %5d %5d %5d\r\n", - inet_ntop(AF_INET, &so->so_faddr, addr, sizeof(addr)), - ntohs(so->so_fport), + inet_ntoa(so->so_faddr), ntohs(so->so_fport), so->so_rcv.sb_cc, so->so_snd.sb_cc); } } diff --git a/BasiliskII/src/slirp/debug.h b/BasiliskII/src/slirp/debug.h old mode 100644 new mode 100755 index c5d42195..6e8444da --- a/BasiliskII/src/slirp/debug.h +++ b/BasiliskII/src/slirp/debug.h @@ -36,15 +36,15 @@ extern int slirp_debug; #endif -void debug_init(char *, int); -//void ttystats(struct ttys *); -void allttystats(void); -void ipstats(void); -void vjstats(void); -void tcpstats(void); -void udpstats(void); -void icmpstats(void); -void mbufstats(void); -void sockstats(void); -void slirp_exit(int); +void debug_init _P((char *, int)); +//void ttystats _P((struct ttys *)); +void allttystats _P((void)); +void ipstats _P((void)); +void vjstats _P((void)); +void tcpstats _P((void)); +void udpstats _P((void)); +void icmpstats _P((void)); +void mbufstats _P((void)); +void sockstats _P((void)); +void slirp_exit _P((int)); diff --git a/BasiliskII/src/slirp/icmp_var.h b/BasiliskII/src/slirp/icmp_var.h old mode 100644 new mode 100755 diff --git a/BasiliskII/src/slirp/if.c b/BasiliskII/src/slirp/if.c old mode 100644 new mode 100755 index 9185dcf6..eab8a46e --- a/BasiliskII/src/slirp/if.c +++ b/BasiliskII/src/slirp/if.c @@ -7,11 +7,11 @@ #include -size_t if_mtu, if_mru; +int if_mtu, if_mru; int if_comp; int if_maxlinkhdr; -int if_queued = 0; /* Number of packets queued so far */ -int if_thresh = 10; /* Number of packets queued before we start sending +int if_queued = 0; /* Number of packets queued so far */ +int if_thresh = 10; /* Number of packets queued before we start sending * (to prevent allocing too many mbufs) */ struct mbuf if_fastq; /* fast queue (for interactive data) */ @@ -116,8 +116,7 @@ if_input(ttyp) DEBUG_MISC((dfd, " read %d bytes\n", if_n)); if (if_n <= 0) { - int error = WSAGetLastError(); - if (if_n == 0 || (error != WSAEINTR && error != EAGAIN)) { + if (if_n == 0 || (errno != EINTR && errno != EAGAIN)) { if (ttyp->up) link_up--; tty_detached(ttyp, 0); diff --git a/BasiliskII/src/slirp/if.h b/BasiliskII/src/slirp/if.h old mode 100644 new mode 100755 index a2564ab1..5d96a903 --- a/BasiliskII/src/slirp/if.h +++ b/BasiliskII/src/slirp/if.h @@ -15,8 +15,8 @@ /* Needed for FreeBSD */ #undef if_mtu -extern size_t if_mtu; -extern size_t if_mru; /* MTU and MRU */ +extern int if_mtu; +extern int if_mru; /* MTU and MRU */ extern int if_comp; /* Flags for compression */ extern int if_maxlinkhdr; extern int if_queued; /* Number of packets queued so far */ diff --git a/BasiliskII/src/slirp/ip.h b/BasiliskII/src/slirp/ip.h old mode 100644 new mode 100755 index e0c7de96..94dcc606 --- a/BasiliskII/src/slirp/ip.h +++ b/BasiliskII/src/slirp/ip.h @@ -98,7 +98,7 @@ struct ip { } PACKED__; #ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) +#pragma pack(0) #endif #define IP_MAXPACKET 65535 /* maximum packet size */ @@ -168,7 +168,7 @@ struct ip_timestamp { } PACKED__; #ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) +#pragma pack(0) #endif /* flag bits for ipt_flg */ @@ -195,23 +195,19 @@ struct ip_timestamp { #define IP_MSS 576 /* default maximum segment size */ -#ifdef HAVE_SYS_TYPES32_H /* Overcome some Solaris 2.x junk */ -#include -#else #if SIZEOF_CHAR_P == 4 -typedef caddr_t caddr32_t; + struct mbuf_ptr { + struct mbuf *mptr; + uint32_t dummy; + }; #else -typedef u_int32_t caddr32_t; -#endif -#endif - -#if SIZEOF_CHAR_P == 4 -typedef struct ipq *ipqp_32; -typedef struct ipasfrag *ipasfragp_32; -#else -typedef caddr32_t ipqp_32; -typedef caddr32_t ipasfragp_32; + struct mbuf_ptr { + struct mbuf *mptr; + }; #endif +struct qlink { + void *next, *prev; +}; /* * Overlay for ip header used by other protocols (tcp, udp). @@ -221,16 +217,16 @@ typedef caddr32_t ipasfragp_32; #endif struct ipovly { - caddr32_t ih_next, ih_prev; /* for protocol sequence q's */ + struct mbuf_ptr ih_mbuf; /* backpointer to mbuf */ u_int8_t ih_x1; /* (unused) */ u_int8_t ih_pr; /* protocol */ u_int16_t ih_len; /* protocol length */ struct in_addr ih_src; /* source internet address */ struct in_addr ih_dst; /* destination internet address */ -} PACKED__; +} __attribute__((packed)); #ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) +#pragma pack(0) #endif /* @@ -241,12 +237,13 @@ struct ipovly { * size 28 bytes */ struct ipq { - ipqp_32 next,prev; /* to other reass headers */ + struct qlink frag_link; /* to ip headers of fragments */ + struct qlink ip_link; /* to other reass headers */ + u_int8_t ipq_ttl; /* time for reass q to live */ u_int8_t ipq_p; /* protocol of this fragment */ u_int16_t ipq_id; /* sequence id for reassembly */ - ipasfragp_32 ipq_next,ipq_prev; - /* to ip headers of fragments */ + struct in_addr ipq_src,ipq_dst; }; @@ -256,29 +253,16 @@ struct ipq { * Note: ipf_next must be at same offset as ipq_next above */ struct ipasfrag { -#ifdef WORDS_BIGENDIAN - u_char ip_v:4, - ip_hl:4; -#else - u_char ip_hl:4, - ip_v:4; -#endif - /* BUG : u_int changed to u_int8_t. - * sizeof(u_int)==4 on linux 2.0 - */ - u_int8_t ipf_mff; /* XXX overlays ip_tos: use low bit - * to avoid destroying tos (PPPDTRuu); - * copied from (ip_off&IP_MF) */ - u_int16_t ip_len; - u_int16_t ip_id; - u_int16_t ip_off; - u_int8_t ip_ttl; - u_int8_t ip_p; - u_int16_t ip_sum; - ipasfragp_32 ipf_next; /* next fragment */ - ipasfragp_32 ipf_prev; /* previous fragment */ + struct qlink ipf_link; + struct ip ipf_ip; }; +#define ipf_off ipf_ip.ip_off +#define ipf_tos ipf_ip.ip_tos +#define ipf_len ipf_ip.ip_len +#define ipf_next ipf_link.next +#define ipf_prev ipf_link.prev + /* * Structure stored in mbuf in inpcb.ip_options * and passed to ip_output when ip options are in use. diff --git a/BasiliskII/src/slirp/ip_icmp.c b/BasiliskII/src/slirp/ip_icmp.c old mode 100644 new mode 100755 index 55376a8b..7cbda790 --- a/BasiliskII/src/slirp/ip_icmp.c +++ b/BasiliskII/src/slirp/ip_icmp.c @@ -77,7 +77,7 @@ icmp_input(m, hlen) DEBUG_CALL("icmp_input"); DEBUG_ARG("m = %lx", (long )m); - DEBUG_ARG("m_len = %zu", m->m_len); + DEBUG_ARG("m_len = %d", m->m_len); icmpstat.icps_received++; @@ -201,12 +201,12 @@ end_error: #define ICMP_MAXDATALEN (IP_MSS-28) void -icmp_error( - struct mbuf *msrc, - u_char type, - u_char code, - int minsize, - char *message) +icmp_error(msrc, type, code, minsize, message) + struct mbuf *msrc; + u_char type; + u_char code; + int minsize; + char *message; { unsigned hlen, shlen, s_ip_len; register struct ip *ip; @@ -215,7 +215,7 @@ icmp_error( DEBUG_CALL("icmp_error"); DEBUG_ARG("msrc = %lx", (long )msrc); - DEBUG_ARG("msrc_len = %zu", msrc->m_len); + DEBUG_ARG("msrc_len = %d", msrc->m_len); if(type!=ICMP_UNREACH && type!=ICMP_TIMXCEED) goto end_error; @@ -223,9 +223,9 @@ icmp_error( if(!msrc) goto end_error; ip = mtod(msrc, struct ip *); #if DEBUG - { char bufa[INET_ADDRSTRLEN], bufb[INET_ADDRSTRLEN]; - inet_ntop(AF_INET, &ip->ip_src, bufa, sizeof(bufa)); - inet_ntop(AF_INET, &ip->ip_dst, bufb, sizeof(bufb)); + { char bufa[20], bufb[20]; + strcpy(bufa, inet_ntoa(ip->ip_src)); + strcpy(bufb, inet_ntoa(ip->ip_dst)); DEBUG_MISC((dfd, " %.16s to %.16s\n", bufa, bufb)); } #endif @@ -244,7 +244,7 @@ icmp_error( /* make a copy */ if(!(m=m_get())) goto end_error; /* get mbuf */ - { u_int new_m_size; + { int new_m_size; new_m_size=sizeof(struct ip )+ICMP_MINLEN+msrc->m_len+ICMP_MAXDATALEN; if(new_m_size>m->m_size) m_inc(m, new_m_size); } @@ -299,7 +299,7 @@ icmp_error( /* fill in ip */ ip->ip_hl = hlen >> 2; - ip->ip_len = (u_int16_t)m->m_len; + ip->ip_len = m->m_len; ip->ip_tos=((ip->ip_tos & 0x1E) | 0xC0); /* high priority for errors */ diff --git a/BasiliskII/src/slirp/ip_icmp.h b/BasiliskII/src/slirp/ip_icmp.h old mode 100644 new mode 100755 index 683dc87f..6968daa7 --- a/BasiliskII/src/slirp/ip_icmp.h +++ b/BasiliskII/src/slirp/ip_icmp.h @@ -95,7 +95,7 @@ struct icmp { } PACKED__; #ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) +#pragma pack(0) #endif /* @@ -161,8 +161,8 @@ struct icmp { (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) -void icmp_input(struct mbuf *, int); -void icmp_error(struct mbuf *, u_char, u_char, int, char *); -void icmp_reflect(struct mbuf *); +void icmp_input _P((struct mbuf *, int)); +void icmp_error _P((struct mbuf *, u_char, u_char, int, char *)); +void icmp_reflect _P((struct mbuf *)); #endif diff --git a/BasiliskII/src/slirp/ip_input.c b/BasiliskII/src/slirp/ip_input.c old mode 100644 new mode 100755 index cac8493b..c93c83fe --- a/BasiliskII/src/slirp/ip_input.c +++ b/BasiliskII/src/slirp/ip_input.c @@ -38,6 +38,16 @@ * terms and conditions of the copyright. */ +#include +#include +#include +#include + +#define container_of(ptr, type, member) ({ \ + const typeof(((type *) 0)->member) *__mptr = (ptr); \ + (type *) ((char *) __mptr - offsetof(type, member));}) + + #include #include "ip_icmp.h" @@ -52,7 +62,7 @@ struct ipq ipq; void ip_init() { - ipq.next = ipq.prev = (ipqp_32)&ipq; + ipq.ip_link.next = ipq.ip_link.prev = &ipq.ip_link; ip_id = tt.tv_sec & 0xffff; udp_init(); tcp_init(); @@ -68,11 +78,11 @@ ip_input(m) struct mbuf *m; { register struct ip *ip; - u_int hlen; + int hlen; DEBUG_CALL("ip_input"); DEBUG_ARG("m = %lx", (long)m); - DEBUG_ARG("m_len = %zu", m->m_len); + DEBUG_ARG("m_len = %d", m->m_len); ipstat.ips_total++; @@ -155,18 +165,20 @@ ip_input(m) */ if (ip->ip_off &~ IP_DF) { register struct ipq *fp; + struct qlink *l; /* * Look for queue of fragments * of this datagram. */ - for (fp = (struct ipq *) ipq.next; fp != &ipq; - fp = (struct ipq *) fp->next) - if (ip->ip_id == fp->ipq_id && - ip->ip_src.s_addr == fp->ipq_src.s_addr && - ip->ip_dst.s_addr == fp->ipq_dst.s_addr && - ip->ip_p == fp->ipq_p) + for (l = ipq.ip_link.next; l != &ipq.ip_link; l = l->next) { + fp = container_of(l, struct ipq, ip_link); + if (ip->ip_id == fp->ipq_id && + ip->ip_src.s_addr == fp->ipq_src.s_addr && + ip->ip_dst.s_addr == fp->ipq_dst.s_addr && + ip->ip_p == fp->ipq_p) goto found; - fp = 0; + } + fp = NULL; found: /* @@ -176,9 +188,9 @@ ip_input(m) */ ip->ip_len -= hlen; if (ip->ip_off & IP_MF) - ((struct ipasfrag *)ip)->ipf_mff |= 1; + ip->ip_tos |= 1; else - ((struct ipasfrag *)ip)->ipf_mff &= ~1; + ip->ip_tos &= ~1; ip->ip_off <<= 3; @@ -187,9 +199,9 @@ ip_input(m) * or if this is not the first fragment, * attempt reassembly; if it succeeds, proceed. */ - if (((struct ipasfrag *)ip)->ipf_mff & 1 || ip->ip_off) { + if (ip->ip_tos & 1 || ip->ip_off) { ipstat.ips_fragments++; - ip = ip_reass((struct ipasfrag *)ip, fp); + ip = ip_reass(ip, fp); if (ip == 0) return; ipstat.ips_reassembled++; @@ -225,21 +237,21 @@ bad: return; } +#define iptofrag(P) ((struct ipasfrag *)(((char*)(P)) - sizeof(struct qlink))) +#define fragtoip(P) ((struct ip*)(((char*)(P)) + sizeof(struct qlink))) /* * Take incoming datagram fragment and try to * reassemble it into whole datagram. If a chain for * reassembly of this datagram already exists, then it * is given as fp; otherwise have to make a chain. */ -struct ip * -ip_reass(ip, fp) - register struct ipasfrag *ip; - register struct ipq *fp; +static struct ip * +ip_reass(register struct ip *ip, register struct ipq *fp) { register struct mbuf *m = dtom(ip); register struct ipasfrag *q; int hlen = ip->ip_hl << 2; - int i, next; + u_int16_t i, next; DEBUG_CALL("ip_reass"); DEBUG_ARG("ip = %lx", (long)ip); @@ -261,13 +273,13 @@ ip_reass(ip, fp) struct mbuf *t; if ((t = m_get()) == NULL) goto dropfrag; fp = mtod(t, struct ipq *); - insque_32(fp, &ipq); + insque(&fp->ip_link, &ipq.ip_link); fp->ipq_ttl = IPFRAGTTL; fp->ipq_p = ip->ip_p; fp->ipq_id = ip->ip_id; - fp->ipq_next = fp->ipq_prev = (ipasfragp_32)fp; - fp->ipq_src = ((struct ip *)ip)->ip_src; - fp->ipq_dst = ((struct ip *)ip)->ip_dst; + fp->frag_link.next = fp->frag_link.prev = &fp->frag_link; + fp->ipq_src = ip->ip_src; + fp->ipq_dst = ip->ip_dst; q = (struct ipasfrag *)fp; goto insert; } @@ -275,9 +287,9 @@ ip_reass(ip, fp) /* * Find a segment which begins after this one does. */ - for (q = (struct ipasfrag *)fp->ipq_next; q != (struct ipasfrag *)fp; - q = (struct ipasfrag *)q->ipf_next) - if (q->ip_off > ip->ip_off) + for (q = fp->frag_link.next; q != (struct ipasfrag *)&fp->frag_link; + q = q->ipf_next) + if (q->ipf_off > ip->ip_off) break; /* @@ -285,9 +297,9 @@ ip_reass(ip, fp) * our data already. If so, drop the data from the incoming * segment. If it provides all of our data, drop us. */ - if (q->ipf_prev != (ipasfragp_32)fp) { - i = ((struct ipasfrag *)(q->ipf_prev))->ip_off + - ((struct ipasfrag *)(q->ipf_prev))->ip_len - ip->ip_off; + if (q->ipf_prev != &fp->frag_link) { + struct ipasfrag *pq = q->ipf_prev; + i = pq->ipf_off + pq->ipf_len - ip->ip_off; if (i > 0) { if (i >= ip->ip_len) goto dropfrag; @@ -301,17 +313,18 @@ ip_reass(ip, fp) * While we overlap succeeding segments trim them or, * if they are completely covered, dequeue them. */ - while (q != (struct ipasfrag *)fp && ip->ip_off + ip->ip_len > q->ip_off) { - i = (ip->ip_off + ip->ip_len) - q->ip_off; - if (i < q->ip_len) { - q->ip_len -= i; - q->ip_off += i; + while (q != (struct ipasfrag*)&fp->frag_link && + ip->ip_off + ip->ip_len > q->ipf_off) { + i = (ip->ip_off + ip->ip_len) - q->ipf_off; + if (i < q->ipf_len) { + q->ipf_len -= i; + q->ipf_off += i; m_adj(dtom(q), i); break; } - q = (struct ipasfrag *) q->ipf_next; - m_freem(dtom((struct ipasfrag *) q->ipf_prev)); - ip_deq((struct ipasfrag *) q->ipf_prev); + q = q->ipf_next; + m_freem(dtom(q->ipf_prev)); + ip_deq(q->ipf_prev); } insert: @@ -319,27 +332,26 @@ insert: * Stick new segment in its place; * check for complete reassembly. */ - ip_enq(ip, (struct ipasfrag *) q->ipf_prev); + ip_enq(iptofrag(ip), q->ipf_prev); next = 0; - for (q = (struct ipasfrag *) fp->ipq_next; q != (struct ipasfrag *)fp; - q = (struct ipasfrag *) q->ipf_next) { - if (q->ip_off != next) + for (q = fp->frag_link.next; q != (struct ipasfrag*)&fp->frag_link; + q = q->ipf_next) { + if (q->ipf_off != next) return (0); - next += q->ip_len; + next += q->ipf_len; } - if (((struct ipasfrag *)(q->ipf_prev))->ipf_mff & 1) + if (((struct ipasfrag *)(q->ipf_prev))->ipf_tos & 1) return (0); /* * Reassembly is complete; concatenate fragments. */ - q = (struct ipasfrag *) fp->ipq_next; + q = fp->frag_link.next; m = dtom(q); q = (struct ipasfrag *) q->ipf_next; - while (q != (struct ipasfrag *)fp) { - struct mbuf *t; - t = dtom(q); + while (q != (struct ipasfrag*)&fp->frag_link) { + struct mbuf *t = dtom(q); q = (struct ipasfrag *) q->ipf_next; m_cat(m, t); } @@ -350,7 +362,7 @@ insert: * dequeue and discard fragment reassembly header. * Make header visible. */ - ip = (struct ipasfrag *) fp->ipq_next; + q = fp->frag_link.next; /* * If the fragments concatenated to an mbuf that's @@ -361,24 +373,24 @@ insert: */ if (m->m_flags & M_EXT) { int delta; - delta = (char *)ip - m->m_dat; - ip = (struct ipasfrag *)(m->m_ext + delta); + delta = (char *)q - m->m_dat; + q = (struct ipasfrag *)(m->m_ext + delta); } /* DEBUG_ARG("ip = %lx", (long)ip); * ip=(struct ipasfrag *)m->m_data; */ + ip = fragtoip(q); ip->ip_len = next; - ip->ipf_mff &= ~1; - ((struct ip *)ip)->ip_src = fp->ipq_src; - ((struct ip *)ip)->ip_dst = fp->ipq_dst; - remque_32(fp); + ip->ip_tos &= ~1; + ip->ip_src = fp->ipq_src; + ip->ip_dst = fp->ipq_dst; + remque(&fp->ip_link); (void) m_free(dtom(fp)); - m = dtom(ip); m->m_len += (ip->ip_hl << 2); m->m_data -= (ip->ip_hl << 2); - return ((struct ip *)ip); + return ip; dropfrag: ipstat.ips_fragdropped++; @@ -396,13 +408,12 @@ ip_freef(fp) { register struct ipasfrag *q, *p; - for (q = (struct ipasfrag *) fp->ipq_next; q != (struct ipasfrag *)fp; - q = p) { - p = (struct ipasfrag *) q->ipf_next; + for (q = fp->frag_link.next; q != (struct ipasfrag*)&fp->frag_link; q = p) { + p = q->ipf_next; ip_deq(q); m_freem(dtom(q)); } - remque_32(fp); + remque(&fp->ip_link); (void) m_free(dtom(fp)); } @@ -416,10 +427,10 @@ ip_enq(p, prev) { DEBUG_CALL("ip_enq"); DEBUG_ARG("prev = %lx", (long)prev); - p->ipf_prev = (ipasfragp_32) prev; + p->ipf_prev = prev; p->ipf_next = prev->ipf_next; - ((struct ipasfrag *)(prev->ipf_next))->ipf_prev = (ipasfragp_32) p; - prev->ipf_next = (ipasfragp_32) p; + ((struct ipasfrag *)(prev->ipf_next))->ipf_prev = p; + prev->ipf_next = p; } /* @@ -441,20 +452,21 @@ ip_deq(p) void ip_slowtimo() { - register struct ipq *fp; + struct qlink *l; DEBUG_CALL("ip_slowtimo"); - fp = (struct ipq *) ipq.next; - if (fp == 0) - return; + l = ipq.ip_link.next; - while (fp != &ipq) { - --fp->ipq_ttl; - fp = (struct ipq *) fp->next; - if (((struct ipq *)(fp->prev))->ipq_ttl == 0) { + if (l == 0) + return; + printf("Line 453\n"); + while (l != &ipq.ip_link) { + struct ipq *fp = container_of(l, struct ipq, ip_link); + l = l->next; + if (--fp->ipq_ttl == 0) { ipstat.ips_fragtimeout++; - ip_freef((struct ipq *) fp->prev); + ip_freef(fp); } } } diff --git a/BasiliskII/src/slirp/ip_output.c b/BasiliskII/src/slirp/ip_output.c old mode 100644 new mode 100755 index fb9a9420..0d1ae1b2 --- a/BasiliskII/src/slirp/ip_output.c +++ b/BasiliskII/src/slirp/ip_output.c @@ -55,9 +55,8 @@ ip_output(so, m0) { register struct ip *ip; register struct mbuf *m = m0; - register u_int hlen = sizeof(struct ip); - u_int len, off; - int error = 0; + register int hlen = sizeof(struct ip ); + int len, off, error = 0; DEBUG_CALL("ip_output"); DEBUG_ARG("so = %lx", (long)so); @@ -129,7 +128,7 @@ ip_output(so, m0) */ m0 = m; mhlen = sizeof (struct ip); - for (off = hlen + len; off < ip->ip_len; off += len) { + for (off = hlen + len; off < (u_int16_t)ip->ip_len; off += len) { register struct ip *mhip; m = m_get(); if (m == 0) { @@ -174,7 +173,7 @@ ip_output(so, m0) * and updating header, then send each fragment (in order). */ m = m0; - m_adj(m, hlen + firstlen - ip->ip_len); + m_adj(m, hlen + firstlen - (u_int16_t)ip->ip_len); ip->ip_len = htons((u_int16_t)m->m_len); ip->ip_off = htons((u_int16_t)(ip->ip_off | IP_MF)); ip->ip_sum = 0; diff --git a/BasiliskII/src/slirp/libslirp.h b/BasiliskII/src/slirp/libslirp.h old mode 100644 new mode 100755 diff --git a/BasiliskII/src/slirp/main.h b/BasiliskII/src/slirp/main.h old mode 100644 new mode 100755 diff --git a/BasiliskII/src/slirp/mbuf.c b/BasiliskII/src/slirp/mbuf.c old mode 100644 new mode 100755 index 5a16fab8..2b53bc3e --- a/BasiliskII/src/slirp/mbuf.c +++ b/BasiliskII/src/slirp/mbuf.c @@ -24,16 +24,18 @@ int mbuf_alloced = 0; struct mbuf m_freelist, m_usedlist; int mbuf_thresh = 30; int mbuf_max = 0; -size_t msize; +int msize; -void m_init() +void +m_init() { m_freelist.m_next = m_freelist.m_prev = &m_freelist; m_usedlist.m_next = m_usedlist.m_prev = &m_usedlist; msize_init(); } -void msize_init() +void +msize_init() { /* * Find a nice value for msize @@ -51,7 +53,8 @@ void msize_init() * free old mbufs, we mark all mbufs above mbuf_thresh as M_DOFREE, * which tells m_free to actually free() it */ -struct mbuf *m_get() +struct mbuf * +m_get() { register struct mbuf *m; int flags = 0; @@ -86,7 +89,9 @@ end_error: return m; } -void m_free(struct mbuf *m) +void +m_free(m) + struct mbuf *m; { DEBUG_CALL("m_free"); @@ -119,7 +124,9 @@ void m_free(struct mbuf *m) * the other.. if result is too big for one mbuf, malloc() * an M_EXT data segment */ -void m_cat(register struct mbuf *m, register struct mbuf *n) +void +m_cat(m, n) + register struct mbuf *m, *n; { /* * If there's no room, realloc @@ -135,7 +142,10 @@ void m_cat(register struct mbuf *m, register struct mbuf *n) /* make m size bytes large */ -void m_inc(struct mbuf *m, u_int size) +void +m_inc(m, size) + struct mbuf *m; + int size; { int datasize; @@ -169,7 +179,10 @@ void m_inc(struct mbuf *m, u_int size) -void m_adj(struct mbuf *m, int len) +void +m_adj(m, len) + struct mbuf *m; + int len; { if (m == NULL) return; @@ -189,7 +202,9 @@ void m_adj(struct mbuf *m, int len) * Copy len bytes from m, starting off bytes into n */ int -m_copy(struct mbuf *n, struct mbuf *m, u_int off, u_int len) +m_copy(n, m, off, len) + struct mbuf *n, *m; + int off, len; { if (len > M_FREEROOM(n)) return -1; @@ -205,7 +220,9 @@ m_copy(struct mbuf *n, struct mbuf *m, u_int off, u_int len) * XXX This is a kludge, I should eliminate the need for it * Fortunately, it's not used often */ -struct mbuf *dtom(void *dat) +struct mbuf * +dtom(dat) + void *dat; { struct mbuf *m; diff --git a/BasiliskII/src/slirp/mbuf.h b/BasiliskII/src/slirp/mbuf.h old mode 100644 new mode 100755 index 11b252bb..183254a0 --- a/BasiliskII/src/slirp/mbuf.h +++ b/BasiliskII/src/slirp/mbuf.h @@ -63,11 +63,11 @@ struct m_hdr { struct mbuf *mh_prevpkt; /* Flags aren't used in the output queue */ int mh_flags; /* Misc flags */ - size_t mh_size; /* Size of data */ + int mh_size; /* Size of data */ struct socket *mh_so; caddr_t mh_data; /* Location of data */ - size_t mh_len; /* Amount of data in this mbuf */ + int mh_len; /* Amount of data in this mbuf */ }; /* @@ -130,14 +130,14 @@ extern int mbuf_alloced; extern struct mbuf m_freelist, m_usedlist; extern int mbuf_max; -void m_init(void); -void msize_init(void); -struct mbuf * m_get(void); -void m_free(struct mbuf *); -void m_cat(register struct mbuf *, register struct mbuf *); -void m_inc(struct mbuf *, u_int); -void m_adj(struct mbuf *, int); -int m_copy(struct mbuf *, struct mbuf *, u_int, u_int); -struct mbuf * dtom(void *); +void m_init _P((void)); +void msize_init _P((void)); +struct mbuf * m_get _P((void)); +void m_free _P((struct mbuf *)); +void m_cat _P((register struct mbuf *, register struct mbuf *)); +void m_inc _P((struct mbuf *, int)); +void m_adj _P((struct mbuf *, int)); +int m_copy _P((struct mbuf *, struct mbuf *, int, int)); +struct mbuf * dtom _P((void *)); #endif diff --git a/BasiliskII/src/slirp/misc.c b/BasiliskII/src/slirp/misc.c old mode 100644 new mode 100755 index b80caf66..9438af38 --- a/BasiliskII/src/slirp/misc.c +++ b/BasiliskII/src/slirp/misc.c @@ -17,7 +17,10 @@ int x_port = -1; int x_display = 0; int x_screen = 0; -int show_x(char *buff, struct socket *inso) +int +show_x(buff, inso) + char *buff; + struct socket *inso; { if (x_port < 0) { lprint("X Redir: X not being redirected.\r\n"); @@ -37,7 +40,12 @@ int show_x(char *buff, struct socket *inso) /* * XXX Allow more than one X redirection? */ -void redir_x(u_int32_t inaddr, int start_port, int display, int screen) +void +redir_x(inaddr, start_port, display, screen) + u_int32_t inaddr; + int start_port; + int display; + int screen; { int i; @@ -61,69 +69,44 @@ void redir_x(u_int32_t inaddr, int start_port, int display, int screen) #endif #ifndef HAVE_INET_ATON -int inet_aton(const char *cp, struct in_addr *ia) +int +inet_aton(cp, ia) + const char *cp; + struct in_addr *ia; { - return inet_pton(AF_INET, cp, &ia->s_addr); + u_int32_t addr = inet_addr(cp); + if (addr == 0xffffffff) + return 0; + ia->s_addr = addr; + return 1; } #endif /* * Get our IP address and put it in our_addr */ -void getouraddr() +void +getouraddr() { char buff[256]; - - if (gethostname(buff, sizeof(buff)) == 0) - { - struct addrinfo hints = { 0 }; - hints.ai_flags = AI_NUMERICHOST; - hints.ai_family = AF_INET; - struct addrinfo* ai; - if (getaddrinfo(buff, NULL, &hints, &ai) == 0) - { - our_addr = *(struct in_addr *)ai->ai_addr->sa_data; - freeaddrinfo(ai); - } - } - if (our_addr.s_addr == 0) - our_addr.s_addr = loopback_addr.s_addr; + struct hostent *he = NULL; + + if (gethostname(buff,256) == 0) + he = gethostbyname(buff); + if (he) + our_addr = *(struct in_addr *)he->h_addr; + if (our_addr.s_addr == 0) + our_addr.s_addr = loopback_addr.s_addr; } -#if SIZEOF_CHAR_P == 8 - -struct quehead_32 { - u_int32_t qh_link; - u_int32_t qh_rlink; -}; - -inline void insque_32(void *a, void *b) -{ - register struct quehead_32 *element = (struct quehead_32 *) a; - register struct quehead_32 *head = (struct quehead_32 *) b; - element->qh_link = head->qh_link; - head->qh_link = (u_int32_t)element; - element->qh_rlink = (u_int32_t)head; - ((struct quehead_32 *)(element->qh_link))->qh_rlink - = (u_int32_t)element; -} - -inline void remque_32(void *a) -{ - register struct quehead_32 *element = (struct quehead_32 *) a; - ((struct quehead_32 *)(element->qh_link))->qh_rlink = element->qh_rlink; - ((struct quehead_32 *)(element->qh_rlink))->qh_link = element->qh_link; - element->qh_rlink = 0; -} - -#endif /* SIZEOF_CHAR_P == 8 */ - struct quehead { struct quehead *qh_link; struct quehead *qh_rlink; }; -void insque(void *a, void *b) +void +insque(a, b) + void *a, *b; { register struct quehead *element = (struct quehead *) a; register struct quehead *head = (struct quehead *) b; @@ -134,7 +117,9 @@ void insque(void *a, void *b) = (struct quehead *)element; } -void remque(void *a) +void +remque(a) + void *a; { register struct quehead *element = (struct quehead *) a; ((struct quehead *)(element->qh_link))->qh_rlink = element->qh_rlink; @@ -146,7 +131,13 @@ void remque(void *a) /* #endif */ -int add_exec(struct ex_list **ex_ptr, int do_pty, char *exec, int addr, int port) +int +add_exec(ex_ptr, do_pty, exec, addr, port) + struct ex_list **ex_ptr; + int do_pty; + char *exec; + int addr; + int port; { struct ex_list *tmp_ptr; @@ -175,7 +166,9 @@ int add_exec(struct ex_list **ex_ptr, int do_pty, char *exec, int addr, int port extern int sys_nerr; extern char *sys_errlist[]; -char *strerror(int error) +char * +strerror(error) + int error; { if (error < sys_nerr) return sys_errlist[error]; @@ -188,7 +181,11 @@ char *strerror(int error) #ifdef _WIN32 -int fork_exec(struct socket *so, char *ex, int do_pty) +int +fork_exec(so, ex, do_pty) + struct socket *so; + char *ex; + int do_pty; { /* not implemented */ return 0; @@ -196,7 +193,9 @@ int fork_exec(struct socket *so, char *ex, int do_pty) #else -int slirp_openpty(int *amaster, int *aslave) +int +slirp_openpty(amaster, aslave) + int *amaster, *aslave; { register int master, slave; @@ -270,7 +269,11 @@ int slirp_openpty(int *amaster, int *aslave) * do_pty = 1 Fork/exec using slirp.telnetd * do_ptr = 2 Fork/exec using pty */ -int fork_exec(struct socket *so, char *ex, int do_pty) +int +fork_exec(so, ex, do_pty) + struct socket *so; + char *ex; + int do_pty; { int s; struct sockaddr_in addr; @@ -426,7 +429,9 @@ int fork_exec(struct socket *so, char *ex, int do_pty) #endif #ifndef HAVE_STRDUP -char *strdup(const char *str) +char * +strdup(str) + const char *str; { char *bptr; @@ -438,7 +443,9 @@ char *strdup(const char *str) #endif #if 0 -void snooze_hup(int num) +void +snooze_hup(num) + int num; { int s, ret; #ifndef NO_UNIX_SOCKETS @@ -478,7 +485,8 @@ void snooze_hup(int num) } -void snooze() +void +snooze() { sigset_t s; int i; @@ -502,7 +510,9 @@ void snooze() exit(255); } -void relay(int s) +void +relay(s) + int s; { char buf[8192]; int n; @@ -562,14 +572,25 @@ void relay(int s) } #endif -int (*lprint_print)(void *, const char *, va_list); +int (*lprint_print) _P((void *, const char *, va_list)); char *lprint_ptr, *lprint_ptr2, **lprint_arg; -void lprint(const char *format, ...) +void +#ifdef __STDC__ +lprint(const char *format, ...) +#else +lprint(va_alist) va_dcl +#endif { va_list args; - va_start(args, format); +#ifdef __STDC__ + va_start(args, format); +#else + char *format; + va_start(args); + format = va_arg(args, char *); +#endif #if 0 /* If we're printing to an sbuf, make sure there's enough room */ /* XXX +100? */ @@ -618,7 +639,9 @@ void lprint(const char *format, ...) va_end(args); } -void add_emu(char *buff) +void +add_emu(buff) + char *buff; { u_int lport, fport; u_int8_t tos = 0, emu = 0; @@ -710,24 +733,42 @@ void add_emu(char *buff) * Some BSD-derived systems have a sprintf which returns char * */ -int vsprintf_len(char *string, const char *format, va_list args) +int +vsprintf_len(string, format, args) + char *string; + const char *format; + va_list args; { vsprintf(string, format, args); return strlen(string); } -int sprintf_len(char *string, const char *format, ...) +int +#ifdef __STDC__ +sprintf_len(char *string, const char *format, ...) +#else +sprintf_len(va_alist) va_dcl +#endif { va_list args; +#ifdef __STDC__ va_start(args, format); +#else + char *string; + char *format; + va_start(args); + string = va_arg(args, char *); + format = va_arg(args, char *); +#endif vsprintf(string, format, args); - va_end(args); return strlen(string); } #endif -void u_sleep(int usec) +void +u_sleep(usec) + int usec; { struct timeval t; fd_set fdset; @@ -744,7 +785,9 @@ void u_sleep(int usec) * Set fd blocking and non-blocking */ -void fd_nonblock(int fd) +void +fd_nonblock(fd) + int fd; { #if defined USE_FIONBIO && defined FIONBIO ioctlsockopt_t opt = 1; @@ -759,7 +802,9 @@ void fd_nonblock(int fd) #endif } -void fd_block(int fd) +void +fd_block(fd) + int fd; { #if defined USE_FIONBIO && defined FIONBIO ioctlsockopt_t opt = 0; @@ -779,8 +824,13 @@ void fd_block(int fd) /* * invoke RSH */ -int rsh_exec(struct socket *so, struct socket *ns, - char *user, char *host, char *args) +int +rsh_exec(so,ns, user, host, args) + struct socket *so; + struct socket *ns; + char *user; + char *host; + char *args; { int fd[2]; int fd0[2]; diff --git a/BasiliskII/src/slirp/misc.h b/BasiliskII/src/slirp/misc.h old mode 100644 new mode 100755 index 381f5f3e..efea9ff8 --- a/BasiliskII/src/slirp/misc.h +++ b/BasiliskII/src/slirp/misc.h @@ -19,15 +19,15 @@ struct ex_list { extern struct ex_list *exec_list; extern u_int curtime, time_fasttimo, last_slowtimo, detach_time, detach_wait; -extern int (*lprint_print)(void *, const char *, va_list); +extern int (*lprint_print) _P((void *, const char *, va_list)); extern char *lprint_ptr, *lprint_ptr2, **lprint_arg; extern struct sbuf *lprint_sb; #ifndef HAVE_STRDUP -char *strdup(const char *); +char *strdup _P((const char *)); #endif -void do_wait(int); +void do_wait _P((int)); #define EMU_NONE 0x0 @@ -67,21 +67,21 @@ extern struct emu_t *tcpemu; extern int x_port, x_server, x_display; -int show_x(char *, struct socket *); -void redir_x(u_int32_t, int, int, int); -void getouraddr(void); -void slirp_insque(void *, void *); -void slirp_remque(void *); -int add_exec(struct ex_list **, int, char *, int, int); -int slirp_openpty(int *, int *); -int fork_exec(struct socket *, char *, int); -void snooze_hup(int); -void snooze(void); -void relay(int); -void add_emu(char *); -void u_sleep(int); -void fd_nonblock(int); -void fd_block(int); -int rsh_exec(struct socket *, struct socket *, char *, char *, char *); +int show_x _P((char *, struct socket *)); +void redir_x _P((u_int32_t, int, int, int)); +void getouraddr _P((void)); +void slirp_insque _P((void *, void *)); +void slirp_remque _P((void *)); +int add_exec _P((struct ex_list **, int, char *, int, int)); +int slirp_openpty _P((int *, int *)); +int fork_exec _P((struct socket *, char *, int)); +void snooze_hup _P((int)); +void snooze _P((void)); +void relay _P((int)); +void add_emu _P((char *)); +void u_sleep _P((int)); +void fd_nonblock _P((int)); +void fd_block _P((int)); +int rsh_exec _P((struct socket *, struct socket *, char *, char *, char *)); #endif diff --git a/BasiliskII/src/slirp/sbuf.c b/BasiliskII/src/slirp/sbuf.c old mode 100644 new mode 100755 index 278e3687..2d078f38 --- a/BasiliskII/src/slirp/sbuf.c +++ b/BasiliskII/src/slirp/sbuf.c @@ -16,12 +16,17 @@ * } */ -void sbfree(struct sbuf *sb) +void +sbfree(sb) + struct sbuf *sb; { free(sb->sb_data); } -void sbdrop(struct sbuf *sb, u_int num) +void +sbdrop(sb, num) + struct sbuf *sb; + int num; { /* * We can only drop how much we have @@ -36,7 +41,10 @@ void sbdrop(struct sbuf *sb, u_int num) } -void sbreserve(struct sbuf *sb, size_t size) +void +sbreserve(sb, size) + struct sbuf *sb; + int size; { if (sb->sb_data) { /* Already alloced, realloc if necessary */ @@ -64,14 +72,17 @@ void sbreserve(struct sbuf *sb, size_t size) * this prevents an unnecessary copy of the data * (the socket is non-blocking, so we won't hang) */ -void sbappend(struct socket *so, struct mbuf *m) +void +sbappend(so, m) + struct socket *so; + struct mbuf *m; { int ret = 0; DEBUG_CALL("sbappend"); DEBUG_ARG("so = %lx", (long)so); DEBUG_ARG("m = %lx", (long)m); - DEBUG_ARG("m->m_len = %zu", m->m_len); + DEBUG_ARG("m->m_len = %d", m->m_len); /* Shouldn't happen, but... e.g. foreign host closes connection */ if (m->m_len <= 0) { @@ -123,7 +134,10 @@ void sbappend(struct socket *so, struct mbuf *m) * Copy the data from m into sb * The caller is responsible to make sure there's enough room */ -void sbappendsb(struct sbuf *sb, struct mbuf *m) +void +sbappendsb(sb, m) + struct sbuf *sb; + struct mbuf *m; { int len, n, nn; @@ -159,7 +173,12 @@ void sbappendsb(struct sbuf *sb, struct mbuf *m) * Don't update the sbuf rptr, this will be * done in sbdrop when the data is acked */ -void sbcopy(struct sbuf *sb, u_int off, u_int len, char *to) +void +sbcopy(sb, off, len, to) + struct sbuf *sb; + int off; + int len; + char *to; { char *from; diff --git a/BasiliskII/src/slirp/sbuf.h b/BasiliskII/src/slirp/sbuf.h old mode 100644 new mode 100755 index 04f7981c..161e0bb7 --- a/BasiliskII/src/slirp/sbuf.h +++ b/BasiliskII/src/slirp/sbuf.h @@ -8,8 +8,6 @@ #ifndef _SBUF_H_ #define _SBUF_H_ -#include - #define sbflush(sb) sbdrop((sb),(sb)->sb_cc) #define sbspace(sb) ((sb)->sb_datalen - (sb)->sb_cc) @@ -23,11 +21,11 @@ struct sbuf { char *sb_data; /* Actual data */ }; -void sbfree(struct sbuf *); -void sbdrop(struct sbuf *, u_int); -void sbreserve(struct sbuf *, size_t); -void sbappend(struct socket *, struct mbuf *); -void sbappendsb(struct sbuf *, struct mbuf *); -void sbcopy(struct sbuf *, u_int, u_int, char *); +void sbfree _P((struct sbuf *)); +void sbdrop _P((struct sbuf *, int)); +void sbreserve _P((struct sbuf *, int)); +void sbappend _P((struct socket *, struct mbuf *)); +void sbappendsb _P((struct sbuf *, struct mbuf *)); +void sbcopy _P((struct sbuf *, int, int, char *)); #endif diff --git a/BasiliskII/src/slirp/slirp.c b/BasiliskII/src/slirp/slirp.c old mode 100644 new mode 100755 index dc2fdc65..44f777d0 --- a/BasiliskII/src/slirp/slirp.c +++ b/BasiliskII/src/slirp/slirp.c @@ -84,7 +84,7 @@ static int get_dns_addr(struct in_addr *pdns_addr) static int get_dns_addr(struct in_addr *pdns_addr) { char buff[512]; - char buff2[256+1]; + char buff2[256]; FILE *f; int found = 0; struct in_addr tmp_addr; @@ -211,8 +211,8 @@ int slirp_select_fill(int *pnfds, * in the fragment queue, or there are TCP connections active */ do_slowtimo = ((tcb.so_next != &tcb) || - ((struct ipasfrag *)&ipq != (struct ipasfrag *)ipq.next)); - + (&ipq.ip_link != ipq.ip_link.next)); + for (so = tcb.so_next; so != &tcb; so = so_next) { so_next = so->so_next; @@ -220,14 +220,14 @@ int slirp_select_fill(int *pnfds, * See if we need a tcp_fasttimo */ if (time_fasttimo == 0 && so->so_tcpcb->t_flags & TF_DELACK) - time_fasttimo = curtime; /* Flag when we want a fasttimo */ + time_fasttimo = curtime; /* Flag when we want a fasttimo */ /* * NOFDREF can include still connecting to local-host, * newly socreated() sockets etc. Don't want to select these. */ if (so->so_state & SS_NOFDREF || so->s == -1) - continue; + continue; /* * Set for reading sockets which are accepting @@ -346,18 +346,18 @@ int slirp_select_fill(int *pnfds, void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) { - struct socket *so, *so_next; - int ret; + struct socket *so, *so_next; + int ret; - global_readfds = readfds; - global_writefds = writefds; - global_xfds = xfds; + global_readfds = readfds; + global_writefds = writefds; + global_xfds = xfds; /* Update time */ updtime(); - + /* - * See if anything has timed out + * See if anything has timed out */ if (link_up) { if (time_fasttimo && ((curtime - time_fasttimo) >= FAST_TIMO)) { @@ -370,7 +370,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) last_slowtimo = curtime; } } - + /* * Check sockets */ @@ -380,21 +380,21 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) */ for (so = tcb.so_next; so != &tcb; so = so_next) { so_next = so->so_next; - + /* * FD_ISSET is meaningless on these sockets * (and they can crash the program) */ if (so->so_state & SS_NOFDREF || so->s == -1) - continue; - + continue; + /* * Check for URG data * This will soread as well, so no need to * test for readfds below if this succeeds */ if (FD_ISSET(so->s, xfds)) - sorecvoob(so); + sorecvoob(so); /* * Check sockets for reading */ @@ -407,92 +407,86 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) continue; } /* else */ ret = soread(so); - + /* Output it if we read something */ if (ret > 0) - tcp_output(sototcpcb(so)); + tcp_output(sototcpcb(so)); } - + /* * Check sockets for writing */ if (FD_ISSET(so->s, writefds)) { - /* - * Check for non-blocking, still-connecting sockets - */ - if (so->so_state & SS_ISFCONNECTING) { - /* Connected */ - so->so_state &= ~SS_ISFCONNECTING; - - ret = send(so->s, (char*)&ret, 0, 0); - if (ret < 0) { - /* XXXXX Must fix, zero bytes is a NOP */ - int error = WSAGetLastError(); - if (error == EAGAIN || error == WSAEWOULDBLOCK || - error == WSAEINPROGRESS || error == WSAENOTCONN) - continue; - - /* else failed */ - so->so_state = SS_NOFDREF; - } - /* else so->so_state &= ~SS_ISFCONNECTING; */ - - /* - * Continue tcp_input - */ - tcp_input((struct mbuf *)NULL, sizeof(struct ip), so); - /* continue; */ - } - else - ret = sowrite(so); - /* - * XXXXX If we wrote something (a lot), there - * could be a need for a window update. - * In the worst case, the remote will send - * a window probe to get things going again - */ + /* + * Check for non-blocking, still-connecting sockets + */ + if (so->so_state & SS_ISFCONNECTING) { + /* Connected */ + so->so_state &= ~SS_ISFCONNECTING; + + ret = send(so->s, &ret, 0, 0); + if (ret < 0) { + /* XXXXX Must fix, zero bytes is a NOP */ + if (errno == EAGAIN || errno == EWOULDBLOCK || + errno == EINPROGRESS || errno == ENOTCONN) + continue; + + /* else failed */ + so->so_state = SS_NOFDREF; + } + /* else so->so_state &= ~SS_ISFCONNECTING; */ + + /* + * Continue tcp_input + */ + tcp_input((struct mbuf *)NULL, sizeof(struct ip), so); + /* continue; */ + } else + ret = sowrite(so); + /* + * XXXXX If we wrote something (a lot), there + * could be a need for a window update. + * In the worst case, the remote will send + * a window probe to get things going again + */ } - + /* * Probe a still-connecting, non-blocking socket * to check if it's still alive - */ + */ #ifdef PROBE_CONN if (so->so_state & SS_ISFCONNECTING) { - ret = recv(so->s, (char *)&ret, 0, 0); - - if (ret < 0) { - /* XXX */ - int error = WSAGetLastError(); - if (error == EAGAIN || error == WSAEWOULDBLOCK || - error == WSAEINPROGRESS || error == WSAENOTCONN) - continue; /* Still connecting, continue */ - - /* else failed */ - so->so_state = SS_NOFDREF; - - /* tcp_input will take care of it */ - } - else { - ret = send(so->s, &ret, 0, 0); - if (ret < 0) { - /* XXX */ - int error = WSAGetLastError(); - if (error == EAGAIN || error == WSAEWOULDBLOCK || - error == WSAEINPROGRESS || error == WSAENOTCONN) - continue; - /* else failed */ - so->so_state = SS_NOFDREF; - } - else - so->so_state &= ~SS_ISFCONNECTING; - - } - tcp_input((struct mbuf *)NULL, sizeof(struct ip), so); - } /* SS_ISFCONNECTING */ + ret = recv(so->s, (char *)&ret, 0,0); + + if (ret < 0) { + /* XXX */ + if (errno == EAGAIN || errno == EWOULDBLOCK || + errno == EINPROGRESS || errno == ENOTCONN) + continue; /* Still connecting, continue */ + + /* else failed */ + so->so_state = SS_NOFDREF; + + /* tcp_input will take care of it */ + } else { + ret = send(so->s, &ret, 0,0); + if (ret < 0) { + /* XXX */ + if (errno == EAGAIN || errno == EWOULDBLOCK || + errno == EINPROGRESS || errno == ENOTCONN) + continue; + /* else failed */ + so->so_state = SS_NOFDREF; + } else + so->so_state &= ~SS_ISFCONNECTING; + + } + tcp_input((struct mbuf *)NULL, sizeof(struct ip),so); + } /* SS_ISFCONNECTING */ #endif - } - + } + /* * Now UDP sockets. * Incoming packets are sent straight away, they're not buffered. @@ -500,27 +494,27 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) */ for (so = udb.so_next; so != &udb; so = so_next) { so_next = so->so_next; - + if (so->s != -1 && FD_ISSET(so->s, readfds)) { - sorecvfrom(so); - } + sorecvfrom(so); + } } -} - + } + /* * See if we can start outputting */ if (if_queued && link_up) - if_start(); + if_start(); /* clear global file descriptor sets. * these reside on the stack in vl.c * so they're unusable if we're not in * slirp_select_fill or slirp_select_poll. */ - global_readfds = NULL; - global_writefds = NULL; - global_xfds = NULL; + global_readfds = NULL; + global_writefds = NULL; + global_xfds = NULL; } #define ETH_ALEN 6 diff --git a/BasiliskII/src/slirp/slirp.h b/BasiliskII/src/slirp/slirp.h old mode 100644 new mode 100755 index b845caa7..c30c8d70 --- a/BasiliskII/src/slirp/slirp.h +++ b/BasiliskII/src/slirp/slirp.h @@ -22,12 +22,18 @@ typedef char *caddr_t; typedef int socklen_t; typedef unsigned long ioctlsockopt_t; +# include # include -# include # include # include # define USE_FIONBIO 1 +# define EWOULDBLOCK WSAEWOULDBLOCK +# define EINPROGRESS WSAEINPROGRESS +# define ENOTCONN WSAENOTCONN +# define EHOSTUNREACH WSAEHOSTUNREACH +# define ENETUNREACH WSAENETUNREACH +# define ECONNREFUSED WSAECONNREFUSED /* Basilisk II Router defines those */ # define udp_read_completion slirp_udp_read_completion @@ -35,14 +41,6 @@ typedef unsigned long ioctlsockopt_t; # define init_udp slirp_init_udp # define final_udp slirp_final_udp #else -# define WSAGetLastError() (int)(errno) -# define WSASetLastError(e) (void)(errno = (e)) -# define WSAEWOULDBLOCK EWOULDBLOCK -# define WSAEINPROGRESS EINPROGRESS -# define WSAENOTCONN ENOTCONN -# define WSAEHOSTUNREACH EHOSTUNREACH -# define WSAENETUNREACH ENETUNREACH -# define WSAECONNREFUSED ECONNREFUSED typedef int ioctlsockopt_t; # define ioctlsocket ioctl # define closesocket(s) close(s) @@ -57,9 +55,7 @@ typedef int ioctlsockopt_t; # include #endif -#ifndef _WIN32 #include -#endif #ifdef NEED_TYPEDEFS typedef char int8_t; @@ -129,6 +125,17 @@ typedef u_int32_t uint32; #ifndef _WIN32 #include +#endif + +#ifndef _P +#ifndef NO_PROTOTYPES +# define _P(x) x +#else +# define _P(x) () +#endif +#endif + +#ifndef _WIN32 #include #include #endif @@ -139,23 +146,20 @@ typedef u_int32_t uint32; /* Systems lacking strdup() definition in . */ #if defined(ultrix) -char *strdup(const char *); +char *strdup _P((const char *)); #endif /* Systems lacking malloc() definition in . */ #if defined(ultrix) || defined(hcx) -void *malloc(size_t arg); -void free(void *ptr); +void *malloc _P((size_t arg)); +void free _P((void *ptr)); #endif #ifndef HAVE_INET_ATON -int inet_aton(const char *cp, struct in_addr *ia); +int inet_aton _P((const char *cp, struct in_addr *ia)); #endif #include -#ifdef _WIN32 -#include -#endif #ifndef NO_UNIX_SOCKETS #include #endif @@ -187,7 +191,11 @@ int inet_aton(const char *cp, struct in_addr *ia); #include #endif +#ifdef __STDC__ #include +#else +#include +#endif #include @@ -204,13 +212,8 @@ int inet_aton(const char *cp, struct in_addr *ia); #if defined __GNUC__ #define PACKED__ __attribute__ ((packed)) -#elif defined _MSC_VER -#define PRAGMA_PACK_SUPPORTED 1 -#define PACK_RESET -#define PACKED__ #elif defined __sgi #define PRAGMA_PACK_SUPPORTED 1 -#define PACK_RESET 0 #define PACKED__ #else #error "Packed attribute or pragma shall be supported" @@ -246,49 +249,41 @@ extern struct ttys *ttys_unit[MAX_INTERFACES]; #endif #ifndef FULL_BOLT -void if_start(void); +void if_start _P((void)); #else -void if_start(struct ttys *); +void if_start _P((struct ttys *)); #endif #ifdef BAD_SPRINTF # define vsprintf vsprintf_len # define sprintf sprintf_len - extern int vsprintf_len(char *, const char *, va_list); - extern int sprintf_len(char *, const char *, ...); + extern int vsprintf_len _P((char *, const char *, va_list)); + extern int sprintf_len _P((char *, const char *, ...)); #endif #ifdef DECLARE_SPRINTF # ifndef BAD_SPRINTF - extern int vsprintf(char *, const char *, va_list); + extern int vsprintf _P((char *, const char *, va_list)); # endif - extern int vfprintf(FILE *, const char *, va_list); + extern int vfprintf _P((FILE *, const char *, va_list)); #endif #ifndef HAVE_STRERROR - extern char *strerror(int error); + extern char *strerror _P((int error)); #endif #ifndef HAVE_INDEX - char *index(const char *, int); + char *index _P((const char *, int)); #endif #ifndef HAVE_GETHOSTID - long gethostid(void); + long gethostid _P((void)); #endif -void lprint(const char *, ...); +void lprint _P((const char *, ...)); extern int do_echo; -#if SIZEOF_CHAR_P == 4 -# define insque_32 insque -# define remque_32 remque -#else - extern inline void insque_32(void *, void *); - extern inline void remque_32(void *); -#endif - #ifndef _WIN32 #include #endif @@ -299,47 +294,48 @@ extern int do_echo; int cksum(struct mbuf *m, int len); /* if.c */ -void if_init(void); -void if_output(struct socket *, struct mbuf *); +void if_init _P((void)); +void if_output _P((struct socket *, struct mbuf *)); /* ip_input.c */ -void ip_init(void); -void ip_input(struct mbuf *); -struct ip * ip_reass(register struct ipasfrag *, register struct ipq *); -void ip_freef(struct ipq *); -void ip_enq(register struct ipasfrag *, register struct ipasfrag *); -void ip_deq(register struct ipasfrag *); -void ip_slowtimo(void); -void ip_stripoptions(register struct mbuf *, struct mbuf *); +void ip_init _P((void)); +void ip_input _P((struct mbuf *)); +static struct ip * +ip_reass(register struct ip *ip, register struct ipq *); +void ip_freef _P((struct ipq *)); +void ip_enq _P((register struct ipasfrag *, register struct ipasfrag *)); +void ip_deq _P((register struct ipasfrag *)); +void ip_slowtimo _P((void)); +void ip_stripoptions _P((register struct mbuf *, struct mbuf *)); /* ip_output.c */ -int ip_output(struct socket *, struct mbuf *); +int ip_output _P((struct socket *, struct mbuf *)); /* tcp_input.c */ -int tcp_reass(register struct tcpcb *, register struct tcpiphdr *, struct mbuf *); -void tcp_input(register struct mbuf *, int, struct socket *); -void tcp_dooptions(struct tcpcb *, u_char *, int, struct tcpiphdr *); -void tcp_xmit_timer(register struct tcpcb *, int); -u_int tcp_mss(register struct tcpcb *, u_int); +int tcp_reass _P((register struct tcpcb *, register struct tcpiphdr *, struct mbuf *)); +void tcp_input _P((register struct mbuf *, int, struct socket *)); +void tcp_dooptions _P((struct tcpcb *, u_char *, int, struct tcpiphdr *)); +void tcp_xmit_timer _P((register struct tcpcb *, int)); +int tcp_mss _P((register struct tcpcb *, u_int)); /* tcp_output.c */ -int tcp_output(register struct tcpcb *); -void tcp_setpersist(register struct tcpcb *); +int tcp_output _P((register struct tcpcb *)); +void tcp_setpersist _P((register struct tcpcb *)); /* tcp_subr.c */ -void tcp_init(void); -void tcp_template(struct tcpcb *); -void tcp_respond(struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int); -struct tcpcb * tcp_newtcpcb(struct socket *); -struct tcpcb * tcp_close(register struct tcpcb *); -void tcp_drain(void); -void tcp_sockclosed(struct tcpcb *); -int tcp_fconnect(struct socket *); -void tcp_connect(struct socket *); -int tcp_attach(struct socket *); -u_int8_t tcp_tos(struct socket *); -int tcp_emu(struct socket *, struct mbuf *); -int tcp_ctl(struct socket *); +void tcp_init _P((void)); +void tcp_template _P((struct tcpcb *)); +void tcp_respond _P((struct tcpcb *, register struct tcpiphdr *, register struct mbuf *, tcp_seq, tcp_seq, int)); +struct tcpcb * tcp_newtcpcb _P((struct socket *)); +struct tcpcb * tcp_close _P((register struct tcpcb *)); +void tcp_drain _P((void)); +void tcp_sockclosed _P((struct tcpcb *)); +int tcp_fconnect _P((struct socket *)); +void tcp_connect _P((struct socket *)); +int tcp_attach _P((struct socket *)); +u_int8_t tcp_tos _P((struct socket *)); +int tcp_emu _P((struct socket *, struct mbuf *)); +int tcp_ctl _P((struct socket *)); struct tcpcb *tcp_drop(struct tcpcb *tp, int err); #ifdef USE_PPP @@ -355,4 +351,9 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err); #define max(x,y) ((x) > (y) ? (x) : (y)) #endif +#ifdef _WIN32 +#undef errno +#define errno (WSAGetLastError()) +#endif + #endif diff --git a/BasiliskII/src/slirp/slirp_config.h b/BasiliskII/src/slirp/slirp_config.h old mode 100644 new mode 100755 index 237268fa..e583dcc8 --- a/BasiliskII/src/slirp/slirp_config.h +++ b/BasiliskII/src/slirp/slirp_config.h @@ -40,6 +40,11 @@ */ #undef USE_LOWCPU +/* Define this if your compiler doesn't like prototypes */ +#ifndef __STDC__ +#define NO_PROTOTYPES +#endif + /*********************************************************/ /* * Autoconf defined configuration options @@ -72,6 +77,9 @@ /* Define if you have sys/stropts.h */ #undef HAVE_SYS_STROPTS_H +/* Define if your compiler doesn't like prototypes */ +#undef NO_PROTOTYPES + /* Define if you don't have u_int32_t etc. typedef'd */ #undef NEED_TYPEDEFS #ifdef __sun__ diff --git a/BasiliskII/src/slirp/socket.c b/BasiliskII/src/slirp/socket.c old mode 100644 new mode 100755 index 42ba31b2..f3d10e53 --- a/BasiliskII/src/slirp/socket.c +++ b/BasiliskII/src/slirp/socket.c @@ -14,12 +14,6 @@ #include #endif -#ifdef _WIN32 -#define IS_EAGAIN(e) ((e) == WSAEINTR || (e) == EAGAIN) -#else -#define IS_EAGAIN(e) ((e) == EAGAIN) -#endif - void so_init() { @@ -103,12 +97,11 @@ int soread(so) struct socket *so; { - int n, nn; - u_int lss, total; + int n, nn, lss, total; struct sbuf *sb = &so->so_snd; - u_int len = sb->sb_datalen - sb->sb_cc; + int len = sb->sb_datalen - sb->sb_cc; struct iovec iov[2]; - u_int mss = so->so_tcpcb->t_maxseg; + int mss = so->so_tcpcb->t_maxseg; DEBUG_CALL("soread"); DEBUG_ARG("so = %lx", (long )so); @@ -166,8 +159,7 @@ soread(so) nn = recv(so->s, iov[0].iov_base, iov[0].iov_len,0); #endif if (nn <= 0) { - int error = WSAGetLastError(); - if (nn < 0 && IS_EAGAIN(error)) + if (nn < 0 && (errno == EINTR || errno == EAGAIN)) return 0; else { DEBUG_MISC((dfd, " --- soread() disconnected, nn = %d, errno = %d-%s\n", nn, errno,strerror(errno))); @@ -305,7 +297,7 @@ sowrite(so) { int n,nn; struct sbuf *sb = &so->so_rcv; - u_int len = sb->sb_cc; + int len = sb->sb_cc; struct iovec iov[2]; DEBUG_CALL("sowrite"); @@ -352,12 +344,9 @@ sowrite(so) nn = send(so->s, iov[0].iov_base, iov[0].iov_len,0); #endif /* This should never happen, but people tell me it does *shrug* */ - if (nn < 0) { - int error = WSAGetLastError(); - if (IS_EAGAIN(error)) - return 0; - } - + if (nn < 0 && (errno == EAGAIN || errno == EINTR)) + return 0; + if (nn <= 0) { DEBUG_MISC((dfd, " --- sowrite disconnected, so->so_state = %x, errno = %d\n", so->so_state, errno)); @@ -416,9 +405,8 @@ sorecvfrom(so) if(len == -1 || len == 0) { u_char code=ICMP_UNREACH_PORT; - int error = WSAGetLastError(); - if(error == WSAEHOSTUNREACH) code=ICMP_UNREACH_HOST; - else if(error == WSAENETUNREACH) code=ICMP_UNREACH_NET; + if(errno == EHOSTUNREACH) code=ICMP_UNREACH_HOST; + else if(errno == ENETUNREACH) code=ICMP_UNREACH_NET; DEBUG_MISC((dfd," udp icmp rx errno = %d-%s\n", errno,strerror(errno))); @@ -431,7 +419,7 @@ sorecvfrom(so) udp_detach(so); } else { /* A "normal" UDP packet */ struct mbuf *m; - u_int len; + int len; ioctlsockopt_t n; if (!(m = m_get())) return; @@ -454,14 +442,13 @@ sorecvfrom(so) m->m_len = recvfrom(so->s, m->m_data, len, 0, (struct sockaddr *)&addr, &addrlen); - DEBUG_MISC((dfd, " did recvfrom %zu, errno = %d-%s\n", + DEBUG_MISC((dfd, " did recvfrom %d, errno = %d-%s\n", m->m_len, errno,strerror(errno))); if(m->m_len<0) { u_char code=ICMP_UNREACH_PORT; - int error = WSAGetLastError(); - if(error == WSAEHOSTUNREACH) code=ICMP_UNREACH_HOST; - else if(error == WSAENETUNREACH) code=ICMP_UNREACH_NET; + if(errno == EHOSTUNREACH) code=ICMP_UNREACH_HOST; + else if(errno == ENETUNREACH) code=ICMP_UNREACH_NET; DEBUG_MISC((dfd," rx error, tx icmp ICMP_UNREACH:%i\n", code)); icmp_error(so->so_m, ICMP_UNREACH,code, 0,strerror(errno)); @@ -526,9 +513,7 @@ sosendto(so, m) addr.sin_addr = so->so_faddr; addr.sin_port = so->so_fport; - char addrstr[INET_ADDRSTRLEN]; - DEBUG_MISC((dfd, " sendto()ing, addr.sin_port=%d, addr.sin_addr.s_addr=%.16s\n", - ntohs(addr.sin_port), inet_ntop(AF_INET, &addr.sin_addr, addrstr, sizeof(addrstr)))); + DEBUG_MISC((dfd, " sendto()ing, addr.sin_port=%d, addr.sin_addr.s_addr=%.16s\n", ntohs(addr.sin_port), inet_ntoa(addr.sin_addr))); /* Don't care what port we get */ ret = sendto(so->s, m->m_data, m->m_len, 0, @@ -599,12 +584,16 @@ solisten(port, laddr, lport, flags) (setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int)) < 0) || (bind(s,(struct sockaddr *)&addr, sizeof(addr)) < 0) || (listen(s,1) < 0)) { - int error = WSAGetLastError(); /* Don't clobber the real reason we failed */ + int tmperrno = errno; /* Don't clobber the real reason we failed */ close(s); sofree(so); /* Restore the real errno */ - WSASetLastError(error); +#ifdef _WIN32 + WSASetLastError(tmperrno); +#else + errno = tmperrno; +#endif return NULL; } setsockopt(s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(int)); diff --git a/BasiliskII/src/slirp/socket.h b/BasiliskII/src/slirp/socket.h old mode 100644 new mode 100755 index 3b0fee16..d05354c8 --- a/BasiliskII/src/slirp/socket.h +++ b/BasiliskII/src/slirp/socket.h @@ -81,24 +81,24 @@ struct iovec { }; #endif -void so_init(void); -struct socket * solookup(struct socket *, struct in_addr, u_int, struct in_addr, u_int); -struct socket * socreate(void); -void sofree(struct socket *); -int soread(struct socket *); -void sorecvoob(struct socket *); -int sosendoob(struct socket *); -int sowrite(struct socket *); -void sorecvfrom(struct socket *); -int sosendto(struct socket *, struct mbuf *); -struct socket * solisten(u_int, u_int32_t, u_int, int); -void sorwakeup(struct socket *); -void sowwakeup(struct socket *); -void soisfconnecting(register struct socket *); -void soisfconnected(register struct socket *); -void sofcantrcvmore(struct socket *); -void sofcantsendmore(struct socket *); -void soisfdisconnected(struct socket *); -void sofwdrain(struct socket *); +void so_init _P((void)); +struct socket * solookup _P((struct socket *, struct in_addr, u_int, struct in_addr, u_int)); +struct socket * socreate _P((void)); +void sofree _P((struct socket *)); +int soread _P((struct socket *)); +void sorecvoob _P((struct socket *)); +int sosendoob _P((struct socket *)); +int sowrite _P((struct socket *)); +void sorecvfrom _P((struct socket *)); +int sosendto _P((struct socket *, struct mbuf *)); +struct socket * solisten _P((u_int, u_int32_t, u_int, int)); +void sorwakeup _P((struct socket *)); +void sowwakeup _P((struct socket *)); +void soisfconnecting _P((register struct socket *)); +void soisfconnected _P((register struct socket *)); +void sofcantrcvmore _P((struct socket *)); +void sofcantsendmore _P((struct socket *)); +void soisfdisconnected _P((struct socket *)); +void sofwdrain _P((struct socket *)); #endif /* _SOCKET_H_ */ diff --git a/BasiliskII/src/slirp/tcp.h b/BasiliskII/src/slirp/tcp.h old mode 100644 new mode 100755 index 24e7914a..5f03f9e1 --- a/BasiliskII/src/slirp/tcp.h +++ b/BasiliskII/src/slirp/tcp.h @@ -38,8 +38,8 @@ typedef u_int32_t tcp_seq; #define PR_SLOWHZ 2 /* 2 slow timeouts per second (approx) */ #define PR_FASTHZ 5 /* 5 fast timeouts per second (not important) */ -extern size_t tcp_rcvspace; -extern size_t tcp_sndspace; +extern int tcp_rcvspace; +extern int tcp_sndspace; extern struct socket *tcp_last_so; #define TCP_SNDSPACE 8192 @@ -78,7 +78,7 @@ struct tcphdr { } PACKED__; #ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) +#pragma pack(0) #endif #include "tcp_var.h" diff --git a/BasiliskII/src/slirp/tcp_input.c b/BasiliskII/src/slirp/tcp_input.c old mode 100644 new mode 100755 index 032e5378..fc7c0bc0 --- a/BasiliskII/src/slirp/tcp_input.c +++ b/BasiliskII/src/slirp/tcp_input.c @@ -68,7 +68,7 @@ tcp_seq tcp_iss; /* tcp initial send seq # */ #ifdef TCP_ACK_HACK #define TCP_REASS(tp, ti, m, so, flags) {\ if ((ti)->ti_seq == (tp)->rcv_nxt && \ - (tp)->seg_next == (tcpiphdrp_32)(tp) && \ + tcpfrag_list_empty(tp) && \ (tp)->t_state == TCPS_ESTABLISHED) {\ if (ti->ti_flags & TH_PUSH) \ tp->t_flags |= TF_ACKNOW; \ @@ -91,7 +91,7 @@ tcp_seq tcp_iss; /* tcp initial send seq # */ #else #define TCP_REASS(tp, ti, m, so, flags) { \ if ((ti)->ti_seq == (tp)->rcv_nxt && \ - (tp)->seg_next == (tcpiphdrp_32)(tp) && \ + tcpfrag_list_empty(tp) && \ (tp)->t_state == TCPS_ESTABLISHED) { \ tp->t_flags |= TF_DELACK; \ (tp)->rcv_nxt += (ti)->ti_len; \ @@ -111,7 +111,10 @@ tcp_seq tcp_iss; /* tcp initial send seq # */ #endif int -tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, struct mbuf *m) +tcp_reass(tp, ti, m) + register struct tcpcb *tp; + register struct tcpiphdr *ti; + struct mbuf *m; { register struct tcpiphdr *q; struct socket *so = tp->t_socket; @@ -127,8 +130,8 @@ tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, struct mbuf * /* * Find a segment which begins after this one does. */ - for (q = (struct tcpiphdr *)tp->seg_next; q != (struct tcpiphdr *)tp; - q = (struct tcpiphdr *)q->ti_next) + for (q = tcpfrag_list_first(tp); !tcpfrag_list_end(q, tp); + q = tcpiphdr_next(q)) if (SEQ_GT(q->ti_seq, ti->ti_seq)) break; @@ -137,9 +140,9 @@ tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, struct mbuf * * our data already. If so, drop the data from the incoming * segment. If it provides all of our data, drop us. */ - if ((struct tcpiphdr *)q->ti_prev != (struct tcpiphdr *)tp) { + if (!tcpfrag_list_end(tcpiphdr_prev(q), tp)) { register int i; - q = (struct tcpiphdr *)q->ti_prev; + q = tcpiphdr_prev(q); /* conversion to int (in i) handles seq wraparound */ i = q->ti_seq + q->ti_len - ti->ti_seq; if (i > 0) { @@ -159,37 +162,36 @@ tcp_reass(register struct tcpcb *tp, register struct tcpiphdr *ti, struct mbuf * ti->ti_len -= i; ti->ti_seq += i; } - q = (struct tcpiphdr *)(q->ti_next); + q = tcpiphdr_next(q); } tcpstat.tcps_rcvoopack++; tcpstat.tcps_rcvoobyte += ti->ti_len; - REASS_MBUF(ti) = (mbufp_32) m; /* XXX */ + ti->ti_mbuf = m; /* * While we overlap succeeding segments trim them or, * if they are completely covered, dequeue them. */ - while (q != (struct tcpiphdr *)tp) { + while (!tcpfrag_list_end(q, tp)) { register int i = (ti->ti_seq + ti->ti_len) - q->ti_seq; if (i <= 0) break; if (i < q->ti_len) { q->ti_seq += i; q->ti_len -= i; - m_adj((struct mbuf *) REASS_MBUF(q), i); + m_adj(q->ti_mbuf, i); break; } - q = (struct tcpiphdr *)q->ti_next; - m = (struct mbuf *) REASS_MBUF((struct tcpiphdr *)q->ti_prev); - remque_32((void *)(q->ti_prev)); + q = tcpiphdr_next(q); + m = tcpiphdr_prev(q)->ti_mbuf; + remque(tcpiphdr2qlink(tcpiphdr_prev(q))); m_freem(m); } /* * Stick new segment in its place. */ - insque_32(ti, (void *)(q->ti_prev)); - + insque(tcpiphdr2qlink(ti), tcpiphdr2qlink(tcpiphdr_prev(q))); present: /* * Present data to user, advancing rcv_nxt through @@ -197,17 +199,17 @@ present: */ if (!TCPS_HAVEESTABLISHED(tp->t_state)) return (0); - ti = (struct tcpiphdr *) tp->seg_next; - if (ti == (struct tcpiphdr *)tp || ti->ti_seq != tp->rcv_nxt) + ti = tcpfrag_list_first(tp); + if (tcpfrag_list_end(ti, tp) || ti->ti_seq != tp->rcv_nxt) return (0); if (tp->t_state == TCPS_SYN_RECEIVED && ti->ti_len) return (0); do { tp->rcv_nxt += ti->ti_len; flags = ti->ti_flags & TH_FIN; - remque_32(ti); - m = (struct mbuf *) REASS_MBUF(ti); /* XXX */ - ti = (struct tcpiphdr *)ti->ti_next; + remque(tcpiphdr2qlink(ti)); + m = ti->ti_mbuf; + ti = tcpiphdr_next(ti); /* if (so->so_state & SS_FCANTRCVMORE) */ if (so->so_state & SS_FCANTSENDMORE) m_freem(m); @@ -226,9 +228,13 @@ present: * TCP input routine, follows pages 65-76 of the * protocol specification dated September, 1981 very closely. */ -void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) +void +tcp_input(m, iphlen, inso) + register struct mbuf *m; + int iphlen; + struct socket *inso; { - struct ip save_ip, *ip; + struct ip save_ip, *ip; register struct tcpiphdr *ti; caddr_t optp = NULL; int optlen = 0; @@ -236,25 +242,23 @@ void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) register struct tcpcb *tp = 0; register int tiflags; struct socket *so = 0; - int todrop; - u_int acked; - int ourfinisacked, needoutput = 0; - /* int dropsocket = 0; */ + int todrop, acked, ourfinisacked, needoutput = 0; +/* int dropsocket = 0; */ int iss = 0; u_long tiwin; int ret; - /* int ts_present = 0; */ +/* int ts_present = 0; */ DEBUG_CALL("tcp_input"); - DEBUG_ARGS((dfd, " m = %8lx iphlen = %2d inso = %lx\n", - (long)m, iphlen, (long)inso)); - + DEBUG_ARGS((dfd," m = %8lx iphlen = %2d inso = %lx\n", + (long )m, iphlen, (long )inso )); + /* * If called with m == 0, then we're continuing the connect */ if (m == NULL) { so = inso; - + /* Re-set a few variables */ tp = sototcpcb(so); m = so->so_m; @@ -262,46 +266,47 @@ void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) ti = so->so_ti; tiwin = ti->ti_win; tiflags = ti->ti_flags; - + goto cont_conn; } - - + + tcpstat.tcps_rcvtotal++; /* * Get IP and TCP header together in first mbuf. * Note: IP leaves IP header in first mbuf. */ ti = mtod(m, struct tcpiphdr *); - if (iphlen > sizeof(struct ip)) { - ip_stripoptions(m, (struct mbuf *)0); - iphlen = sizeof(struct ip); + if (iphlen > sizeof(struct ip )) { + ip_stripoptions(m, (struct mbuf *)0); + iphlen=sizeof(struct ip ); } /* XXX Check if too short */ - + /* * Save a copy of the IP header in case we want restore it * for sending an ICMP error message in response. */ - ip = mtod(m, struct ip *); - save_ip = *ip; - save_ip.ip_len += iphlen; + ip=mtod(m, struct ip *); + save_ip = *ip; + save_ip.ip_len+= iphlen; /* * Checksum extended TCP header and data. */ tlen = ((struct ip *)ti)->ip_len; - ti->ti_next = ti->ti_prev = 0; + tcpiphdr2qlink(ti)->next = tcpiphdr2qlink(ti)->prev = 0; + memset(&ti->ti_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr)); ti->ti_x1 = 0; ti->ti_len = htons((u_int16_t)tlen); - len = sizeof(struct ip) + tlen; + len = sizeof(struct ip ) + tlen; /* keep checksum for ICMP reply - * ti->ti_sum = cksum(m, len); + * ti->ti_sum = cksum(m, len); * if (ti->ti_sum) { */ - if (cksum(m, len)) { - tcpstat.tcps_rcvbadsum++; - goto drop; + if(cksum(m, len)) { + tcpstat.tcps_rcvbadsum++; + goto drop; } /* @@ -309,37 +314,37 @@ void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) * pull out TCP options and adjust length. XXX */ off = ti->ti_off << 2; - if (off < sizeof(struct tcphdr) || off > tlen) { - tcpstat.tcps_rcvbadoff++; - goto drop; + if (off < sizeof (struct tcphdr) || off > tlen) { + tcpstat.tcps_rcvbadoff++; + goto drop; } tlen -= off; ti->ti_len = tlen; - if (off > sizeof(struct tcphdr)) { - optlen = off - sizeof(struct tcphdr); - optp = mtod(m, caddr_t) + sizeof(struct tcpiphdr); + if (off > sizeof (struct tcphdr)) { + optlen = off - sizeof (struct tcphdr); + optp = mtod(m, caddr_t) + sizeof (struct tcpiphdr); - /* + /* * Do quick retrieval of timestamp options ("options * prediction?"). If timestamp is the only option and it's * formatted as recommended in RFC 1323 appendix A, we * quickly get the values now and not bother calling * tcp_dooptions(), etc. */ - /* if ((optlen == TCPOLEN_TSTAMP_APPA || - * (optlen > TCPOLEN_TSTAMP_APPA && - * optp[TCPOLEN_TSTAMP_APPA] == TCPOPT_EOL)) && - * *(u_int32_t *)optp == htonl(TCPOPT_TSTAMP_HDR) && - * (ti->ti_flags & TH_SYN) == 0) { - * ts_present = 1; - * ts_val = ntohl(*(u_int32_t *)(optp + 4)); - * ts_ecr = ntohl(*(u_int32_t *)(optp + 8)); - * optp = NULL; / * we've parsed the options * / - * } - */ +/* if ((optlen == TCPOLEN_TSTAMP_APPA || + * (optlen > TCPOLEN_TSTAMP_APPA && + * optp[TCPOLEN_TSTAMP_APPA] == TCPOPT_EOL)) && + * *(u_int32_t *)optp == htonl(TCPOPT_TSTAMP_HDR) && + * (ti->ti_flags & TH_SYN) == 0) { + * ts_present = 1; + * ts_val = ntohl(*(u_int32_t *)(optp + 4)); + * ts_ecr = ntohl(*(u_int32_t *)(optp + 8)); + * optp = NULL; / * we've parsed the options * / + * } + */ } tiflags = ti->ti_flags; - + /* * Convert TCP protocol specific fields to host format. */ @@ -351,20 +356,20 @@ void tcp_input(register struct mbuf *m, int iphlen, struct socket *inso) /* * Drop TCP, IP headers and TCP options. */ - m->m_data += sizeof(struct tcpiphdr) + off - sizeof(struct tcphdr); - m->m_len -= sizeof(struct tcpiphdr) + off - sizeof(struct tcphdr); - + m->m_data += sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); + m->m_len -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); + /* * Locate pcb for segment. */ findso: so = tcp_last_so; if (so->so_fport != ti->ti_dport || - so->so_lport != ti->ti_sport || - so->so_laddr.s_addr != ti->ti_src.s_addr || - so->so_faddr.s_addr != ti->ti_dst.s_addr) { + so->so_lport != ti->ti_sport || + so->so_laddr.s_addr != ti->ti_src.s_addr || + so->so_faddr.s_addr != ti->ti_dst.s_addr) { so = solookup(&tcb, ti->ti_src, ti->ti_sport, - ti->ti_dst, ti->ti_dport); + ti->ti_dst, ti->ti_dport); if (so) tcp_last_so = so; ++tcpstat.tcps_socachemiss; @@ -377,63 +382,63 @@ findso: * but should either do a listen or a connect soon. * * state == CLOSED means we've done socreate() but haven't - * attached it to a protocol yet... - * + * attached it to a protocol yet... + * * XXX If a TCB does not exist, and the TH_SYN flag is * the only flag set, then create a session, mark it * as if it was LISTENING, and continue... */ if (so == 0) { - if ((tiflags & (TH_SYN | TH_FIN | TH_RST | TH_URG | TH_ACK)) != TH_SYN) - goto dropwithreset; - - if ((so = socreate()) == NULL) - goto dropwithreset; - if (tcp_attach(so) < 0) { - free(so); /* Not sofree (if it failed, it's not insqued) */ - goto dropwithreset; - } - - sbreserve(&so->so_snd, tcp_sndspace); - sbreserve(&so->so_rcv, tcp_rcvspace); - - /* tcp_last_so = so; */ /* XXX ? */ - /* tp = sototcpcb(so); */ - - so->so_laddr = ti->ti_src; - so->so_lport = ti->ti_sport; - so->so_faddr = ti->ti_dst; - so->so_fport = ti->ti_dport; - - if ((so->so_iptos = tcp_tos(so)) == 0) - so->so_iptos = ((struct ip *)ti)->ip_tos; - - tp = sototcpcb(so); - tp->t_state = TCPS_LISTEN; + if ((tiflags & (TH_SYN|TH_FIN|TH_RST|TH_URG|TH_ACK)) != TH_SYN) + goto dropwithreset; + + if ((so = socreate()) == NULL) + goto dropwithreset; + if (tcp_attach(so) < 0) { + free(so); /* Not sofree (if it failed, it's not insqued) */ + goto dropwithreset; + } + + sbreserve(&so->so_snd, tcp_sndspace); + sbreserve(&so->so_rcv, tcp_rcvspace); + + /* tcp_last_so = so; */ /* XXX ? */ + /* tp = sototcpcb(so); */ + + so->so_laddr = ti->ti_src; + so->so_lport = ti->ti_sport; + so->so_faddr = ti->ti_dst; + so->so_fport = ti->ti_dport; + + if ((so->so_iptos = tcp_tos(so)) == 0) + so->so_iptos = ((struct ip *)ti)->ip_tos; + + tp = sototcpcb(so); + tp->t_state = TCPS_LISTEN; } - - /* - * If this is a still-connecting socket, this probably - * a retransmit of the SYN. Whether it's a retransmit SYN - * or something else, we nuke it. - */ - if (so->so_state & SS_ISFCONNECTING) - goto drop; + + /* + * If this is a still-connecting socket, this probably + * a retransmit of the SYN. Whether it's a retransmit SYN + * or something else, we nuke it. + */ + if (so->so_state & SS_ISFCONNECTING) + goto drop; tp = sototcpcb(so); - + /* XXX Should never fail */ if (tp == 0) goto dropwithreset; if (tp->t_state == TCPS_CLOSED) goto drop; - + /* Unscale the window into a 32-bit value. */ /* if ((tiflags & TH_SYN) == 0) * tiwin = ti->ti_win << tp->snd_scale; * else */ - tiwin = ti->ti_win; + tiwin = ti->ti_win; /* * Segment received on connection. @@ -441,66 +446,66 @@ findso: */ tp->t_idle = 0; if (so_options) - tp->t_timer[TCPT_KEEP] = tcp_keepintvl; + tp->t_timer[TCPT_KEEP] = tcp_keepintvl; else - tp->t_timer[TCPT_KEEP] = tcp_keepidle; + tp->t_timer[TCPT_KEEP] = tcp_keepidle; /* * Process options if not in LISTEN state, * else do it below (after getting remote address). */ if (optp && tp->t_state != TCPS_LISTEN) - tcp_dooptions(tp, (u_char *)optp, optlen, ti); - /* , */ - /* &ts_present, &ts_val, &ts_ecr); */ + tcp_dooptions(tp, (u_char *)optp, optlen, ti); +/* , */ +/* &ts_present, &ts_val, &ts_ecr); */ - /* - * Header prediction: check for the two common cases - * of a uni-directional data xfer. If the packet has - * no control flags, is in-sequence, the window didn't - * change and we're not retransmitting, it's a - * candidate. If the length is zero and the ack moved - * forward, we're the sender side of the xfer. Just - * free the data acked & wake any higher level process - * that was blocked waiting for space. If the length - * is non-zero and the ack didn't move, we're the - * receiver side. If we're getting packets in-order - * (the reassembly queue is empty), add the data to - * the socket buffer and note that we need a delayed ack. - * - * XXX Some of these tests are not needed - * eg: the tiwin == tp->snd_wnd prevents many more - * predictions.. with no *real* advantage.. - */ + /* + * Header prediction: check for the two common cases + * of a uni-directional data xfer. If the packet has + * no control flags, is in-sequence, the window didn't + * change and we're not retransmitting, it's a + * candidate. If the length is zero and the ack moved + * forward, we're the sender side of the xfer. Just + * free the data acked & wake any higher level process + * that was blocked waiting for space. If the length + * is non-zero and the ack didn't move, we're the + * receiver side. If we're getting packets in-order + * (the reassembly queue is empty), add the data to + * the socket buffer and note that we need a delayed ack. + * + * XXX Some of these tests are not needed + * eg: the tiwin == tp->snd_wnd prevents many more + * predictions.. with no *real* advantage.. + */ if (tp->t_state == TCPS_ESTABLISHED && - (tiflags & (TH_SYN | TH_FIN | TH_RST | TH_URG | TH_ACK)) == TH_ACK && - /* (!ts_present || TSTMP_GEQ(ts_val, tp->ts_recent)) && */ - ti->ti_seq == tp->rcv_nxt && - tiwin && tiwin == tp->snd_wnd && - tp->snd_nxt == tp->snd_max) { - /* + (tiflags & (TH_SYN|TH_FIN|TH_RST|TH_URG|TH_ACK)) == TH_ACK && +/* (!ts_present || TSTMP_GEQ(ts_val, tp->ts_recent)) && */ + ti->ti_seq == tp->rcv_nxt && + tiwin && tiwin == tp->snd_wnd && + tp->snd_nxt == tp->snd_max) { + /* * If last ACK falls within this segment's sequence numbers, * record the timestamp. */ - /* if (ts_present && SEQ_LEQ(ti->ti_seq, tp->last_ack_sent) && - * SEQ_LT(tp->last_ack_sent, ti->ti_seq + ti->ti_len)) { - * tp->ts_recent_age = tcp_now; - * tp->ts_recent = ts_val; - * } - */ +/* if (ts_present && SEQ_LEQ(ti->ti_seq, tp->last_ack_sent) && + * SEQ_LT(tp->last_ack_sent, ti->ti_seq + ti->ti_len)) { + * tp->ts_recent_age = tcp_now; + * tp->ts_recent = ts_val; + * } + */ if (ti->ti_len == 0) { if (SEQ_GT(ti->ti_ack, tp->snd_una) && - SEQ_LEQ(ti->ti_ack, tp->snd_max) && - tp->snd_cwnd >= tp->snd_wnd) { + SEQ_LEQ(ti->ti_ack, tp->snd_max) && + tp->snd_cwnd >= tp->snd_wnd) { /* * this is a pure ack for outstanding data. */ ++tcpstat.tcps_predack; - /* if (ts_present) - * tcp_xmit_timer(tp, tcp_now-ts_ecr+1); - * else - */ if (tp->t_rtt && -SEQ_GT(ti->ti_ack, tp->t_rtseq)) +/* if (ts_present) + * tcp_xmit_timer(tp, tcp_now-ts_ecr+1); + * else + */ if (tp->t_rtt && + SEQ_GT(ti->ti_ack, tp->t_rtseq)) tcp_xmit_timer(tp, tp->t_rtt); acked = ti->ti_ack - tp->snd_una; tcpstat.tcps_rcvackpack++; @@ -523,27 +528,26 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) else if (tp->t_timer[TCPT_PERSIST] == 0) tp->t_timer[TCPT_REXMT] = tp->t_rxtcur; - /* + /* * There's room in so_snd, sowwakup will read() * from the socket if we can */ - /* if (so->so_snd.sb_flags & SB_NOTIFY) - * sowwakeup(so); - */ - /* - * This is called because sowwakeup might have - * put data into so_snd. Since we don't so sowwakeup, - * we don't need this.. XXX??? - */ +/* if (so->so_snd.sb_flags & SB_NOTIFY) + * sowwakeup(so); + */ + /* + * This is called because sowwakeup might have + * put data into so_snd. Since we don't so sowwakeup, + * we don't need this.. XXX??? + */ if (so->so_snd.sb_cc) (void) tcp_output(tp); return; } - } - else if (ti->ti_ack == tp->snd_una && - tp->seg_next == (tcpiphdrp_32)tp && - ti->ti_len <= sbspace(&so->so_rcv)) { + } else if (ti->ti_ack == tp->snd_una && + tcpfrag_list_empty(tp) && + ti->ti_len <= sbspace(&so->so_rcv)) { /* * this is a pure, in-sequence data packet * with nothing on the reassembly queue and @@ -557,26 +561,25 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * Add data to socket buffer. */ if (so->so_emu) { - if (tcp_emu(so, m)) sbappend(so, m); - } - else + if (tcp_emu(so,m)) sbappend(so, m); + } else sbappend(so, m); - - /* + + /* * XXX This is called when data arrives. Later, check * if we can actually write() to the socket * XXX Need to check? It's be NON_BLOCKING */ - /* sorwakeup(so); */ - - /* - * If this is a short packet, then ACK now - with Nagel - * congestion avoidance sender won't send more until - * he gets an ACK. - * - * It is better to not delay acks at all to maximize - * TCP throughput. See RFC 2581. - */ +/* sorwakeup(so); */ + + /* + * If this is a short packet, then ACK now - with Nagel + * congestion avoidance sender won't send more until + * he gets an ACK. + * + * It is better to not delay acks at all to maximize + * TCP throughput. See RFC 2581. + */ tp->t_flags |= TF_ACKNOW; tcp_output(tp); return; @@ -589,147 +592,141 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * but not less than advertised window. */ { int win; - win = sbspace(&so->so_rcv); - if (win < 0) - win = 0; - tp->rcv_wnd = max(win, (int)(tp->rcv_adv - tp->rcv_nxt)); + win = sbspace(&so->so_rcv); + if (win < 0) + win = 0; + tp->rcv_wnd = max(win, (int)(tp->rcv_adv - tp->rcv_nxt)); } switch (tp->t_state) { - /* - * If the state is LISTEN then ignore segment if it contains an RST. - * If the segment contains an ACK then it is bad and send a RST. - * If it does not contain a SYN then it is not interesting; drop it. - * Don't bother responding if the destination was a broadcast. - * Otherwise initialize tp->rcv_nxt, and tp->irs, select an initial - * tp->iss, and send a segment: - * - * Also initialize tp->snd_nxt to tp->iss+1 and tp->snd_una to tp->iss. - * Fill in remote peer address fields if not previously specified. - * Enter SYN_RECEIVED state, and process any other fields of this - * segment in this state. - */ + /* + * If the state is LISTEN then ignore segment if it contains an RST. + * If the segment contains an ACK then it is bad and send a RST. + * If it does not contain a SYN then it is not interesting; drop it. + * Don't bother responding if the destination was a broadcast. + * Otherwise initialize tp->rcv_nxt, and tp->irs, select an initial + * tp->iss, and send a segment: + * + * Also initialize tp->snd_nxt to tp->iss+1 and tp->snd_una to tp->iss. + * Fill in remote peer address fields if not previously specified. + * Enter SYN_RECEIVED state, and process any other fields of this + * segment in this state. + */ case TCPS_LISTEN: { - if (tiflags & TH_RST) - goto drop; - if (tiflags & TH_ACK) - goto dropwithreset; - if ((tiflags & TH_SYN) == 0) - goto drop; - - /* - * This has way too many gotos... - * But a bit of spaghetti code never hurt anybody :) - */ - - /* - * If this is destined for the control address, then flag to - * tcp_ctl once connected, otherwise connect - */ - if ((so->so_faddr.s_addr&htonl(0xffffff00)) == special_addr.s_addr) { - int lastbyte = ntohl(so->so_faddr.s_addr) & 0xff; - if (lastbyte != CTL_ALIAS && lastbyte != CTL_DNS) { + if (tiflags & TH_RST) + goto drop; + if (tiflags & TH_ACK) + goto dropwithreset; + if ((tiflags & TH_SYN) == 0) + goto drop; + + /* + * This has way too many gotos... + * But a bit of spaghetti code never hurt anybody :) + */ + + /* + * If this is destined for the control address, then flag to + * tcp_ctl once connected, otherwise connect + */ + if ((so->so_faddr.s_addr&htonl(0xffffff00)) == special_addr.s_addr) { + int lastbyte=ntohl(so->so_faddr.s_addr) & 0xff; + if (lastbyte!=CTL_ALIAS && lastbyte!=CTL_DNS) { #if 0 - if (lastbyte == CTL_CMD || lastbyte == CTL_EXEC) { - /* Command or exec adress */ - so->so_state |= SS_CTL; - } - else + if(lastbyte==CTL_CMD || lastbyte==CTL_EXEC) { + /* Command or exec adress */ + so->so_state |= SS_CTL; + } else #endif - { - /* May be an add exec */ - struct ex_list *ex_ptr; - for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) { - if (ex_ptr->ex_fport == so->so_fport && - lastbyte == ex_ptr->ex_addr) { - so->so_state |= SS_CTL; - break; - } - } - } - if (so->so_state & SS_CTL) goto cont_input; - } - /* CTL_ALIAS: Do nothing, tcp_fconnect will be called on it */ + { + /* May be an add exec */ + struct ex_list *ex_ptr; + for(ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) { + if(ex_ptr->ex_fport == so->so_fport && + lastbyte == ex_ptr->ex_addr) { + so->so_state |= SS_CTL; + break; + } } + } + if(so->so_state & SS_CTL) goto cont_input; + } + /* CTL_ALIAS: Do nothing, tcp_fconnect will be called on it */ + } + + if (so->so_emu & EMU_NOCONNECT) { + so->so_emu &= ~EMU_NOCONNECT; + goto cont_input; + } + + if((tcp_fconnect(so) == -1) && (errno != EINPROGRESS) && (errno != EWOULDBLOCK)) { + u_char code=ICMP_UNREACH_NET; + DEBUG_MISC((dfd," tcp fconnect errno = %d-%s\n", + errno,strerror(errno))); + if(errno == ECONNREFUSED) { + /* ACK the SYN, send RST to refuse the connection */ + tcp_respond(tp, ti, m, ti->ti_seq+1, (tcp_seq)0, + TH_RST|TH_ACK); + } else { + if(errno == EHOSTUNREACH) code=ICMP_UNREACH_HOST; + HTONL(ti->ti_seq); /* restore tcp header */ + HTONL(ti->ti_ack); + HTONS(ti->ti_win); + HTONS(ti->ti_urp); + m->m_data -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); + m->m_len += sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr); + *ip=save_ip; + icmp_error(m, ICMP_UNREACH,code, 0,strerror(errno)); + } + tp = tcp_close(tp); + m_free(m); + } else { + /* + * Haven't connected yet, save the current mbuf + * and ti, and return + * XXX Some OS's don't tell us whether the connect() + * succeeded or not. So we must time it out. + */ + so->so_m = m; + so->so_ti = ti; + tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; + tp->t_state = TCPS_SYN_RECEIVED; + } + return; - if (so->so_emu & EMU_NOCONNECT) { - so->so_emu &= ~EMU_NOCONNECT; - goto cont_input; - } - - if (tcp_fconnect(so) == -1) { - int error = WSAGetLastError(); - if ((error != WSAEINPROGRESS) && (error != WSAEWOULDBLOCK)) { - u_char code = ICMP_UNREACH_NET; - DEBUG_MISC((dfd, " tcp fconnect errno = %d-%s\n", - errno, strerror(errno))); - if (error == WSAECONNREFUSED) { - /* ACK the SYN, send RST to refuse the connection */ - tcp_respond(tp, ti, m, ti->ti_seq + 1, (tcp_seq)0, - TH_RST | TH_ACK); - } - else { - if (error == WSAEHOSTUNREACH) code = ICMP_UNREACH_HOST; - HTONL(ti->ti_seq); /* restore tcp header */ - HTONL(ti->ti_ack); - HTONS(ti->ti_win); - HTONS(ti->ti_urp); - m->m_data -= sizeof(struct tcpiphdr) + off - sizeof(struct tcphdr); - m->m_len += sizeof(struct tcpiphdr) + off - sizeof(struct tcphdr); - *ip = save_ip; - icmp_error(m, ICMP_UNREACH, code, 0, strerror(errno)); - } - tp = tcp_close(tp); - m_free(m); - return; - } - } - - /* - * Haven't connected yet, save the current mbuf - * and ti, and return - * XXX Some OS's don't tell us whether the connect() - * succeeded or not. So we must time it out. - */ - so->so_m = m; - so->so_ti = ti; - tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; - tp->t_state = TCPS_SYN_RECEIVED; - return; - - cont_conn: - /* m==NULL - * Check if the connect succeeded - */ - if (so->so_state & SS_NOFDREF) { - tp = tcp_close(tp); - goto dropwithreset; - } - cont_input: - tcp_template(tp); - - if (optp) - tcp_dooptions(tp, (u_char *)optp, optlen, ti); - /* , */ - /* &ts_present, &ts_val, &ts_ecr); */ - - if (iss) - tp->iss = iss; - else - tp->iss = tcp_iss; - tcp_iss += TCP_ISSINCR / 2; - tp->irs = ti->ti_seq; - tcp_sendseqinit(tp); - tcp_rcvseqinit(tp); - tp->t_flags |= TF_ACKNOW; - tp->t_state = TCPS_SYN_RECEIVED; - tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; - tcpstat.tcps_accepts++; - goto trimthenstep6; + cont_conn: + /* m==NULL + * Check if the connect succeeded + */ + if (so->so_state & SS_NOFDREF) { + tp = tcp_close(tp); + goto dropwithreset; + } + cont_input: + tcp_template(tp); + + if (optp) + tcp_dooptions(tp, (u_char *)optp, optlen, ti); + /* , */ + /* &ts_present, &ts_val, &ts_ecr); */ + + if (iss) + tp->iss = iss; + else + tp->iss = tcp_iss; + tcp_iss += TCP_ISSINCR/2; + tp->irs = ti->ti_seq; + tcp_sendseqinit(tp); + tcp_rcvseqinit(tp); + tp->t_flags |= TF_ACKNOW; + tp->t_state = TCPS_SYN_RECEIVED; + tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT; + tcpstat.tcps_accepts++; + goto trimthenstep6; } /* case TCPS_LISTEN */ - + /* * If the state is SYN_SENT: * if seg contains an ACK, but not for our SYN, drop the input. @@ -744,13 +741,13 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) */ case TCPS_SYN_SENT: if ((tiflags & TH_ACK) && - (SEQ_LEQ(ti->ti_ack, tp->iss) || - SEQ_GT(ti->ti_ack, tp->snd_max))) + (SEQ_LEQ(ti->ti_ack, tp->iss) || + SEQ_GT(ti->ti_ack, tp->snd_max))) goto dropwithreset; if (tiflags & TH_RST) { if (tiflags & TH_ACK) - tp = tcp_drop(tp, 0); /* XXX Check t_softerror! */ + tp = tcp_drop(tp,0); /* XXX Check t_softerror! */ goto drop; } @@ -770,7 +767,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) tcpstat.tcps_connects++; soisfconnected(so); tp->t_state = TCPS_ESTABLISHED; - + /* Do window scaling on this connection? */ /* if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) == * (TF_RCVD_SCALE|TF_REQ_SCALE)) { @@ -778,7 +775,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * tp->rcv_scale = tp->request_r_scale; * } */ - (void)tcp_reass(tp, (struct tcpiphdr *)0, + (void) tcp_reass(tp, (struct tcpiphdr *)0, (struct mbuf *)0); /* * if we didn't have to retransmit the SYN, @@ -786,11 +783,10 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) */ if (tp->t_rtt) tcp_xmit_timer(tp, tp->t_rtt); - } - else + } else tp->t_state = TCPS_SYN_RECEIVED; - trimthenstep6: +trimthenstep6: /* * Advance ti->ti_seq to correspond to first data byte. * If data, trim to stay within window, @@ -812,45 +808,45 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) /* * States other than LISTEN or SYN_SENT. * First check timestamp, if present. - * Then check that at least some bytes of segment are within + * Then check that at least some bytes of segment are within * receive window. If segment begins before rcv_nxt, * drop leading data (and SYN); if nothing left, just ack. - * + * * RFC 1323 PAWS: If we have a timestamp reply on this segment * and it's less than ts_recent, drop it. */ - /* if (ts_present && (tiflags & TH_RST) == 0 && tp->ts_recent && - * TSTMP_LT(ts_val, tp->ts_recent)) { - * - */ /* Check to see if ts_recent is over 24 days old. */ - /* if ((int)(tcp_now - tp->ts_recent_age) > TCP_PAWS_IDLE) { - */ /* - * * Invalidate ts_recent. If this segment updates - * * ts_recent, the age will be reset later and ts_recent - * * will get a valid value. If it does not, setting - * * ts_recent to zero will at least satisfy the - * * requirement that zero be placed in the timestamp - * * echo reply when ts_recent isn't valid. The - * * age isn't reset until we get a valid ts_recent - * * because we don't want out-of-order segments to be - * * dropped when ts_recent is old. - * */ - /* tp->ts_recent = 0; - * } else { - * tcpstat.tcps_rcvduppack++; - * tcpstat.tcps_rcvdupbyte += ti->ti_len; - * tcpstat.tcps_pawsdrop++; - * goto dropafterack; - * } - * } - */ +/* if (ts_present && (tiflags & TH_RST) == 0 && tp->ts_recent && + * TSTMP_LT(ts_val, tp->ts_recent)) { + * + */ /* Check to see if ts_recent is over 24 days old. */ +/* if ((int)(tcp_now - tp->ts_recent_age) > TCP_PAWS_IDLE) { + */ /* + * * Invalidate ts_recent. If this segment updates + * * ts_recent, the age will be reset later and ts_recent + * * will get a valid value. If it does not, setting + * * ts_recent to zero will at least satisfy the + * * requirement that zero be placed in the timestamp + * * echo reply when ts_recent isn't valid. The + * * age isn't reset until we get a valid ts_recent + * * because we don't want out-of-order segments to be + * * dropped when ts_recent is old. + * */ +/* tp->ts_recent = 0; + * } else { + * tcpstat.tcps_rcvduppack++; + * tcpstat.tcps_rcvdupbyte += ti->ti_len; + * tcpstat.tcps_pawsdrop++; + * goto dropafterack; + * } + * } + */ todrop = tp->rcv_nxt - ti->ti_seq; if (todrop > 0) { if (tiflags & TH_SYN) { tiflags &= ~TH_SYN; ti->ti_seq++; - if (ti->ti_urp > 1) + if (ti->ti_urp > 1) ti->ti_urp--; else tiflags &= ~TH_URG; @@ -860,14 +856,14 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * Following if statement from Stevens, vol. 2, p. 960. */ if (todrop > ti->ti_len - || (todrop == ti->ti_len && (tiflags & TH_FIN) == 0)) { + || (todrop == ti->ti_len && (tiflags & TH_FIN) == 0)) { /* * Any valid FIN must be to the left of the window. * At this point the FIN must be a duplicate or out * of sequence; drop it. */ tiflags &= ~TH_FIN; - + /* * Send an ACK to resynchronize and drop any data. * But keep on processing for RST or ACK. @@ -876,8 +872,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) todrop = ti->ti_len; tcpstat.tcps_rcvduppack++; tcpstat.tcps_rcvdupbyte += todrop; - } - else { + } else { tcpstat.tcps_rcvpartduppack++; tcpstat.tcps_rcvpartdupbyte += todrop; } @@ -896,7 +891,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * user processes are gone, then RST the other end. */ if ((so->so_state & SS_NOFDREF) && - tp->t_state > TCPS_CLOSE_WAIT && ti->ti_len) { + tp->t_state > TCPS_CLOSE_WAIT && ti->ti_len) { tp = tcp_close(tp); tcpstat.tcps_rcvafterclose++; goto dropwithreset; @@ -906,7 +901,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * If segment ends after window, drop trailing data * (and PUSH and FIN); if nothing left, just ACK. */ - todrop = (ti->ti_seq + ti->ti_len) - (tp->rcv_nxt + tp->rcv_wnd); + todrop = (ti->ti_seq+ti->ti_len) - (tp->rcv_nxt+tp->rcv_wnd); if (todrop > 0) { tcpstat.tcps_rcvpackafterwin++; if (todrop >= ti->ti_len) { @@ -918,8 +913,8 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * are above the previous ones. */ if (tiflags & TH_SYN && - tp->t_state == TCPS_TIME_WAIT && - SEQ_GT(ti->ti_seq, tp->rcv_nxt)) { + tp->t_state == TCPS_TIME_WAIT && + SEQ_GT(ti->ti_seq, tp->rcv_nxt)) { iss = tp->rcv_nxt + TCP_ISSINCR; tp = tcp_close(tp); goto findso; @@ -934,55 +929,53 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) if (tp->rcv_wnd == 0 && ti->ti_seq == tp->rcv_nxt) { tp->t_flags |= TF_ACKNOW; tcpstat.tcps_rcvwinprobe++; - } - else + } else goto dropafterack; - } - else + } else tcpstat.tcps_rcvbyteafterwin += todrop; m_adj(m, -todrop); ti->ti_len -= todrop; - tiflags &= ~(TH_PUSH | TH_FIN); + tiflags &= ~(TH_PUSH|TH_FIN); } /* * If last ACK falls within this segment's sequence numbers, * record its timestamp. */ - /* if (ts_present && SEQ_LEQ(ti->ti_seq, tp->last_ack_sent) && - * SEQ_LT(tp->last_ack_sent, ti->ti_seq + ti->ti_len + - * ((tiflags & (TH_SYN|TH_FIN)) != 0))) { - * tp->ts_recent_age = tcp_now; - * tp->ts_recent = ts_val; - * } - */ +/* if (ts_present && SEQ_LEQ(ti->ti_seq, tp->last_ack_sent) && + * SEQ_LT(tp->last_ack_sent, ti->ti_seq + ti->ti_len + + * ((tiflags & (TH_SYN|TH_FIN)) != 0))) { + * tp->ts_recent_age = tcp_now; + * tp->ts_recent = ts_val; + * } + */ - /* - * If the RST bit is set examine the state: - * SYN_RECEIVED STATE: - * If passive open, return to LISTEN state. - * If active open, inform user that connection was refused. - * ESTABLISHED, FIN_WAIT_1, FIN_WAIT2, CLOSE_WAIT STATES: - * Inform user that connection was reset, and close tcb. - * CLOSING, LAST_ACK, TIME_WAIT STATES - * Close the tcb. - */ + /* + * If the RST bit is set examine the state: + * SYN_RECEIVED STATE: + * If passive open, return to LISTEN state. + * If active open, inform user that connection was refused. + * ESTABLISHED, FIN_WAIT_1, FIN_WAIT2, CLOSE_WAIT STATES: + * Inform user that connection was reset, and close tcb. + * CLOSING, LAST_ACK, TIME_WAIT STATES + * Close the tcb. + */ if (tiflags&TH_RST) switch (tp->t_state) { case TCPS_SYN_RECEIVED: - /* so->so_error = ECONNREFUSED; */ +/* so->so_error = ECONNREFUSED; */ goto close; case TCPS_ESTABLISHED: case TCPS_FIN_WAIT_1: case TCPS_FIN_WAIT_2: case TCPS_CLOSE_WAIT: - /* so->so_error = ECONNRESET; */ - close: - tp->t_state = TCPS_CLOSED; - tcpstat.tcps_drops++; - tp = tcp_close(tp); - goto drop; +/* so->so_error = ECONNRESET; */ + close: + tp->t_state = TCPS_CLOSED; + tcpstat.tcps_drops++; + tp = tcp_close(tp); + goto drop; case TCPS_CLOSING: case TCPS_LAST_ACK: @@ -996,7 +989,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * error and we send an RST and drop the connection. */ if (tiflags & TH_SYN) { - tp = tcp_drop(tp, 0); + tp = tcp_drop(tp,0); goto dropwithreset; } @@ -1009,45 +1002,42 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * Ack processing. */ switch (tp->t_state) { - /* - * In SYN_RECEIVED state if the ack ACKs our SYN then enter - * ESTABLISHED state and continue processing, otherwise - * send an RST. una<=ack<=max - */ + /* + * In SYN_RECEIVED state if the ack ACKs our SYN then enter + * ESTABLISHED state and continue processing, otherwise + * send an RST. una<=ack<=max + */ case TCPS_SYN_RECEIVED: if (SEQ_GT(tp->snd_una, ti->ti_ack) || - SEQ_GT(ti->ti_ack, tp->snd_max)) + SEQ_GT(ti->ti_ack, tp->snd_max)) goto dropwithreset; tcpstat.tcps_connects++; tp->t_state = TCPS_ESTABLISHED; - /* - * The sent SYN is ack'ed with our sequence number +1 - * The first data byte already in the buffer will get + /* + * The sent SYN is ack'ed with our sequence number +1 + * The first data byte already in the buffer will get * lost if no correction is made. This is only needed for * SS_CTL since the buffer is empty otherwise. - * tp->snd_una++; or: + * tp->snd_una++; or: */ - tp->snd_una = ti->ti_ack; + tp->snd_una=ti->ti_ack; if (so->so_state & SS_CTL) { - /* So tcp_ctl reports the right state */ - ret = tcp_ctl(so); - if (ret == 1) { - soisfconnected(so); - so->so_state &= ~SS_CTL; /* success XXX */ - } - else if (ret == 2) { - so->so_state = SS_NOFDREF; /* CTL_CMD */ - } - else { - needoutput = 1; - tp->t_state = TCPS_FIN_WAIT_1; - } + /* So tcp_ctl reports the right state */ + ret = tcp_ctl(so); + if (ret == 1) { + soisfconnected(so); + so->so_state &= ~SS_CTL; /* success XXX */ + } else if (ret == 2) { + so->so_state = SS_NOFDREF; /* CTL_CMD */ + } else { + needoutput = 1; + tp->t_state = TCPS_FIN_WAIT_1; + } + } else { + soisfconnected(so); } - else { - soisfconnected(so); - } - + /* Do window scaling? */ /* if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) == * (TF_RCVD_SCALE|TF_REQ_SCALE)) { @@ -1055,7 +1045,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * tp->rcv_scale = tp->request_r_scale; * } */ - (void)tcp_reass(tp, (struct tcpiphdr *)0, (struct mbuf *)0); + (void) tcp_reass(tp, (struct tcpiphdr *)0, (struct mbuf *)0); tp->snd_wl1 = ti->ti_seq - 1; /* Avoid ack processing; snd_una==ti_ack => dup ack */ goto synrx_to_est; @@ -1079,9 +1069,9 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) if (SEQ_LEQ(ti->ti_ack, tp->snd_una)) { if (ti->ti_len == 0 && tiwin == tp->snd_wnd) { - tcpstat.tcps_rcvdupack++; - DEBUG_MISC((dfd, " dup ack m = %lx so = %lx \n", - (long)m, (long)so)); + tcpstat.tcps_rcvdupack++; + DEBUG_MISC((dfd," dup ack m = %lx so = %lx \n", + (long )m, (long )so)); /* * If we have outstanding data (other than * a window probe), this is a completely @@ -1101,18 +1091,18 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * the new ssthresh). * * Dup acks mean that packets have left the - * network (they're now cached at the receiver) + * network (they're now cached at the receiver) * so bump cwnd by the amount in the receiver * to keep a constant cwnd packets in the * network. */ if (tp->t_timer[TCPT_REXMT] == 0 || - ti->ti_ack != tp->snd_una) + ti->ti_ack != tp->snd_una) tp->t_dupacks = 0; else if (++tp->t_dupacks == tcprexmtthresh) { tcp_seq onxt = tp->snd_nxt; u_int win = - min(tp->snd_wnd, tp->snd_cwnd) / 2 / + min(tp->snd_wnd, tp->snd_cwnd) / 2 / tp->t_maxseg; if (win < 2) @@ -1122,20 +1112,18 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) tp->t_rtt = 0; tp->snd_nxt = ti->ti_ack; tp->snd_cwnd = tp->t_maxseg; - (void)tcp_output(tp); + (void) tcp_output(tp); tp->snd_cwnd = tp->snd_ssthresh + - tp->t_maxseg * tp->t_dupacks; + tp->t_maxseg * tp->t_dupacks; if (SEQ_GT(onxt, tp->snd_nxt)) tp->snd_nxt = onxt; goto drop; - } - else if (tp->t_dupacks > tcprexmtthresh) { + } else if (tp->t_dupacks > tcprexmtthresh) { tp->snd_cwnd += tp->t_maxseg; - (void)tcp_output(tp); + (void) tcp_output(tp); goto drop; } - } - else + } else tp->t_dupacks = 0; break; } @@ -1145,7 +1133,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * for the other side's cached packets, retract it. */ if (tp->t_dupacks > tcprexmtthresh && - tp->snd_cwnd > tp->snd_ssthresh) + tp->snd_cwnd > tp->snd_ssthresh) tp->snd_cwnd = tp->snd_ssthresh; tp->t_dupacks = 0; if (SEQ_GT(ti->ti_ack, tp->snd_max)) { @@ -1165,12 +1153,12 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * timer backoff (cf., Phil Karn's retransmit alg.). * Recompute the initial retransmit timer. */ - /* if (ts_present) - * tcp_xmit_timer(tp, tcp_now-ts_ecr+1); - * else - */ - if (tp->t_rtt && SEQ_GT(ti->ti_ack, tp->t_rtseq)) - tcp_xmit_timer(tp, tp->t_rtt); +/* if (ts_present) + * tcp_xmit_timer(tp, tcp_now-ts_ecr+1); + * else + */ + if (tp->t_rtt && SEQ_GT(ti->ti_ack, tp->t_rtseq)) + tcp_xmit_timer(tp,tp->t_rtt); /* * If all outstanding data is acked, stop retransmit @@ -1181,8 +1169,7 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) if (ti->ti_ack == tp->snd_max) { tp->t_timer[TCPT_REXMT] = 0; needoutput = 1; - } - else if (tp->t_timer[TCPT_PERSIST] == 0) + } else if (tp->t_timer[TCPT_PERSIST] == 0) tp->t_timer[TCPT_REXMT] = tp->t_rxtcur; /* * When new data is acked, open the congestion window. @@ -1192,41 +1179,40 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) * (maxseg^2 / cwnd per packet). */ { - register u_int cw = tp->snd_cwnd; - register u_int incr = tp->t_maxseg; + register u_int cw = tp->snd_cwnd; + register u_int incr = tp->t_maxseg; - if (cw > tp->snd_ssthresh) - incr = incr * incr / cw; - tp->snd_cwnd = min(cw + incr, (u_int32_t) (TCP_MAXWIN << tp->snd_scale)); + if (cw > tp->snd_ssthresh) + incr = incr * incr / cw; + tp->snd_cwnd = min(cw + incr, TCP_MAXWIN<snd_scale); } if (acked > so->so_snd.sb_cc) { tp->snd_wnd -= so->so_snd.sb_cc; - sbdrop(&so->so_snd, so->so_snd.sb_cc); + sbdrop(&so->so_snd, (int )so->so_snd.sb_cc); ourfinisacked = 1; - } - else { + } else { sbdrop(&so->so_snd, acked); tp->snd_wnd -= acked; ourfinisacked = 0; } /* * XXX sowwakup is called when data is acked and there's room for - * for more data... it should read() the socket + * for more data... it should read() the socket */ - /* if (so->so_snd.sb_flags & SB_NOTIFY) - * sowwakeup(so); - */ +/* if (so->so_snd.sb_flags & SB_NOTIFY) + * sowwakeup(so); + */ tp->snd_una = ti->ti_ack; if (SEQ_LT(tp->snd_nxt, tp->snd_una)) tp->snd_nxt = tp->snd_una; switch (tp->t_state) { - /* - * In FIN_WAIT_1 STATE in addition to the processing - * for the ESTABLISHED state if our FIN is now acknowledged - * then enter FIN_WAIT_2. - */ + /* + * In FIN_WAIT_1 STATE in addition to the processing + * for the ESTABLISHED state if our FIN is now acknowledged + * then enter FIN_WAIT_2. + */ case TCPS_FIN_WAIT_1: if (ourfinisacked) { /* @@ -1244,12 +1230,12 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) } break; - /* - * In CLOSING STATE in addition to the processing for - * the ESTABLISHED state if the ACK acknowledges our FIN - * then enter the TIME-WAIT state, otherwise ignore - * the segment. - */ + /* + * In CLOSING STATE in addition to the processing for + * the ESTABLISHED state if the ACK acknowledges our FIN + * then enter the TIME-WAIT state, otherwise ignore + * the segment. + */ case TCPS_CLOSING: if (ourfinisacked) { tp->t_state = TCPS_TIME_WAIT; @@ -1259,12 +1245,12 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) } break; - /* - * In LAST_ACK, we may still be waiting for data to drain - * and/or to be acked, as well as for the ack of our FIN. - * If our FIN is now acknowledged, delete the TCB, - * enter the closed state and return. - */ + /* + * In LAST_ACK, we may still be waiting for data to drain + * and/or to be acked, as well as for the ack of our FIN. + * If our FIN is now acknowledged, delete the TCB, + * enter the closed state and return. + */ case TCPS_LAST_ACK: if (ourfinisacked) { tp = tcp_close(tp); @@ -1272,11 +1258,11 @@ SEQ_GT(ti->ti_ack, tp->t_rtseq)) } break; - /* - * In TIME_WAIT state the only thing that should arrive - * is a retransmission of the remote FIN. Acknowledge - * it and restart the finack timer. - */ + /* + * In TIME_WAIT state the only thing that should arrive + * is a retransmission of the remote FIN. Acknowledge + * it and restart the finack timer. + */ case TCPS_TIME_WAIT: tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL; goto dropafterack; @@ -1289,12 +1275,12 @@ step6: * Don't look at window if no ACK: TAC's send garbage on first SYN. */ if ((tiflags & TH_ACK) && - (SEQ_LT(tp->snd_wl1, ti->ti_seq) || - (tp->snd_wl1 == ti->ti_seq && (SEQ_LT(tp->snd_wl2, ti->ti_ack) || - (tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd))))) { + (SEQ_LT(tp->snd_wl1, ti->ti_seq) || + (tp->snd_wl1 == ti->ti_seq && (SEQ_LT(tp->snd_wl2, ti->ti_ack) || + (tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd))))) { /* keep track of pure window updates */ if (ti->ti_len == 0 && - tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd) + tp->snd_wl2 == ti->ti_ack && tiwin > tp->snd_wnd) tcpstat.tcps_rcvwinupd++; tp->snd_wnd = tiwin; tp->snd_wl1 = ti->ti_seq; @@ -1308,7 +1294,7 @@ step6: * Process segments with URG. */ if ((tiflags & TH_URG) && ti->ti_urp && - TCPS_HAVERCVDFIN(tp->t_state) == 0) { + TCPS_HAVERCVDFIN(tp->t_state) == 0) { /* * This is a kludge, but if we receive and accept * random urgent pointers, we'll crash in @@ -1324,32 +1310,31 @@ step6: * If this segment advances the known urgent pointer, * then mark the data stream. This should not happen * in CLOSE_WAIT, CLOSING, LAST_ACK or TIME_WAIT STATES since - * a FIN has been received from the remote side. + * a FIN has been received from the remote side. * In these states we ignore the URG. * * According to RFC961 (Assigned Protocols), * the urgent pointer points to the last octet * of urgent data. We continue, however, * to consider it to indicate the first octet - * of data past the urgent section as the original + * of data past the urgent section as the original * spec states (in one of two places). */ - if (SEQ_GT(ti->ti_seq + ti->ti_urp, tp->rcv_up)) { + if (SEQ_GT(ti->ti_seq+ti->ti_urp, tp->rcv_up)) { tp->rcv_up = ti->ti_seq + ti->ti_urp; - so->so_urgc = so->so_rcv.sb_cc + + so->so_urgc = so->so_rcv.sb_cc + (tp->rcv_up - tp->rcv_nxt); /* -1; */ tp->rcv_up = ti->ti_seq + ti->ti_urp; - + } - } - else + } else /* * If no out of band data is expected, * pull receive urgent pointer along * with the receive window. */ if (SEQ_GT(tp->rcv_nxt, tp->rcv_up)) - tp->rcv_up = tp->rcv_nxt; + tp->rcv_up = tp->rcv_nxt; dodata: /* @@ -1361,7 +1346,7 @@ dodata: * connection then we just ignore the text. */ if ((ti->ti_len || (tiflags&TH_FIN)) && - TCPS_HAVERCVDFIN(tp->t_state) == 0) { + TCPS_HAVERCVDFIN(tp->t_state) == 0) { TCP_REASS(tp, ti, m, so, tiflags); /* * Note the amount of data that peer has sent into @@ -1369,8 +1354,7 @@ dodata: * buffer size. */ len = so->so_rcv.sb_datalen - (tp->rcv_adv - tp->rcv_nxt); - } - else { + } else { m_free(m); tiflags &= ~TH_FIN; } @@ -1384,45 +1368,45 @@ dodata: /* * If we receive a FIN we can't send more data, * set it SS_FDRAIN - * Shutdown the socket if there is no rx data in the + * Shutdown the socket if there is no rx data in the * buffer. * soread() is called on completion of shutdown() and * will got to TCPS_LAST_ACK, and use tcp_output() * to send the FIN. */ - /* sofcantrcvmore(so); */ +/* sofcantrcvmore(so); */ sofwdrain(so); - + tp->t_flags |= TF_ACKNOW; tp->rcv_nxt++; } switch (tp->t_state) { - /* - * In SYN_RECEIVED and ESTABLISHED STATES - * enter the CLOSE_WAIT state. - */ + /* + * In SYN_RECEIVED and ESTABLISHED STATES + * enter the CLOSE_WAIT state. + */ case TCPS_SYN_RECEIVED: case TCPS_ESTABLISHED: - if (so->so_emu == EMU_CTL) /* no shutdown on socket */ - tp->t_state = TCPS_LAST_ACK; - else - tp->t_state = TCPS_CLOSE_WAIT; - break; + if(so->so_emu == EMU_CTL) /* no shutdown on socket */ + tp->t_state = TCPS_LAST_ACK; + else + tp->t_state = TCPS_CLOSE_WAIT; + break; - /* - * If still in FIN_WAIT_1 STATE FIN has not been acked so - * enter the CLOSING state. - */ + /* + * If still in FIN_WAIT_1 STATE FIN has not been acked so + * enter the CLOSING state. + */ case TCPS_FIN_WAIT_1: tp->t_state = TCPS_CLOSING; break; - /* - * In FIN_WAIT_2 state enter the TIME_WAIT state, - * starting the time-wait timer, turning off the other - * standard timers. - */ + /* + * In FIN_WAIT_2 state enter the TIME_WAIT state, + * starting the time-wait timer, turning off the other + * standard timers. + */ case TCPS_FIN_WAIT_2: tp->t_state = TCPS_TIME_WAIT; tcp_canceltimers(tp); @@ -1430,9 +1414,9 @@ dodata: soisfdisconnected(so); break; - /* - * In TIME_WAIT state restart the 2 MSL time_wait timer. - */ + /* + * In TIME_WAIT state restart the 2 MSL time_wait timer. + */ case TCPS_TIME_WAIT: tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL; break; @@ -1443,18 +1427,18 @@ dodata: * If this is a small packet, then ACK now - with Nagel * congestion avoidance sender won't send more until * he gets an ACK. - * + * * See above. */ - /* if (ti->ti_len && (unsigned)ti->ti_len < tp->t_maxseg) { - */ - /* if ((ti->ti_len && (unsigned)ti->ti_len < tp->t_maxseg && - * (so->so_iptos & IPTOS_LOWDELAY) == 0) || - * ((so->so_iptos & IPTOS_LOWDELAY) && - * ((struct tcpiphdr_2 *)ti)->first_char == (char)27)) { - */ +/* if (ti->ti_len && (unsigned)ti->ti_len < tp->t_maxseg) { + */ +/* if ((ti->ti_len && (unsigned)ti->ti_len < tp->t_maxseg && + * (so->so_iptos & IPTOS_LOWDELAY) == 0) || + * ((so->so_iptos & IPTOS_LOWDELAY) && + * ((struct tcpiphdr_2 *)ti)->first_char == (char)27)) { + */ if (ti->ti_len && (unsigned)ti->ti_len <= 5 && - ((struct tcpiphdr_2 *)ti)->first_char == (char)27) { + ((struct tcpiphdr_2 *)ti)->first_char == (char)27) { tp->t_flags |= TF_ACKNOW; } @@ -1462,7 +1446,7 @@ dodata: * Return any desired output. */ if (needoutput || (tp->t_flags & TF_ACKNOW)) { - (void)tcp_output(tp); + (void) tcp_output(tp); } return; @@ -1475,7 +1459,7 @@ dropafterack: goto drop; m_freem(m); tp->t_flags |= TF_ACKNOW; - (void)tcp_output(tp); + (void) tcp_output(tp); return; dropwithreset: @@ -1484,8 +1468,8 @@ dropwithreset: tcp_respond(tp, ti, m, (tcp_seq)0, ti->ti_ack, TH_RST); else { if (tiflags & TH_SYN) ti->ti_len++; - tcp_respond(tp, ti, m, ti->ti_seq + ti->ti_len, (tcp_seq)0, - TH_RST | TH_ACK); + tcp_respond(tp, ti, m, ti->ti_seq+ti->ti_len, (tcp_seq)0, + TH_RST|TH_ACK); } return; @@ -1504,7 +1488,11 @@ drop: * u_int32_t *ts_val, *ts_ecr; */ void -tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti) +tcp_dooptions(tp, cp, cnt, ti) + struct tcpcb *tp; + u_char *cp; + int cnt; + struct tcpiphdr *ti; { u_int16_t mss; int opt, optlen; @@ -1535,7 +1523,7 @@ tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti) continue; memcpy((char *) &mss, (char *) cp + 2, sizeof(mss)); NTOHS(mss); - tcp_mss(tp, mss); /* sets t_maxseg */ + (void) tcp_mss(tp, mss); /* sets t_maxseg */ break; /* case TCPOPT_WINDOW: @@ -1580,7 +1568,11 @@ tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti) #ifdef notdef -void tcp_pulloutofband(struct socket *so, struct tcpiphdr *ti, register struct mbuf *m) +void +tcp_pulloutofband(so, ti, m) + struct socket *so; + struct tcpiphdr *ti; + register struct mbuf *m; { int cnt = ti->ti_urp - 1; @@ -1610,7 +1602,10 @@ void tcp_pulloutofband(struct socket *so, struct tcpiphdr *ti, register struct m * and update averages and current timeout. */ -void tcp_xmit_timer(register struct tcpcb *tp, int rtt) +void +tcp_xmit_timer(tp, rtt) + register struct tcpcb *tp; + int rtt; { register short delta; @@ -1697,10 +1692,13 @@ void tcp_xmit_timer(register struct tcpcb *tp, int rtt) * parameters from pre-set or cached values in the routing entry. */ -u_int tcp_mss(register struct tcpcb *tp, u_int offer) +int +tcp_mss(tp, offer) + register struct tcpcb *tp; + u_int offer; { struct socket *so = tp->t_socket; - u_int mss; + int mss; DEBUG_CALL("tcp_mss"); DEBUG_ARG("tp = %lx", (long)tp); diff --git a/BasiliskII/src/slirp/tcp_output.c b/BasiliskII/src/slirp/tcp_output.c old mode 100644 new mode 100755 index 01df0118..5cb1a61e --- a/BasiliskII/src/slirp/tcp_output.c +++ b/BasiliskII/src/slirp/tcp_output.c @@ -63,7 +63,9 @@ u_char tcp_outflags[TCP_NSTATES] = { /* * Tcp output routine: figure out what should be sent and send it. */ -int tcp_output(register struct tcpcb *tp) +int +tcp_output(tp) + register struct tcpcb *tp; { register struct socket *so = tp->t_socket; register long len, win; @@ -124,7 +126,7 @@ again: * to send then the probe will be the FIN * itself. */ - if (off < (int)so->so_snd.sb_cc) + if (off < so->so_snd.sb_cc) flags &= ~TH_FIN; win = 1; } else { @@ -199,12 +201,12 @@ again: * taking into account that we are limited by * TCP_MAXWIN << tp->rcv_scale. */ - long adv = min(win, TCP_MAXWIN << tp->rcv_scale) - + long adv = min(win, (long)TCP_MAXWIN << tp->rcv_scale) - (tp->rcv_adv - tp->rcv_nxt); - if (adv >= (long)(2 * tp->t_maxseg)) + if (adv >= (long) (2 * tp->t_maxseg)) goto send; - if (2 * adv >= (long)so->so_rcv.sb_datalen) + if (2 * adv >= (long) so->so_rcv.sb_datalen) goto send; } @@ -357,7 +359,7 @@ send: */ /* if (len <= MHLEN - hdrlen - max_linkhdr) { */ - sbcopy(&so->so_snd, off, len, mtod(m, caddr_t) + hdrlen); + sbcopy(&so->so_snd, off, (int) len, mtod(m, caddr_t) + hdrlen); m->m_len += len; /* } else { @@ -433,12 +435,12 @@ send: * Calculate receive window. Don't shrink window, * but avoid silly window syndrome. */ - if (win < (so->so_rcv.sb_datalen / 4) && win < tp->t_maxseg) + if (win < (long)(so->so_rcv.sb_datalen / 4) && win < (long)tp->t_maxseg) win = 0; - if (win > (u_long) (TCP_MAXWIN << tp->rcv_scale)) - win = (u_long) (TCP_MAXWIN << tp->rcv_scale); - if (win < (tp->rcv_adv - tp->rcv_nxt)) - win = (tp->rcv_adv - tp->rcv_nxt); + if (win > (long)TCP_MAXWIN << tp->rcv_scale) + win = (long)TCP_MAXWIN << tp->rcv_scale; + if (win < (long)(tp->rcv_adv - tp->rcv_nxt)) + win = (long)(tp->rcv_adv - tp->rcv_nxt); ti->ti_win = htons((u_int16_t) (win>>tp->rcv_scale)); if (SEQ_GT(tp->snd_up, tp->snd_una)) { @@ -528,7 +530,7 @@ send: { - ((struct ip *)ti)->ip_len = (u_int16_t) m->m_len; + ((struct ip *)ti)->ip_len = m->m_len; ((struct ip *)ti)->ip_ttl = ip_defttl; ((struct ip *)ti)->ip_tos = so->so_iptos; @@ -579,7 +581,9 @@ out: return (0); } -void tcp_setpersist(register struct tcpcb *tp) +void +tcp_setpersist(tp) + register struct tcpcb *tp; { int t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1; diff --git a/BasiliskII/src/slirp/tcp_subr.c b/BasiliskII/src/slirp/tcp_subr.c old mode 100644 new mode 100755 index 70e04b5e..39135080 --- a/BasiliskII/src/slirp/tcp_subr.c +++ b/BasiliskII/src/slirp/tcp_subr.c @@ -46,13 +46,14 @@ int tcp_mssdflt = TCP_MSS; int tcp_rttdflt = TCPTV_SRTTDFLT / PR_SLOWHZ; int tcp_do_rfc1323 = 0; /* Don't do rfc1323 performance enhancements */ -size_t tcp_rcvspace; /* You may want to change this */ -size_t tcp_sndspace; /* Keep small if you have an error prone link */ +int tcp_rcvspace; /* You may want to change this */ +int tcp_sndspace; /* Keep small if you have an error prone link */ /* * Tcp initialization */ -void tcp_init() +void +tcp_init() { tcp_iss = 1; /* wrong */ tcb.so_next = tcb.so_prev = &tcb; @@ -73,12 +74,14 @@ void tcp_init() * necessary when the connection is used. */ /* struct tcpiphdr * */ -void tcp_template(struct tcpcb *tp) +void +tcp_template(tp) + struct tcpcb *tp; { struct socket *so = tp->t_socket; register struct tcpiphdr *n = &tp->t_template; - n->ti_next = n->ti_prev = 0; + n->ti_mbuf = NULL; n->ti_x1 = 0; n->ti_pr = IPPROTO_TCP; n->ti_len = htons(sizeof (struct tcpiphdr) - sizeof (struct ip)); @@ -110,8 +113,13 @@ void tcp_template(struct tcpcb *tp) * In any case the ack and sequence number of the transmitted * segment are as specified by the parameters. */ -void tcp_respond(struct tcpcb *tp, register struct tcpiphdr *ti, - register struct mbuf *m, tcp_seq ack, tcp_seq seq, int flags) +void +tcp_respond(tp, ti, m, ack, seq, flags) + struct tcpcb *tp; + register struct tcpiphdr *ti; + register struct mbuf *m; + tcp_seq ack, seq; + int flags; { register int tlen; int win = 0; @@ -156,7 +164,7 @@ void tcp_respond(struct tcpcb *tp, register struct tcpiphdr *ti, tlen += sizeof (struct tcpiphdr); m->m_len = tlen; - ti->ti_next = ti->ti_prev = 0; + ti->ti_mbuf = 0; ti->ti_x1 = 0; ti->ti_seq = htonl(seq); ti->ti_ack = htonl(ack); @@ -185,7 +193,9 @@ void tcp_respond(struct tcpcb *tp, register struct tcpiphdr *ti, * empty reassembly queue and hooking it to the argument * protocol control block. */ -struct tcpcb *tcp_newtcpcb(struct socket *so) +struct tcpcb * +tcp_newtcpcb(so) + struct socket *so; { register struct tcpcb *tp; @@ -194,7 +204,7 @@ struct tcpcb *tcp_newtcpcb(struct socket *so) return ((struct tcpcb *)0); memset((char *) tp, 0, sizeof(struct tcpcb)); - tp->seg_next = tp->seg_prev = (tcpiphdrp_32)tp; + tp->seg_next = tp->seg_prev = (struct tcpiphdr*)tp; tp->t_maxseg = tcp_mssdflt; tp->t_flags = tcp_do_rfc1323 ? (TF_REQ_SCALE|TF_REQ_TSTMP) : 0; @@ -258,7 +268,9 @@ struct tcpcb *tcp_drop(struct tcpcb *tp, int err) * discard internet protocol block * wake up any sleepers */ -struct tcpcb *tcp_close(register struct tcpcb *tp) +struct tcpcb * +tcp_close(tp) + register struct tcpcb *tp; { register struct tcpiphdr *t; struct socket *so = tp->t_socket; @@ -268,11 +280,11 @@ struct tcpcb *tcp_close(register struct tcpcb *tp) DEBUG_ARG("tp = %lx", (long )tp); /* free the reassembly queue, if any */ - t = (struct tcpiphdr *) tp->seg_next; - while (t != (struct tcpiphdr *)tp) { - t = (struct tcpiphdr *)t->ti_next; - m = (struct mbuf *) REASS_MBUF((struct tcpiphdr *)t->ti_prev); - remque_32((struct tcpiphdr *) t->ti_prev); + t = tcpfrag_list_first(tp); + while (!tcpfrag_list_end(t, tp)) { + t = tcpiphdr_next(t); + m = tcpiphdr_prev(t)->ti_mbuf; + remque(tcpiphdr2qlink(tcpiphdr_prev(t))); m_freem(m); } /* It's static */ @@ -294,7 +306,8 @@ struct tcpcb *tcp_close(register struct tcpcb *tp) return ((struct tcpcb *)0); } -void tcp_drain() +void +tcp_drain() { /* XXX */ } @@ -306,7 +319,10 @@ void tcp_drain() #ifdef notdef -void tcp_quench(int i, int errno) +void +tcp_quench(i, errno) + + int errno; { struct tcpcb *tp = intotcpcb(inp); @@ -330,7 +346,9 @@ void tcp_quench(int i, int errno) * for peer to send FIN or not respond to keep-alives, etc. * We can let the user exit from the close as soon as the FIN is acked. */ -void tcp_sockclosed(struct tcpcb *tp) +void +tcp_sockclosed(tp) + struct tcpcb *tp; { DEBUG_CALL("tcp_sockclosed"); @@ -371,7 +389,8 @@ void tcp_sockclosed(struct tcpcb *tp) * nonblocking. Connect returns after the SYN is sent, and does * not wait for ACK+SYN. */ -int tcp_fconnect(struct socket *so) +int tcp_fconnect(so) + struct socket *so; { int ret=0; @@ -404,12 +423,10 @@ int tcp_fconnect(struct socket *so) } else addr.sin_addr = so->so_faddr; addr.sin_port = so->so_fport; - - char addrstr[INET_ADDRSTRLEN]; + DEBUG_MISC((dfd, " connect()ing, addr.sin_port=%d, " "addr.sin_addr.s_addr=%.16s\n", - ntohs(addr.sin_port), inet_ntop(AF_INET, &addr.sin_addr, - addrstr, sizeof(addrstr)))); + ntohs(addr.sin_port), inet_ntoa(addr.sin_addr))); /* We don't care what port we get */ ret = connect(s,(struct sockaddr *)&addr,sizeof (addr)); @@ -435,7 +452,9 @@ int tcp_fconnect(struct socket *so) * the time it gets to accept(), so... We simply accept * here and SYN the local-host. */ -void tcp_connect(struct socket *inso) +void +tcp_connect(inso) + struct socket *inso; { struct socket *so; struct sockaddr_in addr; @@ -467,7 +486,7 @@ void tcp_connect(struct socket *inso) so->so_lport = inso->so_lport; } - tcp_mss(sototcpcb(so), 0); + (void) tcp_mss(sototcpcb(so), 0); if ((s = accept(inso->s,(struct sockaddr *)&addr,&addrlen)) < 0) { tcp_close(sototcpcb(so)); /* This will sofree() as well */ @@ -520,7 +539,9 @@ void tcp_connect(struct socket *inso) /* * Attach a TCPCB to a socket. */ -int tcp_attach(struct socket *so) +int +tcp_attach(so) + struct socket *so; { if ((so->so_tcpcb = tcp_newtcpcb(so)) == NULL) return -1; @@ -554,7 +575,9 @@ struct emu_t *tcpemu = 0; /* * Return TOS according to the above table */ -u_int8_t tcp_tos(struct socket *so) +u_int8_t +tcp_tos(so) + struct socket *so; { int i = 0; struct emu_t *emup; @@ -606,7 +629,10 @@ int do_echo = -1; * * NOTE: if you return 0 you MUST m_free() the mbuf! */ -int tcp_emu(struct socket *so, struct mbuf *m) +int +tcp_emu(so, m) + struct socket *so; + struct mbuf *m; { u_int n1, n2, n3, n4, n5, n6; char buff[256]; @@ -807,7 +833,7 @@ int tcp_emu(struct socket *so, struct mbuf *m) ns->so_laddr=so->so_laddr; ns->so_lport=htons(port); - tcp_mss(sototcpcb(ns), 0); + (void) tcp_mss(sototcpcb(ns), 0); ns->so_faddr=so->so_faddr; ns->so_fport=htons(IPPORT_RESERVED-1); /* Use a fake port. */ @@ -1034,7 +1060,7 @@ do_prompt: * of the connection as a NUL-terminated decimal ASCII string. */ so->so_emu = 0; - for (lport = 0, i = 0; i < (int) (m->m_len-1); ++i) { + for (lport = 0, i = 0; i < m->m_len-1; ++i) { if (m->m_data[i] < '0' || m->m_data[i] > '9') return 1; /* invalid number */ lport *= 10; @@ -1219,7 +1245,9 @@ do_prompt: * Return 0 if this connections is to be closed, 1 otherwise, * return 2 if this is a command-line connection */ -int tcp_ctl(struct socket *so) +int +tcp_ctl(so) + struct socket *so; { struct sbuf *sb = &so->so_snd; int command; diff --git a/BasiliskII/src/slirp/tcp_timer.c b/BasiliskII/src/slirp/tcp_timer.c old mode 100644 new mode 100755 diff --git a/BasiliskII/src/slirp/tcp_timer.h b/BasiliskII/src/slirp/tcp_timer.h old mode 100644 new mode 100755 index 73fe2089..0bc438c7 --- a/BasiliskII/src/slirp/tcp_timer.h +++ b/BasiliskII/src/slirp/tcp_timer.h @@ -130,9 +130,9 @@ extern int tcp_backoff[]; struct tcpcb; -void tcp_fasttimo(void); -void tcp_slowtimo(void); -void tcp_canceltimers(struct tcpcb *); -struct tcpcb * tcp_timers(register struct tcpcb *, int); +void tcp_fasttimo _P((void)); +void tcp_slowtimo _P((void)); +void tcp_canceltimers _P((struct tcpcb *)); +struct tcpcb * tcp_timers _P((register struct tcpcb *, int)); #endif diff --git a/BasiliskII/src/slirp/tcp_var.h b/BasiliskII/src/slirp/tcp_var.h old mode 100644 new mode 100755 index c8e99ae0..064ac69a --- a/BasiliskII/src/slirp/tcp_var.h +++ b/BasiliskII/src/slirp/tcp_var.h @@ -36,18 +36,12 @@ #include "tcpip.h" #include "tcp_timer.h" -#if SIZEOF_CHAR_P == 4 - typedef struct tcpiphdr *tcpiphdrp_32; -#else - typedef u_int32_t tcpiphdrp_32; -#endif - /* * Tcp control block, one per tcp; fields: */ struct tcpcb { - tcpiphdrp_32 seg_next; /* sequencing queue */ - tcpiphdrp_32 seg_prev; + struct tcpiphdr *seg_next; /* sequencing queue */ + struct tcpiphdr *seg_prev; short t_state; /* state of this connection */ short t_timer[TCPT_NTIMERS]; /* tcp timers */ short t_rxtshift; /* log(2) of rexmt exp. backoff */ @@ -166,21 +160,6 @@ struct tcpcb { #define TCP_REXMTVAL(tp) \ (((tp)->t_srtt >> TCP_RTT_SHIFT) + (tp)->t_rttvar) -/* XXX - * We want to avoid doing m_pullup on incoming packets but that - * means avoiding dtom on the tcp reassembly code. That in turn means - * keeping an mbuf pointer in the reassembly queue (since we might - * have a cluster). As a quick hack, the source & destination - * port numbers (which are no longer needed once we've located the - * tcpcb) are overlayed with an mbuf pointer. - */ -#if SIZEOF_CHAR_P == 4 -typedef struct mbuf *mbufp_32; -#else -typedef u_int32_t mbufp_32; -#endif -#define REASS_MBUF(ti) (*(mbufp_32 *)&((ti)->ti_t)) - /* * TCP statistics. * Many of these should be kept per connection, diff --git a/BasiliskII/src/slirp/tcpip.h b/BasiliskII/src/slirp/tcpip.h old mode 100644 new mode 100755 index dff5a3c9..7974ce3d --- a/BasiliskII/src/slirp/tcpip.h +++ b/BasiliskII/src/slirp/tcpip.h @@ -40,8 +40,7 @@ struct tcpiphdr { struct ipovly ti_i; /* overlaid ip structure */ struct tcphdr ti_t; /* tcp header */ }; -#define ti_next ti_i.ih_next -#define ti_prev ti_i.ih_prev +#define ti_mbuf ti_i.ih_mbuf.mptr #define ti_x1 ti_i.ih_x1 #define ti_pr ti_i.ih_pr #define ti_len ti_i.ih_len @@ -58,6 +57,14 @@ struct tcpiphdr { #define ti_sum ti_t.th_sum #define ti_urp ti_t.th_urp +#define tcpiphdr2qlink(T) ((struct qlink*)(((char*)(T)) - sizeof(struct qlink))) +#define qlink2tcpiphdr(Q) ((struct tcpiphdr*)(((char*)(Q)) + sizeof(struct qlink))) +#define tcpiphdr_next(T) qlink2tcpiphdr(tcpiphdr2qlink(T)->next) +#define tcpiphdr_prev(T) qlink2tcpiphdr(tcpiphdr2qlink(T)->prev) +#define tcpfrag_list_first(T) qlink2tcpiphdr((T)->seg_next) +#define tcpfrag_list_end(F, T) (tcpiphdr2qlink(F) == (struct qlink*)(T)) +#define tcpfrag_list_empty(T) ((T)->seg_next == (struct tcpiphdr*)(T)) + /* * Just a clean way to get to the first byte * of the packet diff --git a/BasiliskII/src/slirp/tftp.c b/BasiliskII/src/slirp/tftp.c old mode 100644 new mode 100755 index 3ba2971c..e656c4f0 --- a/BasiliskII/src/slirp/tftp.c +++ b/BasiliskII/src/slirp/tftp.c @@ -127,6 +127,7 @@ static int tftp_send_error(struct tftp_session *spt, struct sockaddr_in saddr, daddr; struct mbuf *m; struct tftp_t *tp; + int nobytes; m = m_get(); @@ -151,6 +152,8 @@ static int tftp_send_error(struct tftp_session *spt, daddr.sin_addr = spt->client_ip; daddr.sin_port = spt->client_port; + nobytes = 2; + m->m_len = sizeof(struct tftp_t) - 514 + 3 + strlen(msg) - sizeof(struct ip) - sizeof(struct udphdr); diff --git a/BasiliskII/src/slirp/tftp.h b/BasiliskII/src/slirp/tftp.h old mode 100644 new mode 100755 index b150a049..f89e0393 --- a/BasiliskII/src/slirp/tftp.h +++ b/BasiliskII/src/slirp/tftp.h @@ -34,7 +34,7 @@ struct tftp_t { } PACKED__; #ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) +#pragma pack(0) #endif void tftp_input(struct mbuf *m); diff --git a/BasiliskII/src/slirp/udp.c b/BasiliskII/src/slirp/udp.c old mode 100644 new mode 100755 index deedb1e7..7917aaa4 --- a/BasiliskII/src/slirp/udp.c +++ b/BasiliskII/src/slirp/udp.c @@ -128,8 +128,7 @@ udp_input(m, iphlen) * Checksum extended UDP header and data. */ if (udpcksum && uh->uh_sum) { - ((struct ipovly *)ip)->ih_next = 0; - ((struct ipovly *)ip)->ih_prev = 0; + memset(&((struct ipovly *)ip)->ih_mbuf, 0, sizeof(struct mbuf_ptr)); ((struct ipovly *)ip)->ih_x1 = 0; ((struct ipovly *)ip)->ih_len = uh->uh_ulen; /* keep uh_sum for ICMP reply @@ -272,10 +271,10 @@ int udp_output2(struct socket *so, struct mbuf *m, * and addresses and length put into network format. */ ui = mtod(m, struct udpiphdr *); - ui->ui_next = ui->ui_prev = 0; + memset(&ui->ui_i.ih_mbuf, 0 , sizeof(struct mbuf_ptr)); ui->ui_x1 = 0; ui->ui_pr = IPPROTO_UDP; - ui->ui_len = htons((u_short) (m->m_len - sizeof(struct ip))); /* + sizeof (struct udphdr)); */ + ui->ui_len = htons(m->m_len - sizeof(struct ip)); /* + sizeof (struct udphdr)); */ /* XXXXX Check for from-one-location sockets, or from-any-location sockets */ ui->ui_src = saddr->sin_addr; ui->ui_dst = daddr->sin_addr; @@ -291,7 +290,7 @@ int udp_output2(struct socket *so, struct mbuf *m, if ((ui->ui_sum = cksum(m, /* sizeof (struct udpiphdr) + */ m->m_len)) == 0) ui->ui_sum = 0xffff; } - ((struct ip *)ui)->ip_len = (u_int16_t) m->m_len; + ((struct ip *)ui)->ip_len = m->m_len; ((struct ip *)ui)->ip_ttl = ip_defttl; ((struct ip *)ui)->ip_tos = iptos; @@ -338,10 +337,14 @@ udp_attach(so) addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; if(bind(so->s, (struct sockaddr *)&addr, sizeof(addr))<0) { - int error = WSAGetLastError(); + int lasterrno=errno; closesocket(so->s); so->s=-1; - WSASetLastError(error); +#ifdef _WIN32 + WSASetLastError(lasterrno); +#else + errno=lasterrno; +#endif } else { /* success, insert in queue */ so->so_expire = curtime + SO_EXPIRE; diff --git a/BasiliskII/src/slirp/udp.h b/BasiliskII/src/slirp/udp.h old mode 100644 new mode 100755 index 7d844efe..639a2f2c --- a/BasiliskII/src/slirp/udp.h +++ b/BasiliskII/src/slirp/udp.h @@ -54,7 +54,7 @@ struct udphdr { } PACKED__; #ifdef PRAGMA_PACK_SUPPORTED -#pragma pack(PACK_RESET) +#pragma pack(0) #endif /* @@ -64,8 +64,7 @@ struct udpiphdr { struct ipovly ui_i; /* overlaid ip structure */ struct udphdr ui_u; /* udp header */ }; -#define ui_next ui_i.ih_next -#define ui_prev ui_i.ih_prev +#define ui_mbuf ui_i.ih_mbuf.mptr #define ui_x1 ui_i.ih_x1 #define ui_pr ui_i.ih_pr #define ui_len ui_i.ih_len @@ -100,14 +99,14 @@ extern struct udpstat udpstat; extern struct socket udb; struct mbuf; -void udp_init(void); -void udp_input(register struct mbuf *, int); -int udp_output(struct socket *, struct mbuf *, struct sockaddr_in *); -int udp_attach(struct socket *); -void udp_detach(struct socket *); -u_int8_t udp_tos(struct socket *); -void udp_emu(struct socket *, struct mbuf *); -struct socket * udp_listen(u_int, u_int32_t, u_int, int); +void udp_init _P((void)); +void udp_input _P((register struct mbuf *, int)); +int udp_output _P((struct socket *, struct mbuf *, struct sockaddr_in *)); +int udp_attach _P((struct socket *)); +void udp_detach _P((struct socket *)); +u_int8_t udp_tos _P((struct socket *)); +void udp_emu _P((struct socket *, struct mbuf *)); +struct socket * udp_listen _P((u_int, u_int32_t, u_int, int)); int udp_output2(struct socket *so, struct mbuf *m, struct sockaddr_in *saddr, struct sockaddr_in *daddr, int iptos); From f8e69c4fb893d7dd7a91a0f4ba1b6eeefa93b450 Mon Sep 17 00:00:00 2001 From: jvernet Date: Thu, 5 Oct 2017 19:31:26 +0200 Subject: [PATCH 79/85] Remove slirp debug message --- .../BasiliskII.xcodeproj/project.pbxproj | 38 ------------------- BasiliskII/src/slirp/ip_input.c | 2 +- 2 files changed, 1 insertion(+), 39 deletions(-) diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index ff97d3a7..00ee66ca 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -7,25 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 4E4213FE1F85430F00377045 /* ether_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4E4213FA1F85430E00377045 /* ether_unix.cpp */; }; - 4E42142F1F854B1700377045 /* bootp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E42142E1F854B1700377045 /* bootp.c */; }; - 4E4214311F854B2C00377045 /* ip_output.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214301F854B2C00377045 /* ip_output.c */; }; - 4E4214421F854BB300377045 /* tcp_timer.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214321F854BB100377045 /* tcp_timer.c */; }; - 4E4214431F854BB300377045 /* tcp_input.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214331F854BB100377045 /* tcp_input.c */; }; - 4E4214441F854BB300377045 /* debug.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214341F854BB200377045 /* debug.c */; }; - 4E4214451F854BB300377045 /* tcp_subr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214351F854BB200377045 /* tcp_subr.c */; }; - 4E4214461F854BB300377045 /* cksum.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214361F854BB200377045 /* cksum.c */; }; - 4E4214471F854BB300377045 /* ip_input.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214371F854BB200377045 /* ip_input.c */; }; - 4E4214481F854BB300377045 /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214381F854BB200377045 /* socket.c */; }; - 4E4214491F854BB300377045 /* udp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214391F854BB200377045 /* udp.c */; }; - 4E42144A1F854BB300377045 /* sbuf.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E42143A1F854BB200377045 /* sbuf.c */; }; - 4E42144B1F854BB300377045 /* mbuf.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E42143B1F854BB200377045 /* mbuf.c */; }; - 4E42144C1F854BB300377045 /* tcp_output.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E42143C1F854BB200377045 /* tcp_output.c */; }; - 4E42144D1F854BB300377045 /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E42143D1F854BB200377045 /* misc.c */; }; - 4E42144E1F854BB300377045 /* if.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E42143E1F854BB300377045 /* if.c */; }; - 4E42144F1F854BB300377045 /* tftp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E42143F1F854BB300377045 /* tftp.c */; }; - 4E4214501F854BB300377045 /* slirp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214401F854BB300377045 /* slirp.c */; }; - 4E4214511F854BB300377045 /* ip_icmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4E4214411F854BB300377045 /* ip_icmp.c */; }; 752F26F91F240E51001032B4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F26F81F240E51001032B4 /* Foundation.framework */; }; 752F26FB1F240E69001032B4 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F26FA1F240E69001032B4 /* IOKit.framework */; }; 752F27011F242BAF001032B4 /* prefs_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 752F27001F242BAF001032B4 /* prefs_sdl.cpp */; }; @@ -1100,9 +1081,7 @@ buildActionMask = 2147483647; files = ( 7539E19E1F23B25A006B2DF2 /* rounding.cpp in Sources */, - 4E42144F1F854BB300377045 /* tftp.c in Sources */, 7539E29D1F23C83F006B2DF2 /* sys_darwin.cpp in Sources */, - 4E4214481F854BB300377045 /* socket.c in Sources */, 7539E1291F23B25A006B2DF2 /* video_blit.cpp in Sources */, 7539E28E1F23C56F006B2DF2 /* clip_dummy.cpp in Sources */, 7539E1A01F23B25A006B2DF2 /* memory.cpp in Sources */, @@ -1110,32 +1089,22 @@ 7539E1741F23B25A006B2DF2 /* audio_sdl.cpp in Sources */, 753252EE1F535DD10024025B /* defs68k.c in Sources */, 7539E29F1F23C939006B2DF2 /* fpu_uae.cpp in Sources */, - 4E42144E1F854BB300377045 /* if.c in Sources */, 7539E1E21F23B25A006B2DF2 /* video.cpp in Sources */, 7539E18F1F23B25A006B2DF2 /* timer.cpp in Sources */, - 4E4214441F854BB300377045 /* debug.c in Sources */, 7539E1711F23B25A006B2DF2 /* rom_patches.cpp in Sources */, 7539E1281F23B25A006B2DF2 /* sigsegv.cpp in Sources */, - 4E42144B1F854BB300377045 /* mbuf.c in Sources */, - 4E4214501F854BB300377045 /* slirp.c in Sources */, 753253341F5368370024025B /* cpustbl.cpp in Sources */, 756C1B341F252FC100620917 /* utils_macosx.mm in Sources */, 753253321F5368370024025B /* cpuemu.cpp in Sources */, 7539E2701F23B32A006B2DF2 /* tinyxml2.cpp in Sources */, - 4E4214431F854BB300377045 /* tcp_input.c in Sources */, 7539E28F1F23C56F006B2DF2 /* ether_dummy.cpp in Sources */, - 4E4214311F854B2C00377045 /* ip_output.c in Sources */, - 4E4214421F854BB300377045 /* tcp_timer.c in Sources */, 7539E1721F23B25A006B2DF2 /* rsrc_patches.cpp in Sources */, - 4E4214491F854BB300377045 /* udp.c in Sources */, 7539E2931F23C56F006B2DF2 /* serial_dummy.cpp in Sources */, 7539E1981F23B25A006B2DF2 /* exceptions.cpp in Sources */, 75CBCF771F5DB65E00830063 /* video_sdl.cpp in Sources */, 7539E1901F23B25A006B2DF2 /* basilisk_glue.cpp in Sources */, 7539E2801F23C4CA006B2DF2 /* main_unix.cpp in Sources */, 7539E1E11F23B25A006B2DF2 /* user_strings.cpp in Sources */, - 4E4214451F854BB300377045 /* tcp_subr.c in Sources */, - 4E4214471F854BB300377045 /* ip_input.c in Sources */, 75CBCF751F5DB3AD00830063 /* video_sdl2.cpp in Sources */, 752F27011F242BAF001032B4 /* prefs_sdl.cpp in Sources */, 7539E2971F23C5FD006B2DF2 /* newcpu.cpp in Sources */, @@ -1143,11 +1112,8 @@ 753253331F5368370024025B /* cpustbl_nf.cpp in Sources */, 7539E16C1F23B25A006B2DF2 /* main.cpp in Sources */, 7539E26D1F23B32A006B2DF2 /* strlcpy.c in Sources */, - 4E4214511F854BB300377045 /* ip_icmp.c in Sources */, - 4E4214461F854BB300377045 /* cksum.c in Sources */, 7539E26E1F23B32A006B2DF2 /* sys_unix.cpp in Sources */, 7539E1271F23B25A006B2DF2 /* cdrom.cpp in Sources */, - 4E42144C1F854BB300377045 /* tcp_output.c in Sources */, 753253311F5368370024025B /* cpuemu_nf.cpp in Sources */, 7539E1261F23B25A006B2DF2 /* audio.cpp in Sources */, 7539E1701F23B25A006B2DF2 /* prefs.cpp in Sources */, @@ -1164,7 +1130,6 @@ 7539E23F1F23B32A006B2DF2 /* bincue_unix.cpp in Sources */, 7539E12C1F23B25A006B2DF2 /* emul_op.cpp in Sources */, 7539E19D1F23B25A006B2DF2 /* mathlib.cpp in Sources */, - 4E4213FE1F85430F00377045 /* ether_unix.cpp in Sources */, 752F27031F242F51001032B4 /* xpram_sdl.cpp in Sources */, 7539E16D1F23B25A006B2DF2 /* pict.c in Sources */, 7539E1251F23B25A006B2DF2 /* adb.cpp in Sources */, @@ -1173,11 +1138,8 @@ 7539E18D1F23B25A006B2DF2 /* slot_rom.cpp in Sources */, 7539E1731F23B25A006B2DF2 /* scsi.cpp in Sources */, 7539E12B1F23B25A006B2DF2 /* disk.cpp in Sources */, - 4E42144D1F854BB300377045 /* misc.c in Sources */, 7539E1E31F23B25A006B2DF2 /* xpram.cpp in Sources */, - 4E42142F1F854B1700377045 /* bootp.c in Sources */, 7539E24C1F23B32A006B2DF2 /* extfs_unix.cpp in Sources */, - 4E42144A1F854BB300377045 /* sbuf.c in Sources */, 7539E2681F23B32A006B2DF2 /* rpc_unix.cpp in Sources */, 7539E2911F23C56F006B2DF2 /* prefs_editor_dummy.cpp in Sources */, ); diff --git a/BasiliskII/src/slirp/ip_input.c b/BasiliskII/src/slirp/ip_input.c index c93c83fe..7c995c98 100755 --- a/BasiliskII/src/slirp/ip_input.c +++ b/BasiliskII/src/slirp/ip_input.c @@ -460,7 +460,7 @@ ip_slowtimo() if (l == 0) return; - printf("Line 453\n"); + while (l != &ipq.ip_link) { struct ipq *fp = container_of(l, struct ipq, ip_link); l = l->next; From b2f4de5a8962660cb22c9928d33287604259aae8 Mon Sep 17 00:00:00 2001 From: jvernet Date: Thu, 5 Oct 2017 22:20:15 +0200 Subject: [PATCH 80/85] SheepShaver Pref Editor Udate --- BasiliskII/src/MacOSX/clip_macosx.cpp | 6 +- SheepShaver/src/MacOSX/Launcher/Info.plist | 2 +- .../project.pbxproj | 68 +++++++++++++++--- .../contents.xcworkspacedata | 7 ++ SheepShaver/src/MacOSX/PrefsEditor/Info.plist | 4 +- .../src/MacOSX/PrefsEditor/PrefsEditor.mm | 4 +- .../project.pbxproj | 69 +++++++++++++++++-- .../contents.xcworkspacedata | 7 ++ SheepShaver/src/Unix/sysdeps.h | 2 +- 9 files changed, 145 insertions(+), 24 deletions(-) create mode 100644 SheepShaver/src/MacOSX/Launcher/SheepShaverLauncher.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 SheepShaver/src/MacOSX/PrefsEditor/SheepShaverPrefs.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/BasiliskII/src/MacOSX/clip_macosx.cpp b/BasiliskII/src/MacOSX/clip_macosx.cpp index 1d37edfc..a1a3e5da 100644 --- a/BasiliskII/src/MacOSX/clip_macosx.cpp +++ b/BasiliskII/src/MacOSX/clip_macosx.cpp @@ -100,7 +100,8 @@ void GetScrap(void **handle, uint32 type, int32 offset) { #if defined(__LP64__) D(bug("GetScrap handle %p, type %08x, offset %d\n", handle, type, offset)); - #warning Carbon scrapbook function are not implemented in 64-bit mode + #error Carbon scrapbook function are not implemented in 64-bit mode + #error Use clip_macosx64.mm instead. #else D(bug("GetScrap handle %p, type %08x, offset %d\n", handle, type, offset)); ScrapRef theScrap; @@ -177,7 +178,8 @@ void ZeroScrap() void PutScrap(uint32 type, void *scrap, int32 length) { #if defined(__LP64__) - #warning Carbon scrapbook function are not implemented in 64-bit mode + #error Carbon scrapbook function are not implemented in 64-bit mode + #error Use clip_macosx64.mm instead. D(bug("PutScrap type %4.4s, data %08lx, length %ld\n", &type, scrap, length)); #else static bool clear = true; diff --git a/SheepShaver/src/MacOSX/Launcher/Info.plist b/SheepShaver/src/MacOSX/Launcher/Info.plist index 54bcb8dd..7c2c94bf 100644 --- a/SheepShaver/src/MacOSX/Launcher/Info.plist +++ b/SheepShaver/src/MacOSX/Launcher/Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile SheepShaver.icns CFBundleIdentifier - net.sourceforge.SheepShaverLauncher + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/SheepShaver/src/MacOSX/Launcher/SheepShaverLauncher.xcodeproj/project.pbxproj b/SheepShaver/src/MacOSX/Launcher/SheepShaverLauncher.xcodeproj/project.pbxproj index fe382f61..abfe0315 100644 --- a/SheepShaver/src/MacOSX/Launcher/SheepShaverLauncher.xcodeproj/project.pbxproj +++ b/SheepShaver/src/MacOSX/Launcher/SheepShaverLauncher.xcodeproj/project.pbxproj @@ -10,7 +10,7 @@ 084186B10B3A0515004B1F63 /* VMSettingsController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 084186B00B3A0515004B1F63 /* VMSettingsController.mm */; }; 088EBBB61B41AEBB0066D352 /* DiskType.m in Sources */ = {isa = PBXBuildFile; fileRef = 088EBBB51B41AEBB0066D352 /* DiskType.m */; }; 08AAB16D102614D5007E1230 /* SheepShaver.icns in Resources */ = {isa = PBXBuildFile; fileRef = 08AAB16C102614D5007E1230 /* SheepShaver.icns */; }; - 08AAB1B310261691007E1230 /* SheepShaver in Copy SheepShaver */ = {isa = PBXBuildFile; fileRef = 08AAB1B11026168B007E1230 /* SheepShaver */; }; + 08AAB1B310261691007E1230 /* SheepShaver in Copy SheepShaver */ = {isa = PBXBuildFile; fileRef = 08AAB1B11026168B007E1230 /* SheepShaver */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 08B5FAFD102497FA0047FD1B /* VMSettingsWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = 08B5FAFB102497FA0047FD1B /* VMSettingsWindow.nib */; }; 08B5FB01102498B00047FD1B /* VMListWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = 08B5FAFF102498B00047FD1B /* VMListWindow.nib */; }; 08B5FB221024FE320047FD1B /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 08B5FB211024FE320047FD1B /* AppController.mm */; }; @@ -209,6 +209,9 @@ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; + attributes = { + LastUpgradeCheck = 0900; + }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SheepShaverLauncher" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; @@ -310,11 +313,13 @@ PREFS_EDITOR, STANDALONE_PREFS, ); - GCC_VERSION = 4.0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; OTHER_CFLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = net.sourceforge.SheepShaverLauncher; PRODUCT_NAME = SheepShaverLauncher; + SDKROOT = macosx; WRAPPER_EXTENSION = app; ZERO_LINK = YES; }; @@ -324,11 +329,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - ppc, - i386, - x86_64, - ); COPY_PHASE_STRIP = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; @@ -337,15 +337,17 @@ PREFS_EDITOR, STANDALONE_PREFS, ); - GCC_VERSION = 4.0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; "GCC_VERSION[arch=x86_64]" = 4.2; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; "MACOSX_DEPLOYMENT_TARGET[arch=x86_64]" = 10.5; OTHER_CFLAGS = "$(inherited)"; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + PRODUCT_BUNDLE_IDENTIFIER = net.sourceforge.SheepShaverLauncher; PRODUCT_NAME = SheepShaverLauncher; - "SDKROOT[arch=x86_64]" = macosx10.6; + SDKROOT = macosx; + "SDKROOT[arch=x86_64]" = macosx10.13; WRAPPER_EXTENSION = app; }; name = Release; @@ -353,8 +355,33 @@ C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; @@ -363,10 +390,33 @@ C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = LauncherPrefix.h; GCC_VERSION = 4.0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; PREBINDING = NO; SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; diff --git a/SheepShaver/src/MacOSX/Launcher/SheepShaverLauncher.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SheepShaver/src/MacOSX/Launcher/SheepShaverLauncher.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/SheepShaver/src/MacOSX/Launcher/SheepShaverLauncher.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SheepShaver/src/MacOSX/PrefsEditor/Info.plist b/SheepShaver/src/MacOSX/PrefsEditor/Info.plist index 68215486..dfaec90d 100644 --- a/SheepShaver/src/MacOSX/PrefsEditor/Info.plist +++ b/SheepShaver/src/MacOSX/PrefsEditor/Info.plist @@ -1,5 +1,5 @@ - + CFBundleDevelopmentRegion @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - net.sourceforge.SheepShaverPrefs + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/SheepShaver/src/MacOSX/PrefsEditor/PrefsEditor.mm b/SheepShaver/src/MacOSX/PrefsEditor/PrefsEditor.mm index 29b48305..ca833b45 100644 --- a/SheepShaver/src/MacOSX/PrefsEditor/PrefsEditor.mm +++ b/SheepShaver/src/MacOSX/PrefsEditor/PrefsEditor.mm @@ -54,12 +54,12 @@ void prefs_exit() return self; } -- (int)numberOfRowsInTableView:(NSTableView *)aTable +- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTable { return [diskArray count]; } -- (id)tableView:(NSTableView *)aTable objectValueForTableColumn:(NSTableColumn *)aCol row:(int)aRow +- (id)tableView:(NSTableView *)aTable objectValueForTableColumn:(NSTableColumn *)aCol row:(NSInteger)aRow { return [diskArray objectAtIndex: aRow]; } diff --git a/SheepShaver/src/MacOSX/PrefsEditor/SheepShaverPrefs.xcodeproj/project.pbxproj b/SheepShaver/src/MacOSX/PrefsEditor/SheepShaverPrefs.xcodeproj/project.pbxproj index 92ed7a0e..38729ece 100644 --- a/SheepShaver/src/MacOSX/PrefsEditor/SheepShaverPrefs.xcodeproj/project.pbxproj +++ b/SheepShaver/src/MacOSX/PrefsEditor/SheepShaverPrefs.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 42; + objectVersion = 45; objects = { /* Begin PBXBuildFile section */ @@ -161,10 +161,19 @@ /* Begin PBXProject section */ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; + attributes = { + LastUpgradeCheck = 0900; + }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SheepShaverPrefs" */; + compatibilityVersion = "Xcode 3.1"; + developmentRegion = en; hasScannedForEncodings = 1; + knownRegions = ( + en, + ); mainGroup = 29B97314FDCFA39411CA2CEA /* SheepShaverPrefs */; projectDirPath = ""; + projectRoot = ""; targets = ( 8D1107260486CEB800E47090 /* SheepShaverPrefs */, ); @@ -234,7 +243,9 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; OTHER_CFLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = net.sourceforge.SheepShaverPrefs; PRODUCT_NAME = SheepShaverPrefs; + SDKROOT = macosx; WRAPPER_EXTENSION = app; ZERO_LINK = YES; }; @@ -243,10 +254,6 @@ C01FCF4C08A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - ppc, - i386, - ); GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; GCC_MODEL_TUNING = G5; @@ -257,7 +264,9 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Applications"; OTHER_CFLAGS = "$(inherited)"; + PRODUCT_BUNDLE_IDENTIFIER = net.sourceforge.SheepShaverPrefs; PRODUCT_NAME = SheepShaverPrefs; + SDKROOT = macosx; WRAPPER_EXTENSION = app; }; name = Release; @@ -265,20 +274,66 @@ C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; name = Debug; }; C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; PREBINDING = NO; - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; name = Release; }; diff --git a/SheepShaver/src/MacOSX/PrefsEditor/SheepShaverPrefs.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SheepShaver/src/MacOSX/PrefsEditor/SheepShaverPrefs.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/SheepShaver/src/MacOSX/PrefsEditor/SheepShaverPrefs.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SheepShaver/src/Unix/sysdeps.h b/SheepShaver/src/Unix/sysdeps.h index 0099527b..f439050d 100644 --- a/SheepShaver/src/Unix/sysdeps.h +++ b/SheepShaver/src/Unix/sysdeps.h @@ -149,7 +149,7 @@ typedef long int32; #error "No 4 byte type, you lose." #endif #if SIZEOF_LONG == 8 -typedef unsigned long uint64; +typedef uint64_t uint64; typedef long int64; #define VAL64(a) (a ## l) #define UVAL64(a) (a ## ul) From d3fc193d661e61fb9aabf0817bddc5fa189ccd67 Mon Sep 17 00:00:00 2001 From: jvernet Date: Mon, 9 Oct 2017 21:45:44 +0200 Subject: [PATCH 81/85] Slirp 64 bits - Slirp 64 Bits - added to the basilisk XCode Project --- .../BasiliskII.xcodeproj/project.pbxproj | 236 ++++++-- BasiliskII/src/slirp/sbuf.c | 2 +- BasiliskII/src/slirp/slirp.h | 16 +- .../contents.xcworkspacedata | 7 + .../project.pbxproj | 14 +- .../contents.xcworkspacedata | 7 + SheepShaver/src/Unix/config.h.old | 544 ++++++++++++++++++ 7 files changed, 756 insertions(+), 70 deletions(-) create mode 100644 SheepShaver/src/MacOSX/SheepShaver.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 SheepShaver/src/Unix/config.h.old diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index 00ee66ca..170a03d8 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -7,6 +7,25 @@ objects = { /* Begin PBXBuildFile section */ + 4ECAC2671F8A8A5D0013B963 /* ether_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC2661F8A8A5D0013B963 /* ether_unix.cpp */; }; + 4ECAC2681F8A8AE90013B963 /* bootp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC2601F8A8A020013B963 /* bootp.c */; }; + 4ECAC2691F8A8AF10013B963 /* cksum.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC2541F8A8A000013B963 /* cksum.c */; }; + 4ECAC26A1F8A8AF80013B963 /* debug.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC23F1F8A89FE0013B963 /* debug.c */; }; + 4ECAC26B1F8A8B010013B963 /* if.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC2501F8A8A000013B963 /* if.c */; }; + 4ECAC26C1F8A8B120013B963 /* ip_icmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC2441F8A89FE0013B963 /* ip_icmp.c */; }; + 4ECAC26D1F8A8B120013B963 /* ip_input.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC2481F8A89FF0013B963 /* ip_input.c */; }; + 4ECAC26E1F8A8B120013B963 /* ip_output.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC2471F8A89FF0013B963 /* ip_output.c */; }; + 4ECAC26F1F8A8B230013B963 /* mbuf.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC24F1F8A89FF0013B963 /* mbuf.c */; }; + 4ECAC2701F8A8B230013B963 /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC2401F8A89FE0013B963 /* misc.c */; }; + 4ECAC2711F8A8B350013B963 /* sbuf.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC24A1F8A89FF0013B963 /* sbuf.c */; }; + 4ECAC2721F8A8B390013B963 /* slirp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC23D1F8A89FE0013B963 /* slirp.c */; }; + 4ECAC2731F8A8B390013B963 /* socket.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC2431F8A89FE0013B963 /* socket.c */; }; + 4ECAC2741F8A8B480013B963 /* tcp_input.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC25E1F8A8A020013B963 /* tcp_input.c */; }; + 4ECAC2751F8A8B480013B963 /* tcp_output.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC24C1F8A89FF0013B963 /* tcp_output.c */; }; + 4ECAC2761F8A8B480013B963 /* tcp_subr.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC2571F8A8A000013B963 /* tcp_subr.c */; }; + 4ECAC2771F8A8B480013B963 /* tcp_timer.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC24D1F8A89FF0013B963 /* tcp_timer.c */; }; + 4ECAC2781F8A8B4B0013B963 /* tftp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC2521F8A8A000013B963 /* tftp.c */; }; + 4ECAC2791F8A8B530013B963 /* udp.c in Sources */ = {isa = PBXBuildFile; fileRef = 4ECAC24E1F8A89FF0013B963 /* udp.c */; }; 752F26F91F240E51001032B4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F26F81F240E51001032B4 /* Foundation.framework */; }; 752F26FB1F240E69001032B4 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752F26FA1F240E69001032B4 /* IOKit.framework */; }; 752F27011F242BAF001032B4 /* prefs_sdl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 752F27001F242BAF001032B4 /* prefs_sdl.cpp */; }; @@ -94,7 +113,6 @@ 7539E2711F23B32A006B2DF2 /* tunconfig in Resources */ = {isa = PBXBuildFile; fileRef = 7539E2331F23B32A006B2DF2 /* tunconfig */; }; 7539E2801F23C4CA006B2DF2 /* main_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E27F1F23C4CA006B2DF2 /* main_unix.cpp */; }; 7539E28E1F23C56F006B2DF2 /* clip_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2851F23C56F006B2DF2 /* clip_dummy.cpp */; }; - 7539E28F1F23C56F006B2DF2 /* ether_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2861F23C56F006B2DF2 /* ether_dummy.cpp */; }; 7539E2911F23C56F006B2DF2 /* prefs_editor_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2881F23C56F006B2DF2 /* prefs_editor_dummy.cpp */; }; 7539E2921F23C56F006B2DF2 /* scsi_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E2891F23C56F006B2DF2 /* scsi_dummy.cpp */; }; 7539E2931F23C56F006B2DF2 /* serial_dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7539E28A1F23C56F006B2DF2 /* serial_dummy.cpp */; }; @@ -208,25 +226,48 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 4E4213FA1F85430E00377045 /* ether_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ether_unix.cpp; path = ../Unix/ether_unix.cpp; sourceTree = ""; }; - 4E42142E1F854B1700377045 /* bootp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = bootp.c; path = ../../slirp/bootp.c; sourceTree = ""; }; - 4E4214301F854B2C00377045 /* ip_output.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ip_output.c; path = ../../slirp/ip_output.c; sourceTree = ""; }; - 4E4214321F854BB100377045 /* tcp_timer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tcp_timer.c; path = ../../slirp/tcp_timer.c; sourceTree = ""; }; - 4E4214331F854BB100377045 /* tcp_input.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tcp_input.c; path = ../../slirp/tcp_input.c; sourceTree = ""; }; - 4E4214341F854BB200377045 /* debug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = debug.c; path = ../../slirp/debug.c; sourceTree = ""; }; - 4E4214351F854BB200377045 /* tcp_subr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tcp_subr.c; path = ../../slirp/tcp_subr.c; sourceTree = ""; }; - 4E4214361F854BB200377045 /* cksum.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cksum.c; path = ../../slirp/cksum.c; sourceTree = ""; }; - 4E4214371F854BB200377045 /* ip_input.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ip_input.c; path = ../../slirp/ip_input.c; sourceTree = ""; }; - 4E4214381F854BB200377045 /* socket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = socket.c; path = ../../slirp/socket.c; sourceTree = ""; }; - 4E4214391F854BB200377045 /* udp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = udp.c; path = ../../slirp/udp.c; sourceTree = ""; }; - 4E42143A1F854BB200377045 /* sbuf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sbuf.c; path = ../../slirp/sbuf.c; sourceTree = ""; }; - 4E42143B1F854BB200377045 /* mbuf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mbuf.c; path = ../../slirp/mbuf.c; sourceTree = ""; }; - 4E42143C1F854BB200377045 /* tcp_output.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tcp_output.c; path = ../../slirp/tcp_output.c; sourceTree = ""; }; - 4E42143D1F854BB200377045 /* misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = misc.c; path = ../../slirp/misc.c; sourceTree = ""; }; - 4E42143E1F854BB300377045 /* if.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = if.c; path = ../../slirp/if.c; sourceTree = ""; }; - 4E42143F1F854BB300377045 /* tftp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tftp.c; path = ../../slirp/tftp.c; sourceTree = ""; }; - 4E4214401F854BB300377045 /* slirp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = slirp.c; path = ../../slirp/slirp.c; sourceTree = ""; }; - 4E4214411F854BB300377045 /* ip_icmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ip_icmp.c; path = ../../slirp/ip_icmp.c; sourceTree = ""; }; + 4ECAC23D1F8A89FE0013B963 /* slirp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = slirp.c; path = ../../slirp/slirp.c; sourceTree = ""; }; + 4ECAC23E1F8A89FE0013B963 /* tcp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = tcp.h; path = ../../slirp/tcp.h; sourceTree = ""; }; + 4ECAC23F1F8A89FE0013B963 /* debug.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = debug.c; path = ../../slirp/debug.c; sourceTree = ""; }; + 4ECAC2401F8A89FE0013B963 /* misc.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = misc.c; path = ../../slirp/misc.c; sourceTree = ""; }; + 4ECAC2411F8A89FE0013B963 /* if.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = if.h; path = ../../slirp/if.h; sourceTree = ""; }; + 4ECAC2421F8A89FE0013B963 /* sbuf.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = sbuf.h; path = ../../slirp/sbuf.h; sourceTree = ""; }; + 4ECAC2431F8A89FE0013B963 /* socket.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = socket.c; path = ../../slirp/socket.c; sourceTree = ""; }; + 4ECAC2441F8A89FE0013B963 /* ip_icmp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = ip_icmp.c; path = ../../slirp/ip_icmp.c; sourceTree = ""; }; + 4ECAC2451F8A89FE0013B963 /* socket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = socket.h; path = ../../slirp/socket.h; sourceTree = ""; }; + 4ECAC2461F8A89FE0013B963 /* udp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = udp.h; path = ../../slirp/udp.h; sourceTree = ""; }; + 4ECAC2471F8A89FF0013B963 /* ip_output.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = ip_output.c; path = ../../slirp/ip_output.c; sourceTree = ""; }; + 4ECAC2481F8A89FF0013B963 /* ip_input.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = ip_input.c; path = ../../slirp/ip_input.c; sourceTree = ""; }; + 4ECAC2491F8A89FF0013B963 /* icmp_var.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = icmp_var.h; path = ../../slirp/icmp_var.h; sourceTree = ""; }; + 4ECAC24A1F8A89FF0013B963 /* sbuf.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = sbuf.c; path = ../../slirp/sbuf.c; sourceTree = ""; }; + 4ECAC24B1F8A89FF0013B963 /* slirp_config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = slirp_config.h; path = ../../slirp/slirp_config.h; sourceTree = ""; }; + 4ECAC24C1F8A89FF0013B963 /* tcp_output.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = tcp_output.c; path = ../../slirp/tcp_output.c; sourceTree = ""; }; + 4ECAC24D1F8A89FF0013B963 /* tcp_timer.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = tcp_timer.c; path = ../../slirp/tcp_timer.c; sourceTree = ""; }; + 4ECAC24E1F8A89FF0013B963 /* udp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = udp.c; path = ../../slirp/udp.c; sourceTree = ""; }; + 4ECAC24F1F8A89FF0013B963 /* mbuf.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = mbuf.c; path = ../../slirp/mbuf.c; sourceTree = ""; }; + 4ECAC2501F8A8A000013B963 /* if.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = if.c; path = ../../slirp/if.c; sourceTree = ""; }; + 4ECAC2511F8A8A000013B963 /* ip_icmp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ip_icmp.h; path = ../../slirp/ip_icmp.h; sourceTree = ""; }; + 4ECAC2521F8A8A000013B963 /* tftp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = tftp.c; path = ../../slirp/tftp.c; sourceTree = ""; }; + 4ECAC2531F8A8A000013B963 /* debug.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = debug.h; path = ../../slirp/debug.h; sourceTree = ""; }; + 4ECAC2541F8A8A000013B963 /* cksum.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cksum.c; path = ../../slirp/cksum.c; sourceTree = ""; }; + 4ECAC2551F8A8A000013B963 /* tcp_var.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = tcp_var.h; path = ../../slirp/tcp_var.h; sourceTree = ""; }; + 4ECAC2561F8A8A000013B963 /* slirp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = slirp.h; path = ../../slirp/slirp.h; sourceTree = ""; }; + 4ECAC2571F8A8A000013B963 /* tcp_subr.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = tcp_subr.c; path = ../../slirp/tcp_subr.c; sourceTree = ""; }; + 4ECAC2581F8A8A010013B963 /* ip.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ip.h; path = ../../slirp/ip.h; sourceTree = ""; }; + 4ECAC2591F8A8A010013B963 /* bootp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = bootp.h; path = ../../slirp/bootp.h; sourceTree = ""; }; + 4ECAC25A1F8A8A010013B963 /* ctl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ctl.h; path = ../../slirp/ctl.h; sourceTree = ""; }; + 4ECAC25B1F8A8A010013B963 /* libslirp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = libslirp.h; path = ../../slirp/libslirp.h; sourceTree = ""; }; + 4ECAC25C1F8A8A010013B963 /* VERSION */ = {isa = PBXFileReference; lastKnownFileType = text; name = VERSION; path = ../../slirp/VERSION; sourceTree = ""; }; + 4ECAC25D1F8A8A010013B963 /* tcpip.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = tcpip.h; path = ../../slirp/tcpip.h; sourceTree = ""; }; + 4ECAC25E1F8A8A020013B963 /* tcp_input.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = tcp_input.c; path = ../../slirp/tcp_input.c; sourceTree = ""; }; + 4ECAC25F1F8A8A020013B963 /* misc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = misc.h; path = ../../slirp/misc.h; sourceTree = ""; }; + 4ECAC2601F8A8A020013B963 /* bootp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = bootp.c; path = ../../slirp/bootp.c; sourceTree = ""; }; + 4ECAC2611F8A8A020013B963 /* mbuf.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = mbuf.h; path = ../../slirp/mbuf.h; sourceTree = ""; }; + 4ECAC2621F8A8A020013B963 /* COPYRIGHT */ = {isa = PBXFileReference; lastKnownFileType = text; name = COPYRIGHT; path = ../../slirp/COPYRIGHT; sourceTree = ""; }; + 4ECAC2631F8A8A020013B963 /* main.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = main.h; path = ../../slirp/main.h; sourceTree = ""; }; + 4ECAC2641F8A8A020013B963 /* tcp_timer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = tcp_timer.h; path = ../../slirp/tcp_timer.h; sourceTree = ""; }; + 4ECAC2651F8A8A030013B963 /* tftp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = tftp.h; path = ../../slirp/tftp.h; sourceTree = ""; }; + 4ECAC2661F8A8A5D0013B963 /* ether_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ether_unix.cpp; path = ../../Unix/ether_unix.cpp; sourceTree = ""; }; 752F26F81F240E51001032B4 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 752F26FA1F240E69001032B4 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 752F27001F242BAF001032B4 /* prefs_sdl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = prefs_sdl.cpp; sourceTree = ""; }; @@ -293,7 +334,6 @@ 7539DFFA1F23B25A006B2DF2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 7539DFFB1F23B25A006B2DF2 /* audio_defs_macosx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audio_defs_macosx.h; sourceTree = ""; }; 7539E0021F23B25A006B2DF2 /* BasiliskII.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = BasiliskII.icns; sourceTree = ""; }; - 7539E0031F23B25A006B2DF2 /* BasiliskII.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = BasiliskII.xcodeproj; sourceTree = ""; }; 7539E00A1F23B25A006B2DF2 /* Credits.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = Credits.html; sourceTree = ""; }; 7539E0101F23B25A006B2DF2 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 7539E0141F23B25A006B2DF2 /* HowTo.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = HowTo.html; sourceTree = ""; }; @@ -428,27 +468,51 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 4E4214031F85448200377045 /* slirp */ = { + 4ECAC23C1F8A89ED0013B963 /* slirp */ = { isa = PBXGroup; children = ( - 4E4214301F854B2C00377045 /* ip_output.c */, - 4E4214361F854BB200377045 /* cksum.c */, - 4E4214341F854BB200377045 /* debug.c */, - 4E42143E1F854BB300377045 /* if.c */, - 4E4214411F854BB300377045 /* ip_icmp.c */, - 4E4214371F854BB200377045 /* ip_input.c */, - 4E42143B1F854BB200377045 /* mbuf.c */, - 4E42143D1F854BB200377045 /* misc.c */, - 4E42143A1F854BB200377045 /* sbuf.c */, - 4E4214401F854BB300377045 /* slirp.c */, - 4E4214381F854BB200377045 /* socket.c */, - 4E4214331F854BB100377045 /* tcp_input.c */, - 4E42143C1F854BB200377045 /* tcp_output.c */, - 4E4214351F854BB200377045 /* tcp_subr.c */, - 4E4214321F854BB100377045 /* tcp_timer.c */, - 4E42143F1F854BB300377045 /* tftp.c */, - 4E4214391F854BB200377045 /* udp.c */, - 4E42142E1F854B1700377045 /* bootp.c */, + 4ECAC2661F8A8A5D0013B963 /* ether_unix.cpp */, + 4ECAC2601F8A8A020013B963 /* bootp.c */, + 4ECAC2591F8A8A010013B963 /* bootp.h */, + 4ECAC2541F8A8A000013B963 /* cksum.c */, + 4ECAC2621F8A8A020013B963 /* COPYRIGHT */, + 4ECAC25A1F8A8A010013B963 /* ctl.h */, + 4ECAC23F1F8A89FE0013B963 /* debug.c */, + 4ECAC2531F8A8A000013B963 /* debug.h */, + 4ECAC2491F8A89FF0013B963 /* icmp_var.h */, + 4ECAC2501F8A8A000013B963 /* if.c */, + 4ECAC2411F8A89FE0013B963 /* if.h */, + 4ECAC2441F8A89FE0013B963 /* ip_icmp.c */, + 4ECAC2511F8A8A000013B963 /* ip_icmp.h */, + 4ECAC2481F8A89FF0013B963 /* ip_input.c */, + 4ECAC2471F8A89FF0013B963 /* ip_output.c */, + 4ECAC2581F8A8A010013B963 /* ip.h */, + 4ECAC25B1F8A8A010013B963 /* libslirp.h */, + 4ECAC2631F8A8A020013B963 /* main.h */, + 4ECAC24F1F8A89FF0013B963 /* mbuf.c */, + 4ECAC2611F8A8A020013B963 /* mbuf.h */, + 4ECAC2401F8A89FE0013B963 /* misc.c */, + 4ECAC25F1F8A8A020013B963 /* misc.h */, + 4ECAC24A1F8A89FF0013B963 /* sbuf.c */, + 4ECAC2421F8A89FE0013B963 /* sbuf.h */, + 4ECAC24B1F8A89FF0013B963 /* slirp_config.h */, + 4ECAC23D1F8A89FE0013B963 /* slirp.c */, + 4ECAC2561F8A8A000013B963 /* slirp.h */, + 4ECAC2431F8A89FE0013B963 /* socket.c */, + 4ECAC2451F8A89FE0013B963 /* socket.h */, + 4ECAC25E1F8A8A020013B963 /* tcp_input.c */, + 4ECAC24C1F8A89FF0013B963 /* tcp_output.c */, + 4ECAC2571F8A8A000013B963 /* tcp_subr.c */, + 4ECAC24D1F8A89FF0013B963 /* tcp_timer.c */, + 4ECAC2641F8A8A020013B963 /* tcp_timer.h */, + 4ECAC2551F8A8A000013B963 /* tcp_var.h */, + 4ECAC23E1F8A89FE0013B963 /* tcp.h */, + 4ECAC25D1F8A8A010013B963 /* tcpip.h */, + 4ECAC2521F8A8A000013B963 /* tftp.c */, + 4ECAC2651F8A8A030013B963 /* tftp.h */, + 4ECAC24E1F8A89FF0013B963 /* udp.c */, + 4ECAC2461F8A89FE0013B963 /* udp.h */, + 4ECAC25C1F8A8A010013B963 /* VERSION */, ); path = slirp; sourceTree = ""; @@ -605,7 +669,6 @@ 7539DFFA1F23B25A006B2DF2 /* Assets.xcassets */, 7539DFFB1F23B25A006B2DF2 /* audio_defs_macosx.h */, 7539E0021F23B25A006B2DF2 /* BasiliskII.icns */, - 7539E0031F23B25A006B2DF2 /* BasiliskII.xcodeproj */, 7539E00A1F23B25A006B2DF2 /* Credits.html */, 7539E00F1F23B25A006B2DF2 /* InfoPlist.strings */, 7539E0141F23B25A006B2DF2 /* HowTo.html */, @@ -618,11 +681,6 @@ name = MacOSX; sourceTree = ""; }; - 7539E0041F23B25A006B2DF2 /* Products */ = { - isa = PBXGroup; - name = Products; - sourceTree = ""; - }; 7539E0711F23B25A006B2DF2 /* SDL */ = { isa = PBXGroup; children = ( @@ -697,7 +755,6 @@ 7539E1E41F23B25E006B2DF2 /* src */ = { isa = PBXGroup; children = ( - 4E4214031F85448200377045 /* slirp */, 7539DFC91F23B25A006B2DF2 /* adb.cpp */, 7539DFCA1F23B25A006B2DF2 /* audio.cpp */, 7539DFCB1F23B25A006B2DF2 /* cdrom.cpp */, @@ -706,7 +763,6 @@ 7539E2811F23C52C006B2DF2 /* dummy */, 7539DFD51F23B25A006B2DF2 /* emul_op.cpp */, 7539DFD61F23B25A006B2DF2 /* ether.cpp */, - 4E4213FA1F85430E00377045 /* ether_unix.cpp */, 7539DFD71F23B25A006B2DF2 /* extfs.cpp */, 7539DFD81F23B25A006B2DF2 /* include */, 7539DFF81F23B25A006B2DF2 /* macos_util.cpp */, @@ -720,6 +776,7 @@ 7539E0701F23B25A006B2DF2 /* scsi.cpp */, 7539E0711F23B25A006B2DF2 /* SDL */, 7539E0771F23B25A006B2DF2 /* serial.cpp */, + 4ECAC23C1F8A89ED0013B963 /* slirp */, 7539E0A21F23B25A006B2DF2 /* slot_rom.cpp */, 7539E0A31F23B25A006B2DF2 /* sony.cpp */, 7539E0A41F23B25A006B2DF2 /* timer.cpp */, @@ -950,10 +1007,6 @@ productRefGroup = 7539DFB31F23B17E006B2DF2 /* Products */; projectDirPath = ""; projectReferences = ( - { - ProductGroup = 7539E0041F23B25A006B2DF2 /* Products */; - ProjectRef = 7539E0031F23B25A006B2DF2 /* BasiliskII.xcodeproj */; - }, { ProductGroup = 752F27061F251B4A001032B4 /* Products */; ProjectRef = 752F27051F251B4A001032B4 /* SDL.xcodeproj */; @@ -1083,9 +1136,13 @@ 7539E19E1F23B25A006B2DF2 /* rounding.cpp in Sources */, 7539E29D1F23C83F006B2DF2 /* sys_darwin.cpp in Sources */, 7539E1291F23B25A006B2DF2 /* video_blit.cpp in Sources */, + 4ECAC2701F8A8B230013B963 /* misc.c in Sources */, + 4ECAC26E1F8A8B120013B963 /* ip_output.c in Sources */, + 4ECAC2781F8A8B4B0013B963 /* tftp.c in Sources */, 7539E28E1F23C56F006B2DF2 /* clip_dummy.cpp in Sources */, 7539E1A01F23B25A006B2DF2 /* memory.cpp in Sources */, 753253351F53688D0024025B /* readcpu.cpp in Sources */, + 4ECAC26B1F8A8B010013B963 /* if.c in Sources */, 7539E1741F23B25A006B2DF2 /* audio_sdl.cpp in Sources */, 753252EE1F535DD10024025B /* defs68k.c in Sources */, 7539E29F1F23C939006B2DF2 /* fpu_uae.cpp in Sources */, @@ -1094,34 +1151,43 @@ 7539E1711F23B25A006B2DF2 /* rom_patches.cpp in Sources */, 7539E1281F23B25A006B2DF2 /* sigsegv.cpp in Sources */, 753253341F5368370024025B /* cpustbl.cpp in Sources */, + 4ECAC2761F8A8B480013B963 /* tcp_subr.c in Sources */, 756C1B341F252FC100620917 /* utils_macosx.mm in Sources */, 753253321F5368370024025B /* cpuemu.cpp in Sources */, 7539E2701F23B32A006B2DF2 /* tinyxml2.cpp in Sources */, - 7539E28F1F23C56F006B2DF2 /* ether_dummy.cpp in Sources */, 7539E1721F23B25A006B2DF2 /* rsrc_patches.cpp in Sources */, 7539E2931F23C56F006B2DF2 /* serial_dummy.cpp in Sources */, 7539E1981F23B25A006B2DF2 /* exceptions.cpp in Sources */, 75CBCF771F5DB65E00830063 /* video_sdl.cpp in Sources */, + 4ECAC2771F8A8B480013B963 /* tcp_timer.c in Sources */, 7539E1901F23B25A006B2DF2 /* basilisk_glue.cpp in Sources */, + 4ECAC26D1F8A8B120013B963 /* ip_input.c in Sources */, + 4ECAC2791F8A8B530013B963 /* udp.c in Sources */, 7539E2801F23C4CA006B2DF2 /* main_unix.cpp in Sources */, 7539E1E11F23B25A006B2DF2 /* user_strings.cpp in Sources */, 75CBCF751F5DB3AD00830063 /* video_sdl2.cpp in Sources */, 752F27011F242BAF001032B4 /* prefs_sdl.cpp in Sources */, 7539E2971F23C5FD006B2DF2 /* newcpu.cpp in Sources */, 7539E12A1F23B25A006B2DF2 /* vm_alloc.cpp in Sources */, + 4ECAC26F1F8A8B230013B963 /* mbuf.c in Sources */, 753253331F5368370024025B /* cpustbl_nf.cpp in Sources */, 7539E16C1F23B25A006B2DF2 /* main.cpp in Sources */, 7539E26D1F23B32A006B2DF2 /* strlcpy.c in Sources */, 7539E26E1F23B32A006B2DF2 /* sys_unix.cpp in Sources */, + 4ECAC2721F8A8B390013B963 /* slirp.c in Sources */, 7539E1271F23B25A006B2DF2 /* cdrom.cpp in Sources */, 753253311F5368370024025B /* cpuemu_nf.cpp in Sources */, 7539E1261F23B25A006B2DF2 /* audio.cpp in Sources */, 7539E1701F23B25A006B2DF2 /* prefs.cpp in Sources */, 7539E12D1F23B25A006B2DF2 /* ether.cpp in Sources */, + 4ECAC2731F8A8B390013B963 /* socket.c in Sources */, 7539E26C1F23B32A006B2DF2 /* sshpty.c in Sources */, + 4ECAC2741F8A8B480013B963 /* tcp_input.c in Sources */, + 4ECAC26A1F8A8AF80013B963 /* debug.c in Sources */, 7539E1781F23B25A006B2DF2 /* serial.cpp in Sources */, 757A2BF01F5AF9D6003EDB01 /* user_strings_unix.cpp in Sources */, 7539E1991F23B25A006B2DF2 /* flags.cpp in Sources */, + 4ECAC2691F8A8AF10013B963 /* cksum.c in Sources */, 7539E2921F23C56F006B2DF2 /* scsi_dummy.cpp in Sources */, 7539E16F1F23B25A006B2DF2 /* prefs_items.cpp in Sources */, 7539E18E1F23B25A006B2DF2 /* sony.cpp in Sources */, @@ -1130,15 +1196,20 @@ 7539E23F1F23B32A006B2DF2 /* bincue_unix.cpp in Sources */, 7539E12C1F23B25A006B2DF2 /* emul_op.cpp in Sources */, 7539E19D1F23B25A006B2DF2 /* mathlib.cpp in Sources */, + 4ECAC2671F8A8A5D0013B963 /* ether_unix.cpp in Sources */, 752F27031F242F51001032B4 /* xpram_sdl.cpp in Sources */, 7539E16D1F23B25A006B2DF2 /* pict.c in Sources */, 7539E1251F23B25A006B2DF2 /* adb.cpp in Sources */, + 4ECAC2751F8A8B480013B963 /* tcp_output.c in Sources */, 7539E12F1F23B25A006B2DF2 /* macos_util.cpp in Sources */, 7539E24A1F23B32A006B2DF2 /* disk_sparsebundle.cpp in Sources */, + 4ECAC26C1F8A8B120013B963 /* ip_icmp.c in Sources */, 7539E18D1F23B25A006B2DF2 /* slot_rom.cpp in Sources */, 7539E1731F23B25A006B2DF2 /* scsi.cpp in Sources */, 7539E12B1F23B25A006B2DF2 /* disk.cpp in Sources */, 7539E1E31F23B25A006B2DF2 /* xpram.cpp in Sources */, + 4ECAC2681F8A8AE90013B963 /* bootp.c in Sources */, + 4ECAC2711F8A8B350013B963 /* sbuf.c in Sources */, 7539E24C1F23B32A006B2DF2 /* extfs_unix.cpp in Sources */, 7539E2681F23B32A006B2DF2 /* rpc_unix.cpp in Sources */, 7539E2911F23C56F006B2DF2 /* prefs_editor_dummy.cpp in Sources */, @@ -1190,6 +1261,8 @@ 753252DE1F5358D30024025B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LIBRARY = "compiler-default"; + GCC_WARN_INHIBIT_ALL_WARNINGS = YES; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -1197,6 +1270,8 @@ 753252DF1F5358D30024025B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LIBRARY = "compiler-default"; + GCC_WARN_INHIBIT_ALL_WARNINGS = YES; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -1204,6 +1279,8 @@ 753252F81F535E1E0024025B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LIBRARY = "compiler-default"; + GCC_WARN_INHIBIT_ALL_WARNINGS = YES; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -1211,6 +1288,8 @@ 753252F91F535E1E0024025B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_CXX_LIBRARY = "compiler-default"; + GCC_WARN_INHIBIT_ALL_WARNINGS = YES; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -1360,27 +1439,45 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - COMBINE_HIDPI_IMAGES = YES; + CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; + CLANG_CXX_LIBRARY = "compiler-default"; + CLANG_ENABLE_MODULES = NO; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = NO; + CLANG_WARN__DUPLICATE_METHOD_MATCH = NO; + COMBINE_HIDPI_IMAGES = NO; + ENABLE_NS_ASSERTIONS = YES; + ENABLE_TESTABILITY = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(LOCAL_LIBRARY_DIR)/Frameworks", ); + GCC_CW_ASM_SYNTAX = NO; + GCC_C_LANGUAGE_STANDARD = "compiler-default"; + GCC_ENABLE_PASCAL_STRINGS = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_USE_STANDARD_INCLUDE_SEARCHING = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = NO; HEADER_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", ../MacOSX, ../include, ../uae_cpu, - ../UNIX, + ../Unix, ../slirp, ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.7; + OTHER_CFLAGS = ""; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; PRODUCT_BUNDLE_IDENTIFIER = com.basiliskii.BasiliskII; PRODUCT_NAME = "$(TARGET_NAME)"; - WARNING_CFLAGS = "-Wconversion"; + USE_HEADERMAP = YES; + WARNING_CFLAGS = ""; }; name = Debug; }; @@ -1389,27 +1486,48 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_64_BIT)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - COMBINE_HIDPI_IMAGES = YES; + CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; + CLANG_CXX_LIBRARY = "compiler-default"; + CLANG_ENABLE_MODULES = NO; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = NO; + CLANG_WARN__DUPLICATE_METHOD_MATCH = NO; + COMBINE_HIDPI_IMAGES = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_NS_ASSERTIONS = YES; + ENABLE_TESTABILITY = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(LOCAL_LIBRARY_DIR)/Frameworks", ); + GCC_CW_ASM_SYNTAX = NO; + GCC_C_LANGUAGE_STANDARD = "compiler-default"; + GCC_DYNAMIC_NO_PIC = YES; + GCC_ENABLE_PASCAL_STRINGS = NO; + GCC_INLINES_ARE_PRIVATE_EXTERN = NO; + GCC_OPTIMIZATION_LEVEL = fast; GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_USE_STANDARD_INCLUDE_SEARCHING = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = NO; HEADER_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", ../MacOSX, ../include, ../uae_cpu, - ../UNIX, + ../Unix, ../slirp, ); INFOPLIST_FILE = "$(SRCROOT)/Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.7; + OTHER_CFLAGS = ""; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; PRODUCT_BUNDLE_IDENTIFIER = com.basiliskii.BasiliskII; PRODUCT_NAME = "$(TARGET_NAME)"; - WARNING_CFLAGS = "-Wconversion"; + USE_HEADERMAP = YES; + WARNING_CFLAGS = ""; }; name = Release; }; diff --git a/BasiliskII/src/slirp/sbuf.c b/BasiliskII/src/slirp/sbuf.c index 2d078f38..0d880092 100755 --- a/BasiliskII/src/slirp/sbuf.c +++ b/BasiliskII/src/slirp/sbuf.c @@ -5,7 +5,7 @@ * terms and conditions of the copyright. */ -#include +// #include #include /* Done as a macro in socket.h */ diff --git a/BasiliskII/src/slirp/slirp.h b/BasiliskII/src/slirp/slirp.h index c30c8d70..16266f6c 100755 --- a/BasiliskII/src/slirp/slirp.h +++ b/BasiliskII/src/slirp/slirp.h @@ -41,6 +41,14 @@ typedef unsigned long ioctlsockopt_t; # define init_udp slirp_init_udp # define final_udp slirp_final_udp #else +# define WSAGetLastError() (int)(errno) +# define WSASetLastError(e) (void)(errno = (e)) +# define WSAEWOULDBLOCK EWOULDBLOCK +# define WSAEINPROGRESS EINPROGRESS +# define WSAENOTCONN ENOTCONN +# define WSAEHOSTUNREACH EHOSTUNREACH +# define WSAENETUNREACH ENETUNREACH +# define WSAECONNREFUSED ECONNREFUSED typedef int ioctlsockopt_t; # define ioctlsocket ioctl # define closesocket(s) close(s) @@ -55,7 +63,9 @@ typedef int ioctlsockopt_t; # include #endif +#ifndef _WIN32 #include +#endif #ifdef NEED_TYPEDEFS typedef char int8_t; @@ -125,6 +135,8 @@ typedef u_int32_t uint32; #ifndef _WIN32 #include +#include +#include #endif #ifndef _P @@ -135,10 +147,6 @@ typedef u_int32_t uint32; #endif #endif -#ifndef _WIN32 -#include -#include -#endif #ifdef GETTIMEOFDAY_ONE_ARG #define gettimeofday(x, y) gettimeofday(x) diff --git a/SheepShaver/src/MacOSX/SheepShaver.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SheepShaver/src/MacOSX/SheepShaver.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/SheepShaver/src/MacOSX/SheepShaver.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj b/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj index 811ef728..a3340e61 100644 --- a/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj +++ b/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj @@ -1288,6 +1288,7 @@ PREBINDING = NO; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; PRODUCT_NAME = lowmem; + SDKROOT = macosx; }; name = Debug; }; @@ -1307,6 +1308,7 @@ PREBINDING = NO; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; PRODUCT_NAME = lowmem; + SDKROOT = macosx; ZERO_LINK = NO; }; name = Release; @@ -1329,7 +1331,7 @@ _REENTRANT, ); HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL.framework/Versions/A/Headers/, + "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", ./config/, ../Unix, ../MacOSX/Launcher, @@ -1364,7 +1366,7 @@ _REENTRANT, ); HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL.framework/Versions/A/Headers/, + "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", ./config/, ../Unix, ../MacOSX/Launcher, @@ -1429,8 +1431,8 @@ _REENTRANT, ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; + GCC_WARN_UNUSED_FUNCTION = NO; + GCC_WARN_UNUSED_VARIABLE = NO; HEADER_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", ./config/, @@ -1487,8 +1489,8 @@ _REENTRANT, ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; + GCC_WARN_UNUSED_FUNCTION = NO; + GCC_WARN_UNUSED_VARIABLE = NO; HEADER_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", ./config/, diff --git a/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SheepShaver/src/Unix/config.h.old b/SheepShaver/src/Unix/config.h.old new file mode 100644 index 00000000..9fcc90d9 --- /dev/null +++ b/SheepShaver/src/Unix/config.h.old @@ -0,0 +1,544 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +#ifndef CONFIG_H +#define CONFIG_H + + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define if using a PowerPC CPU emulator. */ +#define EMULATED_PPC 1 + +/* Define to enable dyngen engine */ +#define ENABLE_DYNGEN 1 + +/* Define is using ESD. */ +/* #undef ENABLE_ESD */ + +/* Define if using Linux fbdev extension. */ +/* #undef ENABLE_FBDEV_DGA */ + +/* Define if using GTK. */ +/* #undef ENABLE_GTK */ + +/* Define if using "mon". */ +/* #undef ENABLE_MON */ + +/* Define if your system supports TUN/TAP devices. */ +/* #undef ENABLE_TUNTAP */ + +/* Define if using video enabled on SEGV signals. */ +#define ENABLE_VOSF 1 + +/* Define if using XFree86 DGA extension. */ +/* #undef ENABLE_XF86_DGA */ + +/* Define if using XFree86 DGA extension. */ +/* #undef ENABLE_XF86_VIDMODE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_AVAILABILITYMACROS_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the `ceil' function. */ +#define HAVE_CEIL 1 + +/* Define to 1 if you have the `ceilf' function. */ +#define HAVE_CEILF 1 + +/* Define to 1 if you have the `cfmakeraw' function. */ +#define HAVE_CFMAKERAW 1 + +/* Define to 1 if you have the `clock_gettime' function. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the `clock_nanosleep' function. */ +/* #undef HAVE_CLOCK_NANOSLEEP */ + +/* Define if you have /dev/ptmx. */ +/* #undef HAVE_DEV_PTMX */ + +/* Define if you have /dev/ptc. */ +/* #undef HAVE_DEV_PTS_AND_PTC */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the `exp2' function. */ +#define HAVE_EXP2 1 + +/* Define to 1 if you have the `exp2f' function. */ +#define HAVE_EXP2F 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FENV_H 1 + +/* Define to 1 if you have the `floor' function. */ +#define HAVE_FLOOR 1 + +/* Define to 1 if you have the `floorf' function. */ +#define HAVE_FLOORF 1 + +/* Define if framework AppKit is available. */ +#define HAVE_FRAMEWORK_APPKIT 1 + +/* Define if framework AudioToolbox is available. */ +#define HAVE_FRAMEWORK_AUDIOTOOLBOX 1 + +/* Define if framework AudioUnit is available. */ +#define HAVE_FRAMEWORK_AUDIOUNIT 1 + +/* Define if framework Carbon is available. */ +#define HAVE_FRAMEWORK_CARBON 1 + +/* Define if framework CoreAudio is available. */ +#define HAVE_FRAMEWORK_COREAUDIO 1 + +/* Define if framework CoreFoundation is available. */ +#define HAVE_FRAMEWORK_COREFOUNDATION 1 + +/* Define if framework IOKit is available. */ +#define HAVE_FRAMEWORK_IOKIT 1 + +/* Define if framework SDL is available. */ +/* #undef HAVE_FRAMEWORK_SDL */ + +/* Define if framework SDL2 is available. */ +/* #undef HAVE_FRAMEWORK_SDL2 */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_HISTORY_H */ + +/* Define to 1 if you have the `inet_aton' function. */ +#define HAVE_INET_ATON 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_INTTYPES_H */ + +/* Define to 1 if you have the header + file. */ +#define HAVE_IOKIT_STORAGE_IOBLOCKSTORAGEDEVICE_H 1 + +/* Define to 1 if you have the `curses' library (-lcurses). */ +/* #undef HAVE_LIBCURSES */ + +/* Define to 1 if you have the `c_r' library (-lc_r). */ +/* #undef HAVE_LIBC_R */ + +/* Define to 1 if you have the `Hcurses' library (-lHcurses). */ +/* #undef HAVE_LIBHCURSES */ + +/* Define to 1 if you have the `m' library (-lm). */ +#define HAVE_LIBM 1 + +/* Define to 1 if you have the `ncurses' library (-lncurses). */ +/* #undef HAVE_LIBNCURSES */ + +/* Define to 1 if you have the `posix4' library (-lposix4). */ +/* #undef HAVE_LIBPOSIX4 */ + +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#define HAVE_LIBPTHREAD 1 + +/* Define to 1 if you have the `PTL' library (-lPTL). */ +/* #undef HAVE_LIBPTL */ + +/* Define to 1 if you have the `readline' library (-lreadline). */ +/* #undef HAVE_LIBREADLINE */ + +/* Define to 1 if you have the `termcap' library (-ltermcap). */ +/* #undef HAVE_LIBTERMCAP */ + +/* Define to 1 if you have the `terminfo' library (-lterminfo). */ +/* #undef HAVE_LIBTERMINFO */ + +/* Define to 1 if you have the `termlib' library (-ltermlib). */ +/* #undef HAVE_LIBTERMLIB */ + +/* Define to 1 if you have the `vhd' library (-lvhd). */ +/* #undef HAVE_LIBVHD */ + +/* Define if there is a linker script to relocate the executable above + 0x70000000. */ +/* #undef HAVE_LINKER_SCRIPT */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_IF_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_IF_TUN_H */ + +/* Define to 1 if you have the `log2' function. */ +#define HAVE_LOG2 1 + +/* Define to 1 if you have the `log2f' function. */ +#define HAVE_LOG2F 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LOGIN_H */ + +/* Define if your system supports Mach exceptions. */ +#define HAVE_MACH_EXCEPTIONS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MACH_MACH_INIT_H 1 + +/* Define to 1 if you have the `mach_task_self' function. */ +#define HAVE_MACH_TASK_SELF 1 + +/* Define if your system has a working vm_allocate()-based memory allocator. + */ +#define HAVE_MACH_VM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MACH_VM_MAP_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MALLOC_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MEMORY_H */ + +/* Define to 1 if you have the `mmap' function. */ +#define HAVE_MMAP 1 + +/* Define if defines MAP_ANON and mmap()'ing with MAP_ANON works. + */ +/* #undef HAVE_MMAP_ANON */ + +/* Define if defines MAP_ANONYMOUS and mmap()'ing with + MAP_ANONYMOUS works. */ +/* #undef HAVE_MMAP_ANONYMOUS */ + +/* Define if your system has a working mmap()-based memory allocator. */ +/* #undef HAVE_MMAP_VM */ + +/* Define to 1 if you have the `mprotect' function. */ +#define HAVE_MPROTECT 1 + +/* Define to 1 if you have the `munmap' function. */ +#define HAVE_MUNMAP 1 + +/* Define to 1 if you have the `nanosleep' function. */ +#define HAVE_NANOSLEEP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_IF_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NET_IF_TUN_H */ + +/* Define if you are on NEWS-OS (additions from openssh-3.2.2p1, for + sshpty.c). */ +/* #undef HAVE_NEWS4 */ + +/* Define to 1 if you have the `poll' function. */ +#define HAVE_POLL 1 + +/* Define if pthreads are available. */ +#define HAVE_PTHREADS 1 + +/* Define to 1 if you have the `pthread_cancel' function. */ +#define HAVE_PTHREAD_CANCEL 1 + +/* Define to 1 if you have the `pthread_cond_init' function. */ +#define HAVE_PTHREAD_COND_INIT 1 + +/* Define to 1 if you have the `pthread_mutexattr_setprotocol' function. */ +#define HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL 1 + +/* Define to 1 if you have the `pthread_mutexattr_setpshared' function. */ +#define HAVE_PTHREAD_MUTEXATTR_SETPSHARED 1 + +/* Define to 1 if you have the `pthread_mutexattr_settype' function. */ +#define HAVE_PTHREAD_MUTEXATTR_SETTYPE 1 + +/* Define to 1 if you have the `pthread_testcancel' function. */ +#define HAVE_PTHREAD_TESTCANCEL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PTY_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_READLINE_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_READLINE_HISTORY_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_READLINE_READLINE_H */ + +/* Define to 1 if you have the `round' function. */ +#define HAVE_ROUND 1 + +/* Define to 1 if you have the `roundf' function. */ +#define HAVE_ROUNDF 1 + +/* Define to 1 if you have the `sem_init' function. */ +#define HAVE_SEM_INIT 1 + +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Define if we know a hack to replace siginfo_t->si_addr member. */ +/* #undef HAVE_SIGCONTEXT_SUBTERFUGE */ + +/* Define if your system support extended signals. */ +/* #undef HAVE_SIGINFO_T */ + +/* Define to 1 if you have the `signal' function. */ +#define HAVE_SIGNAL 1 + +/* Define if sa_restorer is available in struct sigaction. */ +/* #undef HAVE_SIGNAL_SA_RESTORER */ + +/* Define if we can ignore the fault (instruction skipping in SIGSEGV + handler). */ +#define HAVE_SIGSEGV_SKIP_INSTRUCTION 1 + +/* Define if slirp library is supported */ +#define HAVE_SLIRP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STDLIB_H */ + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STRING_H */ + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STROPTS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BITYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BSDTTY_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_FILIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_POLL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_STROPTS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_TYPES_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the `task_self' function. */ +/* #undef HAVE_TASK_SELF */ + +/* Define to 1 if you have the `trunc' function. */ +#define HAVE_TRUNC 1 + +/* Define to 1 if you have the `truncf' function. */ +#define HAVE_TRUNCF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UTIL_H 1 + +/* Define to 1 if you have the `vhangup' function. */ +/* #undef HAVE_VHANGUP */ + +/* Define to 1 if you have the `vm_allocate' function. */ +#define HAVE_VM_ALLOCATE 1 + +/* Define to 1 if you have the `vm_deallocate' function. */ +#define HAVE_VM_DEALLOCATE 1 + +/* Define to 1 if you have the `vm_protect' function. */ +#define HAVE_VM_PROTECT 1 + +/* Define if your system supports Windows exceptions. */ +/* #undef HAVE_WIN32_EXCEPTIONS */ + +/* Define to 1 if you have the `_getpty' function. */ +/* #undef HAVE__GETPTY */ + +/* Define to the floating point format of the host machine. */ +#define HOST_FLOAT_FORMAT IEEE_FLOAT_FORMAT + +/* Define to 1 if the host machine stores floating point numbers in memory + with the word containing the sign bit at the lowest address, or to 0 if it + does it the other way around. This macro should not be defined if the + ordering is the same as for multi-word integers. */ +/* #undef HOST_FLOAT_WORDS_BIG_ENDIAN */ + +/* Define constant offset for Mac address translation */ +/* #undef NATMEM_OFFSET */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "Christian.Bauer@uni-mainz.de" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "SheepShaver" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "SheepShaver 2.4" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "SheepShaver" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.4" + +/* Define if the __PAGEZERO Mach-O Low Memory Globals hack works on this + system. */ +/* #undef PAGEZERO_HACK */ + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* Define if your system requires sigactions to be reinstalled. */ +/* #undef SIGACTION_NEED_REINSTALL */ + +/* Define if your system requires signals to be reinstalled. */ +/* #undef SIGNAL_NEED_REINSTALL */ + +/* The size of `double', as computed by sizeof. */ +#define SIZEOF_DOUBLE 8 + +/* The size of `float', as computed by sizeof. */ +#define SIZEOF_FLOAT 4 + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of `short', as computed by sizeof. */ +#define SIZEOF_SHORT 2 + +/* The size of `void *', as computed by sizeof. */ +#define SIZEOF_VOID_P 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Define if BSD-style non-blocking I/O is to be used */ +/* #undef USE_FIONBIO */ + +/* Define to enble SDL support. */ +#define USE_SDL 1 + +/* Define to enable SDL audio support */ +#define USE_SDL_AUDIO 1 + +/* Define to enable SDL video graphics support. */ +#define USE_SDL_VIDEO 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to 1 if the X Window System is missing or not being used. */ +/* #undef X_DISPLAY_MISSING */ + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `off_t' if does not define. */ +#define loff_t off_t + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to 'int' if doesn't define. */ +/* #undef socklen_t */ + +#endif /* CONFIG_H */ + From e6808d6556e875434bfabfbbb6212e72f9c5d58b Mon Sep 17 00:00:00 2001 From: jvernet Date: Mon, 9 Oct 2017 22:18:17 +0200 Subject: [PATCH 82/85] timer symlink ?? --- .../MacOSX/BasiliskII.xcodeproj/project.pbxproj | 3 ++- BasiliskII/src/SDL/video_sdl.cpp | 2 +- BasiliskII/src/SDL/video_sdl2.cpp | 2 +- .../SheepShaver_Xcode8.xcodeproj/project.pbxproj | 14 ++++++-------- SheepShaver/src/Unix/sysdeps.h | 2 +- SheepShaver/src/Unix/timer_unix.cpp | 1 - SheepShaver/src/adb.cpp | 1 - 7 files changed, 11 insertions(+), 14 deletions(-) delete mode 120000 SheepShaver/src/Unix/timer_unix.cpp delete mode 120000 SheepShaver/src/adb.cpp diff --git a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj index 170a03d8..aec36915 100644 --- a/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj +++ b/BasiliskII/src/MacOSX/BasiliskII.xcodeproj/project.pbxproj @@ -514,7 +514,8 @@ 4ECAC2461F8A89FE0013B963 /* udp.h */, 4ECAC25C1F8A8A010013B963 /* VERSION */, ); - path = slirp; + name = slirp; + path = ../slirp; sourceTree = ""; }; 752F26F71F240E51001032B4 /* Frameworks */ = { diff --git a/BasiliskII/src/SDL/video_sdl.cpp b/BasiliskII/src/SDL/video_sdl.cpp index 03e4c5b7..148c2504 100644 --- a/BasiliskII/src/SDL/video_sdl.cpp +++ b/BasiliskII/src/SDL/video_sdl.cpp @@ -2228,7 +2228,7 @@ static int redraw_func(void *arg) // Wait next += VIDEO_REFRESH_DELAY; - int32 delay = int32(next - GetTicks_usec()); + uint64 delay = int32(next - GetTicks_usec()); if (delay > 0) Delay_usec(delay); else if (delay < -VIDEO_REFRESH_DELAY) diff --git a/BasiliskII/src/SDL/video_sdl2.cpp b/BasiliskII/src/SDL/video_sdl2.cpp index 3c7177e6..0b4bfb86 100644 --- a/BasiliskII/src/SDL/video_sdl2.cpp +++ b/BasiliskII/src/SDL/video_sdl2.cpp @@ -2586,7 +2586,7 @@ static int redraw_func(void *arg) // Wait next += VIDEO_REFRESH_DELAY; - int32 delay = int32(next - GetTicks_usec()); + uint64 delay = int32(next - GetTicks_usec()); if (delay > 0) Delay_usec(delay); else if (delay < -VIDEO_REFRESH_DELAY) diff --git a/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj b/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj index a3340e61..4618cdf5 100644 --- a/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj +++ b/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 44; + objectVersion = 47; objects = { /* Begin PBXBuildFile section */ @@ -1015,7 +1015,7 @@ LastUpgradeCheck = 0820; }; buildConfigurationList = 0856CCB114A99DE0000B1711 /* Build configuration list for PBXProject "SheepShaver_Xcode8" */; - compatibilityVersion = "Xcode 3.0"; + compatibilityVersion = "Xcode 6.3"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( @@ -1288,7 +1288,6 @@ PREBINDING = NO; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; PRODUCT_NAME = lowmem; - SDKROOT = macosx; }; name = Debug; }; @@ -1308,7 +1307,6 @@ PREBINDING = NO; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; PRODUCT_NAME = lowmem; - SDKROOT = macosx; ZERO_LINK = NO; }; name = Release; @@ -1431,8 +1429,8 @@ _REENTRANT, ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_UNUSED_FUNCTION = NO; - GCC_WARN_UNUSED_VARIABLE = NO; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", ./config/, @@ -1489,8 +1487,8 @@ _REENTRANT, ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_UNUSED_FUNCTION = NO; - GCC_WARN_UNUSED_VARIABLE = NO; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "$(BUILT_PRODUCTS_DIR)/SDL2.framework/Headers", ./config/, diff --git a/SheepShaver/src/Unix/sysdeps.h b/SheepShaver/src/Unix/sysdeps.h index f439050d..e0de3f21 100644 --- a/SheepShaver/src/Unix/sysdeps.h +++ b/SheepShaver/src/Unix/sysdeps.h @@ -429,7 +429,7 @@ typedef struct timeval tm_time_t; // Timing functions extern uint64 GetTicks_usec(void); -extern void Delay_usec(uint32 usec); +extern void Delay_usec(uint64 usec); #ifdef HAVE_PTHREADS // Setup pthread attributes diff --git a/SheepShaver/src/Unix/timer_unix.cpp b/SheepShaver/src/Unix/timer_unix.cpp deleted file mode 120000 index db93bbd3..00000000 --- a/SheepShaver/src/Unix/timer_unix.cpp +++ /dev/null @@ -1 +0,0 @@ -../../../BasiliskII/src/Unix/timer_unix.cpp \ No newline at end of file diff --git a/SheepShaver/src/adb.cpp b/SheepShaver/src/adb.cpp deleted file mode 120000 index 1cc36b98..00000000 --- a/SheepShaver/src/adb.cpp +++ /dev/null @@ -1 +0,0 @@ -../../BasiliskII/src/adb.cpp \ No newline at end of file From b904304e89ace011e090ef0aa70a73c4ebf200f0 Mon Sep 17 00:00:00 2001 From: jvernet Date: Mon, 9 Oct 2017 22:19:16 +0200 Subject: [PATCH 83/85] Try to fix build error on SheepShaver XCode Project --- SheepShaver/src/Unix/timer_unix.cpp | 401 ++++++++++++++++++++++++ SheepShaver/src/adb.cpp | 460 ++++++++++++++++++++++++++++ 2 files changed, 861 insertions(+) create mode 100644 SheepShaver/src/Unix/timer_unix.cpp create mode 100644 SheepShaver/src/adb.cpp diff --git a/SheepShaver/src/Unix/timer_unix.cpp b/SheepShaver/src/Unix/timer_unix.cpp new file mode 100644 index 00000000..97372b49 --- /dev/null +++ b/SheepShaver/src/Unix/timer_unix.cpp @@ -0,0 +1,401 @@ +/* + * timer_unix.cpp - Time Manager emulation, Unix specific stuff + * + * Basilisk II (C) 1997-2008 Christian Bauer + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "sysdeps.h" +#include "macos_util.h" +#include "timer.h" + +#include + +#define DEBUG 0 +#include "debug.h" + +// For NetBSD with broken pthreads headers +#ifndef CLOCK_REALTIME +#define CLOCK_REALTIME 0 +#endif + +#if defined(__MACH__) +#include +#include + +static clock_serv_t host_clock; +static bool host_clock_inited = false; + +static inline void mach_current_time(tm_time_t &t) { + if(!host_clock_inited) { + host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &host_clock); + host_clock_inited = true; + } + + clock_get_time(host_clock, (mach_timespec_t *)&t); +} +#endif + + +/* + * Return microseconds since boot (64 bit) + */ + +void Microseconds(uint32 &hi, uint32 &lo) +{ + D(bug("Microseconds\n")); +#if defined(__MACH__) + tm_time_t t; + mach_current_time(t); + uint64 tl = (uint64)t.tv_sec * 1000000 + t.tv_nsec / 1000; +#elif defined(HAVE_CLOCK_GETTIME) + struct timespec t; + clock_gettime(CLOCK_REALTIME, &t); + uint64 tl = (uint64)t.tv_sec * 1000000 + t.tv_nsec / 1000; +#else + struct timeval t; + gettimeofday(&t, NULL); + uint64 tl = (uint64)t.tv_sec * 1000000 + t.tv_usec; +#endif + hi = tl >> 32; + lo = tl; +} + + +/* + * Return local date/time in Mac format (seconds since 1.1.1904) + */ + +uint32 TimerDateTime(void) +{ + return TimeToMacTime(time(NULL)); +} + + +/* + * Get current time + */ + +void timer_current_time(tm_time_t &t) +{ +#if defined(__MACH__) + mach_current_time(t); +#elif defined(HAVE_CLOCK_GETTIME) + clock_gettime(CLOCK_REALTIME, &t); +#else + gettimeofday(&t, NULL); +#endif +} + + +/* + * Add times + */ + +void timer_add_time(tm_time_t &res, tm_time_t a, tm_time_t b) +{ +#if defined(HAVE_CLOCK_GETTIME) || defined(__MACH__) + res.tv_sec = a.tv_sec + b.tv_sec; + res.tv_nsec = a.tv_nsec + b.tv_nsec; + if (res.tv_nsec >= 1000000000) { + res.tv_sec++; + res.tv_nsec -= 1000000000; + } +#else + res.tv_sec = a.tv_sec + b.tv_sec; + res.tv_usec = a.tv_usec + b.tv_usec; + if (res.tv_usec >= 1000000) { + res.tv_sec++; + res.tv_usec -= 1000000; + } +#endif +} + + +/* + * Subtract times + */ + +void timer_sub_time(tm_time_t &res, tm_time_t a, tm_time_t b) +{ +#if defined(HAVE_CLOCK_GETTIME) || defined(__MACH__) + res.tv_sec = a.tv_sec - b.tv_sec; + res.tv_nsec = a.tv_nsec - b.tv_nsec; + if (res.tv_nsec < 0) { + res.tv_sec--; + res.tv_nsec += 1000000000; + } +#else + res.tv_sec = a.tv_sec - b.tv_sec; + res.tv_usec = a.tv_usec - b.tv_usec; + if (res.tv_usec < 0) { + res.tv_sec--; + res.tv_usec += 1000000; + } +#endif +} + + +/* + * Compare times (<0: a < b, =0: a = b, >0: a > b) + */ + +int timer_cmp_time(tm_time_t a, tm_time_t b) +{ +#if defined(HAVE_CLOCK_GETTIME) || defined(__MACH__) + if (a.tv_sec == b.tv_sec) + return a.tv_nsec - b.tv_nsec; + else + return a.tv_sec - b.tv_sec; +#else + if (a.tv_sec == b.tv_sec) + return a.tv_usec - b.tv_usec; + else + return a.tv_sec - b.tv_sec; +#endif +} + + +/* + * Convert Mac time value (>0: microseconds, <0: microseconds) to tm_time_t + */ + +void timer_mac2host_time(tm_time_t &res, int32 mactime) +{ +#if defined(HAVE_CLOCK_GETTIME) || defined(__MACH__) + if (mactime > 0) { + // Time in milliseconds + res.tv_sec = mactime / 1000; + res.tv_nsec = (mactime % 1000) * 1000000; + } else { + // Time in negative microseconds + res.tv_sec = -mactime / 1000000; + res.tv_nsec = (-mactime % 1000000) * 1000; + } +#else + if (mactime > 0) { + // Time in milliseconds + res.tv_sec = mactime / 1000; + res.tv_usec = (mactime % 1000) * 1000; + } else { + // Time in negative microseconds + res.tv_sec = -mactime / 1000000; + res.tv_usec = -mactime % 1000000; + } +#endif +} + + +/* + * Convert positive tm_time_t to Mac time value (>0: microseconds, <0: microseconds) + * A negative input value for hosttime results in a zero return value + * As long as the microseconds value fits in 32 bit, it must not be converted to milliseconds! + */ + +int32 timer_host2mac_time(tm_time_t hosttime) +{ + if (hosttime.tv_sec < 0) + return 0; + else { +#if defined(HAVE_CLOCK_GETTIME) || defined(__MACH__) + uint64 t = (uint64)hosttime.tv_sec * 1000000 + hosttime.tv_nsec / 1000; +#else + uint64 t = (uint64)hosttime.tv_sec * 1000000 + hosttime.tv_usec; +#endif + if (t > 0x7fffffff) + return t / 1000; // Time in milliseconds + else + return -t; // Time in negative microseconds + } +} + + +/* + * Get current value of microsecond timer + */ + +uint64 GetTicks_usec(void) +{ +#if defined(__MACH__) + tm_time_t t; + mach_current_time(t); + return (uint64)t.tv_sec * 1000000 + t.tv_nsec / 1000; +#elif defined(HAVE_CLOCK_GETTIME) + struct timespec t; + clock_gettime(CLOCK_REALTIME, &t); + return (uint64)t.tv_sec * 1000000 + t.tv_nsec / 1000; +#else + struct timeval t; + gettimeofday(&t, NULL); + return (uint64)t.tv_sec * 1000000 + t.tv_usec; +#endif +} + + +/* + * Delay by specified number of microseconds (<1 second) + * (adapted from SDL_Delay() source; this function is designed to provide + * the highest accuracy possible) + */ + +#if defined(linux) +// Linux select() changes its timeout parameter upon return to contain +// the remaining time. Most other unixen leave it unchanged or undefined. +#define SELECT_SETS_REMAINING +#elif defined(__FreeBSD__) || defined(__sun__) || (defined(__MACH__) && defined(__APPLE__)) +#define USE_NANOSLEEP +#elif defined(HAVE_PTHREADS) && defined(sgi) +// SGI pthreads has a bug when using pthreads+signals+nanosleep, +// so instead of using nanosleep, wait on a CV which is never signalled. +#include +#define USE_COND_TIMEDWAIT +#endif + +void Delay_usec(uint64 usec) +{ + int was_error; + +#if defined(USE_NANOSLEEP) + struct timespec elapsed, tv; +#elif defined(USE_COND_TIMEDWAIT) + // Use a local mutex and cv, so threads remain independent + pthread_cond_t delay_cond = PTHREAD_COND_INITIALIZER; + pthread_mutex_t delay_mutex = PTHREAD_MUTEX_INITIALIZER; + struct timespec elapsed; + uint64 future; +#else + struct timeval tv; +#ifndef SELECT_SETS_REMAINING + uint64 then, now, elapsed; +#endif +#endif + + // Set the timeout interval - Linux only needs to do this once +#if defined(SELECT_SETS_REMAINING) + tv.tv_sec = 0; + tv.tv_usec = usec; +#elif defined(USE_NANOSLEEP) + elapsed.tv_sec = 0; + elapsed.tv_nsec = usec * 1000; +#elif defined(USE_COND_TIMEDWAIT) + future = GetTicks_usec() + usec; + elapsed.tv_sec = future / 1000000; + elapsed.tv_nsec = (future % 1000000) * 1000; +#else + then = GetTicks_usec(); +#endif + + do { + errno = 0; +#if defined(USE_NANOSLEEP) + tv.tv_sec = elapsed.tv_sec; + tv.tv_nsec = elapsed.tv_nsec; + was_error = nanosleep(&tv, &elapsed); +#elif defined(USE_COND_TIMEDWAIT) + was_error = pthread_mutex_lock(&delay_mutex); + was_error = pthread_cond_timedwait(&delay_cond, &delay_mutex, &elapsed); + was_error = pthread_mutex_unlock(&delay_mutex); +#else +#ifndef SELECT_SETS_REMAINING + // Calculate the time interval left (in case of interrupt) + now = GetTicks_usec(); + elapsed = now - then; + then = now; + if (elapsed >= usec) + break; + usec -= elapsed; + tv.tv_sec = 0; + tv.tv_usec = usec; +#endif + was_error = select(0, NULL, NULL, NULL, &tv); +#endif + } while (was_error && (errno == EINTR)); +} + + +/* + * Suspend emulator thread, virtual CPU in idle mode + */ + +#ifdef HAVE_PTHREADS +#if defined(HAVE_PTHREAD_COND_INIT) +#define IDLE_USES_COND_WAIT 1 +static pthread_mutex_t idle_lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_cond_t idle_cond = PTHREAD_COND_INITIALIZER; +#elif defined(HAVE_SEM_INIT) +#define IDLE_USES_SEMAPHORE 1 +#include +#ifdef HAVE_SPINLOCKS +static spinlock_t idle_lock = SPIN_LOCK_UNLOCKED; +#define LOCK_IDLE spin_lock(&idle_lock) +#define UNLOCK_IDLE spin_unlock(&idle_lock) +#else +static pthread_mutex_t idle_lock = PTHREAD_MUTEX_INITIALIZER; +#define LOCK_IDLE pthread_mutex_lock(&idle_lock) +#define UNLOCK_IDLE pthread_mutex_unlock(&idle_lock) +#endif +static sem_t idle_sem; +static int idle_sem_ok = -1; +#endif +#endif + +void idle_wait(void) +{ +#ifdef IDLE_USES_COND_WAIT + pthread_mutex_lock(&idle_lock); + pthread_cond_wait(&idle_cond, &idle_lock); + pthread_mutex_unlock(&idle_lock); +#else +#ifdef IDLE_USES_SEMAPHORE + LOCK_IDLE; + if (idle_sem_ok < 0) + idle_sem_ok = (sem_init(&idle_sem, 0, 0) == 0); + if (idle_sem_ok > 0) { + idle_sem_ok++; + UNLOCK_IDLE; + sem_wait(&idle_sem); + return; + } + UNLOCK_IDLE; +#endif + + // Fallback: sleep 10 ms + Delay_usec(10000); +#endif +} + + +/* + * Resume execution of emulator thread, events just arrived + */ + +void idle_resume(void) +{ +#ifdef IDLE_USES_COND_WAIT + pthread_cond_signal(&idle_cond); +#else +#ifdef IDLE_USES_SEMAPHORE + LOCK_IDLE; + if (idle_sem_ok > 1) { + idle_sem_ok--; + UNLOCK_IDLE; + sem_post(&idle_sem); + return; + } + UNLOCK_IDLE; +#endif +#endif +} diff --git a/SheepShaver/src/adb.cpp b/SheepShaver/src/adb.cpp new file mode 100644 index 00000000..c05c0000 --- /dev/null +++ b/SheepShaver/src/adb.cpp @@ -0,0 +1,460 @@ +/* + * adb.cpp - ADB emulation (mouse/keyboard) + * + * Basilisk II (C) Christian Bauer + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* + * SEE ALSO + * Inside Macintosh: Devices, chapter 5 "ADB Manager" + * Technote HW 01: "ADB - The Untold Story: Space Aliens Ate My Mouse" + */ + +#include + +#include "sysdeps.h" +#include "cpu_emulation.h" +#include "emul_op.h" +#include "main.h" +#include "prefs.h" +#include "video.h" +#include "adb.h" + +#ifdef POWERPC_ROM +#include "thunks.h" +#endif + +#define DEBUG 0 +#include "debug.h" + + +// Global variables +static int mouse_x = 0, mouse_y = 0; // Mouse position +static int old_mouse_x = 0, old_mouse_y = 0; +static bool mouse_button[3] = {false, false, false}; // Mouse button states +static bool old_mouse_button[3] = {false, false, false}; +static bool relative_mouse = false; + +static uint8 key_states[16]; // Key states (Mac keycodes) +#define MATRIX(code) (key_states[code >> 3] & (1 << (~code & 7))) + +// Keyboard event buffer (Mac keycodes with up/down flag) +const int KEY_BUFFER_SIZE = 16; +static uint8 key_buffer[KEY_BUFFER_SIZE]; +static unsigned int key_read_ptr = 0, key_write_ptr = 0; + +static uint8 mouse_reg_3[2] = {0x63, 0x01}; // Mouse ADB register 3 + +static uint8 key_reg_2[2] = {0xff, 0xff}; // Keyboard ADB register 2 +static uint8 key_reg_3[2] = {0x62, 0x05}; // Keyboard ADB register 3 + +static uint8 m_keyboard_type = 0x05; + +// ADB mouse motion lock (for platforms that use separate input thread) +static B2_mutex *mouse_lock; + + +/* + * Initialize ADB emulation + */ + +void ADBInit(void) +{ + mouse_lock = B2_create_mutex(); + m_keyboard_type = (uint8)PrefsFindInt32("keyboardtype"); + key_reg_3[1] = m_keyboard_type; +} + + +/* + * Exit ADB emulation + */ + +void ADBExit(void) +{ + if (mouse_lock) { + B2_delete_mutex(mouse_lock); + mouse_lock = NULL; + } +} + + +/* + * ADBOp() replacement + */ + +void ADBOp(uint8 op, uint8 *data) +{ + D(bug("ADBOp op %02x, data %02x %02x %02x\n", op, data[0], data[1], data[2])); + + // ADB reset? + if ((op & 0x0f) == 0) { + mouse_reg_3[0] = 0x63; + mouse_reg_3[1] = 0x01; + key_reg_2[0] = 0xff; + key_reg_2[1] = 0xff; + key_reg_3[0] = 0x62; + key_reg_3[1] = m_keyboard_type; + return; + } + + // Cut op into fields + uint8 adr = op >> 4; + uint8 cmd = (op >> 2) & 3; + uint8 reg = op & 3; + + // Check which device was addressed and act accordingly + if (adr == (mouse_reg_3[0] & 0x0f)) { + + // Mouse + if (cmd == 2) { + + // Listen + switch (reg) { + case 3: // Address/HandlerID + if (data[2] == 0xfe) // Change address + mouse_reg_3[0] = (mouse_reg_3[0] & 0xf0) | (data[1] & 0x0f); + else if (data[2] == 1 || data[2] == 2 || data[2] == 4) // Change device handler ID + mouse_reg_3[1] = data[2]; + else if (data[2] == 0x00) // Change address and enable bit + mouse_reg_3[0] = (mouse_reg_3[0] & 0xd0) | (data[1] & 0x2f); + break; + } + + } else if (cmd == 3) { + + // Talk + switch (reg) { + case 1: // Extended mouse protocol + data[0] = 8; + data[1] = 'a'; // Identifier + data[2] = 'p'; + data[3] = 'p'; + data[4] = 'l'; + data[5] = 300 >> 8; // Resolution (dpi) + data[6] = 300 & 0xff; + data[7] = 1; // Class (mouse) + data[8] = 3; // Number of buttons + break; + case 3: // Address/HandlerID + data[0] = 2; + data[1] = (mouse_reg_3[0] & 0xf0) | (rand() & 0x0f); + data[2] = mouse_reg_3[1]; + break; + default: + data[0] = 0; + break; + } + } + D(bug(" mouse reg 3 %02x%02x\n", mouse_reg_3[0], mouse_reg_3[1])); + + } else if (adr == (key_reg_3[0] & 0x0f)) { + + // Keyboard + if (cmd == 2) { + + // Listen + switch (reg) { + case 2: // LEDs/Modifiers + key_reg_2[0] = data[1]; + key_reg_2[1] = data[2]; + break; + case 3: // Address/HandlerID + if (data[2] == 0xfe) // Change address + key_reg_3[0] = (key_reg_3[0] & 0xf0) | (data[1] & 0x0f); + else if (data[2] == 0x00) // Change address and enable bit + key_reg_3[0] = (key_reg_3[0] & 0xd0) | (data[1] & 0x2f); + break; + } + + } else if (cmd == 3) { + + // Talk + switch (reg) { + case 2: { // LEDs/Modifiers + uint8 reg2hi = 0xff; + uint8 reg2lo = key_reg_2[1] | 0xf8; + if (MATRIX(0x6b)) // Scroll Lock + reg2lo &= ~0x40; + if (MATRIX(0x47)) // Num Lock + reg2lo &= ~0x80; + if (MATRIX(0x37)) // Command + reg2hi &= ~0x01; + if (MATRIX(0x3a)) // Option + reg2hi &= ~0x02; + if (MATRIX(0x38)) // Shift + reg2hi &= ~0x04; + if (MATRIX(0x36)) // Control + reg2hi &= ~0x08; + if (MATRIX(0x39)) // Caps Lock + reg2hi &= ~0x20; + if (MATRIX(0x75)) // Delete + reg2hi &= ~0x40; + data[0] = 2; + data[1] = reg2hi; + data[2] = reg2lo; + break; + } + case 3: // Address/HandlerID + data[0] = 2; + data[1] = (key_reg_3[0] & 0xf0) | (rand() & 0x0f); + data[2] = key_reg_3[1]; + break; + default: + data[0] = 0; + break; + } + } + D(bug(" keyboard reg 3 %02x%02x\n", key_reg_3[0], key_reg_3[1])); + + } else // Unknown address + if (cmd == 3) + data[0] = 0; // Talk: 0 bytes of data +} + + +/* + * Mouse was moved (x/y are absolute or relative, depending on ADBSetRelMouseMode()) + */ + +void ADBMouseMoved(int x, int y) +{ + B2_lock_mutex(mouse_lock); + if (relative_mouse) { + mouse_x += x; mouse_y += y; + } else { + mouse_x = x; mouse_y = y; + } + B2_unlock_mutex(mouse_lock); + SetInterruptFlag(INTFLAG_ADB); + TriggerInterrupt(); +} + + +/* + * Mouse button pressed + */ + +void ADBMouseDown(int button) +{ + mouse_button[button] = true; + SetInterruptFlag(INTFLAG_ADB); + TriggerInterrupt(); +} + + +/* + * Mouse button released + */ + +void ADBMouseUp(int button) +{ + mouse_button[button] = false; + SetInterruptFlag(INTFLAG_ADB); + TriggerInterrupt(); +} + + +/* + * Set mouse mode (absolute or relative) + */ + +void ADBSetRelMouseMode(bool relative) +{ + if (relative_mouse != relative) { + relative_mouse = relative; + mouse_x = mouse_y = 0; + } +} + + +/* + * Key pressed ("code" is the Mac key code) + */ + +void ADBKeyDown(int code) +{ + // Add keycode to buffer + key_buffer[key_write_ptr] = code; + key_write_ptr = (key_write_ptr + 1) % KEY_BUFFER_SIZE; + + // Set key in matrix + key_states[code >> 3] |= (1 << (~code & 7)); + + // Trigger interrupt + SetInterruptFlag(INTFLAG_ADB); + TriggerInterrupt(); +} + + +/* + * Key released ("code" is the Mac key code) + */ + +void ADBKeyUp(int code) +{ + // Add keycode to buffer + key_buffer[key_write_ptr] = code | 0x80; // Key-up flag + key_write_ptr = (key_write_ptr + 1) % KEY_BUFFER_SIZE; + + // Clear key in matrix + key_states[code >> 3] &= ~(1 << (~code & 7)); + + // Trigger interrupt + SetInterruptFlag(INTFLAG_ADB); + TriggerInterrupt(); +} + + +/* + * ADB interrupt function (executed as part of 60Hz interrupt) + */ + +void ADBInterrupt(void) +{ + M68kRegisters r; + + // Return if ADB is not initialized + uint32 adb_base = ReadMacInt32(0xcf8); + if (!adb_base || adb_base == 0xffffffff) + return; + uint32 tmp_data = adb_base + 0x163; // Temporary storage for faked ADB data + + // Get mouse state + B2_lock_mutex(mouse_lock); + int mx = mouse_x; + int my = mouse_y; + if (relative_mouse) + mouse_x = mouse_y = 0; + bool mb[3] = {mouse_button[0], mouse_button[1], mouse_button[2]}; + B2_unlock_mutex(mouse_lock); + + uint32 key_base = adb_base + 4; + uint32 mouse_base = adb_base + 16; + + if (relative_mouse) { + + // Mouse movement (relative) and buttons + if (mx != 0 || my != 0 || mb[0] != old_mouse_button[0] || mb[1] != old_mouse_button[1] || mb[2] != old_mouse_button[2]) { + + // Call mouse ADB handler + if (mouse_reg_3[1] == 4) { + // Extended mouse protocol + WriteMacInt8(tmp_data, 3); + WriteMacInt8(tmp_data + 1, (my & 0x7f) | (mb[0] ? 0 : 0x80)); + WriteMacInt8(tmp_data + 2, (mx & 0x7f) | (mb[1] ? 0 : 0x80)); + WriteMacInt8(tmp_data + 3, ((my >> 3) & 0x70) | ((mx >> 7) & 0x07) | (mb[2] ? 0x08 : 0x88)); + } else { + // 100/200 dpi mode + WriteMacInt8(tmp_data, 2); + WriteMacInt8(tmp_data + 1, (my & 0x7f) | (mb[0] ? 0 : 0x80)); + WriteMacInt8(tmp_data + 2, (mx & 0x7f) | (mb[1] ? 0 : 0x80)); + } + r.a[0] = tmp_data; + r.a[1] = ReadMacInt32(mouse_base); + r.a[2] = ReadMacInt32(mouse_base + 4); + r.a[3] = adb_base; + r.d[0] = (mouse_reg_3[0] << 4) | 0x0c; // Talk 0 + Execute68k(r.a[1], &r); + + old_mouse_button[0] = mb[0]; + old_mouse_button[1] = mb[1]; + old_mouse_button[2] = mb[2]; + } + + } else { + + // Update mouse position (absolute) + if (mx != old_mouse_x || my != old_mouse_y) { +#ifdef POWERPC_ROM + static const uint8 proc_template[] = { + 0x2f, 0x08, // move.l a0,-(sp) + 0x2f, 0x00, // move.l d0,-(sp) + 0x2f, 0x01, // move.l d1,-(sp) + 0x70, 0x01, // moveq #1,d0 (MoveTo) + 0xaa, 0xdb, // CursorDeviceDispatch + M68K_RTS >> 8, M68K_RTS & 0xff + }; + BUILD_SHEEPSHAVER_PROCEDURE(proc); + r.a[0] = ReadMacInt32(mouse_base + 4); + r.d[0] = mx; + r.d[1] = my; + Execute68k(proc, &r); +#else + WriteMacInt16(0x82a, mx); + WriteMacInt16(0x828, my); + WriteMacInt16(0x82e, mx); + WriteMacInt16(0x82c, my); + WriteMacInt8(0x8ce, ReadMacInt8(0x8cf)); // CrsrCouple -> CrsrNew +#endif + old_mouse_x = mx; + old_mouse_y = my; + } + + // Send mouse button events + if (mb[0] != old_mouse_button[0] || mb[1] != old_mouse_button[1] || mb[2] != old_mouse_button[2]) { + uint32 mouse_base = adb_base + 16; + + // Call mouse ADB handler + if (mouse_reg_3[1] == 4) { + // Extended mouse protocol + WriteMacInt8(tmp_data, 3); + WriteMacInt8(tmp_data + 1, mb[0] ? 0 : 0x80); + WriteMacInt8(tmp_data + 2, mb[1] ? 0 : 0x80); + WriteMacInt8(tmp_data + 3, mb[2] ? 0x08 : 0x88); + } else { + // 100/200 dpi mode + WriteMacInt8(tmp_data, 2); + WriteMacInt8(tmp_data + 1, mb[0] ? 0 : 0x80); + WriteMacInt8(tmp_data + 2, mb[1] ? 0 : 0x80); + } + r.a[0] = tmp_data; + r.a[1] = ReadMacInt32(mouse_base); + r.a[2] = ReadMacInt32(mouse_base + 4); + r.a[3] = adb_base; + r.d[0] = (mouse_reg_3[0] << 4) | 0x0c; // Talk 0 + Execute68k(r.a[1], &r); + + old_mouse_button[0] = mb[0]; + old_mouse_button[1] = mb[1]; + old_mouse_button[2] = mb[2]; + } + } + + // Process accumulated keyboard events + while (key_read_ptr != key_write_ptr) { + + // Read keyboard event + uint8 mac_code = key_buffer[key_read_ptr]; + key_read_ptr = (key_read_ptr + 1) % KEY_BUFFER_SIZE; + + // Call keyboard ADB handler + WriteMacInt8(tmp_data, 2); + WriteMacInt8(tmp_data + 1, mac_code); + WriteMacInt8(tmp_data + 2, mac_code == 0x7f ? 0x7f : 0xff); // Power key is special + r.a[0] = tmp_data; + r.a[1] = ReadMacInt32(key_base); + r.a[2] = ReadMacInt32(key_base + 4); + r.a[3] = adb_base; + r.d[0] = (key_reg_3[0] << 4) | 0x0c; // Talk 0 + Execute68k(r.a[1], &r); + } + + // Clear temporary data + WriteMacInt32(tmp_data, 0); + WriteMacInt32(tmp_data + 4, 0); +} From 28206248d44991654acfa0e9a0bb22de8e90783b Mon Sep 17 00:00:00 2001 From: David Ludwig Date: Tue, 7 Nov 2017 17:57:10 -0500 Subject: [PATCH 84/85] bug-fix: crash on startup, when passing in single-parameter, command-line args --- BasiliskII/src/Unix/main_unix.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/BasiliskII/src/Unix/main_unix.cpp b/BasiliskII/src/Unix/main_unix.cpp index c80f95f4..59444580 100644 --- a/BasiliskII/src/Unix/main_unix.cpp +++ b/BasiliskII/src/Unix/main_unix.cpp @@ -432,12 +432,14 @@ int main(int argc, char **argv) #if defined(__APPLE__) && defined(__MACH__) // Mac OS X likes to pass in various options of its own, when launching an app. // Attempt to ignore these. - const char * mac_psn_prefix = "-psn_"; - if (strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0) { - argv[i] = NULL; - } else if (strncmp(mac_psn_prefix, argv[i], strlen(mac_psn_prefix)) == 0) { - argv[i] = NULL; - } + if (argv[i]) { + const char * mac_psn_prefix = "-psn_"; + if (strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0) { + argv[i] = NULL; + } else if (strncmp(mac_psn_prefix, argv[i], strlen(mac_psn_prefix)) == 0) { + argv[i] = NULL; + } + } #endif } From ea626e216d4d0056f8d42b3816d855ed95352bcc Mon Sep 17 00:00:00 2001 From: jvernet Date: Tue, 2 Jan 2018 17:01:45 +0100 Subject: [PATCH 85/85] icns --- SheepShaver/src/MacOSX/SheepShaver.icns | Bin 59840 -> 79532 bytes .../src/MacOSX/SheepShaver.xcodeproj.zip | Bin 0 -> 35529 bytes .../SheepShaver.xcodeproj/project.pbxproj | 2449 ----------------- .../contents.xcworkspacedata | 7 - .../project.pbxproj | 4 +- SheepShaver/src/Unix/config.h.old | 6 +- 6 files changed, 5 insertions(+), 2461 deletions(-) create mode 100644 SheepShaver/src/MacOSX/SheepShaver.xcodeproj.zip delete mode 100644 SheepShaver/src/MacOSX/SheepShaver.xcodeproj/project.pbxproj delete mode 100644 SheepShaver/src/MacOSX/SheepShaver.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/SheepShaver/src/MacOSX/SheepShaver.icns b/SheepShaver/src/MacOSX/SheepShaver.icns index 84fb9395869b296f201ffee9d87a55e4bee1bb8d..ae6d1d5b8095331382622d487684d415bcaa86dd 100644 GIT binary patch literal 79532 zcmeEv2|SeB`}k|$w^D>GQItYa6dBzVr7Wpbh!&wjLKI_6iXv$dMWIyErc#k@q?9Fw zD9JL6eczX1X5RmKXH22G*Z2Nz-R}S6Xy!fVd7kq==UL8k&U4;3?DsgjKupW-Z#G&j z4MC8#y^HD+2x8vsqTz4=f|xk%4$^#^HfR!)06q%BZnM{9F&+Pfm{`FCAuZ5>Yg zJt`UyG(#O+mqU<3sQsSBDiCC+&A4wM#H6fq5)x3`zu$yOj&KALfE1ji=Eq^-O~u}8 zA&m{n`Eao18LwIj2_A$X5nVC~#>i=@6%RBMiGWir4C8du?$p42)J2D{K|+r{L@mmJ zN4iJgi>n_;LXf!gV9B0mGE;!3hFTIBd59a zQ-5yE9YqMLhv5v}^tc+hKU?0=3KDwq@y4QDm@+Wf?jmEPhe+XUllF@6_OOP4)I2F5 zh0p7~7kzmAA=W*Y+-|s@f>_yj4P3t!VT0Wch#|uB@ggKWYB6Joz{)`rK@kx_&E8(0 zT{dMm#0N?2nltAjB7!3j!F1UjyoJeG$2T*WI}2hVX&d+1BfCedf##`Y4G7 zK@1-SeoHTWeB2QCr&grF2SKu-Jw5FabuezRkLIhM@E{6IEBl~gdS&!`Ib=o}3%J0v zf0U9A9fD4bMZ@rN-h^H%9hCP3hCl5A+8F|E(us`=B!X{lTn5|^KN}4KSv)>Jmk%y~2k%GPbKT-T!PLd>a5wx0X`i9pAQC#24m<_46>04V zP;-IrgKxc?&cm3a$q*AIECOPRrUXMwM2b%vCnXw!qAAf7l^}?lLZr0O zf1(2*VKhu!3qeGf2-ATBlmSYZFElF-^gy6QIND|{v5kgBa6~c|5}ysQXd=KvFt{)1 zZ%L%#D0njdI3zZk(KQQ(Y=VQMp)i<8!6QiW31}Amu30b|iiT_;JlqD;QFt=wItGc4 zw#37;U*7 zKM8Oc97atDgU}69oHF^|!8Dfp5Lip$_5OXvX?GG`dQc+p>l z3~rnNmH9)QKqUYKw{f0=pt4ioRxlS8PzAq(fLEl`ydoX(ige%=>4;aPN2eoRkxoo+ zqyJ3s3L0=AeIWh2UIDNOj_CUXuRw6=c;6p+MLHfq`hMRlXehkzkG#Sccm?go-}4IJ z1Yjt<@b|qU6Clx$@b|qU6Y&aR(DyrDk%@SPFw*r~uMkGOBJ+z^WD=oF;1!vOR{&@x zXwkib21UFg^KW`Z<^-?E1lG6YRx>sb-ydnefiVWZt8HiV8L}wsg zkwMI8qyNyn!jBd!{D^*Z;6TPe#uu*uP@*3#R?x5rj_5bWEBqk8FR=o_W#Ii7UP0@c zehFX< z_|1q{0F=!bWP%@_3n0zc8LKF2pM~gTBBk5VlCH0N5}Z4)Kc3 zNLSz$JVb~G#0nnJ2Ze7?pC9xg7>33vr#mk0e>fkE*9lY*>N z-=K|Y>lbWHUl=FiN3nDo7)~4Qj(~4N&=Cfle!YfZZ^5wfgkE2$0QyHLgk~GSfBZuH zZRI3b#{P`J&kEp2<@mNYfFStqA{fA*jo)VW=L0YU`0tHSfIdLSZHS5{k_ZTbA2S$s zGTZhoUO-S#V4E4O0PJY@F)R=)z;6TJ4CJ``3(#>iu3x{tT9MXq8!|knuV_#kr7#9O z!O*}zP{t8JP5@#|1Az+d4igB#tcPI`9%!Sb5sbTmEpkgx{2)ioj7Gl@ zAaF(*z#9T-j3xgm=mUjnY;S%6tiGx^|I&7H5atGue-Ngpn;JUG#>cAfgvB>Oku=m+3 zV0X|8qB{`ZA-; z59aQ8b!*=Od3l+TGUL+_8?TnFlc|gk#3JwHmEi+3_4oPo^A7g)g55dwwaYq5Na+N` zJbjL+4{`+G^lBnlO#5KqiJ0VxREU)?JR%{=wF zX9R{nWT&3Rpby7143NqF{e!)Iq~T!_3DCl6(#N3%(-t{C4_U8jX141VJQ(6x{(ArR zgAS`vrrR;NrlH}%K{BPUhtyTy2|tqp)N@V4PA}lySM_|QEtzsyKQ&B}8+FEE@hl0s z%}=_9hlWUf?X8`4RUPn6uoGDzqogLuG2=Si`z(vpnU|7R?mtudh`)=I(<1SsHN)M# zy;V(JgoX|xIa$&dTEGcGvps7-)(dxa5A?QEuFsrnw|?g_6HTj!%>x51wRQD%P5m%s zlx~4?WnD9k6R^Xc~WJuzPx?ia9>YveN|fnvFUYOYGKEK9UvC< zYleHe``dfE${O46YKmDrP4%<1I#o<<21&9?sjpWvT%xNcg zx3=EV6gA0cEF(OLX{0nZb@#S3G&NQkQ^hS2Wx=B}=svoCrdYl&{f^)ujqfcURUF7gS}Z5Q^V6*Ct>V&qdcoOK+sY zj)0g`+7qAsvbx7s!es5LM?Jcg|Ki!<#Yk3lqUv%uK z+cBGM-f6nR*J1pj%N@mqg!0@ z@B1a(@IJcqB*bhTAr}ly+XI4>^i%kW*d}hzJ+J3CQpUL%jQ7*i_~jd|T3Z zkYo`J@jAj3LzzVQnuI|Y)gH9>B7GC!M^amk?~Q;RB$}Ehfn?dYbx7RX#DT*D{3#7{%491^SaWiEj%!+e&8^-MpA zhl3p)^2qzAx-AiAy8y9r332iZf?bV-JP!o%>?tfva1g!@@vQdI45wwPYA36m?Pv>0KrBk3+odLelcnc=cXBoU7?54roM9c7TjLrxS)psGWIz zMe-n9Vi8`obC=P!{mZ#eL4ty2X)ydg>0{Tx@X#<^7YsVFi#cu6J!8fPu&hED81DV> zFpoSu1XE8)a0NnaV*Agmn#mRb@tU;3X(yBWV7R9;-{>sFtY*r02I5r=Oy4LOoSpG1 z-0k3Epmr|NIp8E^o~*36@O1882t-g09xgTzK^3;H7iU8vXI82{5%!ZYL7@S}Iy9UMI!bE|?=D>3T;W#8DoteFu>^Dk|@E?0yHeqp0XZNpbOqk}_gb z7tR7D56OOwqucIwQLB+SYM=kPX^2Ygz!#Mll#~~i*A-W^en@eeHYSdK>LO7oAKs>( z_3?7P-84ucHx=fWmlP5|7ZJ-#>)$znbF(pVG=|!D@!02A_DCGnHr?)>+1C7_q_m>4 zq^Rt}tAx}OB46WZ<+GKxBP3_Nv2pZie@DRwVqX5ooXjT?iRTgO(Kt%&ewH=V@h&Cz z^Ora(cC>b+t{^8TJ2&Uv)u$tdIAeGwL)8E@Ve0_%8XdJ!QKq8f;XXa(z zzn7Src2RF82nHaI_K);-4s^A2)Yi4${t`!P2YS1En?Gj1P6!RV=yEpmo(>=u^=qVd zclEXRbd)u;#I2ymQR`F1uiUw(4MB$YJ>~&o={S5w*XPGM4MROK+M>p<`&z3zTZo-4 zgvPF+frj);H)0Ph73MSuGDOBKv^%Y_vn%`Ti|$7tj%M^VHFpv_`iV^q?e~e0rLvng&EhnV1h#!z1@kKE96eK;kGD zKO2an`^a^FNI$1Onq@-i8I7ai5bw6?>UH7~gRxSk?UftAR5T+rY!naazbK(!R=OFq zty(H|rSFcMnWbC&c{^xtZ|*jhj2SsEwx+aV8)z@N5WiadeE%hh^@K8no?A>>P}Ha5 zoW#ab+*%Mp`P9P#rHm77W{-`a7C(rf)43)QLD|0_L05e@f^I(KAS2{<`OqOp6yJ9u zsN~X9?}sTK>)({#E*`o*`}+~}_PbgFaj52f8{zq*&g^;LjiBAsmPhv+DU^!$MX&lx zzKx*UUiN-^_M)t-si=ZPC7u(T7(qw+TS_11477JqslKy0$3{@&HtI`sWFvLB`ZIoP z1Whv*Iq>3XB*x8&9zkXJp&7E$5+V~Ls2M$i8oo(eM~|RITj>$h+?*CcjcF0o21L;N zek$xBg7Qenc$8O^f(Tms{&gS{LC*#pe;99oM9`I2pJ!Hd)>ikoR<>4VCExiPL1l!N zuGqYNE;9rzv^ET^D#|PW^zj3TpdUWhwtxt#GcJN|^0}6m=e1Nq(mC?WZvsXxXVsQPrF-PZmfB9=l$oRiVsD#eFU;XJ*W#xyW^3vB&)BR^LA}HVf_t#h26g<>X zaJCR)TXmMU6W#ivu?$~X`!4_EyVnWVlD|gKSuyW#Mu*3}KJOBJbuIT?uoHE3Ql8^^ zH?E-UT~1D3-u-LO(_O$R7_t+UJM!>F5-vI6X;R|D1P6Wv`}I4InyfbWjDGesH9P0s zs|WX!({Yz*5tM7zv7ATGvhF0{qVGJv?4~PY<*%x`UeP8o_F2}=o47aG&n{mHaXa@a z4vC=Rr;;9JCEU(@di~+u%NPwwtEXxHmNus&@1(}xdUpGI#^dN)yCi0=dxS?KsB~1) zxjW%!AEiHiaKlYQetlqe;k}T^Ckc1&B|LlZ=;__ayZ2ELwC-t?CLk8xeeqIc_-V|& z+$iTiq&9>{KX?{>Kk@qg=g~<8_am-ch>bg}Cd6U*&`${v3z?v=yn5no=M&|xA-y9o zIwkJf^9R?T-H(X5aX;B%O~BK`a!c0>&-Hz10*GhqIb!2^$if!AUt@)R$h`;m;_g3) ziN1TsZ@1eSM?<@tM;0#FVKRN`l?X(@X{P(OT5a8X$zNN{@J8&z=dq6x!Xs{n`R`e_ z*-q!s^8i)Z-Pl$98i4Y?OyIw7HV)qK0fyyaNmWgvpiStF9_J1;;0elueryF!}r^5=q&%z49q$` z`;*>>4tNAcInMlM8@fF$$=v4X8tfwrOhH1*1*r)^baQMinMKTstQ7 z|BEW0Pe+H3)L#&NMRV-Uh2dQ6SHQ#?pMo;IC?JpKl(&{62NRTuRA1WDcDyL0mlxZa z=G-o%k^hi>kyG$X`auWyetA56fYumDK!3R(iv-}lNRkZzW+<)+YW+ezTA{XoF1WoG zWI^=8vN#BE&k5B6G0-jJ<2U5+AkJP{7DPzNt)4y(3%Qlg*C97*z3<}_Q8Mw~NPDEx z61lU`j%*6t6u2X>@q0vLV8iv`@jC?RM}ve127CN5sP9%=E`hZVoQpPp7yB)+$!7r~ z?A@ksQQw8Mg>95#fuLol{%YW(z1t%9|G^6wNV?J#^WA%n1@;%5U&9SS%ri_u8aSzv z1rB#0zCC!5kWH%eCn`YDw17#`(um5z>jpyD$Lp<@xRC6Jau= zYCL9Q$RbLgXp^C@_1tU%L9~hdL-OvZOa`v@*1oN@lT}+VQ_AQwj)9|HJB#x1(F@EA zEBax0u#RwR&lc;gh>r?^nYg8F94W04siC5|h-ZejJ($XGPrBM{F|#&B=#e7%ZXA8{ zHJ_8d8qhR3ITeLDI^Os09p7rWb(i(Jg>-5NQYsurU%VXR77>}Z(PHbi9p>gcw(qdq zwq9?;I$2f*y>ihw`l7`UkE)*Gc1v?WzHO7C(GCMiK_NjTdeF;~igEOX%lMXW+hw_Z zo7u+2qM{|@M7FM2A}m5%*?l&nHX4jm?pD$2pqYUfsmYd2%>5|H~8UfIhru?O?wpyGPu zJqAjZ&yrc!XqEhH=SO{$|WEmz^7dfQ>w#)2ml7d z<#rS4L3`GQ0|(ALzln8Tg{W>JVs!lF%XnIcfbY<=N-SJx9^VHKJl?4&!m5xq2q+0b zm#Yx(I`%C+o7UM^uL_aa*kAP;Gf&7K@e)e)<)A8X^&U^pt8v)JFTM>RMoYN`vm|(o z1PVSLiGms9Ritqh93qV?7znZ*JNwGF3XNfLxN96SXqIC+!l$5qvh;GayT5g zBgft=3D54mMuI*lg+UBz2s+#`3Z$cekrMR~o64+Rr@8Ab-MdJoU+Fcjw$mx;-y?v2 zJ#ek};d^de&O8Z2RH82XbGI&41u9;2OxKLzh! zFTkLOME1UG$ameK^92Aw(=mwo8KwB#ZgYJQz!^niFWPmR(sV`>Tsf3>pN>mR7%k`b zo3D`r>+P2!GDmj7SaR_6fmh0C&rVBv*|x=4kqvo0=1XB_VPl3Eud5+Yw*Ix85mpn;tbyV-yb9!P_D-xz5SiGb%J)Qk_Jf#0kb&^cptrPqj6+}VXfc4*DbnS$afpC0y2~65=Dctk39aFSR(KM2&{>;brOrO zL?YPVflxs|2=v6$yod_!^YHN zo+xZ876ta1$eK3kc0K5K8Uj7bun9Gjt0!RHKo2_oU)HmrlWT!TC16uO{An!<0+Al^ zLN4$@Vm=k@kr0W>fHVo%vS&XT{{Xo^G8d?{Q6N{)zJ`o}HUgmEpN}8q`gIh5YXXqJ z>^fa~+L-=XEZ{)j`Ou|9>YQdlJd;gn?YY zf3L}9YMF>sV0A|_JmLQ#!~6I9{Z)pCjF6t;2?NybM}~_w9EyHlrVzN8`S; zka?W}GQ5n@3=dpEou1+S18|VxWgr}YoMS&ohWC%aK}<$t{Qw90Gd!f`H;&f;;DdbV z8Q#A}3D!PFhDRSGGS08h@V<_jF8S8fv@vyJY@aVcn?2iZXe(xFH zZ`KR!mFXGYS1V+x~e!|Gr5YGda`6>-!Dd2gC ze=s~|Gp z@Yu~juHV0x4HzRL5pw;WR6rUa3l}04m~RNh=FtrAztPVRWNUt-&+xw53y~%a%L6`$ zWb_PgGmvf6YQJkA5CItTABpJ5c-X<<3j(%4G9(@_i;xTtu?+G- zp5bkN{4=pc-~mX6$3x>z+mgo`$QE?^PFDqJ8l`+E?^c#tuGyU{W{`gr~~Nc1=3 z`5O>ghKKNFWO#p3|Nkt*^8*$@A~+A0>$@4=Ps7tPJY+@TqRj>53Py2l{4>0tjUVMY zItsuI%+j$L9&JqjEEaH}ucOFXi>#+#pW*#eaG=MNh*r5q^Sep47#SVo8V50cq2QPI zH-BM;@sjEPj- zi2p;y7!=0+CSDO7a_fn3M*IK3_Dk0({{N2t|4i=;`~K*f2Fe!${>{o1{~z1^M|x+# z|4RQ8b$c5WhMA6l!nn`>dc6h;<34|Oo#H>N#h;;n?p=^7QYqJjd1M>hh|a%P#@ZdJ zkG1#2`ef}s#h*Us{w@7a`e?Q_k z)}H@seX{nS;{S8>KiTJUjCnnFjw7&%_CwbG|HTKU_)qS+;Lp-O!&ZN02L#99k6aNS zVAy?ZodH9xjQdXZI>rCTe()>w&#)6Rf5+Mp;myE}y^f_pd}3^yQ6Eb`+4>a!e^>uw z?SwqTW!Ms_kHsC3g<;e0T^W9Wob61+PxOJmWAiEgzh3`; zrSpk)X4rKi{CjN%?Vnwz`2V@hC+d}<%Zc#swHdU3cKu$zKZA|E*PqcbaAWDeS7*>o z_B!?+lj$>-{(JSw++!@w*n5nH|ENBe{(JQw_4^Tg>^*)&GZsFU{(JSYw3DeLaenN5 zkT#?IsQ*~{iS-}#`4Jr9HTE71-pKVwea6yHtpBLbkKhQOvG+jQjPj#CW9cW>f7Itk zaD>;`doXw-*B|v6OFywb+4wsM3UYsh&%}E$+TR<)pV1@zrua`T{{JlfBR2Sv-%Nxf z`@g@k=U5*=>PSI&{8^dE=SS@+{y#_mh+coBa|RrtVVwW{nJp0@8}@Ys>ZjwxIm(-#-!<~Ys8^V-?A)TA8QEpPhTqJKDVIbnIDX5-Fs-IZ4M&%$SI zITd>E;WfP6rHipMLn1c@yiX`GU@5uRY`ExrUj8(tmoo+nT5DzpaOSn2@1PnE$l{I# zRur9{W0c`IV>Wu$5Ul>{_Xx_9-XsvSJaYgMD3mDK~` zD)uTi&!R)IJR3*$yDj#V5Pe+KKezRAwyZ{}o9(oOn<74)TZf*0+S7FYPPVCi^{(od z>(O_wScN-pZ8%Yxm$2i?J7(G7y|~!?Iv)-n)YAv4ci8gZuTWRLF|)_O?11CLxK*DY zhHp3Fp)9$gxidI>zC+5T%n+$O{^TRqXXVXY|E8#U9_GQmW41z{Ke44mihMp7Rr$Wn zm0k4cCsgVR$M4HFrt&iIcDL zb}gP`^nTjG%A?DJYu}zY^F$OPQUp`{Zm96 zr@_k=FZtQH4?C=wv7i{O(BGSCl%-jR>X za%Y&8#ovve&*hbyw8Zj*p8t$|wHf$&g=OwZX_|U6!(7)N z&eUw(YG;0DI=Wr3A1C(NuglP@LG?x;M}Kk}u`x!!j{UspibsTz+06#TO4r0951+v; zczIn-DRnXUp}Lr+)f{+ckxegZJLK$fP+SrG?Kr_V>vUIb_F!ti=47|Ce%2eKn|tQ% zIcS-z{8?B2)$Z8mHhazlY`y9-omYW(-`gcD#h<;3r1w}S4!yjwWMRUb`%826V^?dk z^S23VE_$~*}Fm-~gce|%0M@Opm^1+eTw-$}w;7^}d=48zu zL>DyQ8{%N%yuX*(;N`3SxS`^ZQ|wHfb@P0f>K-bWt478B=wgZS*Z7E{GZy1W#))KR4fhv6e*GVj?%5&D}euj(`pv2gI~YxhfFOTGSyU&b^=-3^;2a;O6J0{Q*dx<3pwE^lLjkNH(E5pBYtE+;5PMp21NDyyKJ?dKt8oT4B;k1SGW-+~kuR zyZ!wnLk*I8Q--p#91c_7qmL!RI9%VFqtsw($Ka;mH%7qVrBYJvP95>#2 zy;OBB_KS=q;4nB{SK@1~IK8M?rAqnWfwIAN&DA|eJ6<&2^d9Qk6^9zC_T3~UDtd0X zx;mu90MDg6(pTg$sC`m(pm}-FmW!It*Jo_$zf-h&i917T6`v!e!Nsekbs-kc8d*{1 zcHr<&Q@pQAGRpu(a!S1vv;)2xUD;pTC&($30sS$=>8F#zbze+OEZOwdqXVT%bIpph zah^M2KXJ!%BjD8vgOw}f3riDMKg2zitIy49ZMu7y5asRyoeeI>xVmoMdHC(@x3{#d zBi~w8);D%rMo~8;zy|kFGQBAoeI%>&mi4o&Hg+WGSQ$63I(K)6O82G)ejVbf6FP`t zJBBaJW|d>&oit$JT5bQ;jCXjjiC9wA->j@Pa72N6oW&^HqqNbzyMF}g zK>Yn`(cmo0+zKXrty6;88zC@vte*J#$oWhfV13CTzN0r~ZGzXF^wJS>V&!dIVD*rd zYtfpXX{E95F02AtT|O4@Ns*oBhTjAw8+D|MtEkmrT4UKOJR&Ja#>|juUik zb7yMNSkCe2sjIF3E!0qVMfT3ummt1RVSXcn(&OUrPSb}o0jxBRQ=U6uLR(WP&Alm&r2gI^4*sUb=J@3GgJqRh zGyU9`(aj5y0(UD6;RlL`hhnV7xn2W>c!Ag0zL9M~{7)jLU zSVD^Xv$_QIi2JQ{_fDla!q5xzn;pYsy|WVMyK8G}H@Ty!=rz;!RTG z;un)!dyjY;W(+n5=k$&YbqtU?;o{&r((p*X`&NN%YGoT)Ee>tA+A)0DV)w39sLu8V&Who{K>vE`fsgmk4;RJg-O|?Z z2ra4X9V%)h#h{NJ9ok2f&$oe>B!^UbQYuHFI%59o2mnw?4tc?H&O=b<99Ue=rKIoW zU|I)F8j#_?n4{3)_~8O;Z||KQxPb?5n^5f+rf))dlaoqDMo^3T)6?B=bu{qqv&AUZ zihEh@e535!G~CzWZu~J(+e(dkVBTB3ppH5&mzRW~jvm#T9UyAI_(*&?H!ScJqLhCF)RsneP`g0zfPcMUMP9!?J za_RyPGCBTwb#xZkF3c1Oj#(|e9%4kWbKd+J{iMpPKKI&llo#e2EW5m%X_iIcLp;3u zP(gH6X8(0dDeC%*zJcmByUOYtmmO*heyBXs*Kx??nx>D!Dxyr`ZXkSM;M*b@!MQ$6 zx?GbV%zHeO#0ppa(8ecu$s^i6c2QMXDa)CzkU4I&y68of1`p&|aywFPppUo@y`T@RB=o7UKLKmkNs z7tRnMVn{u{Lr?)|P$3{HU&c5Tj3X44vN{?lK3c(hnZM3j&E~%NAK#*-i0T52-AM;s=y_)m-qyX551ESMiMpR5wiVq&SS9HxQ?1i;|QOuL8EFR?U zxAnt#?UDN>o#`WvaizQM46Pj<4IknqkZm**XNX(|hH3qKTPIFou+9oALFKEX!LB4) z4n5$fvkR!8hWXJ-*7abW{f4LkBKA3{8MG}urk_p>Q2e8tLqL)@tMp~j^5YTjm^!v3 zM@(<(>@=(SP#2sGr zzS!Apz zF>kgGOQr=g_C6TE{Y!I|In|_nnACh;&lSuD-k7~(d(Uwl7N8dv{T~oXm#jX>C0wR= z1Wi88RoS@HqGH}+ua+$o$`IzE)wyn8U)yzP=k7-(mDEA13Fb&fK389Vn&M!5mLq&N zXE^!Q8aH)+m8G{DwJIchB2-0Z&2pZvPpx3m@M;p&-v9x&7Mpy1WPO-4{+JxVdJC~4 zbnY{da14|wcQ{57@@H+ZxIa?jSP*^pqeek#IFIDg%N{%i^ zQ(wGT{tUgPQ@K$tiRIkT-&_rRTCeZR*6y?Pxiy!Pni?_vP$y-uvpqO1IHSF@0C%MQ z^Tn31>bjhZv5ILQpNp+r!C@WRncUXETX)q*)6!QPXZ}Y|BY#HC>d8&NZ)R*-m$uKy zM#{i~%E9LTUNQ?yXI%X~_o$G=&yw!o#H*`DaOJ6kxVw@UIP3}=aRy4~tj-iH&R)(m zsErkiZ|l`01I15L&)=9PTBM4jIyY8oDE_W_C3B8jX(OhnuG9PN4YX?lB_Iq}R6o7L ztks1hx+!{<^l~umk7CyeFb6>FlLnN=Y>cEnx!G97gIgGJzj{sGU}LLGo^~I1!9Dr2 zZ)WQlg}_!m(C$+}j z%=BZ^K97>&sbkZrW7DZ))2U5k^;a;Xp4sH=9{bGPRvv)6&o z>>WP|p0;}(mvGL9ZCATpDT}IokFN3@mKb$`R5hDzA5T4cqfmR~h}?|pnL)z$Lf@20 z-;jHLZSI=nhN_k~O-mKC<`JV3S|yeeW5`wh=-!;p`WVl^PQqX>8f|z%y)nmWe>H}c zQ&3vRM@Izf99GDxYMPU<^ZW@LE(8W)!}u7M+(`6&6&n@M<2l$7)RWG1YUl)gd>fhAq8q9< zY^2FFhlx#^IGsMerEJ1J;hw7W+niz*_BmyAnWlsiVPj~2M}7%SCh2L$&>ZbuG$k0D z>M-4Tp>9f-NnhtDF|kf=_ylxVJxyrHTH~$nuAN%blja8sq>DAY-IZ=nHps)TZS0IZ zY7jyYzs12qfKK=j>FU1$)bD&?A6>lbK>f@C^q~d-vt~WGa)l<|3DDqFFr?{Y0kH9m z#C`i{;t7I=Otc2w#tPBU=8EtubRB}m&tals>1?MuUApT@28R_ju3SLiNFYV&S!(Ll z*BoY)p(_fQ0l(H5uhuTVw^3)->J#)(VnH`3davS7iin8B=v6##4l>d1H^9RQ!TBqv zSz4eaQVdqdp48!&C39%p0J#MY3wPQdfM z-Vppqx19-)TD?2nqIR;;&{Jpk1vCNd7DWG7Fe*#2d*HcVYg-3j5QGb&-bihbR6(Jl zUUNiI`;rxKPYxdlfxG-s67^EvLp2Ifeqmu@F?ziIgLx>+R`sG^@J-t0$+ZE~hE2 zX<_t#1>-%UR4d?DtJj%;sm5~LsKsB?6sgyXF$pnxg~mjAwGNgM+zH}0W@rz5+G9d} zcSY5N8fZn{9b$#^Mu!lRx(|g|Sys-b`xeUcRlkY$N?61RW9~|2C@w0s`Li8Wy}}(6 z5*0~sH|XQ_3uAwCLx>p_ZJ~C|mC@D#F zB@t1nHifL~AAiy*rTux6kb4zrQ-~Ejkhq4#N1*Hsf!BCY?`8I4dTt+xA;oj!FDiE~+y`me@axmTuNx4st%5571nG%V~Q*cPOsa$`HE$9q#xPcN6nIh3E( zBT+{1Ye;J3v+k*~$6nj11@xpGX%FbJ8p;&8LC(1-A46_CIG|1X@S(DZ^s1&t0keOp zXB36c*6LIN&G*O+d#=FKHJ^+mYQtu}FXg9YG?UOVa)cGF;yxe64{6ia4Qa4$=(x+# z8;ih-QsvW2UpZO8%E^>0OK%(ijehp4Mzl?a7^ecnS2%ket+9hg0eYZb?L}LM3w3mu z?0h=(>5Uzrk;c?Wj~(nFT(G$6(PPI)&}ik;h@!3PYJ$d)ShVH^TI1DgtCPAWL3#S%5?DpFZ!mY=f^{_%YK2Y2)tC9H2G zAq0_+~L20v7XjBM^e6&@a%xuG${#fa;%BB zP5no(Zd6ItyLVCt6{4yz!0U=gJUl!m-p(No75fxRK2uSb4$HgF;Ew7voUgN9+A>^hS~2fT{lRfq4vhhsQLS z-97T9I&`g>l|C;m!MyC~*g)U>uK-i=zk$K7OAYk6YJt(xKKGiV(|fQK$q8bDsWxhv zdfGiwCRCTG5sMJi(Vo2_QPl&VH#LW zbYbc+yL5>NJ*3P4d&2;8RaIInD`&3mo&`(bEpl_(R8;?!_j+i<6du zga^bVtg#LgCsP*PE^B~Yh#%k46YoDj+QBOP6PRG*46K`)&~IwHu}$2HiivAUHCntk+u4HsAd2w!RBSU!!CfX>twua=cN7AeseyjkKFeCm7 zILFFlg(xbi47j)}6{UR{?X8_QxQOo2)G#w|g1uB(V82MjH` z%)_J-k8q`3UGCPRsSH=t`!7;;gw87IoI)Y+l1Mfv$JKbYHM2?DI8~mw<0uFrmoQ^u1_nneTZ_o{q z;(hK%S~aZQ=d6(tv`c#>N-O=SR;AT3YzeNPtY_+z3$ppmRgqNV4Ke_e{7&zeO^!U^t_{ZPeVP@OKZ~*9B`EwvVfJ#oLm8Ru$MhX4HZdT(`Y1p zH62f3so`xVJs`+S?ZlibAb^BFb_k6hVUO;Nf(DVL1-lc>k2H%E17sTM5Ww=4j$y8# z?XZu53DS4CU5Pf2&?3grFqP{N2AM}qx4@n{?^z0MBK2A7Fg1w?ZU$tV*K^Q3`~JFYW9>!a<=K z5F$Rp-H9eRl1#Mrr)VLr)3*f(-r7(Zfvon&KoZnPU@$@)Q!OL5-=tspjL1TdeJ&WT8{=ycv zZ!bNbf<|04O&fv=;B;8nBK$mkih+a0o5yJi)QOG;@$``WT6#Q<1M!qQ_a`vXi6@-2 zIAj%8n=Qqs?56TA@hm}@zw3hvVQ@%;=~Ft|bDGqKYV<&&E(BiX%7t~;%3*Qdar<^<7ZuqYFN(7k&0uD`yLVK~sxQsF1@rau z=_Gp}r5V~7>{1ny)MV*)1IOn2Z1r?QuL9Gf`u!RDmUR=@vd##hZ&}&Ej5=Q`rP||FYpHv%n$#hbWeH}vs|nm`&<2yK zgE(BXt^kUBsJOS3AEzi`ZFL#ezYHI|V6|h%dZMpe>&G>u!Sq3p3oP<781j+bmF||> zhr6E6WJl?C{?DI)tjFagVM}j$)XlCj_6KK*xW-7&8)Sz>5H-~uwIu3G8hD5t4O z)eA_ztKvYZ55_f-yK&Tcxj3R_;|&li`U$&g>zK0ZEGLi$~zLfad}AH+gg@&UXOqmfjseY8lGDH(hYH$#v5L(Be9KE=>89l(|vjy@mA;S zN}nX2AjQz01uqX2ID3Mm;62>etbkHgoeqL_Q6oVen*ZNjyf%njEz8CzbdgZx{u>xg z*P_!r%p3v_Q>qgKVQ0sV@IV2}bK7uKbrJHBZWNW=DiZZV<#BTI;hK06N^dJhEw$<0 zNvtnQ<4{ffY;Wo&|973Tjrb@WaS-P=-2BjR{`I^y)poUk66*@0u3TA1#N}6A(3Z{_ zVgJ>ScYk=O@V`H(#>U-n5%)aI+{{ytTKvL9D=s?2vgRF%x3`(F>j6PeYNwT!@X$T5 z2c+sO`L9o!TVT?>0a3*<{lvb-xiBt6Lu<(~sbe0`HL&lQ)0q^~v|rITD2`yms;)kt zzI6f56aFh0n8kZ#n|nWZbOw0caLikYi&Y@VPW#)p5?KKiEB&oR%xp#9skaiR-b$Q$ zD{<wcvBQOPcsa8~`~(960bK6@0OE|8S_)cy3i%m$C$LRs(h zPk$7+DOdD(o~GP;{T*=;Vh00S6z&)=Qo9)XIyy^j7uOE^19xo#uw-vaLQF8Zt$f|uQ)TY>3FfRPk{C_bNd|I!}WDc2wQ2T zXy{aY1~eWTy;FzD*l8hlJh#_ChVB`nC7w>pvS<# z(jK$YmN|xC(t<#S*Jjqxc&M>*G;~Kj^a~ZeLIg4laq~`qPAL~C1p5Q!ZaZT%LAOnU z+nPDIE7qQr*G~BOAheakh`i3AV26x4!K-&i;^&7W>^kDlq{o}%+;n58u5B)DxAN7> z%YZ$nNT)RL%QT>&F0zPz#49MexjMY-g%np~p!_-Eq-C?x!zn2>=~?~))V56F*pIgGjo9cM$easqQb<)Hbu;c@l)CuyEgv|+BoFs z=0kt8jEPx!T2jLrvt!Cy@5Kjw?ep^TP#)JwM)Blf_3-H!m5%aqCHN%|wPeAe8dIah z2FjsNzOm_~S7AHg)Td8{DI0hhXa<$yLxY- zcd1^Wb}Ls6zdn<9EsT29_S5}^1nBZDqS%*!PpfRR1&grTbK|!%UnUK$lE5kqC2Y2k z9S?2Ypu_a2U}lTP_#K9Is1LJsXuyF9&}-m%_s6n7X8VuddAtMvnc>|g=b-V>`>J57 zt}wq-J7Jfx9gJ`Lf`>xm_CHuR@WgzZEsvYT_=QcyK!-`iAZzJ(=%WH4OzXkxXIC?3 z0$r+oV0`=HlGcugegx0lt*k14R7=)u`+7F zby=Yp-$BwGOnX!>)8!(>c17z{Dw)m(jxTz84HFT(tLP+y; zSHm#Zz>BqB;kX+Gq&mf+S2*xrFUNYNH7jrhPV*yc$GMp(*k-Gc6`}Fov=%&NIP=KH zmi{LH=mf#mfX(;RZKsp~{S%(BjaRBCriN_A*%(_JzfnN203&w=2VUshOU{f>8zkFN zdlEWNHFTCG$cMv2wZVG5#Wi5LDH2jD8?sh|%Zf|&deu+jF%4~1O(b;*%!+WhF+OEs zI2@piULKA)(pq0c?xVsjxlyMh;agTiF?Q6ZMqKATtJA}T!+DE}$RE1;I-{C<-}a(e zrn1DT6dVbPzw!CT!iQ@uOr;X`Wy&6?vQO%M9E`p%W7B>LyeH}19>M1x8X79L>9+Xe z)KrPtj>T^{Vn})TblGqm=|b>Y@Gfe)b~soq^dvoO`p8Dwq`hh|_$>=XWC6_3t0FRw zQj&ByrpV8?h^%TmxVD!znMNlN2{)L4n!OUvqjm)rk&Ezfn^F3L7C4uXOC4!Ur6gL3 zux;Dsp>Y-E1>Q^Lg}I^e`yC;$gONR0HjDPw17lsa_5kZpS3LOD0An{^qN~6LOQyLoaPDq z-;6-9qay$5hZLbivQxu!UoDRzDJtvMio9>cM|$t7DZIYANa#HVeviW37`j)ZUgfdJ z^#lt?WMG5Up?bV-uew)F@C_1Sq%7)e15VA0T8!$ySk&u8exT?m5WngO3DD4sN~|)zmi%&Ow0*0-L2#_0?d#f}Cz=Tsvn>D4U&O@K@r)r;|1976{Ok5keZ`lakx*ss8@>6)niBfn1B(=4~~M1 z-act0JW~zF933Jzw&N&h6Q7eOr`M2!PxRJyr%yf0n0l5$+d=%s4~hyN1aH&ab@V9d z*#UyXi-h+Vo~+FV>rH7=vCC1gck?{{QGdDH@bJ=(K8y6dUA?h`FiE+sX?vg8d?yde zc?4Vq-@^~GZd9wkd+%X@;d5}bmQP5qHBy6DOAQ;V!A(UmMPvtaslbM)&WN$wvNo82l#LcsZ;8*WR^;HF0h25bi|` z78R=8thL&z4b>LBL9nJV&dbRw#lb zf`}DEM5}hIqyW*1 zZVmOVb`h7x57w&w`C40k92t;s7zWj|?vcMATuAO8NqhR|Q-h>nq80_%0kcyEoi~4h|-wlEF9A-Gv&y@eTc=pgA!Od!k8|I?7}^fjV$ExL;Y!8U3G_Wbyt)ORc6RJ z7`NXbjH~TB-GMyr?`bq_*J^64J)}pIakqYH%A`fALsX1rQZFh-8~QO?>zZa4`n#+Vd$O35hoJMv~t)~f4{4ojkR4X&cOxGDvH85gGQ4(bB;f5 zT^pyVLQfDz6RyOAl*uU=zc!BH;lG5iD_9|hI1+%b+gtb(}bVUtX;~(lg z!lE?$Rk}>)6fBgjyZX#of*3B8rL4#7_bbn6gs%gajV3J3TVJ0k!GqOL3IY=BmQ3w7 zZ3|+Kwj${e(m77K?m!OdP61Jvy7>)eNlD}FgyVlf8tJkRzCH|KUF(Sqjy9S%zy#2` zhK=5kgg9ZIvq%;Si)iV+h&JRulmgT%};FyNDjmiPYjMYvqrpi(C zx@s0c>7KWzncIUG!4W{-T*;3oJ@0dO+$q}2CCBEPZFlgZ8thj^zhS|i8xHKbv`fRt zFK~g4f%drhm?{s=zvy;Ys?9pG*4!Sv5R?GPvXZ8L`vah&d0w#9-JhoHeq$G=k?euY zsmykt1ufMR#x;EH2jmy{K!LdfGuTv6YF;wFgsk-TN%iKo>0%XpLOdnfe^s;*-3}*W zZ+^M8RG1=bfF;-EqT)_sa@(Iuzg9XV7>V4sfwRrXC)+#=+tm4XA|8&MClf2~3)&J8*_@+sqt% zV_D_LIY^sGz{NC7OvlCU3vmS(>+b>B{hW*!&d6%eIP?4Lo?ED{9sKUrmmJ8dn+2-- zv!9P?w=1)%vOsmmWQCa9Ce{5FRQH;d#XNTk@=$mAQ+AP6_h(SuPG?I-wKJ%$-5OJs zrrFqhfYP^+7i_9{HLEHYRF~zGZf=_{*25Y><(Hq@e!WuL z_;N&e9`+*_lZ$f;b?foz(cuduh`QD-6cxTc&kI4Bk5p&5Sdhk;0Q}HgEQZBS#)wR8 z0!A2El`7S#22QZ+2yMrkLhxxh_~Gf^nQ|x2Z!q?bMPElw2xx)51E-~|y6;yuA9a&zlUR6p2azyUT|(T&oY@l-v7>G&tOP8oj_oFf zTx=qX6ThOZT4mFT;2}6(v4K6HlfIvVdkqJ=5YLIBik2Drq(YS%g`7{8RN!dg0?WaN zo{S(nahF@*Lwf^(K}(u5CP8}rh^v!@Yu*X2ImP~Ci{2ODF1N0>vIth7OyrhQWJB&f z1%)+B!lsz#1=GcIm`HS<$1Qq~z`$<*U~4fyRl@uvw05=V-3kK>xJV{X_+-I1JdcAl z8fgqmps;4r#L*-?m~PVx-(VQN$fEZ)4D7`Xx`h~l97qZG-yz(Fso^fb#$6;>ENz{J zCN$M9&CY+h|J(7==$NL&&p4_&H;v8tLtDG+<_K@*U8sLtv1^^&BM>V;(Nyu-W@E$H ztEbQ8Y+DsyQX7lCRP!9If7yf9M%zBkKag2egkXO|+npR3s#t#nHY}u~1S$X%4B6OL zRPOu%#H+{0#lE`dO3?lvY45OKIps#)L-FT}wx6AhJq{uAE~Aj0f8D+(icKsCs;m2B zvFg?Fe5kBxh=t{dtepX9l|FlA@PN_#2`=k%@?lSggylC#C&>W@p9+C!zIw_Y@wTwC4v8#1ln4UjT~p=P`R+}hl%;|jaM3+cnSBH1-7qS6O+H?yz<^x!ry*kZd!2f zqBmZhaV{^rG;Z&;NnOpE$yi9!EaoO-!_mAgOYeN^$asB>Q2%rpn(0;0kHq)c`m?R* z0ajAlt(LD$TZNhRKL)1xnH%Ps+k+QA6CqTgZlxsfACo{w=>*3QeS-uWe;hw`>eQga zcf5o2f@nqh`>m?8lM8i)Y4}4wg|ln-@D678BB%o3ICf-u3El1DxhjK7-L5W6ov0PZ zR%x%>CRs;SQ0r5xWw*>JH8|ZzU~lu`)Zxqv?S&C-3#oMjG({?r0{Owv2eBQ=w2D3&ZTxj&FMu~UIAj3y>K-KtGws*@ zCYat0;k_MVJ;q(6PBV<8A;rx&i^*b!y^eB(}@Jm3rBhJ{E zm+jR#Ece@oKg~-!O;|$+subcF7gIc`AfV2sz4r0n_#=JVqrRdVnPI!(agFtSV_bLh zh#(9z>I-%D!#(!Ny#uy>lp`FY&;Ob?S%r+gRBPdltD82F>;u-YkiX3Ty$(zB71E*JL1 z@Y3bQd-cZYl@RSvsUa%sW;1jXn(3b7Oo>_%!?9I24^d$4#oO(}rYMtTJ2x|k_~x*U zKNRjxOOahJFm7Vu*52A+7Ba(dRYhY=fKyfc4?+5Rph@T@CQiSAzqBd~WX@VUD$fbg z5tTw7s@Zu+As>SLqQLRJ){*(0Pl;_%cqwRZ+8n$+lRc+Tw~T>T`HFgEhPYG|nSKJ% zs$`I8hQl7b#lnGC=LTb-RQvczC)o*=Qg#gwwqB%Y2o%GEK4cjlg4%;Fz+AaA^0)Q! z2UY2s{*cAY&I=Wa{lmYnarT=JN#0oB9OOFN-$jfo@K$dz-u9#;6y+s0RdF#6qCi4X zNsD?JQH%4>0`ck-`9JFe%^3{6UnSSvxKG;T9RE~3aqLzcJI zamF6lV4~yn=my0BFT?5LO|V#2WkMB`w14kcg}Ug5{0uoy+k2CXwbX~fq+=|C!rV?H zbIJ;jAbf)sz@^z94dHdnz4i;0>?Fe`!=dq^USEcltgSx=QJJhJtx!jtf+;WX-|}IO z@G5@vCGDIH$QJJ^v&>MiqbH*7_NV*lB|k>+FaFQB884DQlG*+`Z#gHDoBCeNRCllI zX(c6}pLjIp%=oeq6GpQ%MXeiqZWQO9{7b_u^!x{3eEpdTI(BjKrP=&HI$eLfU z)*W^0yCs3&-dnTJC%7%5t)jiXxidZD-rTzt!eU0)wosm;N}THXQL?U}PcuM)3GV@S$NnLjpkpx5f}zx=(O`)F;m_{AYtIzCnq z`l6t3ZGdnLl9;$$%+3pYV9>~V5S*=cgyuEl)a>t%^bIJA3)`DpcC&^1*LvC-`}D6Hx2U?C zA|I~(Lzh$)w{uL;&M}K!7w|;Bd{aA^y;8-B@ H=|TShe3i*U literal 59840 zcmeHw4SZ9_mG1~J*nmR}*w`3baVQ~9La0MY+X=1Y786q_#*49Eh1kO02#oI7`< zE9pv>KZx5`Y|y=T?#!H-bIzPIXXdZ*jDr8GA>`}rGYT~02_a9DfeN1Q6o2_SypmVm zQr;TUsq9pKrQAK@^RC{{&`f!ZkOBX_kSMfjJsIdVYqgv@!Dw*lU3nU{$aUQx|wTIB$-XXg%%@cb?ns^?E!Sjh5(bX1mJc^|;+0 zlR=|#60KHK&|!7CO!+F)bd{MS!?jwkMys{EoLa5f&XJ)7+76AzZ8by6Tr$*}Z7fh( z&G|Wb8a+ucsnl*VJx}G-7Ls8eyEYbdZPIRfoOYW* z+D)rUl_%+@Q>&UjJG;L1WO`Fwj&a<2Bb{ljvpXjv)gUV{NS@mjdL4LlI6cpqZ zn2g$d75t_O-OSC^V?y#{akA{?;_{iudAw9@2Ov{2xgFcfz%0Am2&g z+6XOZA^$Mq1{qRvgG}?@Q1G5x3jS=Tg7@(XzGWKWTa@ts9x|;F8`H1!XUs%f7Qe~_ zTv`PTFqaTw)4_ij`!;?N8E7LOp7X}@HbShtji0WEcN`h1BE&#=5ATKF4&DoI3ku0t zNVQpsf%oJSDCWU8!ut;1Tu8>*h}}xlJ-kf|mQHxz0iPb;%8^l7P}b;$f&}Dgg}T&W zDEYx2-p#u-9*&I5W~E&`(VEOwXpx6^!LOUwn&*44mjIV|Gcun?J8Xs* zL%cks0+D%Sh?x+h)oivxDrR>H4I|dM=0TWhF7jt~bA&SwwwkS&KA()RiMfHNkZ3j= z1PR93pm|ovIRKKt;u{x`ktk#MwLvZrl$GQ=@*uO3g917-I3H3R9{XZ45WK0TkPLR{ ziJ7?V3kflCWLQ23ObZ;bJBfJ#843zz^78S}CBBfvje5q?b(wc7~VZHlDbMmw;@l_Rg+ zPKOC(nJcf|4%F^kC@ZhsPSoxk1Idxs?%aTOJLR<7=^;+gZkW&nYd2(e5~qxIJ1{q7 z4$^Mtcck6U5bbt?b~}Q#+X>nY$=%X!P`v)pZj)fUO&(*1oOYW$@J6uRCVU^R-9};r zNl@Dzrrky??J|nC+vEw-Zj;yOF*=Q+?KXN%ZmD)dK`#^)ZMVr~!eJq5ccCc-YKDTs zU~rkd@KVt20@Q7&NeeG+SO#Ah-9*rBHR`qrEVmIXHw+?|$!;M zftuB1278CPtu~MX)a@cN)I$guZb%mlx0LbZCJ34Azbii0T?{vH$YN1Q;06r%3}pWaRhPM#zkUe;-fCfTx8-rSLh;|2gM2RDdy< z@YzY`tby2T4pt<7;w|4Id}2HYQQaKLr&4k+O_$um`VjsoC7&aNdol+vl24!x3EKmo zjSy5q3MZyuvF$_wp<)XJTA#xwQR1h9zX_ky;1i-n{u|-*#+**LhiDT&rwN}5_Bn#T z1pyL%{)70bfHL&wE`KOzWcV}V-!al1^_OZg2x3@0Zy|Adtu|k+ttJEYyfuG0EOtR? zp|HWcU|_zD*BeQi*QGT(As4L9Y1OKHwO$4PjBb-bTS^ka4Qn98^>%n6RD>D+5GzD? zE>OcYjCAsLeo;R?h^THb?kFz{ub`W0IG1%kMt5rFsxmX)VCcsJ($usaB9uAmovF{;!WXp0x? z@8AnN3cUji4w%k7lC8Ew?FPFS8=xgTFf!kk5ADg(VExz(h;$+Fc4@61SV1smbL1X) z0SthDE{N=NwVZjh6+%g;nBoTJL0txjVFo*mBv<40avch92j{uhC^*}ng`ZLyJ3Bm15U$7N$jeu8u6VcI3=6fulR_`&9*iNd z*Q1$>HS;bL4|9BIi^D)vR^ICti9UC$^cid3uM?5W=|zLHG^pEcxSk zP&yz7T}L+9K{iRZG~|F|C|ND%?`D-gL92>x?EP1Ha}mbEy&fH9V8c&HV;C0SWhtq8z#v=!hk7VAuN(WQ*OPl`X?%@$R0xP+l7UptbMLa;e<7VRFxIG7EUKZoQSU8KMPtH5R;3QH9EL$XQs^a8a;UqX^V7O2T8D|}MIXj$?} zzQK{74HOJ{Fs`gFSRBcQL@QL}cG`({2^s1z>$R#}uuyjQTrzyRJ}(cXQs8mf379g4 zT?=MMV}~~dcGSFl;&wW)oWck-a$sSGY3&5w*d0!&7sRJuNbYxo_0xm7(@uvVKns>I z*F-@22D3v`paLsFrt23Fg%g&D;!QBF^zks-IQ||2hCz!>c58^k>0ShSKuk{20)j~~ z;R0SU8IljdRROebK8c65BqxkeCqK6%4n{jL5ZbF(7v>Mh&eL!O12h_aF&U*LW``GO z;20PF5fy0KAQuXVBZKTJ;?~S3qnxlXgw#Zu+IW(0o=4(Qr8I6R0yTM@MD6Ub>s`1J z;&c|o=c+M_%a~7c)%jXjG`ct6gdKwBy3D3LqBVdTDxiD9>eAb=_mexH44SS5A-xSt zP;hZAAaQmRXryXx{$N$U#%Ol9-X?`E;#~ye4cDX!%>zLjoJ)w*326$b6H+_FoRFh{ zIiUg#Iw9aWIw6%>Ww3)Vm=kii(Fr;2Fi3}39Zsv=8RmovoF13c>!$x8a)+!kPH3p; zgsg6_SLY_Kx$Za@(CoqqIo)1p0SFB?m7KONosiq%b;Gudqr(HMi6(SHc7w4?9|Vms+1w^O ztkA{egX~81L3yUGeGum*cFsB&a;xn6=`naAqtyXA45KPHwM#GLbU3U=^g^jQU3wv> z(_uqPQvjAgKfOyY<0b|d&3F&J_f!3jn2LnenqpKsUai@}gq?~U$Wde&V216#B-QfszL%<88!(*~JO~ybd zWOR5L$0aEALJ7BX9bIv_2qHmgacH>m-J0dA;3OY(58MuQ=f z27)1z0fQl=4Q|+KH^R=Q$_$fEbVFJ-yi(^-HUSkAmscHCDTF4$Ob_` z1Hdj2kE?TK+|N)U2%;1UNrFra1cM=}_fe_-M!ZiVi-Gd8<01BiI5?vB!5GMt7cb2A z5<^2EVQ?fu>@XwkY`CtXu**8lG;Nm79T_MhdqXt3d<0h z5LzItgCPaN^Fs>DBfeyh^eR(Ak^$dJ9^qCdza*37RxBoyKcvEt$Djhi?}Vq2_5?Rb zE`LaYF6)O3!PQ7g1izq9VfiIZijY4dfk^pexXU$!LPI@{Q|`w68o zGbK5BvV&`cq_aO(DxcWh*yt)NE!98DDIuv*30usKJl|GZU0s^Y5t*dzmblK2_V(5@ zrHu(^THD(@IxUu4XLXHc_RUrWB4q#*Q6zb>=Ch%7iKAy1E@57R%Wm z>y(M(1`;x+qONZH)wZ@{nL@_)x{VuGrIeC{lvNuy*0ozKjml#70QhKSjG4At5^38S z8&BG|Yv_@TOc=$DaZQ(+o3Gr~ zS<*VM`F!3pjg4P^0^HBZ$oOHyrAwD@b#~sq#`y|cINyY8w>vxAQ8bTbW@boObNqv< zs!gpte`)5k&(6FAbyJ2EE90_XnmKd!6`f_mwaR77iXT-ffAnR0yRV_X{$R)L+qZxo zR(adk(&ED_(BaxMuDK2!s$U!6T=omEyz=H1p1*ww*#osxwiJ`NVZV6pxtYy6%T(X8 z`SV{-qAEzUAs3-mV4~dh;#O1}0G$>Q^%^0jVpqXU=>nTc=b^G3)A*-+MSEW&CTiXD>Y5*m&AmUvGc;x#ymls8de( z;m%X1PJh+d*z`5fxhau=l+JCgv+xGjnRLtN^2e(x zO~&%K=grgoVdl&?k6*m_b&CukK|+*qiMK&znp@l2zFt#WT7C_PZA?U|j9I&N>y}Ma z%YPCo4JH*FNHufbc;k=%`rLD`xPX{fZpiq1#V4|YD6QJI@0!?}Cl^0BX3WEtTef^y zCXS_X85vV-)SBSf`5M#}bsMi}XqV~c%+W&UUbffQ?>l(t(9ve@D(6k`p^+7al+d@^ zpn*3NzrnHh&CQ!F)`|-2HSTtih0D!-%D8rI<%Uh0${wO4YW|M;dfODyG{OLC0#}Fw z7q93TvX|A=ta%AW+XOCy%S?FqkA;PcPksG$b31pV5JwfCf%3Wx^lvtvI@S2i?c3kL zwPC^R*@jb?uD5UxX8)*)$&QY$)u%6Btj`Ge2j*KhT?=`;V)ts?0DDibnxTYX0ig=Eh5x8h#kU zRQI>vx`C;-WiZ)wAX7VT-o$GI zbW(r#tFO-9gifBH)$mV0`q9+%l$6l}2uc6!^ywzxeaFFI)o~v?dh{3!LY$F|cy-R4 zxyI$omn||F7Oz;fYW{uq+%tYPPBOsM$;gnA#cT8YH{O_CSyQvQt=JNGe)@wCj*ruk z>`0^V+oKH)N593{3Q(Q##v5;~)|Ka0e1KyY`d*47jX6ImJ|;%#)e9uwT3ueguC-rC z=3ab$`t%>c`r5#;0XYiZ3M?AFEe=l6oR(rN>uM9;=(-vF8?+rItwYE4<$ z0?;?qrDYRGkIs7at+!qs4>P%HyM5MB&bW@BgLS=}=@d6Y0>D%9N$IuIo3V#goXrnPoDyF4rJ-KXmG!!W7E&#)*ClkcG>Npec9Of)oGgV$|{3l zm9NrGI+uwLgDox9_?x68pBZ^IM5wK;o^= z-MeeQ&!uz9#2VB9(TyJf?4pR|!MPB33!QsjTi$Rb5$noPx>~(dUir#wb?S_D{ zZ4Bix2-XKY-XQe#6y@*^XndK#^_^aCkGITDeQlH~WG`x`Pc9(Qit}W`}gliXyE)1+nlWBS+qg zjx>bFvyg7m>+|O?^#t_EvvmIaW!~GjeW6nQN}@j!;(`=A0%Mj*^%U5HhyQc->_31B zRfedPKp5@oe1Ir3fuc{u=U4^H1jz)>p0QIH<)AGO9k=~U7+Gy}U%KQue)Q;Z&!tOl zBe4E#OG^{j;{TkOo<13uPeSDja%=^2_|>(xHt+u3yZ3wB+ODA}B(@mkJKjJ&rj*s0 z$MkKSC4p&|`%m2O3JbX3z4#|U@ts{=Qo?18961p^suu=rhGti*g|EK)Z}-y~i{G`0 z!$vC0E3l0A@s+kVcD=gmlTYeal$OrDZ^VeKg=J;co^bxsz9zA?zFb)Np(>@jH1)v4 z_uiWY?iHtK%$KuikyMsanpZy7)n;M%d*5$n%=mNDwQHX0aAiWGdODLrp|VknSB!Sp ztcl5l$uv}!(&w5Dfti+cUOjQ-$O%i4 z$#GP&oU$;Z5Eh>lkMHIhxu&FDFmcA=jegYiczXKdE?9tTOJn%q8W0u`>C`rz{rqOmuym#*PE-vXHd(t7&Di3Srcx6_b##2;qQE?iPt zy0p@4uCnN>jg}`&Z_1_}J6oh#lpL5=-1wVVxfMOxbJby9z@4cQZ+t zfJyxIz;UoJjBIOfS$H+>!p7?Ar4Q;Dw~DJ3HJi9vqa|DDLx@Ch(FA9aQs0pNN%4s| z1q|5YM}h4%f)Sq_D)tlOdA9x z!J)-^E|kAoTZz4`jHE-clp43Isp;Ie61~2e7Akif+wCn^uU^<#f;}z4o>p3NP|hi9 zw`}?3Y+&Tc$r+2|oMBT96yJ2Y1Up)3nIsg40DDUlbsN&&G1ozdgT->SwiG+MrKhFN zOrhIB<-6+ZYt!hi6;5*mm4u)kW0d1yFftC(UdEZ1p~ZkbmNPBau3d)>uSwUd#ElJD zxg0C*XW=+NO~ z($XgWdH(#;qp(tUtJ0FqHrQ}o7FYfTjHdf<}g5H3QshGgU!#Xc5xTeip)b+ z{*Bxo&YAGV`s(Us;H-aqc7r93Mm^v`shX5nCZL`mAF%(7FKHY0?5T%&$f=#UFoAsO zUD4|hh=0=7tM=3mApC1pX|krxk|Hf;C^W;8)9 z=)8XITFV(-W75GlX3Y3a7TrRf1nRU5R)&O*-~f4l&g-wMvnU(%52mF(25byev&|BR z5#Wpw;O1y(C>Bkv-oCxAgzgwJKH!|GPl^KjI$N(__d(<1u<^ehqZ>AL%&+MTjWWVw zIWrk&X4Td2m6ntgPE1RCP)~XB@CQ40?hxY=K@zPS-g~d~`#NPDvUAMObic^{*%&(e zqRar3xEMmc@1>?b0-@fPO&d0tz+RwQ=pW|Baj9|1IIlsOUVm@JilR~Qy|Q7y&^@QX zExats6pMw$$HX%-8 z@wo?e$}F72YOh!VU0H#b%+U%u9*Ys}g8(1;O}nk*JnDO`C*{hRsmo;|yF?cDjn z!=Qg4hjlx4?pzPrKX4ol9;ljf3+%^eLwWi87wC+&>4Et82b$Qzk&cfO{7R$FlEFq6 zS{NKnIMYLJ?u50Ho#OIqF=xg5?{B_HHw@1{`M?8Dp6%>x zg*CPhn_FAkVEdT0Hyfjn?>$MaYOUCJxF=!HL>|aSY?8+n$@3x;l{2B=mfYlZd@8l4cY#O1GIWnE^4P% zQ~!@#UIzdIwzL*{WlMIHKrxLllF^pEaT6vw~6bf58Uxol)z$G#O zFCd?7t(~1Xo6kJf*4Eysv&12vGgFGG!T&!W?%cUyQflf$%b@pg0K~qEbNn@ zWuD-QkjIn&pf7-00)`?eq;2g`GjiBfR$Q8l=70FuapNAvS|3VHowNa{{D4!guuS#W zEb1@gVkmc6WQJm?g)J*ZTP@6+(S0VO5+hr2%&CKeF=%T0w&L1kTxr00hoD!$*&N`(2M=?}D=dj@c;qxuxpA#og0_OB0u1)~ zj!l~|A#0GN-p=;owq)E>#|a1y2Z66SXpFd0-~u%eXj=nXE63l%6XN5CC|Jd%mN*Q1 zk+lhwrTB)cz5^8|pmkg_8kEt6Tuj8_da{=4=xqerv?g7sB?QC7AD^D~)2hdH;uE5Fw`@`6$z-631siA4oh!M&+ z(Y%3*12@Kls=JR+XL5A8&XD+~a>R&?S8;JeYy)KxgskW~Fj_TPlCEfBo}#2?7@gZ7 zSQIG)Pp8OC){Rb7!ZO&at1BuhEn*dvClIDCGgnt*glb}wmDO~zGP^>Dp~`A;FxIw# z|Ddy($Qcq42KDDjXmXY(C*BVLAZ&8YCNvpP5e^jyxz<<`Zu^lv%S#iNmeY1^x{O8( z@}cTOY-K^xYp@Z=WbQUvT6_}xV1)b2K8hcFEG;dS;Rk&Je(*8a?EPT5h#&L`<`uVa zcf$-;zz>EeZTE%Z2Yo(2eh{azJ2$RhzZ|fKkdaQx{rEwj&yOEWDcii+whK3=gp3qQ z=Eo2Ee181k<~T-0_wmP7Qvg5c zOJXs^6MLGPzT8?{`;ij>gwBs@Yd0Xy1p*1g9U_3RYy(Xz{|q9T7k>H60t68Hf&hf) z4gj#I832UMfU?`O86!e5NWvar0$xA867(!nH z!w^ob<@OZTa|fm#_R#u{TyAN(e1y{R?AxcVUIMLL?|iPNau)51%=A?n_v(S!oo|g+3W{ z;jcp_#Wr%Hp$nywWRhc79DnYL6)RR%p|b?eh9es9Jk7qs8fIMMt4^cD?OK z9r}8MI-D9n9R?3YW=QwDjvsF*U$LURAqaZdPegl*Kb#uCA3}GJ2Bg{0bnaYJ!~Xrw z0}TydRF#)kA&+%_5TcJe|I5AvA>Q&ZiDn#aIB=lhsLRzLQbp>k-|}M+eSL^QM8}Bo zbnT~CCRe-~-}GY;`-5a(V-PPK1X%)Ck2-^8DsZ>(%{L1v+|t+A7(|4E3p7I{iu$w% z&Rkgbt^f!0y@v69B;(6KrEG1Ft&U?b6$yhVCsQ1=DBG25`i*F@?~lUvbsu98PadFR z-TPiy+1fh0{UbwBQHg^N-LewEAkO#A!u6ZJh9I_scyXXsZr!%cGC4hc?C4RWCM>4r zV(TLU2GMuNFo-D1vTY&;aa0kt$sz`^U#a#n2C*G5)q-HRY}@wU7+A={RfhLI{rvNF zu$Tq7Jla=fA7c=YTBumJti?rapgQ)WhK5g{fBNZZ2~w)CWW<(=*ppuVd!)F6L77%%T zi9tj|QE%V24W(-M-l$Rc!NLk+5EG_7{q(aR22`rgp@3+Qzu2*TI~8mIgE)B7lqpYt z?#B-M`j>EDVGw;M!R^(5@x`7`sVzqN-uEZH{*Qp~ld@XCAo}_agJ}C=|NecS?bz`N zU=UY4K*jr~|21ve6GLDRN1|H-29eUmMc-aw5ZCXfl9gf*_0#Bx#hrXMdIelw|IlPW zwO(NmFWc6y->`G{ZpWtq3}WUiyLzV2Hk6!Vn+EMJt3MCNUV|JwpZ$PJ9A&3H}n%;Dm(K z^mIQA5tpQU4ny?$1Q;SpY|>yU4DpUt8w5lA7J|Dyh|a|ArPyGIJ|BZ2ram-j(t~jT z90`FT`V>Jh#0!TH9QX*f`eTD3CZ2Bf`4|kbFqIq3k;E_*qECQ|VN8N?B0{91pb&jB zD8$}ZAm9ea?SWAI5ba*(5rAI7_l_7G4d)U64O@sJ4AJL{21E1-)unxO;J_h>?olFR zw;Vip=*s{M5oZSvF(5Y^vR$QDcMk7;=&acO8bz8$5@$AK{yPNRuHTXbcqPNDDApX z0mC8ov{(+#I1z~GmWW=yxhVAzBqCKkL?YVVOw`D&v~X^rkVAlozAzx7w0psl_4ybO zv8Sa%frz;MwHKBPu&DyAFDQy9A`sCR21LY-v5#OXBO5Fw``ecEKxFIL>w!1(?)}!745&NW$J_REB`VNQ) z*Z|>cumK>VFIFI8uZl(kBGMMb07QgMP7#QBZx|49KCK1EM;ACmUlSw|T$$<|NDskU%#ui9TT>!Ei~^jc0bA5N=;O%oMYTlMY-_6vB;2n8Z6# z zWa0_m~4FHJah=LVb*uTv57E~6yTduY@#n5o0!6-0X8vBkt%~t1V1U@ zHKo`@HVX-X9*W};u!&t|DEGxjfhN+yg3v@?RA?gAeS{_=WeQD{x!dS#;TbgXy3C!I z4+kak;h;qN)k%!v{Gi0}r0sktC=vd0`&sc&!yr&19|}t3d3jJGFQU`@phWsbSmB^2 z8e{<|F_uhQ`Cfn$`Cft&`JRIkdtP)olSTlP$oC~Ek;yOsO62{M5tq zmEn?Pctmy$!6o(&%{4P3oq_1EP-z~9fw1JT+l^Ob@3N3H5WiSmTKeueueUqEM4rpd zj&u~_R0kF5k_mugSyEB4WCChZLhwn58QHJQnx#Ma_1E3QCGuV15>dQGc#0q(SrGaV zbQ)q$af$szG#r;$34eUkF*PGY%Hi)VUbAK~fDn@K>rO%EBKmQOP0g1tUxd9KhBEB} zm&nWD5?wGvEe?orB|5cu``*3V7Z(-Hg8leNha-Ma_1=5yPsNH$-iG5L1Sy=g9pbelWg`Xt9A3C zvJ<5pEiUOWavFYu4}Yp+p6-q7y}!@0yi? zE1NS(hpTmUWD!b-tt>8a@2rAL|2zq{0EEQ7h}(ehxCu3sDA zDB~<%QG``!7h%v=er&hb0X8rcn3%S4@7_gAVb?e*gl`Fq;RApMV>RrHw*E|9TY}5pBiCNkO3;qlK-hhKnC z((KgK?4?yzOCNz&F5{}Xbr}qp_~!qeIrF!PfSr)&mHt?QW2v_ab_GUS`@JqoH%R7%P-GdKxbmo(c8adadLwa#x{%ELPW=79s#GuNDU*l&lS=jS zCJ8u^|2dN`E@O>@FJ<6$ESy||h$1{GaUh@zf3WZT`F%g2*ZRrH$rFtMu`XM`VZ$mQ zJ75%I6yqpHksHAcPfmS-s+3~b@ZtBQNid4II$c8I5Fu5c0Vnd{*@*0nM7Ht8h9;F8 zEDtJA@Vo#{M2V?}OTmeKU!Nb9hzGmlpISgc;4wLmZ##5oE8@tu9y+uQJkdjNNDrRy z5Ma7+I3mw8RAS~YRjPj)7LH2f1ytfBJTeE@Iq|P6AlK7BIdNjgKP>84{a3&UG zhj3;!!ynqy@wB273wb~Iu$#Gsp2yNufc)_?phMc%FintQolrqI=rDrJ5~!?U=81F} z)UbP*{Q$!~5cBz!RJLg-&=7zjFBC^3_OWob1RY0mQp6D+hA^a?Pxw7Pdeou#MIWi) z1k=E}M&a;78W70r{BJo$;3*3u}e;E!_ zxp6FISM$nYZ9DB*bOKl>#yWo zLtJB>H#R^!>YV;C)*`KaS#!Vunp3MnoM{?OB?j0cv#|Ne&khYsz7^|O-nAw$wj zDl5z3o7r!TA3b{H0O3?c9p4?`AfL^SnOisyc8gD5xUm0+nVCO?IsM)Yg(73``SbOU zjvhT8&N|d4iPd)lHYhIL!558j1r1liq*Hk|wMR&iVYEg^2G*2 zNjZJSVS@Yh`+pL2mLcB-VvzSE262UfE#R_+VD^mHkh2W=2#CQuP$4_ZaMV1iKzo+V zn^(Lr&~;=*#p$rq4Ee~ALBK|drx}hipvJ?gv}3c@35P z1E2~8RDtm~#^D1-hM#2!ZZHfl$R-&fctLSE0$#A|3{lTAq+%B|g&w;3Xx>GOx)ceAT z^sJGr2|X*_2c^UY^g&HMtKu$wfdf5bULTZV3fNym;4Xc}fj$ss52|3)>9q$H^s>lb z5B*+tq=&@={qJD~y)1T@KI1?y8QH_)jQU;s+d~HSve;ezGY<5Ukv%NVsQNuErXJLS#Nnq0CHtlbCI5F%zwc!bqfABq-=!ZTzhc(<80(Yp zUwRuenV^i)8t8q{Yq^K;B0`E>)~?gSE9yh72KpSHS3X~8YIwP>QbKD8eh!ol zPLK2y$RF!nq?%}YpqA+Q*xNw-w-Y9ODqbmaTH^ds{|`X<2FXm`>QvE9eYf2=JUW%@2Qn$leTPaj(@ZBgX= zJJbKa9s0H9!_xx3iv2+c)n3Qdjp zEJs*Oi&!S=i@y%~*ovslWG}_O%3WBN?p*^l#Z)ekJ?t)~@?n_*)r7s0O9*5SyOYb_ zby}dBuJb~UK=!b^n97G`3ads)2+PJ2~*>dnkj*72c&U!-2@`>T~{Mg~2W8f_PZ|;L`F>(d!H@6Fo1!4bC6SQ}jB6Ylxor juYo>mVQ{-6J+a(QYT;@L-|Mi0ogb1W!VQT82VqxfJ>O}8hY;R)f;AC&b zpsE22l-u~O>GOL<^8xq)Sn-<%DiGlN3aAwMA83&MZ)yA^WNPd}?_lKdulbK;z&FX> z!-fAKdFAWve88D_va^)ee{mLZmP@%&NP3Rs+sNcoKE6P|Vc7m!zk&g+RcPBnr6i=h z^f>+KF3?E{Vvq<%mY}*_9?`x*kCpK&#<_!a4+KV)WM<9ApY_BD6xK?)!2iVu^rsQ z{hQsN2_K*Mx=*fCo5SmGVi6|WfQvuR+woM^w8bh5#6a#c$7I4@G*8Z_=tbrL$)I6Z zZl1@?woj4=#itVrHSdTFsx2aJfSxO$@*6{72dJu@KEp zMidmhDbI=`proyEq+dhz(SI=eCILsz*U9V4D@?oX{Re~#?qbB2z;5l+!6okV3+Fob9?g)O z);v{j*1VWIs)H&J^+pe%(9cBQ~AJ25e=mJ-{(X2#)4|AdjU#}T!oEH>Jm&}fTzICYm4|ZRTZ`7>%cKF|3#v0@g^ge`6-O=UsD z#&((Z>f%NJP{S*7ZVd?I0aS9^qb)_5;JBGfc0NqpSz|Rr$W3VuFj;Uxu^_V|9($Ro z`}-SHZ!}O5@coH%hbEw>y1aX_Q2X{cCoFKo$WORn?D6RzndEyA<%Ttdja@M_e?~)a zec>ziDh)NJIMzjQFni*T_Q@ard3Qu8(lBU3!kW`wuHvWJ-Zj7V zhA)h0ohh}UgCOjk7%IK{2qV}@VRU)4A&_D3&og|)-rbfXDv~-vup8dTC(R@SToQ-l zgntGC#I$aLH9EwRx`WA&@oGa!WZFn^CQ2}@gAQSe)|*lrp9W&)CcSwe!0uv>rH^C2 zB8G*(nY;5p1@RdK@KgUqi_bUU35%!Q^2D5RFzS|QK$z}EHiwc^XSmG5D)8CHQ&>^k zrz4tIiCYRejJyP5tT=Mw5EOA>9IZ0tH3rO}nj@$r@@2o?sYU~Dc{tiik~r8LwoRnN z0#x3SXVC5L!+X3T!c%VyP|>(1EMx&w^II?@0DLlV04)G`TPj;@JD7lC?$6#1Rv;+* zjLxtL##?=!$HbO#9t(5i2d6RJfg|+IW#AyKD2P$IAf}=;lXeG`R_$dlSoWvsGIB03 zrgb4_CIJv4=7&?KsVFvQgHlaBBr+q$+HEqD3lSLUOZHF{Ur8wwrmxsAb1FZk_f-@E zC*mb1O!QuS$G3fEiD2{ILtAV4dXq&>XpOM~w)e!kI}i{VA$QxxDZ>yWI~Zk`J8T+J z0J}{|4arAwgfDlc9*qm^0tpDi&&kEK1lhhA+grzm<}U{K(wgJ9eJ{&BJDSg6$nwu) ziG7~S`ZMn@PAA5% z=&#v%yn}(w^^%K7eF4*XG6K2Rw0N?%m=c=Yyy}07csj#@F5st=9Csx;;=nu#&A!8k zPtlLl|JKb-0A*8d<6H57MrY<7XUfc7#ltlt-1;=q&-1|SvAP<5ojiR`j>fUj8@ot9 zF8=oUSSB@Kdd>vn?zb3C6x>D-{WXVO)>x|jDcvR(cn6r+1L`86QpZjHo3!mejJ@UA z<}?RDrFVyZPd5Ev>SWPHw0Jt(_UIijkavFLim7n&hmLLQ#?4lNnvbca(LmX=Nh4F| zmT|=hom4Z9DM|q<+|Fq^LIIXy|12SY`Uektpi$s`iTK^PMf1h`GECDzBN$wARotQf zs`ePiUjK)|ABx7*ztMe2GLQaGAqTzML&WA#F~B7U9+egfj3|uJ5z%6_T9DC~F6L$o zj3`|uGo^@dryO%$-3;g+wV@|8B*1)O^h{6SpcHb*)>sIbPy5e~Ih~i7&lI2z0rsBb zfZlWr3MEGUYj|K;VCE8L2*%^RsqK&7CP4H=VBO5f4p<^V58WEQjwFt$vlhGkM!`N- zVKzS-r+tM2K>_H5#-JpVcic{C-a*(w)8BpO0+7PgO%Qkuh%*l8NI*#7)>Jn@p-*SA zRG>rJIaN@~N6gXpEDlqP0i;v!76~{nCy=U@S9+N_7hg0PpKAk7QlI9Cim1-c;G zVpsc4Vn@FJA$BhQ?@G$c#He`k{Mi_WB7Bf_*{H548z~ov7R^QG?9^fGIMfHG|1B@} zB*cgAA9X~iU~FU)mjk2qoEun~Z)-*~tn(k6x6DLj+qAmKwZ1GLn!NFkhytwTLfPWX zZPqQY3UP{%#tXUeHqPP0*|8u$eM)`B`se8PD5VJC95?F2u6<2yhq?zTWWBd?ydY&} zttI2y_2B0+0UJ&Y^{#uSm zfj8o*)u%Yh5`w(aebBEy_yP8K)pltMgvz-^8?)Pm5T~DdjZ|-s;x!KHZ7nkS|8R-; z_}jALbNRmN^88(S%liYmQpaqKAGdYA{@gG=i+g5P%F+^DGdCov#)+`Smj)ctQQof` z6vD7&KsAQxTE5iW?KPGR3qx+aL)Jc|wPw&e z%A!o0Tni*?U9@#d31iJI#HmY2fwQ_{0bF=^O>wtV%$ShSxN{drlW%KS9T09jg`bda z`gXH$HL+gl&m7@+rRrcxIo;A4)u%ns-(}Pp?evj?kwdY4%MG2Ue+V;tm`OG53%hk1 z$Gyp>l8)O(m1{3XFEg`{S35xI80>PYb;;9s1rWiQ+tdCdao_NU)N#`_yjk}uao_)* z#gWhoi*l`txZU2@&PS%rByr}enX{F~23bywJN0tTFG_cIrRk=^)0Jv6OB3#;&<61` zP8)!RweS|`>+LN=ZXa0saA(uKElFOtDyQiDH&QNOB?P@%coxeB<+Kwjc8F}h-X@Bu zap=@_1BCKR(Ez3_y6+J`Q|`LJHAmeBt`KmwT(82+xhlsw4YnGKr=?$L4wXWumjN}p zd%Dm!hm*n?(pl?Ft63!Do&{likfL2A!Li2uTge8_3St_B1P>`z%4~xpL4Yu;@cj@? z3y5a^3Q^39^c+R(7QJ^YqpIhnN6fzj&|ail_?16H8*i$A)Si+YR;}-li=MRs&F+LR zUem^XA6ZGKgBfn$B>gyfLtzyk#08OX*B6tgXpA}%_Mv1yTbkP)kz~!`IT-xO`C<6G zy#oQXDLSvFi>t*b{2jcs(q}EF>(8N6v&VcSk1`1~#d=kZTHgd|w2eJp2!o7$icYv= zkQWx&3e$yDzP0of-ThQZ$)4U}^|8ZC&bTy}a2UhiBF*l`%y5{<=C1*z-Qlsg%D-`F zc4NFLep>~hVDbe1oLY_YYtmewfz9nPyhb%&cZi``5B~Tts$LZ^=eU^XyurUyl;K>% zm3hL4y2x8qTUQOsrL9hNJ%<99@~xwxSGVuD|DO2u8}jCcPq4k7?4wqP5-9YmWTv*e z2Zj&6R(jTH=9js2YkABJ-l)K>7K)47`0@6%<>>C{tPxaioK5ogAiMCX+@(7!9#b!@BqEgZ%Ua-rkLybm_lJ!7r z0a`c78?>U-!f>P-D~W2S8oP<~QzWKNi@T4JDgojN%t%&*eN@Qy797zDl8V8AWjGO; zF09;mN%Ad5HKk;13kUd8G!|^|3DL4ZFl*%`(n`%}(I9M5#yEMF1aT$1&@x~;Dc8(U zDY3FZR%oFXL?KTuD~CQ)S~%()qLdiK&4 z$jXGk?v(0*^oumel%(_F+Qxks+XntarmEyG%oUL3YErgQgV^zv7i-jdLPEcD2IQ9VaqbA7lS)xiv1HFjO9lGK(I(dOv)<0&*uTfSE)v` zNt?(@uunEcjm-j`9IXHXc~ar*D*hOhl0gEFKE0B^v4|zcXbV~i#46~8ijHEAR`#Er z(|OuU_sF>{yYJ#Wg_g|E0S1iDg{AG+K@OjydYfK0$Id|ExbbCWf@3iJ&wnMfXESKU zW(`usu&RTnK=mwJLU>S00eF+Gk|Q~@+BtND7{yc|;ZJbEZ|o3e&_NZnT5p{oz1Qe_x2J zr&UDqk>c+4XikAQ*+(r1cKmXU0djya5Gv^Ut3vaKva4{dsuE@%)i4-Eb+`!(MLH%MpTw#!LCS4I> z=5sD~31?BRxwv9Z5_;t2SM*SA3e24rdxN;(yK{X{D4x18X!p@4bCOEUEFt;Z8tmLb zc_l@aZ85nNZrm)#+T{ z4#Ab}YPi+B0#z z6mwz8A(qzj$zs$MK*y2kJJ%c3^-~?NNyPxHNjMeuE6gk@WiVK~MMHL?@s&+gYfm%= zc_i-iUOUg`vz0QL$$OWt`fRr@*(_ zpf%6$Na%BUTxjqt`wnbLMxLARjk^6KJZEsGlyWeP8CkT{f!ow!Ss+~-Xc8}kUn3cF zORG#v;UW;mW>A3+HU|TRBzVmNFeIjD0SH6nXl8p%Kx$GM>TEWAn;U8dn?T0lAyp9M zNWY4AZ%CJ_MDxvg2CEBPz5-N3>dj31IP?50^a_J(5?%#3) zuY)?i!v&WnZeERC*q}A*w)vAceEJ35$170Z0ySk0%~`PpLxWN2F(Adi}}q zyjrI?e92v+vd?+nzW^o;;;2s{aKdLB62Et6p>fF;r$>eO5(pfh{e(?rTQcGj#TN}g zKSN}YB^99(@XfguOy(ijEj6(JkA>>P8)Jc+)M`}d#K9Y{qt9O@XwTiOT|FDA{Q2ar zE5f@VCRQ{22XJCX^GPc%60S zIH?bn3vA{Y(W!~EO`|mfbk|-&!(FlL>;lVJbhpBCNecJmKrISKnLby{i_K1sQV4-6 zd%_sET&1|=cae&MPI6`oc)}?hl*6*68?=mRulCpj?LOqXajiP=KVZ+m1(dU)mrQaBE+}q_fpy79E2mR2^uI+vyvlEtXbt z379vCy-oXP1>0f}BibxV*P(-vcA1!^Rh^Kw#6{Q>;?M5|!{537hfcQ2+lEEL0qw}` zd0m09gq3?^1Z^fOgS{!SR})cf^3-o01id)MpCX5BAGp105!i|j^RWjbuDA1l;qj9S zAW-<9#57s0<;g|h$lHFR{M$5h*iQfW?)MA(|e)%RyHI9^MT z2VNTinoC_XkyHun)afm^>{Zl)_u%LoNp!AT+rzWOVas>yfE^$Z1I^)wug*lBks>cyDoSv z=Ha@96IW+7gg^rIp-tu-wa+azoMGEa@V6(+y4e1m8NXM?heWWr`@A!j+mI&a=rumM z;C%DTDu)zNLqygON0`*I5@B`CP&GR)49S{B(^Zyx{NFV!(=H~2B!7y1Qk_;MF&Jb`U0$$C!CY`AiJa{Sb)vu5PPALE zMGG;f{9Ku=c4L4 zM3Mj?kK_iBLks_Aw2`9vr3O76k+?``of5A-)=&C#X?3KeIxEvIT099DJF8_058jrU z{ljwrlIP$5mOYdc_mGgC<*syyB?7F#3F58Ti7Co3&IQ)HiVGb<8@G>=aLQ{-Em)jd znaIL`3}Q)omvONHxm=QsOmRCRnUQT^H-&SAY;SfEpQ6-nNmvAq$5VUPGoy=&FrqBX zDwfST;*;ZCmV9)(sD>X)e$~Bp)%$sIJfTn)_4-8(b@;}0m;A}Fi5CT16#=4ZrA)Tg zOh;n=v|fvV3m?sjC9J7n3G+`-n2gX}R+zTs(C@LUMO0R5RGX#|4=(9Qs;4Z?s^wBf zyL09EeDoBRVzqT?IXajh)?7u`A1!;)*;U9(A!=3?YsD388~WN*(A4GkOOhP-H6>>U zxeF{x%thKCW3wie$~rm?ea)w8L9eeU16L1Fo1YFKy<*mJ!@$N^=katMJ3|QE86wWV zvT~+ZnSYC?p~66&6l~1abPQ^nuJB1HcU{D~4$RmZY&nn*oE?k1?^RG8kseF0A6Zl^ zHU3L?$bF|f=E6SyE8U^$DYiX3E-j6&na}~}I?+TfB9e95!gWqOf>Us`m`{Nka^8}L z_G|vRP3+73cYWOLTZLScQXxdMI&||{qESY^a?|0$8ZpHe<>M#{8Q_qkE#{0bzZlxC8PEE77y*4H&W@IK z7_`D#LpSI0?!uUN!zFB#53kBse5y&}YR3c}$ivvXyM5q`H6j|p?ma}yz4^0F;2iE% zWF82IMqI!@{OgAAh3bE?d2fjAZ^sx}tian$4h{V5Jv->vELpzVfX{RZ``B}MhgQ7U z0v6(P(}T0}HPAfU!k*giA#Dlb{y42w_rI6WV-WPpnsaBPpHiwCa1*}w=NohNh!MZQk%=d;de?rZ?h>`Q<)qXgly zu0?7`Z2yp1u4ICS)Q)r*Pg$)H?aS*sy{16tk(b)F@C)9RW=(lN6Hd2f7YPuEX^j0J zD!j30Sjqzt7ln%xEI*JR#IqeFlxu}SW_F#ZfW=4M=Vj^*{1>4lH-9*e3WpajJyG^a z)&|344P(Cn+0`cGk+3aD0yYkA4@Lg}Ue5 z(d&DF;1AVxeGAy_LGcUf@*H6)hXO7iF_@L^L@l*taYStO6(Yn;_3bANtzh+Hftq*o z`hr(D$iTAON1&bGui1WnMusRsx1GvJ_!s8!hc9%jKe>(hXY!3lwV$OhrvT2BA%XVg zhIvy-0O_QjM1lsn$;;OMIJ!cj3J{Ac)+zkJ+F!TeD5IYg_CZX~>{Pji&UAg4@+T`g z+J6HDU!8_PAS-ZzpGgUFVx4XK^hny3Yp6KW^0~~zC^T;Ywz&}5vJF~0!rFh46cRBG zGlQTcxK~cJ(kAcQTXqkYn%;qJY#1vGe+t#uIwC9ecJ5wHUESx9Pmy&$F?RS-cX5|b zg1Ng&sABUi3Hv@q02L?w>W^$|Sor8F*6dkyT$KLHOcLO52rbwVMGdB2M56 z**L?x>b}66$rh!GY(yki>#-kk8CS_V9&fo*XL68)dosF5rg!B%| zkUod{RA0(1o2~YHGz^*>=M!5SfjVs_$E-XRpVmd3&TC8a0Ow|OP~z?+0#yu{i&C!o z-qq(?--;Rlk@U*1_GR+I@lHTKfujQrtevA^H$UMZqTtSNK10nOcyG%K&)? za6)2!I#v36gK#5x=WFRb2KR+zvqH)R)U7D?fc=F(4@Sy)o!=B=;aXfVQ2g3b_~phP zfjY#x)|B7A|M1T5Kwt#a3kHjHALBjSYXG2Tb@=J^0B6&8k$z+}o7U7IT`1vIKyMCR zNgBXNJm=T^y-u9(ts}f9q~78~T@6w}6$!d7j2v^0k@*EeTKtv;LO&arKv7o!j0wP% z#}eC4t0uPR>60+N{g8k_KUGN%+r}PG3NVIEBDK5UCF7hTEcc!Uuyd}aesZVc1bt=^ z{9)%r zCb73Za?C;%Ns-7w^p-VXtC#7g<-2OOD2|gT;2zgO z)~J7{wRJY+aaU1x1N1!#0);spqn&0or;n+TjC!%y;d0j3oB?D-A=H>c=y|^vjmPq- zO}E*ihCrJ07;W)q$x*G|x6Y(ub0j$Y)&qd*@#%4J3BV=9Nh1)=q zH1zqT`fR{57E98U^CYndk_AkCi;#0rY8H$@O8hJ+oS+ScHSxuI>kbJlkb?YFomnyQb;({2R!4*Rtz{UaVD~I+ z*WLHEK9T{XZy|d3^F9~0aQxt_RFI}_4OrdSdqpzzA z=+m+?_zP=TXniKv&NjVE=@wYNEVKwO+)|i@mK-T`LCa0#>7Zq*@%mCXReJ;`+gCm# zmI*39AePRyopZ?+IGzfp{~<(qEa^1`cx@c=-wFR z&bGYoaevbWbrN2f58n()EoP{IqNB-WpHSEuj42-Dd6RQ|rRPJ`_O?~3y)>=p?pLMQ zR({YML8e5@`?YVms240v^{=dh=|9Uli0f!!sKm_d1pG3GtT`g*P`kAb`HzvL8{?TN zq}2VNe^MxUyHFMPV%YqhB1U;I898QHB^29KJ?#JzYL&1*+^snTth#2G10)}W$O3=e zGm#V&k5>wV1omg~3wsZlyLx1vW7vi)tImuAVk+_7k+9YI>xr9cd`?6ys&7{#1QlNv z!)LXwy5Rh5TzOn<3chxS)%I)ka?|!-DamG~p`7Bax{8SumpyueN>zM#hy@&XPwA&{ zHu927;6h^xxK+ZPs1jOz?#`X?H|5o8SwetBQVz)aGuigR=QEqv?zBV8g_a%_QQ4oY zrcWQD)Ni%z*kr_=vgBPaE}?&^F4^9hmH7W)ZMa<;$E&fSUi9&qXsxX(rfgEHRHckB z`|*VW_;G#?1xAf_0Ty)5?eG#o;S!@IK(kF(yE4{H?cQ}1@k1u#ChMspF4loH^19{_ zE_?0Q`fu|MYN+;pNMX&8r`(Reg^9n#54)d%eltu<7JQC5k_A|=R1%GBj2wmUC17JA zPMdY0p`D97ZQ`i8xqH?4)@gUNyeI>~XZ@;$ifsnMx;>;;;M~fjn|2yj(xy?t*k;V{}1w@u8MpPWK4N z-xE$!AUbeQ;D^`TzVcI_6x2()9XCMp6i=kl%?KV|C{!KgUtp*-ZQxPlMF=Q> z@o2kWlIlLCihpHy849hbF(fPY@`35ry|F3E-cAxL&$oz@T^qVKLEETvLF#~tcviPm zv9hhyt7QvAZEf(ZV18Ff56y@SvX)Tpa`);x)fA~wUl7(59Ym^K4oDfIHTrIa0}MOn zGpAt6Pxx_vSz%!B;`ytrcs+)26r$DWM@CH-@4$$uY@Ea@dl%9LMbBgoUsvtXe=%x& zhUWgqZilkQ9S>b7+e>LPzd-K#?A&EAjKpf-Gosay3$L8ieAZ;8>Dfd*aJoW@BKLYc z8wY>`?vExCu2)2A7;_rve|uu$Af2`96}R0;>kV)@DHD2Ls9nU{4MtbbG+$Om7N7NN6@Hxb9XIk?)71f24@^B}_pm(-4Tu~}3o@66%8ABhlFo1nI_8>=u3H*ba`V+`&&WsU#Q1xtyg?dQ+^ESNI}GlCFNkH+4lYSYKXrhwxN3MIi{7ZeFxA z3@h(7QNR82c`fEr+~{1OUe*v8ypL%H;{|;AVEmpdTyDeEL zuGBv{hQ;?V>Hpi>{b&gPW92*b_BO%8p!J((n&@Uu=@n0)S>_WQXsmJYI0gJ(#ma_# zBd%tRr*7o^n!_;NL}1jtlz+ndYkXp2U8vLXx)N_nEfdL zhtP(!~ZDo%Ts*s-OcC6;_imOROZLaMt#$`>YC!S zkyqr^R+rp{PR5r@)yCQ(Zh1IPw$EG6!_DzA(h6T`{91brXB&~kv8Ye)^NGy3)pIGG=4LcC~E8NWRwF5<2cMV;qc;s zc!|7_UvL8-rI9T*xRP5hCu6N&iNEh=_W!(JJ-4EPM{XVWGFqxH2Wam8#yqsAvHy$+ z{Tk{K(DHcVAIIv+nkqADTzirn_pcBtN^g1hlle?kYyG%t-Erb^?d+P%t54rLd>?`V zJJe7Q>)_h0f_wzW_xA3)F9gt0@z+Rl`!|`DW<3ctX+1yj%uc8T_M2^9eIu(LBX*SI={Ecw0nWwaa=+`9|~yP_`b5q(Cd`5dO&%2@3f0wql7bJ%^T|(7zo^fP9Os`HIb4v{e-sB#{bQH)P$}okaSb#RvBhI!0~$MxP1s=U_)yq~Sdh6i7c4$oir zeY{|r3-ozt%j8lJ}JiQ?ZrUPdw# z&=#dv}C0f+!0*%?#;WkESNyu zJO$G#vn7wrqOj_;!B!hZAuNZsjpmt1@J4_6uJ%RtS%oW|pq@zc zU??BNIfQr-tCWV8MoDGlMa$;?@M$YdPgkqQiUv_z}C#VM?mg4eocs z?rV#~ibMn|Gi{1skAcihX!r=>&P1ePZuW-j&V;8!t>|;zoQ_>pHQ2MPE6EKk<7SHB zj)Btu(9~k@fq@bvmKk!=31g8^G(d(ogwY05-eE9QszY}u?9~P8>zo>ehLMDW*#093 zGv7@0yGW~|d8k27^6}B}#)uoHaH5ArZ?c!ZMe{M%gQ;CbQcs985OB0I1TzL{pnign z%}}z^+bzF?%TRJ5>|#W8Y_!ksL2jhY*`BT#4j9579~uNzT)HH?HyS4r%}8aSC&v*o zv2@)xVs>~g1`mxI>rD`W2EtefC?c=i)RqOrqSw&cGm&vBK0|j6{n}MDBy)u+58DM8 zk~v3}?>Z`x!Qi4QS}85u4L1Z zgF~XwylTmU=XMv0=|=tRO%To1rH4ZiabT@aOPQeR+Z(h|mIlO(;3owrsb(E$ooLkdhW=}4@)wTP*8|8j{3$9mL z4=kb@VYQ-h(ou+O_CyI)*siFaW7Ccp7atE80jQ!1RUA)Ruoi2%XQBm+#zf6a=i5>5n3;GJAJHb?Rcxn!^<8v zIQNemi2j7wF%t6nGS||{*YB4qb=CWN+A8OXrTq}n3ZZ?${x<8sgC}ld$lFdu)KcxQ zX7<1*_1uZ1d+4C`iJVu$3uF-4sACVk1nmZN>zZD`f@D`#$^08) zJP+2^L$7c!gw&_%mFcte@|vF3HIj6=UWO*BR!h}-by+GE+g4x?B#0g0h^qIMDmEq* zAJp_7=vGU3s6dtT6?Q{q>sqRM6JV~yb;ICw$u1R2Q&t=~7@rygk_~>>E)r{@qA=oo? zopWV4#xW`n4JFIBtsy6B?P^435ai=5C->v*{PppD;Kd)QVlDJ8$+@0SP4d&v_dr9P zpyoyu>^=|k&U>UT2S+OCox@E(@14%~{PJ4jLuL5o-O0;ZM<<@YHyoYA(FHxknWJ|E z!!oII;Y7`N1$%z>6|IG0(hg zzyZTSEM!Oair~i4koJA!+QufU(mDj{L$(%k&fKAS+S1<{n<1C7SKy^y%qI;dd2qsY zbi%%~cVOZt!_G{rycN&!h&zjq{L?Y$1Hr5Qs$P`9=IQ4lf`BKl<{-m_G1@gGZinH? z*ZC$}&fAnf7l(Rd)ZGLD3sKMj3r8wChH(-Eb6}am$gn0x`j^*T9{5RP@kjp~ z@Sz@+kx&1TC0UoDj3`)R80_IMc9yi8n@4D_->%-S17T&n4bF4G(x;1N-DituQ`!1< zITKVkyNI=CBNrDiC!p9V9;t(*t0eaE)o$8Q;!TyhE9kYaKzB>UkwG zY2c-bKNV_@T?l_b-hLtLt9@66iL{3CFL0x^Pi^3#Y$YEYLU``ZsB;L67XgjhH`JSa zM2D@0uidLBtA0AAx0e)D<1NG1d$=3x^rW?C>lYFo$eItsZSQb>jkUQ-O8efKUd8#< zx3jT*HEp^H9u5h7*=*`e^Xm~SKHA*g%m<~)_~0n7Lb#Ie9Pf~bDNNw*ItfU2RhbM} z{?;B%5vFt?DFAmSugUxM6LyOCx|W}FCl6~)hOUbKBdhQTNEhhdU4yl*PqdYn&T}N` z!^ii=G4gBYac0MF1jUD;Y5Gxa;l{DSjiB@EvCski?dz&|d)xC*0cS3JL{eUGD@FZN zetVSIeajs$uIuPc>Va)Ap)WSWTj*jA2KS{#uOOOuL8gVb0q5DBx$B<8qy3OzaCb!c zp03S{ZP84t@gsx;<1aHmiXLW|1_%eK{h6jTw*ZrYVU(y)Gv(Jb>-x6~22wW}y$X&q zt7480`(3Id4mg`z-@Wprw$f)d*LBP5TkD`^nV_S0r~ z5~Erwv<>^xJlwBKkr9C}T?O*@S^@dgq0XeEeQ?h(0RhcW3hPJ3Idh)$0lt~FUUkU* zQ|`mlFZP{37rx$KUWHX`BU?;%+MuUe{npVN`n`7ETOQl0x9*lXEhE_SI=MnHoStM5 z)yuu6Tlf;IR@L&0J(SWYOYGLkCzZC_?gaE7hapwt^2-H1(wz}+Bvw}tp9ANI_|;9P z=frPCJ<#td>W`(p5|dxCG#Df?A>TULol!lUW=3L&3m9YkHRe z9m!S3_e@yd7?$uz7CG>!nY0<$FyFFcsR2lb%DcD*Ij=H;XAn9oU=Km*iQ_y(>-Ttj zV_=mjdY)$}D%-ixaaSLqlURX`qgC#m)b4GeYEPLx#SFa9zneeUCBh^Su<`X5HQO0D zQr@_!^-juG9jVV;3#g@R704tNZu2Zq32WKxY~CNMJmsfFr~HV*MZH<*_@sZ$qTc-a zxv}!|^dg=H?$5`lXO8ern`kUzKdDSMAKyt3kXd6BP7@S~$PN7JyqBGb{wm8)P5 z+%Fh|nqER?J=Qjfp+hVLcM6>95N+p;v47}_eoi5eR}1v-Y5KAPHw1(iyfFK8sKA&) zU}{>Y_e5(IC64&Ia;c`r(;sq4u)dQU1^(^(n-&$c#q)-$$RwdWOHt0}sEY^M^js~z zc&N%KnXV&kwZ&S?%@D5@qh>wGjx0vLNFPoVwZ#sPf8_LLtDwdn9N~WR>zVdnP`=|0 zg%lb88N4l^)$m>Vq+4k?fAzjYZ(5b1%+wtTDnwy78NP*i?!>D6Gs9*r?o_y3Kw;&$ z_F@y&n2U7=|MYKI{s-Mo!@j7)_b|(w^J$OH4sd4*0(gswTal7Zy2@$2W`l{(&z9uw zcHH^IVn`k^88x4F+s(w_f-!zw4Od!AUS84d;4Hu}DnBCbbT-;f%JwZCP4~ce(M*Hq zMyZV1`>jfgNzF<6Va-zDrTRzL(KkP%i+0bq2Ud%Tg6o7kwMb~De)6QPpwReuqLJ&jIR@pF9JmwNWjEh7cD$D5YVq@V4#11 z)BgmmV*O8`RqFp&z^R9^yS3;{Z2L3;Qtp76@R`~yjuCcwHi>aN9^EYPp zzcVv2bTRyIC|B?Q;@4PTJ36IADMLp+Jvq~;%Dl*;s4O`pGp#T-DbuP74d=Mftk}?c z&;T{VFiuY|DJy@ZtQbJ0UZ)CVT?hJetx2Yfj(&^Xu#^0#k@bB;c-gIpLM=E+4yE>aX{Zs0HX~qBaPD!Tm{{RP; z|NqLu%GAl;*7O^NY-j57ZPfq9+T_3UPW#3V|Bq1Q|CzVV|Np$d4IuUHXeYDpSWk??QLmTqn8S*X>`< zeyqr!^b*d7;gS9k|B?R@_>svCJ5wM=SR>-WKO>yC}}4udTWv1`$=EVb;ejvqzNiWj+Myw60wzu+z+lOg8g5$ug6Ysho&jVpQuC`Zw z53vWR2eAjN2UkB_Ke%?pe$c+peuQJseb;^8{orZ;=>TCbZa?loVQ*%4=73?ZcE9%E z?JwxF_H)NG&x(!29J1kewT+~*?n zi%^U4yS5~rR1(bu&;afkI(=!%VyA^Y144X*p=>E3c3K}0N9~#lCM&(60efC$<&EB;HLT1W9 zMCud8BqA?CV);o)oEkxqSa%okgE(rG1Ra@KSPT_uC?t%Mq$%WQ8KG5#R$)pVicAE1 zVa_QMHv_a{8UL&~r)VAcdSPcao1shU!q^zG;gSvxVgCc|U`=0yY`(j1}H{{<) z*YM}~=R{8FY(hWMPts3fc@+O7;9n82q`{*G%ptI3B%_uls9193iBcxa8Ny}>o`=H9 z;^Sl74Y^J6QBpK(g6xTMzhZ32wMW$&VlGM35`7PWJc&G!JefSY!4_vOvubHp0uYs>WUqfGGUXxz4hAk7#ECjru z@g&1%_nJa-n7@jmKOxGaKl`>IIcOj1&Gd*U8Nf#EMF2iIiGIWU!WMWB?g;SZ)$RIBX z)$Dg++=@;*Gficp$+$~jn#4XPK2|=4KBhj_I`%pyKUOmXZOm93w=w@?=*En|h`Lj z$SHM7agQO79tKkiJtX{-Q5=&dn=Trq1coIfqaU|GT7#4py&{xMxY{9MmXH-%u3y@) zt4_#*WyIyNsg+tquys zFpw6w@1<&vI8sWTdOoFH^Y-wvO2^VkP0vgG|6=VeU@Pl^sIep)=4@yK8)jyP4Kve* znVFfHnVFfHnVA_j%nUEw_qF=l>aVI+YW4JFd2G*_vB%QABj00(9_9GNtkl{md8(tc zboEzv423X_{HjxjCeF_4Xf_cwL%GoE#Upc0_{^ALtKotA^0Z%xdMIlwDMpkjCRnOt zvKtZ8eI^F+rzU6^({J^O>kcUadaRvc)eT|$p*S^lu58Xv>P@17(`V-ne{nXfMN^lJ zmHuk0Mw0zs&C0DzBBf?(KvzFw za<_@086^7Y2)QMb*3q$nQ-#>vxOLrBs7h0iewx!XAG|QNCbQ(}tb%9>rI^NLG_^s1 zV{!qK5;Q`BCH3#P0LHxrjzk$D#|z31R6r39LzZDST+mFEV|>>4K54GboDn8mqI{jR z-SIWNHH>J1sF8_ik@;dYBu)jb*VPL%S`bml^wftWv$85WfxTX%6Ph;DbP24K^ z!%?Oqt#?j!sDaW5(&a7#a_lzAFR{!;qKtgj^X_w#<_2Kaeq7J8h0`iKxZ5`D9&T($aEP6yVbb6({p6=q@K7HCEc>bu) zwIxsXeTQiyb@Q(;TD($Qa9nmuN@{LmW>&FcF?pqfBU2)JMb*~f&Txlt!v9T$^`4ZOq!HL~_n4I*Umyk?5sX8LII0V7P zdIJaxT1x^-hq`}TTT}j^vrkR`Rvn=@V(;%Syk%@BBLAeGOxG@Bqr0H(YG z(G-AG*Dtk9t&seV>Og{nEoN#LET^JUO--_xXyUpe3Y<5ht9|(E)ERQzXXI)xMK-tJ z-cPTV`D0s&JAU4wdcI1PnyNk4Sk<#sgk%9*#U*qxn546lE7K|lyINreB4C9Vk0`Qs zRn}?qRAa@4x{+&>ra*62+qSO)eaFYblM7pZ4pg;IQ4j-@Xp3-7q5vcX9_>)Oj2Qd!wM0(Z1z8-a4wksp|Hk+}eR z8K`p~SXCZMvYBO{%pQgv&KiggBvgOr9t8k9tB?Gk+>MKBvEhzsD}=s3^&hnYs0)M- zdJmTGPhW&&72W;a1M<7YGOG+aanvcyU*M_e>~@|;cJ=)%7P=#+nQLhz=&^W)xr z8=$An`Ud!{e1oKf6c^SQ#WWYq2`4|baV#BzI5Pj79B7!=vdaxgSs*YwF@X3x#YTfP zIeKjHQ1`k9W<|&iK}+I#THkLq##V*g-vXa#2>VzYfnYpINa6nnNdSM~cHK(lw;-Hx z;_vD1C4C`iTEX1tYBR~I?q>|@4l5MWT$HA1I?vAS=BPy$A}6QhO>6Him|8Ad*0U%w zG`7<2Vn=wmEYvPcm*4S^3j?3mOyd7HDQYQ8WURDqI9_Qq|#* z`hS zh+cV)mct8VK^!&BkX06z+sr9_VF)fd@R8o;M)M;47Vq##E1*aVG}UZu2A+wkV|{G8 z{ei~mW)3Zb0DWjJ`xuz4d1nR=w!KfwHhSy7zwxYfLi2l|qt3>P5*r2Tcu4Cn5}34@ zTB_8+Rm94bh+Aa!;?BY0?*o&;m7Dz==_{8tZsfkGj^UEJUpV6>z0ptkM<=1QgDHm8 z^2CT%=q`9826aFEBAVJV^f|M|f^h0HX$s7>5DtD5@SU_b zKdN>bqPj4r@W#N~UZ`HOfgdV{4t7|fzQz6a+S&c^g{qGptCv|bv4T6Ux|0rH&ntIW z=az@9b8%`6xB3~WE_^lp?6SGFw4~gK3SoTyGqbRAFr@3Msa=ux;6&QG;i&{;UAvkW zq1@O^n#)6SLWz5ezXWjf+zJ$cN!DoXWYzo6i@%@eX7sD zcxZ0wlj(I6hI{CjtTTO;R?nhVNSTAG>1~1oj;{DF$Z#7`-QicGh;{8&c$vLe+(8&q zo0nRMp(l3SnVfuA?Jp>zEV|jWA1MP$@a?F=Wwlk+zey!E7soC{*wBXPMwxsD_zuY~ z8MtFL8@kkT^>pnipP-*9pRt}fpCO(}U6QhA>GUugAgl1qyZqe~ni(NEw zZd!w^ZLb`wALf1Fa9Ae3J7gT9{a{r`k`xxroD3E;W*9|qL6-*mqM-1{*K9zMHj!#C zLliFCpDy3J<=UPH1rrz}Q-guM;#;v!JZ>aIAzG;)`)S~Gz~3|^eG;_&X{TW^o0%;Tm(KFG^`T$O_4T@3 zs(ac-wAIA1jEL``?BPc{2rYA6T($855-6o49|Z&`R-9p`f5XICjvn37YNInvMNf&C zlaDpg;tB`+i z;ABcRmAz%NbG~JD+YRExlhpD-5PUX%-qVxRTHa7hh~iMzeu*d8sm5ea3or7o|JH2{Tu4T z9!y8kUUZkH=c-8n6SGHJT4}U{rDyE4n8h1b^xaG0NZo+{ECcZe11$t0x5x_!lpPr6 zDQI^d(qo{p9_L?B)d0{s*es~OApI70d~G1s11kY={UUn?b}(&dT99;5YJSxHTz2Sf z*jhhoAXfdK_B`x%q1Cu!7j^%huy=gWE#52IcPS z)+292+CstuK?(@%8{9*=rEr741d9zM?@QdHyk%KK$N`-VIO%)XgSaJfgR%bB0j&*K z?Zdm}a{F-!@!prI$Is!%7985Axo3TgxPjXPwF8Ckht#isivsxN1s3Bc*KfM#cnbme zX^qP%xg`d`e89^F==Rm_p#cy+5Whft1A6<+Z`osj-xkHd z*@2PU!{wm~Be1>WlMfFlhL-r9Ll(T$M0f%75c&bZWRTd{X0 zIoHXq3_sU(Tj6ic(ix^UQm-Xnf^lRcX}V?3)qvpu`G{OF9|9ib&YimU+QWbZRP5AX=>v9`%>vJ1*>vS8$)@#=cFIO+wFIz8NFJCV0pP``27?461WzQm4eY}Y7)O@&CjbEh z9$H2Q7eIy=fCkS;4iZ2{>{kwpYrF?J4i(#Pye*@uW*k1FYfw)rG6i!5b6wv`?sYtp zEEmjYD|gl?A2Co)!ro2`AKk0JE@ci(8(%%moHq_iP2O@uxo#{C=FHljQ*c4JHz*V% z2}cdbr7T#qsGw17m(Z?hvfIZyQk=&*AsH&xUzYIA6x1{;23)UMvkHx=0dD45sFIge;c4`rXeXOF3RyM3YE} zAEF$M(Trh!ie}P2PQ+}9j$JI~xT7b=lc7;AUD$Nmgc1C+xwP(Al4$lifttss<``v> zC;CX7aCH8eU}EtKwv1x*h(Q8|`*LxX$G-YEi$7SU3A|+m7kJ8X7F0zl zqHz5CBe2aAMgrL@R7H@%B84efMUYQ(YiFFO%%T}_>C4!`#kdlZ&1AJz@knVX4I&Qh z#aiYJ1&3j?z?V)YS9QP|}izd*^*%oNi#3fWZL z4=p)ggB0$Q9ir9yop*S>G0-iR3zAb1o;C)=9>;Phnk565iVpXGo|QF=V6@BrbFR^! z8d=)7!)~;oVSYy&qhSW|E&ICy`^#)A2Q=8HnFJ)akVK-|{2qcK8 zn=4whpVf&!S-?SI;%&3ZvKtoFDA0)%m?^+tfI0}7-nJcINsuFn6F+W;F>+XCb>f{B zXE|}muXSv8rq~Q7p*!hG|rM#uVTrVC83aDDL8pJ(H%RH@NwZ~Jz(`u&d{7N z`>5TgF{I$Kdtlgr@iwSAHW2oF6{zEdSgzjPvZt_iFCEJ0vftjaYfUBMp;6SDZJ%L~ zGB(d!zM9CAu8SE%H^?Xo#V1U9!Wy?{L|T}qdzg`Kv29QqmTTOMBjMFYXZ@WzMSdP@ zw_hheZMDNz8l7Xvs0gvM**s1Am9+n_qe8l5(T(_&4zJovR9?4gk;)kwD#q|^US<8f2PnJTi7Ia&jwFn1Vi}2@|Np! zYhAiP_*mP3{$9$|svkxD9vu&#^?8O(8Ph=`wK4#iNIZ1;mnXpd5tgz-9=6pk{YO7! zF1*;r_M}=BvC0(W4|W{lpclu1#ZZ{ScxO}INN$3sLA_&S{16?5BmyY~HnpA5O@Gi2X zpFB*XfZ}~-w-ngsasW;9dg}*9e`VkbeZ?Qz5~}XiOM5(@ZldeArO|i%R|5P526SSW zr4)(MML<<%BJsYxyy8D%CktU756cp!auk_d2=r!2@by7nfZ@<>9K#XNE4j zPP$^TVr-s@_DuRQEOy`uF*Qh*Rn4py4bw&3mfjztHb%$3!BvKx3MKz4_tj*-J^f+J zp}fZtzX`vAVnI`ir*I?C=^v|qu|K9%UMJ+Rb#o?tbzaAb1%Eli^%IgCFjBRDrq#BY z4TWJPdz5<;0gziL<{_7fad-?&c$pczOd#~VBymmTZLr}>{~7F~*km-DYVrh_6IZE< zBWTprJtI)}PoZ=RWaDF~d*CN3ctM|6M_aF8w6dsus^-rxw7GgixMQ`y;+npMb9CRx za=bVt&wFMq?VK_KSpQYU$pd??K-?!bIHtE86%kRNbuWGapkd^ZRiJUa7*1r5PBB2Q zs3{^V7aQ#>J<{jG+j_jFaK^U5LaJ%vJcT*Ej)5&kM^mW_?}qsA@`Q4KcV`Digl zF)|`G|6IJzXz9G1fj~>JMXdT0(Pt!z?Rra(#MMgww0xRiDKk1y)?KJDGZ$31I3I#b zHNx&b@v?Hj)l2$S#|H&4;pwpa7j_ar`K-b~Q8|jHGY&J0Pk8CAZ1`s{lmHSvWYCFL zv{5>rtqpZvUYmr&mPTslgyF=%oK-jbO@m1_U$SJ%;kjOW(0m3<^MOXl3q?2jwIY8U zZ%JTsme~F5ufRTHWMf)yfEZ38FqMGJ+a{=^UDRw>xfrz4>Tv3wvsWQtDk}9*x&EFd zV@I1iJQ|1FQ;n`Q8(5$QZ{3}Yot?7_K~-#w*PaP^FhV?98bDac=f0=v!|4%>!jM$i zel#>#Fw;#D?NPi1<;`{rF|6Lq(~$WJwrk|rvDL5@C%+?njMBb6qMl zhTU2}*9HexKK~iFP>@i;YBDIFW_^;2n_=}?W0ao!jxArIhBP@s299FGOc9znwNvre zZg$PXf_8NaS=JM5xw17;?t}OVpwDJ62jMLW0QCtHi$L;m*2BHV>-abCkp^`TuhBEW zCvjL`zwN*s1Pk9>VF6g=>__$b5ome=Xv5hWDu8jaWfn~$m3v6!(=wDFV5-<~PZ?cg zp14<`tw2A_DHRC71S~s?qVG0b9oZK}n=CV&tX_ij=)0Jn>;9Ymp?If&% zzlaYY2yP)=*OGTh9SY49TxQXxP)<5gxTfU8iP&5|t-Yr;rn=5NH*r<3Tzd0R0v_Q% z51ZTT4`jdXDy^C*n-o$tn?&0s%^6O+m_Hy)?dSO$$9N}J$||9H3;uci?kZ4roAMn_ zXa68SPB!*@#+m6k*M$$$DxJT@5x80Mon4>$Hf4)E+^Nakn=<=O$Et3Z zW_z@Pcyb57{`3ktecU*fi`(?H9>1@Dr)9;eY;uV0*5&lP_ccVSCP2twi0$8<1;IsS z51ZiDPRFCAP^y>x=L3G6o!2{}32}h!N^a1+WfFt)t2b*^mgq?jmL zy4Z=}$qfB(HeL0bda-zd%AN7#L7r9++|GphJ6XMX<+Ct>T69Xoy@$4WBf5pQ#_Mrd&BpG z+7uz>1Q6eDs2$_x@}Hm55*hR|IS~zhY&b9F`TlNkp$?6pffV4$9E&Yar(m~?HVHIA z)jy8uci1jJ>`;Ob0K>6G35Jh3HfEB<3?Ld$QDFCXeQeMxB^wWdmzT^e1E)`#SI#=f;MpG5*lD7J~Gv}BK z8fsOGd|t!}Rf0yy8-I zL%YeiAu47-oXn8O&@l3$5W}t~Zf0B5U-tVpW_xrD39TRfS}~Vw zv8*1U>>YL@`R`keVy}?r z^k~0-rZ96YI>QI&pWvt(ob{BjQ~-As>7C^r?q;3zj7O8<_9MW+1qIyV+RE22Gm~wI zERwFudt`J1bboFxsT)F|eDutfvvikuC-lz`f0wbd!J+ti*+SG@$I^L13d896;2$2j zY&}Fhzm<+SY6}jOfv0NAK7>CahONka$Yg)^{_*oL^y_O&=Mec2{Xq1G3BZ8XXg>>o zWa^Z>szIZdU>ue@5@bFNf7OQ{J2RC(c$mqhDq<8icru*^RXG(gk_%!(&H$MB5$y|X%7riIKE;FyFP)6OSO$Uv|Q z2)_r6KcJfCQ=j62@gafS6Pn#vDY!UX)Q6kudt|?u3!7M8JFInKcS*#Unk02j2H~BE zTjt1y#w*q5MH_K|H{(b!f;;DM?1PG&i8*cN{nN&Wai?ZtuoCOYGwVz4EbGEzdpphw!KN5~26R_2b&Q@D7 zjha#>ydHKDuD>F)AdO?h1$SKv7yc1AuTSfgAdLthYDiN~BsHQeC!7?gEf4IwjtM12 zZW5S76o3NHMs^aILjVo18QrE}fd5Nk4pwc%`2t1g#-ctm9GVE{lge%Uc>7)Gr#|$l zH2h8Wqj+%s=ojzVA|zJDeGOua&7rW~bpu;Vd-&c=f6xKy9j?nN5*4TMq}#IzLC0P( zo!uoF`S%4>*J=c=Ht+TfN8#Gy!W!SVZEu}!ZYQE z)*ok8&_Pj+WHo=-zA&)0Y_uW6{^Ku*Q*6T@MZ%~z$F5u)7V+#vz``Y>ytlY6owgBa zl3`eD8$kJ&48{DaE7q4R@F9nbQ_(m)vh8pp;%w@O`SXS5S1mx9FUgx)e#Us#k58

_|HqMLNf6oDKk2AhX_?JD%>|H#mY}DW}-Zt^ZE{YFY zzD|4E{;gt!)Gi)ZE`bNWpLOt;)*<;JN=!dQzcaEHcT{_GgJH;MB>i|TRJ!INV@x|l z|J(E-`yVMEsQxD_VsLi5>TjtIjGO(~tVn(VyTaBU5?{h^E*ynO9+|HzLJI*q)S<`_ z#^x@0c8es!C*ywWe(QlpGrTe0y0EpN=@XM z%f&4)&_zU)7?o*QGb0N3%Q=<7lEq0C#+6}{C5si#lp&KPj1|_E5tF5k6keCKEbv%! zHU7{R!IlY1N{&--7Uv};MNkz)P_n8BCM#lBL@g+CNy^a{z$e8sDVS7bRpe2XQ&nVC zNs6{8(I``$kfqJvD08U@JTK}fv$3E&%F9ZMJkR$i=c~xo z5Tz|um8UKTwLo{q8&-_dkja+Q{!^X5qKK)8seq}JDxa#Ds*tLrCazt%X+hi^z9DU$f1TH&xLL+sezl~%w7tZ;gm|uF zLGFz2%pYvAlS$YH0T!g*D&S{f6SR&)xCY*D0^Rb*5B8!O*(z{P7P>{q4inr}$dAAb z3j9T|4mIGNpba0)=tKY-FJMm}8qXhOc{*004lZDn&@u2S9!e;&5z=lu>bHMM6!b<<} zpzoU_%Z0i@4lxtvK-^h{o&4d!+;>Nw4Fzb0%?1Lz!sz_~f?=3{x{&u3!zKynLfgRh zCBrJaV!6x20JZ_6hH7^Moq&fp(|lW4@lg zvPqQZ=wB=Y?MfwOyn(;dDU2f=a#6lUlPE3teMzpeD3z87zX}LI$MB0&Hzo{qCo?yOJu7oL+mP`-$XAU5G55*q;8^rh(H!BP*TR+kR9E+tDMqk7D z$br2N(xRiK(hIi4;{O}$9Krt!AO{?b|1lryE16y(`{2jIIDv)$2<$K|mYxUqwKDaZ zK$FRpao{)#%^4a!YfGZ^VDeQx+@erw3gfS55ST#wJ%zL}M4{yL%Xj2P3n)(GFK59s zj>vH_;mp0m;pyc;nLxYZ>-Ay-cAXsD1-inO6WZ&TCp~{HH1QqABvKmXVgWyamOYcZ zkT^g}adfvq6Oge~3MC~5nraFP9Jt%j; zDPMBx(F322Y#h;YPwq|rC%qsOz`z5XpzVQF{}b8tg4C$fk#(R`P_g5vMbh)z#8$b{ zPXgSpsL7_l>UH6WX{q%5B%s)V4mcsCy&@cN#u0q6p}YSXyzCVhE0>pMjlZbAAZDzQ9iP?+9uCGLTLG6*g@qQBJn+IMS8E^q?v2}d__NH$u zD1=@v6KLJ~Lt)v$Od_^;jE#m0C8yQEoJ}aOivRC;ol@zMm$)iMCcVHl=5$&ei1fn? zI_HORgijiM#y1SGjH=BT0s1d@%jsT<#QdAx@xhy7;Zyt+3qrmv; zz3&`w1X|b|tHEmuRPKAn>;l{okO!uFxD-lJez}L?iY31ybiq+eq!|T$B7mw4wn|CA z;U>^f8B&UU1=9@z0OyZeluA+WP6wPyC28eetZaP75#hh6#Ygg`8JXRh(tjC8q_dt* z0V9_zWOn~Rz9fwU4{fwinh_?@o*5XMiBt5WKqDBM;7%P*11z%wH0h%z@m1FPH@k7f`cU(|FVI?7JA{v3pl8|N zJ{q%s(haWhY`y&x{LNu_8vZ>4wTa&H^jT+?ho%U z3r{V6u*;b888W)D#JPvKBf@Qr@xa|BL{B{+(;p#iIrMI1eQ!@0;!2t7=sz0@xH8o; z)iQdft){c5bx-jf%Y>y0Xu;Y49(qF71-Jh(6phTjJ&xN)RBv`ndu)CD`&gUi=l&M` zo*38>a;={m=}_gIsbTWur{+a;#DYbq(z=c9KV3BB5na_akE>|5=Ei~Ry5`NcR+1q2 zUPj?<*nN5={@BCrvB`?6-_Os+7z(Gik=F;y4lg$z`11u_m5uZIj_Vd&RngirUyn^m zkJ6D873HhThbiJVV%DwX>@LnuFKt#a?bor@+OlfyzB)0acA;>$fDdSbTj z(-aIf!c9~~TZ?M8F84ReA7^Q2eD9TL3u7{U_&0L(`x8+YN&e0xd+i z19qnxwz*z$I?%6{N*lq_xtc7-FUa9Y^C|w1MjvfxlVAt&4pCNj=mO_B=1jDU!JLM9 z97tGAHPlJ4gK$?oCf$$3$Lr9WuaFj8d-}qFJMGDVUBWZ_TxV1E(K$LPeEZED8ob0}Yo9 z?|?TnQ&3PnfRsI0&X`hlDkRA=x}ruFGa<>f*_CrAgU`_9ut;5Dp0WNE@kK{y$*i$r zdt;!PO}Igboii(fE^9hgd{2ZZMc>?oD&ii^^|zJQvC}%&l*LR(Rb}^CUlD*41|vSm z)^=>64lk%taOSS4scL$hviy={CH84ID+gt;`!C8mqGK;;(BkpO{W;;I*i2^I1yyG9 zAnxq^r9M$$MAqz1B~$>}(d;HiDuSL+y9p**1UoIwo{na#1l7T=R;V2=*7L8Um`zvC zklu0XEzeZqbogx)eWG)am;1r`otl&Pm81ox8=R-O5Ly0vQi=`{&Rmh?$qrOR zI0&@>SF}uy`1;aV^V(D|{33UWjF+E{1uf3Q+i9!FwXG$){Y{8rf0!Cgiea-^cC(>u z)Uc`{rk-W}WW8m*W}Wq#_8RY6_uA)L;M(9?;o9Pw)SAzw_9gT)uggzv1mKqrKj#R3 z4uN6GgP>FVi1b5A6Bw>bWuW`f>Icv)4w~+KN7o_`%kxh*V$W= zK^+JM>j2>h0YR)Yy2iNg9HqFj`$M>WAQ+fO02h88Xcr{NqSx9BAtoQvhK?uL`Ej>X zEeL9cE*Z=;2dlw32DM1A19fL?qml9sL9bv6Wu7C$8WT70SyI+^7rb?|imSF@bhAf_ z1TCc?#wtixrNn`ql39mBW&4Ns(lxO-h$}zGceBVkQ9jgoHM1k5YLckBX6*5!9qX*1 zc5<`xjmzrybr&T|AuN1m)ZA<$QLxGYc1(OgjWt@qP>)5NIAN0;>FaE?kP)pu^UF`V zn85**O0nUxI+-;amqx!WeX5ayI$;`|%t-V&$%dpV63j&FqQFby)Oc#~6fKz=LVA)L zQe6_HIQ&GhvDq>DvBE>fdz^c;SMFDG_lyAwP!UCzWC6}{>hkw;(=w#8*>c-YhmZS@ zA|Gu2M%}{QpS{IClb>{tnm4Y2yD~nlfbHYfe%r)dj9#cuyl2m)8~fhUkDNQtnHz}S z)DOhh-%m&{a<{ejwlBH|zRlmizcxQw-*>Ni2YpMwKfjRP_%FZ9zAe9M-*29L7lF6T z5q`UV>;fr(zU#kHzHP}969dV~rDt-qxY`}>&&O9~cDP={$8BZ4^zUO6eRDo050#X_ zO2td2G7@-1_={a6Ka+-)uuE8E%>QHN)tl&`Y?X7@o7kbWmE~kOnoDXe?ZRQ8B;X*R z(X;R)A)q55CZN}|>HF{t1|fS`KjPM*F0*0sqilNPk&_sR1V5Heg+mhi#!rL4Lz$ox;eBqs@s9S-~LG8Jvac7 zJvDz_C?8BWo?GEK4l|dzth}MTq`aoQsJtx#5qWcY^*A~+1$kq6XL;*5(lKl&_qpE! zauD5Uj}~(|dF%l@NL(0?GIOp1qk*#EpJ+}@r>lBYX)rlxJe+^gaB*=lXb@wdV~}QG zS0LCSb1}UvZ=d&00(aqk=mCLygZ=nW_%L5wfX%&|Kws!DN`R5LQ5c<(%2+p{ToBLi zd+D(ULi&&{+A;Cex(vTU%X?T@jIv8s> z=U~Jjou3}Yr?mN*LO0Oc7#+NiJ#$ck_^{q2kM(of`LUsV_-`JkQ2DtbKB$lbX?1CJ zhjmSLQFT=e#%Xj`3Tcc}xT;tt2p8}dFc)x|7%fCr&TA0*mVix}OoZ-x2*Ra;`*2o)-8{`|bU3wq+k2-+D9o-%3e(6x>@N7gbW-o=0`bULZ zECAt-@6P8=;7)Vjb?7FX9~mFRmxhn%OZp=iPzFc?;M}?HAMB&<=MIq%_eS`leiMF4 zeYAp$ga1?%lnVOEKW-%9MYwdP!_jHi^g~I`c#) z@eUFxQdx=EBDn_X20wgbNaOahsGavUQ4eqII%% zsRkj3+(UtJ;soska?(!HSqYsaAP+zBI`uj|CyBe*ea~Utq2ah%0zN6fSdhq6lz8k| zWSnS{uo+PX5f@PhQB6!6=l)9A39(M>8qS^d(0G_`>2yX41FgBnbW@4>^deoR%XZU6 z=~cRm*~aE#_*r5pl(bw{4lA!|hrY-3W5=0gi7un}_M=+KO|FmK+w9_Z#@9>K8MDc3 zSgr!!Ak!e1;Z+p1sTS+O85aGloAZbq^H-L=hspj_RXQhg>a-T`LqIyxte3|zGqctkn9d$5of=$&FQw z*rwWS7ai)WvmRzEN{ueFZ+0t~jWME(3jPZH3NQ-k3hN4y1r>!Bg>+#ZJm(W-+X}V9 z-55{COLt|c^Gb!LB4T3nQFIZiVy$8?!Y?AWQ9aaeIj2JNp@sZ0goY(UVFvexMvM`^ zJfnz5&>bD8Qqrm!>4&;d8tISU({v4eA`xPvqoN~{M=cDR>#OUf472OmM{UBlvEL;x zzt#fl`G>!-JUv`KE+5y^8*xlpr?1nzk1lacc3Ixf*6C+`oS)eneRDpgvV677wA{2b zw0yR@+Dh7D+G^V14pxS>f4A~p`?rPeBaV3gdQsRacSEKRlZ%>-mw3+Zs+MW66!<0fJ{VWwD zCo4B2O()kvqM1l9(L?syakxEROVXR-#q+9se?zH28BRG)*^xAnbe@!xq(W&m(USD8 zh$sF^aP*Kwuk=HSw0u$Vq?Af2QZcoJPEI?$gVb5}sGXb>X@AN>0q2Ynz^zy_-Qh#YRRqVJD}D@ALUF`i#D)H@=7d^ZikG(RUJh zIxQY0y`DfQSs|;QWH5a`v7XS-b7UK<*0d}6PIklASL> z($Vqcc(&W=y4i7cmY3&cvR!w2GK<}JXTaU^M4R)b!X1C+-C$?_wfzAO_&Tr4`2F_E zKJ)GVrTg%$qo*U^t9KUwg~`*tcNVOK5kikfZ>4#vvDSHe6l_b!Q+Infun6(DzbYUo zpeUdK%-g>{uPd*iPh;*c2pk<{TjkzYz$b(loDUs``mI!d`M`K^!NA_Y+`z4%1mT7~ z`V6Hs%@lQ(T3cRSUR~3ivKg%vO%r+x8W)@^8lMh8>)*}*I~)>5j|xEH-%0Q&tS=3Z zx?9Dqt9hPN2#ah6flNw?1at92F@$2eG9_(Fig@$_n|WCoVehz1Y^zyE%hF0Ql&{2rtB#K=5Y;UDdX-2~ z>eOw5PVE+n7LgX27VT%hOPF=)2JeQ?hQNkaBm4=zl;82*bnlAKftT!@q?i+*N1*qA z-0OH`b4X`XPR1S%CEe@0gmuVPClT(kUk!kifa*I`H}SPewF!;)%lDB-spGYAx}?3L zK9ydT9|Erj_vA-%lezJ|G`=!l9bUO!y&uf4t@pc!z7yZ7d$5WE)WQ++!^$E-1|38K z@ik-0M$``IaOlCX>4N1Hil^w#5o98b1uFHz^~(R0A1U6@C(%!+S14=Lwu;(R>ILd$ z>{AUw_xXl@M6{xfCJ7p+F==pWa*CxFNvoJpG$u0@E2>w~sH9LnNd_(ySt-$}>6CQI zz1H71O~|o|pqIfa1Xm7K2&?2+4c zdUUlHxA(gH*q<;EyBi)>!_-ys(!R4EZpE~v>gfc0?Tba^()*MHmiJd9U(j#peR=`n zcPGPQk-cQ)k<6C-Krj$Zh_CdH;E_0CzPkzbKT|M%5SQENpMo-@VcR1l01?M zk`j^{l6;bOl4_Dhl2VdhBcJhspN`>$hg}Izq_rtt@(vYFisn}4qUJ8NjhpB<&W13zl*u0Zs@)19>*6-rE+P#^B<2E)TDYTK6@U8&t{8z z&CI4rrj2C$$iz|e!&i$e7Fg3WaHqj!@j%xjjlYTFeWRUYz=^`{Fn zv@^(Aw3*S5?g|n=z~dS4ymx zTgw5lu4}WI9O5HHrux%b~=C_cukTd_D%UJ>a zonPpj=#=P8q+LfRO}-+tIK3otX5f6+A*>xir=40nxjem0JBNOL$dxQxy?E-x6*yB> zxwL$G?yRbvSR>LZyqbTp!s*=IVce12@!(YHYzgGHr(4#}@04_{zV_Ib>Ckk>amsYo zbl!A+IdwV5o8ztWlzs`iHs5aSz;vR&&{^!x_f&F~e`&eq-45-Dbg z>`~k!Ub~9(NcZXY#q;^}hVUlyhWX_AWP9#A|J@BulhID$qcA|USkNJoBBDmq;WHl{ z=|b;eJZ~8(i(?iz7iUSqG6w$?f)Th~H)0p8pZ$+BkO@ z!&a=d47z$cmOX=BwXb{+d=H(+FVm$H0_}M`#XPM%y}D$Q!ls@wAR?<1(G@v7ZQ_S+-yslUnqz)LZ(RIrrP zHOwn$YPB@lyBv&270=3@ za*x{cRf{U@+8mW^`D|rvMe8aywHMV~HH1prnjOXNW)IsZ?&TYmZv~+xdDcctMauHbb81baz3D)DyOMf$Hrc;(vq-aw$ zubX)+){Qw0UN`Qq_Rk_s>0@-Ow5qhLbT75K9PTQHTWNP%+}`(HF?<^UO4P;(b&wj1 z)sEE<)ha8HmWfYX7uG8XE2&lQRqr^rki8+}2-t~{X;P6|16qrjYxh1wq%qy=H zS)N;*+iL7I6`PAK&Xl-j@R`3YiEawF5NPJeSR`&*wa99=T9;liZXUGkX55(+a5lR8 zJPaI@PR|_Y99w4ETK9CnE+7Ax4$bhj?$@|YQKyBWm7pD_jns&u-KL$?P;J`UXlOo~ zNeQIIZ}D2XccotBDraqQmbEmv*jM$m)Vx5b#?fSN?OA`*xqzzn-Nbq)@oe$V@1EN+ zxM|_Oytr!JWZ%%OziGv9`nLL>{CY`fBQ=*|N=ZvyqF3)a{2)!GZ8sR7A&sSV_ZkzIoq5xfH2XDvdMUmHOM|!fHy-b(mujClf9vXN`l_0bs#?%YJ~; zIfa9DW-|-;%kJ$2r&~b3k#sfgkgnlM9d6!o?y;=CFjy_FvDCiMMrzM-?%wlQf6BN( zSmj&QUu9gS=XIJb${FV^$l1%O!?T}l%1P%n=S}Bb=WXY8^u%~Xdmi&l;uYbI^sw;s z@SwX`UwaUr-N`BB<$sdB%3jA=&s^ZHRa>dNq`juSVtvf;r1rG*xbRqg+Sz^=yuszdwhSAJ43oeI*UEco#(IQFY$HpweS`F9{5`D z5$bL4ZRjoO&EH+w-2ndQcQ^UxdR>kpsdaVS&5q)eb8C4z?k|#et3ULQG@$J zBLa}X;lUAt;17|OkhEBC`}$CS%p!I1)!FWC`^Q4@;RDR~4*PN|$5f^&Bq~4D!qsFn zSq+z~R2VBwY9+Ok>!~bNW-00%^=!&$}8qHIPi{40+zAhp##Ml3_ zf?hkBh>!BOf3!<)dUSv5NApE-fg869@!VpuT+gMk=Eq*MeFFc#^}JhOxqxlg)dw4# zo`fxXD0*2duq@o{S9HOwImiFbe^_1*&H!wR!5nss3=F4OKpB9MNt79TniXT<0iNmv z1`cl>L3D6NYHC4nMk4UEB;a{O`6;OdMfq94w8FtK4;VwB)Cn<9gnpUwZ#EHY704X(93s4Bv-z5 zT-<~!w2(puGuvR#hE^y>e \"${SRCROOT}/../Unix/basic-dyngen-ops.hpp\"\necho \"\t#include \\\"basic-dyngen-ops-x86_64.hpp\\\"\" >> \"${SRCROOT}/../Unix/basic-dyngen-ops.hpp\"\necho \"#elif defined(__i386__)\" >> \"${SRCROOT}/../Unix/basic-dyngen-ops.hpp\"\necho \"\t#include \\\"basic-dyngen-ops-x86_32.hpp\\\"\" >> \"${SRCROOT}/../Unix/basic-dyngen-ops.hpp\"\necho \"#else\" >> \"${SRCROOT}/../Unix/basic-dyngen-ops.hpp\"\necho \"\t#error Unknown platform\" >> \"${SRCROOT}/../Unix/basic-dyngen-ops.hpp\"\necho \"#endif\" >> \"${SRCROOT}/../Unix/basic-dyngen-ops.hpp\"\n"; - }; - 0873A66914AB8A40004F12B7 /* Run dyngen */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/dyngen", - "$(OBJECT_FILE_DIR)-$(CURRENT_VARIANT)/i386/ppc-dyngen-ops.o", - "$(OBJECT_FILE_DIR)-$(CURRENT_VARIANT)/x86_64/ppc-dyngen-ops.o", - ); - name = "Run dyngen"; - outputPaths = ( - "$(SRCROOT)/../Unix/ppc-dyngen-ops-x86_32.hpp", - "$(SRCROOT)/../Unix/ppc-dyngen-ops-x86_64.hpp", - "$(SRCROOT)/../Unix/ppc-dyngen-ops.hpp", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "arch -x86_64 \"${BUILT_PRODUCTS_DIR}/dyngen\" -o \"${SRCROOT}/../Unix/ppc-dyngen-ops-x86_64.hpp\" \"${OBJECT_FILE_DIR}-${CURRENT_VARIANT}/x86_64/ppc-dyngen-ops.o\"\narch -i386 \"${BUILT_PRODUCTS_DIR}/dyngen\" -o \"${SRCROOT}/../Unix/ppc-dyngen-ops-x86_32.hpp\" \"${OBJECT_FILE_DIR}-${CURRENT_VARIANT}/i386/ppc-dyngen-ops.o\"\n\necho \"#if defined(__x86_64__)\" > \"${SRCROOT}/../Unix/ppc-dyngen-ops.hpp\"\necho \"\t#include \\\"ppc-dyngen-ops-x86_64.hpp\\\"\" >> \"${SRCROOT}/../Unix/ppc-dyngen-ops.hpp\"\necho \"#elif defined(__i386__)\" >> \"${SRCROOT}/../Unix/ppc-dyngen-ops.hpp\"\necho \"\t#include \\\"ppc-dyngen-ops-x86_32.hpp\\\"\" >> \"${SRCROOT}/../Unix/ppc-dyngen-ops.hpp\"\necho \"#else\" >> \"${SRCROOT}/../Unix/ppc-dyngen-ops.hpp\"\necho \"\t#error Unknown platform\" >> \"${SRCROOT}/../Unix/ppc-dyngen-ops.hpp\"\necho \"#endif\" >> \"${SRCROOT}/../Unix/ppc-dyngen-ops.hpp\"\n"; - }; - 0873A67214AB8AE9004F12B7 /* Run genexec */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(SRCROOT)/../kpx_cpu/src/cpu/ppc/ppc-decode.cpp", - "$(SRCROOT)/../kpx_cpu/src/cpu/ppc/genexec.pl", - ); - name = "Run genexec"; - outputPaths = ( - "$(SRCROOT)/../Unix/ppc-execute-impl.cpp", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "gcc -E \"-I${SRCROOT}/config\" \"-I${SRCROOT}/../include\" \"-I${SRCROOT}/../kpx_cpu/include\" \"-I${SRCROOT}/../kpx_cpu/src\" \"-I${SRCROOT}/../Unix\" -DUSE_JIT -DGENEXEC \"${SRCROOT}/../kpx_cpu/src/cpu/ppc/ppc-decode.cpp\" | perl \"${SRCROOT}/../kpx_cpu/src/cpu/ppc/genexec.pl\" > \"${SRCROOT}/../Unix/ppc-execute-impl.cpp\"\n"; - }; - 08CD3F3214B665E1009CA2A2 /* Preprocess Info.plist */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Preprocess Info.plist"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "sed -i '' 's/@PACKAGE_VERSION@/2.4/g' \"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\""; - }; - 08CD43CF14B7BD01009CA2A2 /* Change SDL load path */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Change SDL load path"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "install_name_tool -change @rpath/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL \"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}\"\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 082AC24F14AA59B600071F5E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 082AC26214AA59F000071F5E /* lowmem.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0846E49714B124DE00574779 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0846E4B114B1264700574779 /* ieeefp.cpp in Sources */, - 0846E4B314B1264F00574779 /* mathlib.cpp in Sources */, - 0846E4B514B1265500574779 /* utils-cpuinfo.cpp in Sources */, - 0846E4B614B1265A00574779 /* ppc-translate.cpp in Sources */, - 0846E4B814B1266000574779 /* ppc-jit.cpp in Sources */, - 0846E4B914B1266600574779 /* ppc-execute.cpp in Sources */, - 0846E4BC14B1267200574779 /* ppc-dyngen.cpp in Sources */, - 0846E4BE14B1267A00574779 /* ppc-decode.cpp in Sources */, - 0846E4C014B1267F00574779 /* ppc-cpu.cpp in Sources */, - 0846E4C114B1268B00574779 /* jit-cache.cpp in Sources */, - 0846E4C214B1269600574779 /* basic-dyngen.cpp in Sources */, - 0846E51314B128ED00574779 /* sheepshaver_glue.cpp in Sources */, - 08163340158C125800C449F9 /* ppc-dis.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0846E52514B129EE00574779 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0846E52B14B12A0800574779 /* ppc_asm.S in Sources */, - 0846E55314B12B0D00574779 /* paranoia.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0856CCBE14A99E1C000B1711 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0856CFC114A99EF0000B1711 /* adb.cpp in Sources */, - 0856CFC214A99EF0000B1711 /* audio.cpp in Sources */, - 0856CFE214A99EF0000B1711 /* cdrom.cpp in Sources */, - 0856CFE614A99EF0000B1711 /* disk.cpp in Sources */, - 0856CFEC14A99EF0000B1711 /* scsi_dummy.cpp in Sources */, - 0856CFEE14A99EF0000B1711 /* emul_op.cpp in Sources */, - 0856CFF014A99EF0000B1711 /* ether.cpp in Sources */, - 0856CFF314A99EF0000B1711 /* extfs.cpp in Sources */, - 0856CFF414A99EF0000B1711 /* gfxaccel.cpp in Sources */, - 0856D00914A99EF0000B1711 /* macos_util.cpp in Sources */, - 0856D02514A99EF0000B1711 /* extfs_macosx.cpp in Sources */, - 0856D05014A99EF1000B1711 /* prefs_macosx.mm in Sources */, - 0856D05A14A99EF1000B1711 /* sys_darwin.cpp in Sources */, - 75CBCF7B1F5DB82B00830063 /* video_sdl2.cpp in Sources */, - 0856D05B14A99EF1000B1711 /* main.cpp in Sources */, - 0856D05C14A99EF1000B1711 /* name_registry.cpp in Sources */, - 0856D05D14A99EF1000B1711 /* prefs_items.cpp in Sources */, - 0856D05E14A99EF1000B1711 /* prefs.cpp in Sources */, - 0856D05F14A99EF1000B1711 /* rom_patches.cpp in Sources */, - 0856D06014A99EF1000B1711 /* rsrc_patches.cpp in Sources */, - 0856D06114A99EF1000B1711 /* scsi.cpp in Sources */, - 0856D06214A99EF1000B1711 /* audio_sdl.cpp in Sources */, - 0856D06414A99EF1000B1711 /* SDLMain.m in Sources */, - 0856D06514A99EF1000B1711 /* video_sdl.cpp in Sources */, - 0856D06614A99EF1000B1711 /* serial.cpp in Sources */, - 0856D06714A99EF1000B1711 /* bootp.c in Sources */, - 0856D06814A99EF1000B1711 /* cksum.c in Sources */, - 0856D06A14A99EF1000B1711 /* debug.c in Sources */, - 0856D06B14A99EF1000B1711 /* if.c in Sources */, - 0856D06C14A99EF1000B1711 /* ip_icmp.c in Sources */, - 0856D06D14A99EF1000B1711 /* ip_input.c in Sources */, - 0856D06E14A99EF1000B1711 /* ip_output.c in Sources */, - 0856D06F14A99EF1000B1711 /* mbuf.c in Sources */, - 0856D07014A99EF1000B1711 /* misc.c in Sources */, - 0856D07114A99EF1000B1711 /* sbuf.c in Sources */, - 0856D07214A99EF1000B1711 /* slirp.c in Sources */, - 0856D07314A99EF1000B1711 /* socket.c in Sources */, - 0856D07414A99EF1000B1711 /* tcp_input.c in Sources */, - 0856D07514A99EF1000B1711 /* tcp_output.c in Sources */, - 0856D07614A99EF1000B1711 /* tcp_subr.c in Sources */, - 0856D07714A99EF1000B1711 /* tcp_timer.c in Sources */, - 0856D07814A99EF1000B1711 /* tftp.c in Sources */, - 0856D07914A99EF1000B1711 /* udp.c in Sources */, - 0856D07B14A99EF1000B1711 /* sony.cpp in Sources */, - 0856D07C14A99EF1000B1711 /* thunks.cpp in Sources */, - 0856D07D14A99EF1000B1711 /* timer.cpp in Sources */, - 0856D07E14A99EF1000B1711 /* about_window_unix.cpp in Sources */, - 0856D08714A99EF1000B1711 /* bincue_unix.cpp in Sources */, - 0856D09814A99EF1000B1711 /* ether_unix.cpp in Sources */, - 0856D0AA14A99EF1000B1711 /* main_unix.cpp in Sources */, - 0856D10614A99EF1000B1711 /* prefs_unix.cpp in Sources */, - 0856D10714A99EF1000B1711 /* rpc_unix.cpp in Sources */, - 0856D10814A99EF1000B1711 /* serial_unix.cpp in Sources */, - 0856D10C14A99EF1000B1711 /* sshpty.c in Sources */, - 0856D10D14A99EF1000B1711 /* strlcpy.c in Sources */, - 0856D10E14A99EF1000B1711 /* sys_unix.cpp in Sources */, - 0856D10F14A99EF1000B1711 /* timer_unix.cpp in Sources */, - 0856D11114A99EF1000B1711 /* user_strings_unix.cpp in Sources */, - 0856D11614A99EF1000B1711 /* xpram_unix.cpp in Sources */, - 0856D11714A99EF1000B1711 /* user_strings.cpp in Sources */, - 0856D11814A99EF1000B1711 /* video.cpp in Sources */, - 0856D13F14A99EF1000B1711 /* xpram.cpp in Sources */, - 0856D33914A9A704000B1711 /* VMSettingsController.mm in Sources */, - 082AC22D14AA52E900071F5E /* prefs_editor_dummy.cpp in Sources */, - 0873A80214AC515D004F12B7 /* utils_macosx.mm in Sources */, - 083E370C16EFE85000CCCA59 /* disk_sparsebundle.cpp in Sources */, - 083E372216EFE87200CCCA59 /* tinyxml2.cpp in Sources */, - A7B1921418C35D4700791D8D /* DiskType.m in Sources */, - 087B91BE1B780FFC00825F7F /* sigsegv.cpp in Sources */, - 087B91BF1B780FFC00825F7F /* video_blit.cpp in Sources */, - 087B91C01B780FFC00825F7F /* vm_alloc.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0873A52F14AAF05A004F12B7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0873A54214AAF18E004F12B7 /* cxxdemangle.cpp in Sources */, - 0873A54314AAF18E004F12B7 /* dyngen.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0873A5C214AB8038004F12B7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0873A5D614AB80CA004F12B7 /* basic-dyngen-ops.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0873A5C914AB806D004F12B7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0873A5D814AB80E3004F12B7 /* ppc-dyngen-ops.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0885A51E1593E3B6005C4F7B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 08C99DA11593E79F00898E41 /* clip_macosx.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0885A52D1593E47F005C4F7B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 08D93A16159FE174003B04EC /* clip_macosx64.mm in Sources */, - 0879BD5E15A88F7600DC277D /* pict.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 082AC26814AA5A4800071F5E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 082AC25114AA59B600071F5E /* lowmem */; - targetProxy = 082AC26714AA5A4800071F5E /* PBXContainerItemProxy */; - }; - 0846E4A714B1253500574779 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 0846E49914B124DE00574779 /* kpx_cpu */; - targetProxy = 0846E4A614B1253500574779 /* PBXContainerItemProxy */; - }; - 0846E4C614B126B600574779 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 0873A5CB14AB806D004F12B7 /* ppc-dyngen-ops */; - targetProxy = 0846E4C514B126B600574779 /* PBXContainerItemProxy */; - }; - 0846E4C814B126B800574779 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 0873A67314AB8AE9004F12B7 /* ppc-execute-impl */; - targetProxy = 0846E4C714B126B800574779 /* PBXContainerItemProxy */; - }; - 0846E52E14B12A2E00574779 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 0846E52714B129EE00574779 /* ppc_asm */; - targetProxy = 0846E52D14B12A2E00574779 /* PBXContainerItemProxy */; - }; - 0873A60314AB83CC004F12B7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 0873A5C414AB8038004F12B7 /* basic-dyngen-ops */; - targetProxy = 0873A60214AB83CC004F12B7 /* PBXContainerItemProxy */; - }; - 0873A62714AB869A004F12B7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 0873A53114AAF05A004F12B7 /* dyngen */; - targetProxy = 0873A62614AB869A004F12B7 /* PBXContainerItemProxy */; - }; - 0885A53A1593E4BC005C4F7B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 0885A5201593E3B6005C4F7B /* clip */; - targetProxy = 0885A5391593E4BC005C4F7B /* PBXContainerItemProxy */; - }; - 0885A53C1593E4BC005C4F7B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 0885A52B1593E47F005C4F7B /* clip64 */; - targetProxy = 0885A53B1593E4BC005C4F7B /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 0856D30714A9A704000B1711 /* VMSettingsWindow.nib */ = { - isa = PBXVariantGroup; - children = ( - 0856D30814A9A704000B1711 /* English */, - ); - name = VMSettingsWindow.nib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 082AC25414AA59B700071F5E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - i386, - x86_64, - ); - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_ENABLE_SYMBOL_SEPARATION = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_VERSION = 4.0; - INSTALL_PATH = /usr/local/bin; - OTHER_LDFLAGS = ""; - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = lowmem; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - }; - name = Debug; - }; - 082AC25514AA59B700071F5E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - i386, - x86_64, - ); - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_ENABLE_SYMBOL_SEPARATION = NO; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_VERSION = 4.0; - INSTALL_PATH = /usr/local/bin; - OTHER_LDFLAGS = ""; - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = lowmem; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - ZERO_LINK = NO; - }; - name = Release; - }; - 0846E49B14B124DF00574779 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - i386, - x86_64, - ); - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = ""; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DATADIR=", - HAVE_CONFIG_H, - USE_JIT, - "_GNU_SOURCE=1", - _THREAD_SAFE, - _REENTRANT, - ); - GCC_VERSION = 4.0; - HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL.framework/Versions/A/Headers/, - ./config/, - ../Unix, - ../MacOSX/Launcher, - ../slirp, - ../kpx_cpu/src, - ../kpx_cpu/include, - ../include, - ); - INSTALL_PATH = /usr/local/lib; - PREBINDING = NO; - PRODUCT_NAME = kpx_cpu; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - "SDKROOT[arch=x86_64]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; - }; - name = Debug; - }; - 0846E49C14B124DF00574779 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - i386, - x86_64, - ); - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_AUTO_VECTORIZATION = YES; - GCC_DYNAMIC_NO_PIC = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_SSE3_EXTENSIONS = YES; - GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; - GCC_MODEL_TUNING = ""; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DATADIR=", - HAVE_CONFIG_H, - USE_JIT, - "_GNU_SOURCE=1", - _THREAD_SAFE, - _REENTRANT, - ); - GCC_VERSION = 4.0; - "GCC_VERSION[arch=x86_64]" = 4.2; - HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL.framework/Versions/A/Headers/, - ./config/, - ../Unix, - ../MacOSX/Launcher, - ../slirp, - ../kpx_cpu/src, - ../kpx_cpu/include, - ../include, - ); - INSTALL_PATH = /usr/local/lib; - "MACOSX_DEPLOYMENT_TARGET[arch=x86_64]" = 10.6; - PREBINDING = NO; - PRODUCT_NAME = kpx_cpu; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - "SDKROOT[arch=x86_64]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; - ZERO_LINK = NO; - }; - name = Release; - }; - 0846E52914B129EF00574779 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ppc; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = __ASSEMBLY__; - GCC_VERSION = 4.0; - HEADER_SEARCH_PATHS = ( - ../Unix, - ../include, - ); - INSTALL_PATH = /usr/local/lib; - PREBINDING = NO; - PRODUCT_NAME = ppc_asm; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - }; - name = Debug; - }; - 0846E52A14B129EF00574779 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ppc; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_MODEL_TUNING = G5; - GCC_PREPROCESSOR_DEFINITIONS = __ASSEMBLY__; - GCC_VERSION = 4.0; - HEADER_SEARCH_PATHS = ( - ../Unix, - ../include, - ); - INSTALL_PATH = /usr/local/lib; - PREBINDING = NO; - PRODUCT_NAME = ppc_asm; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - ZERO_LINK = NO; - }; - name = Release; - }; - 0856CCAF14A99DE0000B1711 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - }; - name = Debug; - }; - 0856CCB014A99DE0000B1711 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - }; - name = Release; - }; - 0856CCC514A99E1C000B1711 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - ppc, - i386, - x86_64, - ); - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = /Library/Frameworks; - GCC_CW_ASM_SYNTAX = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_ENABLE_SYMBOL_SEPARATION = NO; - GCC_ENABLE_TRIGRAPHS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DATADIR=", - HAVE_CONFIG_H, - USE_JIT, - "_GNU_SOURCE=1", - _THREAD_SAFE, - _REENTRANT, - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = 4.0; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL.framework/Versions/A/Headers/, - ./config/, - ../Unix, - ../MacOSX/Launcher, - ../slirp, - ../kpx_cpu/src, - ../kpx_cpu/include, - ../include, - ); - INFOPLIST_FILE = Info.plist.in; - INFOPLIST_PREFIX_HEADER = ""; - INFOPLIST_PREPROCESS = NO; - INSTALL_PATH = "$(HOME)/Applications"; - MACOSX_DEPLOYMENT_TARGET = 10.4; - "MACOSX_DEPLOYMENT_TARGET[arch=x86_64]" = 10.5; - OTHER_CFLAGS = ""; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - OTHER_LDFLAGS = ( - "-pagezero_size", - 0x3000, - "-Wl,-seg1addr,0x78048000", - "-lkpx_cpu", - "-lclip", - ); - "OTHER_LDFLAGS[arch=ppc]" = ( - "-pagezero_size", - 0x3000, - "-Wl,-seg1addr,0x78048000", - "-lppc_asm", - "-lclip", - ); - "OTHER_LDFLAGS[arch=x86_64]" = ( - "-pagezero_size", - 0x3000, - "-Wl,-seg1addr,0x78048000", - "-lkpx_cpu", - "-lclip64", - ); - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = SheepShaver; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - "SDKROOT[arch=x86_64]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; - WARNING_LDFLAGS = ""; - }; - name = Debug; - }; - 0856CCC614A99E1C000B1711 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - ppc, - i386, - x86_64, - ); - COPY_PHASE_STRIP = NO; - DEAD_CODE_STRIPPING = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - FRAMEWORK_SEARCH_PATHS = /Library/Frameworks; - GCC_AUTO_VECTORIZATION = YES; - GCC_CW_ASM_SYNTAX = NO; - GCC_DYNAMIC_NO_PIC = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_ENABLE_SSE3_EXTENSIONS = YES; - GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; - GCC_ENABLE_SYMBOL_SEPARATION = NO; - GCC_ENABLE_TRIGRAPHS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DATADIR=", - HAVE_CONFIG_H, - USE_JIT, - "_GNU_SOURCE=1", - _THREAD_SAFE, - _REENTRANT, - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = 4.0; - "GCC_VERSION[arch=x86_64]" = 4.2; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL.framework/Versions/A/Headers/, - ./config/, - ../Unix, - ../MacOSX/Launcher, - ../slirp, - ../kpx_cpu/src, - ../kpx_cpu/include, - ../include, - ); - INFOPLIST_EXPAND_BUILD_SETTINGS = NO; - INFOPLIST_FILE = Info.plist.in; - INFOPLIST_PREFIX_HEADER = ""; - INFOPLIST_PREPROCESS = NO; - INSTALL_PATH = "$(HOME)/Applications"; - MACOSX_DEPLOYMENT_TARGET = 10.4; - "MACOSX_DEPLOYMENT_TARGET[arch=x86_64]" = 10.5; - OTHER_CFLAGS = ""; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - OTHER_LDFLAGS = ( - "-pagezero_size", - 0x3000, - "-Wl,-seg1addr,0x78048000", - "-lkpx_cpu", - "-lclip", - ); - "OTHER_LDFLAGS[arch=ppc]" = ( - "-pagezero_size", - 0x3000, - "-Wl,-seg1addr,0x78048000", - "-lppc_asm", - "-lclip", - ); - "OTHER_LDFLAGS[arch=x86_64]" = ( - "-pagezero_size", - 0x3000, - "-Wl,-seg1addr,0x78048000", - "-lkpx_cpu", - "-lclip64", - ); - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = SheepShaver; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - "SDKROOT[arch=x86_64]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; - ZERO_LINK = NO; - }; - name = Release; - }; - 0873A53414AAF05A004F12B7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - i386, - x86_64, - ); - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_ENABLE_SYMBOL_SEPARATION = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_VERSION = 4.0; - INSTALL_PATH = /usr/local/bin; - OTHER_CFLAGS = "-mdynamic-no-pic"; - OTHER_LDFLAGS = ""; - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = dyngen; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - }; - name = Debug; - }; - 0873A53514AAF05A004F12B7 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - i386, - x86_64, - ); - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_SYMBOL_SEPARATION = NO; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_VERSION = 4.0; - INSTALL_PATH = /usr/local/bin; - OTHER_LDFLAGS = ""; - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = dyngen; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - ZERO_LINK = NO; - }; - name = Release; - }; - 0873A5C614AB8038004F12B7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - i386, - x86_64, - ); - COPY_PHASE_STRIP = NO; - GCC_CW_ASM_SYNTAX = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 2; - GCC_PRECOMPILE_PREFIX_HEADER = ""; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = ( - USE_JIT, - HAVE_CONFIG_H, - _REENTRANT, - _THREAD_SAFE, - "_GNU_SOURCE=1", - ); - GCC_VERSION = 4.0; - HEADER_SEARCH_PATHS = ( - ../kpx_cpu/src, - ../kpx_cpu/include, - ); - INSTALL_PATH = /usr/local/lib; - OTHER_CFLAGS = ( - "-mdynamic-no-pic", - "-fomit-frame-pointer", - "-fno-align-functions", - "-finline-functions", - "-finline-limit=10000", - "-fno-exceptions", - "-g0", - "-fno-reorder-blocks", - "-fno-optimize-sibling-calls", - ); - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = "basic-dyngen-ops"; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - }; - name = Debug; - }; - 0873A5C714AB8038004F12B7 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - i386, - x86_64, - ); - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_VERSION = 4.0; - "GCC_VERSION[arch=x86_64]" = 4.2; - HEADER_SEARCH_PATHS = ( - ../kpx_cpu/src, - ../kpx_cpu/include, - ); - INSTALL_PATH = /usr/local/lib; - OTHER_CFLAGS = ( - "-mdynamic-no-pic", - "-fomit-frame-pointer", - "-fno-align-functions", - "-finline-functions", - "-finline-limit=10000", - "-fno-exceptions", - "-g0", - "-fno-reorder-blocks", - "-fno-optimize-sibling-calls", - ); - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = "basic-dyngen-ops"; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - "SDKROOT[arch=x86_64]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; - ZERO_LINK = NO; - }; - name = Release; - }; - 0873A5CD14AB806E004F12B7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - i386, - x86_64, - ); - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 2; - GCC_PRECOMPILE_PREFIX_HEADER = ""; - GCC_PREFIX_HEADER = ""; - GCC_VERSION = 4.0; - HEADER_SEARCH_PATHS = ( - ../kpx_cpu/src, - ../kpx_cpu/include, - ); - INSTALL_PATH = /usr/local/lib; - OTHER_CFLAGS = ( - "-mdynamic-no-pic", - "-fomit-frame-pointer", - "-fno-align-functions", - "-finline-functions", - "-finline-limit=10000", - "-fno-exceptions", - "-g0", - "-fno-reorder-blocks", - "-fno-optimize-sibling-calls", - ); - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = "ppc-dyngen-ops"; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - }; - name = Debug; - }; - 0873A5CE14AB806E004F12B7 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - i386, - x86_64, - ); - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_MODEL_TUNING = G5; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; - GCC_VERSION = 4.0; - "GCC_VERSION[arch=x86_64]" = 4.2; - HEADER_SEARCH_PATHS = ( - ../kpx_cpu/src, - ../kpx_cpu/include, - ); - INSTALL_PATH = /usr/local/lib; - OTHER_CFLAGS = ( - "-mdynamic-no-pic", - "-fomit-frame-pointer", - "-fno-align-functions", - "-finline-functions", - "-finline-limit=10000", - "-fno-exceptions", - "-g0", - "-fno-reorder-blocks", - "-fno-optimize-sibling-calls", - ); - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; - PRODUCT_NAME = "ppc-dyngen-ops"; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - "SDKROOT[arch=x86_64]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; - ZERO_LINK = NO; - }; - name = Release; - }; - 0873A67414AB8AE9004F12B7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - PRODUCT_NAME = "ppc-execute-impl"; - }; - name = Debug; - }; - 0873A67514AB8AE9004F12B7 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - PRODUCT_NAME = "ppc-execute-impl"; - ZERO_LINK = NO; - }; - name = Release; - }; - 0885A5221593E3B6005C4F7B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - ppc, - i386, - ); - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_VERSION = 4.0; - HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL.framework/Versions/A/Headers/, - ./config/, - ../Unix, - ../MacOSX/Launcher, - ../slirp, - ../kpx_cpu/src, - ../kpx_cpu/include, - ../include, - ); - INSTALL_PATH = /usr/local/lib; - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = clip; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - }; - name = Debug; - }; - 0885A5231593E3B6005C4F7B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - ppc, - i386, - ); - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_MODEL_TUNING = G5; - GCC_VERSION = 4.0; - HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL.framework/Versions/A/Headers/, - ./config/, - ../Unix, - ../MacOSX/Launcher, - ../slirp, - ../kpx_cpu/src, - ../kpx_cpu/include, - ../include, - ); - INSTALL_PATH = /usr/local/lib; - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = clip; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - ZERO_LINK = NO; - }; - name = Release; - }; - 0885A5321593E47F005C4F7B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1)"; - ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1 = x86_64; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_VERSION = 4.0; - HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL.framework/Versions/A/Headers/, - ./config/, - ../Unix, - ../MacOSX/Launcher, - ../slirp, - ../kpx_cpu/src, - ../kpx_cpu/include, - ../include, - ); - INSTALL_PATH = /usr/local/lib; - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = clip64; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; - }; - name = Debug; - }; - 0885A5331593E47F005C4F7B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1)"; - ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1 = x86_64; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_MODEL_TUNING = G5; - GCC_VERSION = 4.0; - HEADER_SEARCH_PATHS = ( - /Library/Frameworks/SDL.framework/Versions/A/Headers/, - ./config/, - ../Unix, - ../MacOSX/Launcher, - ../slirp, - ../kpx_cpu/src, - ../kpx_cpu/include, - ../include, - ); - INSTALL_PATH = /usr/local/lib; - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = clip64; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; - ZERO_LINK = NO; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 082AC25714AA59DB00071F5E /* Build configuration list for PBXNativeTarget "lowmem" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 082AC25414AA59B700071F5E /* Debug */, - 082AC25514AA59B700071F5E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 0846E4A114B1251400574779 /* Build configuration list for PBXNativeTarget "kpx_cpu" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0846E49B14B124DF00574779 /* Debug */, - 0846E49C14B124DF00574779 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 0846E52C14B12A2600574779 /* Build configuration list for PBXNativeTarget "ppc_asm" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0846E52914B129EF00574779 /* Debug */, - 0846E52A14B129EF00574779 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 0856CCB114A99DE0000B1711 /* Build configuration list for PBXProject "SheepShaver" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0856CCAF14A99DE0000B1711 /* Debug */, - 0856CCB014A99DE0000B1711 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 0856CCC714A99E1D000B1711 /* Build configuration list for PBXNativeTarget "SheepShaver" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0856CCC514A99E1C000B1711 /* Debug */, - 0856CCC614A99E1C000B1711 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 0873A53E14AAF076004F12B7 /* Build configuration list for PBXNativeTarget "dyngen" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0873A53414AAF05A004F12B7 /* Debug */, - 0873A53514AAF05A004F12B7 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 0873A5D314AB8099004F12B7 /* Build configuration list for PBXNativeTarget "basic-dyngen-ops" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0873A5C614AB8038004F12B7 /* Debug */, - 0873A5C714AB8038004F12B7 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 0873A5D414AB8099004F12B7 /* Build configuration list for PBXNativeTarget "ppc-dyngen-ops" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0873A5CD14AB806E004F12B7 /* Debug */, - 0873A5CE14AB806E004F12B7 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 0873A67B14AB8AEC004F12B7 /* Build configuration list for PBXAggregateTarget "ppc-execute-impl" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0873A67414AB8AE9004F12B7 /* Debug */, - 0873A67514AB8AE9004F12B7 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 0885A5241593E450005C4F7B /* Build configuration list for PBXNativeTarget "clip" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0885A5221593E3B6005C4F7B /* Debug */, - 0885A5231593E3B6005C4F7B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 0885A5311593E47F005C4F7B /* Build configuration list for PBXNativeTarget "clip64" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0885A5321593E47F005C4F7B /* Debug */, - 0885A5331593E47F005C4F7B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 0856CCAE14A99DE0000B1711 /* Project object */; -} diff --git a/SheepShaver/src/MacOSX/SheepShaver.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SheepShaver/src/MacOSX/SheepShaver.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/SheepShaver/src/MacOSX/SheepShaver.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj b/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj index 4618cdf5..9a560f6c 100644 --- a/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj +++ b/SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeproj/project.pbxproj @@ -1447,7 +1447,7 @@ INSTALL_PATH = "$(HOME)/Applications"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.6; - OTHER_CFLAGS = ""; + OTHER_CFLAGS = "-D__MACH__"; OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; OTHER_LDFLAGS = ( "-pagezero_size", @@ -1506,7 +1506,7 @@ INSTALL_PATH = "$(HOME)/Applications"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.6; - OTHER_CFLAGS = ""; + OTHER_CFLAGS = "-D__MACH__"; OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; OTHER_LDFLAGS = ( "-pagezero_size", diff --git a/SheepShaver/src/Unix/config.h.old b/SheepShaver/src/Unix/config.h.old index 9fcc90d9..ce1715f8 100644 --- a/SheepShaver/src/Unix/config.h.old +++ b/SheepShaver/src/Unix/config.h.old @@ -9,7 +9,7 @@ /* #undef AC_APPLE_UNIVERSAL_BUILD */ /* Define if using a PowerPC CPU emulator. */ -#define EMULATED_PPC 1 +// #define EMULATED_PPC 1 /* Define to enable dyngen engine */ #define ENABLE_DYNGEN 1 @@ -114,8 +114,8 @@ /* #undef HAVE_FRAMEWORK_SDL */ /* Define if framework SDL2 is available. */ -/* #undef HAVE_FRAMEWORK_SDL2 */ - +#define HAVE_FRAMEWORK_SDL2 */ +#error stophere /* Define to 1 if you have the header file. */ /* #undef HAVE_HISTORY_H */