diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml index f2c42460e..5203a718c 100644 --- a/.github/codeql/codeql-config.yml +++ b/.github/codeql/codeql-config.yml @@ -5,3 +5,4 @@ queries: paths-ignore: - fltk - newt64 + - _Tests_ diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2f4f67874..f2e660d3e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -51,6 +51,6 @@ jobs: - name: Compile Einstein run: | cmake -S . -B _Build_/Makefiles - cmake --build _Build_/Makefiles + cmake --build _Build_/Makefiles --target Einstein - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f52be9663..cb15369ce 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -22,18 +22,10 @@ jobs: - name: Build run: xcodebuild build -project _Build_/Xcode/Einstein.xcodeproj -scheme Einstein - # Runs a set of commands using the runners shell + # All automated tests are available as part of the EinsteinTest target - name: Run Xcode tests run: xcodebuild test -project _Build_/Xcode/Einstein.xcodeproj -scheme Einstein - # Also run CLI tests - - name: Run CLI tests - run: | - xcodebuild install -project _Build_/Xcode/Einstein.xcodeproj -configuration Debug -scheme CLITest DSTROOT=/ INSTALL_PATH=/usr/local/bin - cd _Tests_/scripts/ - sh test-instructions.sh /usr/local/bin/CLITest - sh test-memory.sh /usr/local/bin/CLITest - - name: Archive run: | xcodebuild -project _Build_/Xcode/Einstein.xcodeproj -scheme Einstein -archivePath Einstein.xcarchive archive diff --git a/.github/workflows/macos_fltk.yml b/.github/workflows/macos_fltk.yml index 309fcac97..13e4b2b36 100644 --- a/.github/workflows/macos_fltk.yml +++ b/.github/workflows/macos_fltk.yml @@ -45,3 +45,6 @@ jobs: run: | cmake -S . -B _Build_/Makefiles cmake --build _Build_/Makefiles + - name: Run tests + run: | + _Build_/Makefiles/EinsteinTests diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 8f37bbdb7..d759ad53e 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -47,3 +47,6 @@ jobs: run: | cmake -S . -B _Build_/Makefiles cmake --build _Build_/Makefiles + - name: Run tests + run: | + _Build_/Makefiles/EinsteinTests diff --git a/.lgtm.yml b/.lgtm.yml index 90e6f797b..da4b4a39e 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -22,4 +22,4 @@ extraction: index: # Customizable step used by all languages. build_command: - cmake -S . -B _Build_/Makefiles - - cmake --build _Build_/Makefiles + - cmake --build _Build_/Makefiles --target Einstein diff --git a/CMakeLists.txt b/CMakeLists.txt index f74393503..9b1a108e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,28 @@ set ( CMAKE_CXX_EXTENSIONS OFF ) include(CheckSymbolExists) include(CheckFunctionExists) include(CheckIncludeFile) +include(FetchContent) + +FetchContent_Declare( + googletest + URL https://github.com/google/googletest/archive/refs/tags/release-1.11.0.zip +) +# For Windows: Prevent overriding the parent project's compiler/linker settings +set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + +# Check if population has already been performed +FetchContent_GetProperties(googletest) +if(NOT googletest_POPULATED) + # Fetch the content using previously declared details + FetchContent_Populate(googletest) + + # Bring the populated content into the build + add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR}) +endif() + +enable_testing() + +include(GoogleTest) if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") @@ -67,35 +89,11 @@ else() message(STATUS "Newt64 found in " ${newt64_lib_path} ) endif() -# -# ---- Cross-platform checks ------------------------------------------------------------- -# - -set(system_libs "") - -check_symbol_exists(strlcpy string.h HAVE_DECL_STRLCPY) -check_symbol_exists(strlcat string.h HAVE_DECL_STRLCAT) -check_function_exists(strlcpy HAVE_STRLCPY) -check_function_exists(strlcat HAVE_STRLCAT) -if (NOT - (HAVE_STRLCPY AND HAVE_DECL_STRLCPY AND HAVE_STRLCAT AND HAVE_DECL_STRLCAT)) - find_library(BSD_LIBRARY bsd) - if (BSD_LIBRARY) - unset(CMAKE_REQUIRED_LIBRARIES) - set(CMAKE_REQUIRED_LIBRARIES ${BSD_LIBRARY}) - list(APPEND system_libs ${BSD_LIBRARY}) - endif() - check_include_file(bsd/string.h HAVE_BSD_STRING_H) - if(HAVE_BSD_STRING_H) - add_definitions(-DHAVE_BSD_STRING_H) - endif() -endif() - # # ---- Einstein Source Files ------------------------------------------------------------- # -set ( sources +set ( common_sources Emulator/Files/TFileManager.cpp Emulator/Files/TFileManager.h Emulator/Host/THostInfo.cpp @@ -202,6 +200,8 @@ set ( sources Emulator/Serial/TTcpClientSerialPortManager.h Emulator/Network/TNetworkManager.cpp Emulator/Network/TNetworkManager.h + Emulator/Network/TUsermodeNetwork.cpp + Emulator/Network/TUsermodeNetwork.h Emulator/PCMCIA/TATACard.cpp Emulator/PCMCIA/TATACard.h Emulator/PCMCIA/TLinearCard.cpp @@ -226,8 +226,6 @@ set ( sources Emulator/ROM/TFlatROMImageWithREX.h Emulator/ROM/TROMImage.cpp Emulator/ROM/TROMImage.h - Emulator/Screen/TFLScreenManager.cpp - Emulator/Screen/TFLScreenManager.h Emulator/Screen/TNullScreenManager.cpp Emulator/Screen/TNullScreenManager.h Emulator/Screen/TScreenManager.cpp @@ -299,24 +297,31 @@ set ( sources K/Unicode/UUTF16Conv.cpp K/Unicode/UUTF16Conv.h K/Unicode/UnicodeDefinitions.h + app/TPathHelper.cpp + app/TPathHelper.h + Monitor/TSymbolList.cpp + Monitor/TSymbolList.h + Monitor/UDisasm.cpp + Monitor/UDisasm.h + app/TFLRexImage.fl + app/TFLRexImage.cpp + app/TFLRexImage.h +) + +set ( app_sources + Emulator/Screen/TFLScreenManager.cpp + Emulator/Screen/TFLScreenManager.h Monitor/TFLMonitor.cpp Monitor/TFLMonitor.h Monitor/TMonitor.cpp Monitor/TMonitor.h Monitor/TMonitorCore.cpp Monitor/TMonitorCore.h - Monitor/TSymbolList.cpp - Monitor/TSymbolList.h - Monitor/UDisasm.cpp - Monitor/UDisasm.h app/TFLApp.cpp app/TFLApp.h app/TFLAppUI.fl app/TFLAppUI.cpp app/TFLAppUI.h - app/TFLRexImage.fl - app/TFLRexImage.cpp - app/TFLRexImage.h app/TFLSettingsUI.fl app/TFLSettingsUI.cpp app/TFLSettingsUI.h @@ -324,20 +329,25 @@ set ( sources app/TFLSettings.h app/TFLAppWindow.cpp app/TFLAppWindow.h - app/TPathHelper.cpp - app/TPathHelper.h app/TFLTabs.cpp app/TFLTabs.h app/Version.h app/Version_CMake.h.in ) +set ( test_sources + _Tests_/EinsteinTests.cpp + _Tests_/ExecuteInstructionTests.t + _Tests_/UProcessorTests.cpp + _Tests_/UProcessorTests.h +) + # # ---- Einstein Toolkit Sources ---------------------------------------------------------- # if ( USE_NEWT64 MATCHES true ) - list (APPEND sources + list (APPEND app_sources Toolkit/TToolkit.cpp Toolkit/TToolkit.h Toolkit/TTkElement.cpp @@ -386,6 +396,10 @@ macro (build_with_fluid name dir) endmacro () +# +# ---- Platform specific source files ---------------------------------------------------------- +# + if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") # configure to use FLTK as the GUI @@ -399,75 +413,32 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") build_with_fluid(TFLToolkitUI Toolkit) # additional source code - list (APPEND sources - # calling ObjectiveC native functions (very limited support in this version of EInsten) + list (APPEND common_sources + # calling ObjectiveC native functions (very limited support in this version of Einstein) Emulator/NativeCalls/TObjCBridgeCalls.mm Emulator/NativeCalls/TObjCBridgeCalls.h + # Serial port emulation + Emulator/Serial/TBasiliskIISerialPortManager.cpp + Emulator/Serial/TBasiliskIISerialPortManager.h + Emulator/Serial/TPipesSerialPortManager.cpp + Emulator/Serial/TPipesSerialPortManager.h + Emulator/Serial/TPtySerialPortManager.cpp + Emulator/Serial/TPtySerialPortManager.h app/TCocoaPathHelper.mm app/TCocoaPathHelper.h + ) + list (APPEND app_sources # macOS sound support Emulator/Sound/TCoreAudioSoundManager.cpp Emulator/Sound/TCoreAudioSoundManager.h # Network card emulations Emulator/Network/TTapNetwork.cpp Emulator/Network/TTapNetwork.h - Emulator/Network/TUsermodeNetwork.cpp - Emulator/Network/TUsermodeNetwork.h - # Serial port emulation - Emulator/Serial/TBasiliskIISerialPortManager.cpp - Emulator/Serial/TBasiliskIISerialPortManager.h - Emulator/Serial/TPipesSerialPortManager.cpp - Emulator/Serial/TPipesSerialPortManager.h - Emulator/Serial/TPtySerialPortManager.cpp - Emulator/Serial/TPtySerialPortManager.h # Apple macOS required resources Resources/macOS/Info.plist.in Resources/macOS/Einstein.icns Resources/macOS/Entitlements.plist ) - set_property(GLOBAL PROPERTY USE_FOLDERS ON) - source_group(TREE "${CMAKE_SOURCE_DIR}" PREFIX "Sources" FILES ${sources}) - - # take care of the app icon - set (MACOSX_BUNDLE_ICON_FILE Einstein.icns) - set_source_files_properties(Resources/macOS/${MACOSX_BUNDLE_ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") - - # create the application - add_executable(Einstein MACOSX_BUNDLE - ${sources} - ) - - # how to compile and link - target_compile_options(Einstein PUBLIC -Wall -Wextra -Wpedantic -Wno-missing-field-initializers "$<$:-Werror>") - target_compile_definitions(Einstein PRIVATE TARGET_UI_FLTK=1 NO_PORT_AUDIO NO_X11 TARGET_OS_OPENSTEP=1 TARGET_OS_MAC=1 NS_BLOCK_ASSERTIONS=1) - target_link_libraries(Einstein - ${system_libs} - # /usr/local/lib/libfltk.a - fltk - fltk_images - fltk_png - fltk_z - pthread - "-framework AddressBook" - "-framework AudioUnit" - "-framework AppKit" - "-framework CoreAudio" - "-framework Cocoa" - ) - set_target_properties(Einstein PROPERTIES - MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Resources/macOS/Info.plist.in" - ) - set_target_properties(Einstein PROPERTIES - CPACK_BUNDLE_APPLE_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/Resources/macOS/EntiXXXtlements.plist" - ) - - if ( USE_NEWT64 MATCHES true ) - target_include_directories(Einstein SYSTEM PUBLIC ${newt64_incl_path} ${newt64_incl_path}/darwin) - target_link_libraries(Einstein - ${newt64_lib} - ) - target_compile_definitions(Einstein PRIVATE USE_NEWT64=1) - endif () elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") @@ -482,17 +453,12 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") build_with_fluid(TFLToolkitUI Toolkit) # additional source code - list (APPEND sources + list (APPEND common_sources # calling native functions (very limited support in this version of EInsten) Emulator/NativeCalls/NativeCallsDefines.h Emulator/NativeCalls/TNativeCalls.cpp Emulator/NativeCalls/TNativeCalls.h - # Unix sound support - Emulator/Sound/TPulseAudioSoundManager.cpp - Emulator/Sound/TPulseAudioSoundManager.h - # Network card emulations - Emulator/Network/TUsermodeNetwork.cpp - Emulator/Network/TUsermodeNetwork.h + # Serial port emulation Emulator/Serial/TBasiliskIISerialPortManager.cpp Emulator/Serial/TBasiliskIISerialPortManager.h Emulator/Serial/TPipesSerialPortManager.cpp @@ -500,31 +466,13 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") Emulator/Serial/TPtySerialPortManager.cpp Emulator/Serial/TPtySerialPortManager.h ) - set_property(GLOBAL PROPERTY USE_FOLDERS ON) - source_group(TREE "${CMAKE_SOURCE_DIR}" PREFIX "Sources" FILES ${sources}) - - # create the application - add_executable(Einstein ${sources}) - # how to compile and link - target_compile_options(Einstein PUBLIC -Wall -Wno-multichar -Wno-misleading-indentation -Wno-missing-field-initializers) - target_compile_definitions(Einstein PRIVATE TARGET_UI_FLTK=1 TARGET_OS_LINUX=1) - target_link_libraries(Einstein - ${system_libs} - fltk - fltk_images - fltk_png - fltk_z - pulse # sound - ) - - if ( USE_NEWT64 MATCHES true ) - target_include_directories(Einstein SYSTEM PUBLIC ${newt64_incl_path} ${newt64_incl_path}/darwin) - target_link_libraries(Einstein - ${newt64_lib} - ) - target_compile_definitions(Einstein PRIVATE USE_NEWT64=1) - endif () + # additional source code + list (APPEND app_sources + # Unix sound support + Emulator/Sound/TPulseAudioSoundManager.cpp + Emulator/Sound/TPulseAudioSoundManager.h + ) elseif (WIN32) @@ -544,20 +492,109 @@ elseif (WIN32) build_with_fluid(TFLToolkitUI Toolkit) # additional source code - list (APPEND sources + list (APPEND common_sources # calling native functions (very limited support in this version of EInsten) Emulator/NativeCalls/NativeCallsDefines.h Emulator/NativeCalls/TNativeCalls.cpp Emulator/NativeCalls/TNativeCalls.h + ) + # additional source code + list (APPEND app_sources # Windows sound support Emulator/Sound/TWaveSoundManager.cpp Emulator/Sound/TWaveSoundManager.h - # Network card emulations - Emulator/Network/TUsermodeNetwork.cpp - Emulator/Network/TUsermodeNetwork.h ) - set_property(GLOBAL PROPERTY USE_FOLDERS ON) - source_group(TREE "${CMAKE_SOURCE_DIR}" PREFIX "Sources" FILES ${sources} Resources/MSWindows/Einstein.rc.in) + +endif () + +# +# ---- Common rules ---------------------------------------------------------- +# + +set_property(GLOBAL PROPERTY USE_FOLDERS ON) +source_group(TREE "${CMAKE_SOURCE_DIR}" PREFIX "Sources" FILES ${common_sources}) +source_group(TREE "${CMAKE_SOURCE_DIR}" PREFIX "Sources" FILES ${app_sources}) +source_group(TREE "${CMAKE_SOURCE_DIR}" PREFIX "Sources" FILES ${test_sources}) + +# +# ---- Platform specific rules ---------------------------------------------------------- +# + +if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + # take care of the app icon + set (MACOSX_BUNDLE_ICON_FILE Einstein.icns) + set_source_files_properties(Resources/macOS/${MACOSX_BUNDLE_ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") + + # create the application + add_executable(Einstein MACOSX_BUNDLE + ${common_sources} + ${app_sources} + ) + add_executable(EinsteinTests ${common_sources} ${test_sources}) + + # how to compile and link + target_compile_options(Einstein PUBLIC -Wall -Wextra -Wpedantic -Wno-missing-field-initializers "$<$:-Werror>") + target_compile_options(EinsteinTests PUBLIC -Wall -Wextra -Wpedantic -Wno-missing-field-initializers -Werror) + target_compile_definitions(Einstein PRIVATE TARGET_UI_FLTK=1 NO_PORT_AUDIO NO_X11 TARGET_OS_OPENSTEP=1 TARGET_OS_MAC=1 NS_BLOCK_ASSERTIONS=1) + target_compile_definitions(EinsteinTests PRIVATE TARGET_UI_FLTK=1 NO_PORT_AUDIO NO_X11 TARGET_OS_OPENSTEP=1 TARGET_OS_MAC=1 NS_BLOCK_ASSERTIONS=1) + target_link_libraries(Einstein + ${system_libs} + # /usr/local/lib/libfltk.a + fltk + fltk_images + fltk_png + fltk_z + pthread + "-framework AddressBook" + "-framework AudioUnit" + "-framework AppKit" + "-framework CoreAudio" + "-framework Cocoa" + ) + target_link_libraries(EinsteinTests + ${system_libs} + fltk + pthread + "-framework AddressBook" + "-framework AudioUnit" + "-framework AppKit" + "-framework CoreAudio" + "-framework Cocoa" + ) + set_target_properties(Einstein PROPERTIES + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Resources/macOS/Info.plist.in" + ) + set_target_properties(Einstein PROPERTIES + CPACK_BUNDLE_APPLE_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/Resources/macOS/EntiXXXtlements.plist" + ) + +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + + # create the application + add_executable(Einstein ${common_sources} ${app_sources}) + add_executable(EinsteinTests ${common_sources} ${test_sources}) + + # how to compile and link + target_compile_options(Einstein PUBLIC -Wall -Wno-multichar -Wno-misleading-indentation -Wno-missing-field-initializers "$<$:-Werror>") + target_compile_options(EinsteinTests PUBLIC -Wall -Wno-multichar -Wno-misleading-indentation -Wno-missing-field-initializers -Werror) + target_compile_definitions(Einstein PRIVATE TARGET_UI_FLTK=1 TARGET_OS_LINUX=1) + target_compile_definitions(EinsteinTests PRIVATE TARGET_UI_FLTK=1 TARGET_OS_LINUX=1) + target_link_libraries(Einstein + ${system_libs} + fltk + fltk_images + fltk_png + fltk_z + pulse # sound + ) + target_link_libraries(EinsteinTests + ${system_libs} + fltk + pthread + ) + +elseif (WIN32) + source_group(TREE "${CMAKE_SOURCE_DIR}" PREFIX "Sources" FILES Resources/MSWindows/Einstein.rc.in) # Create a resources file for Windows configure_file( @@ -565,18 +602,22 @@ elseif (WIN32) Einstein.rc ) - # create the application + # create the binaries add_executable(Einstein WIN32 - ${sources} ${data} + ${common_sources} ${app_sources} ${data} ${CMAKE_CURRENT_BINARY_DIR}/Einstein.rc ) + add_executable(EinsteinTests ${common_sources} ${test_sources}) # how to compile and link target_compile_options(Einstein PUBLIC "/bigobj") + target_compile_options(EinsteinTests PUBLIC "/bigobj") if ($) target_compile_options(Einstein PUBLIC "/ZI") + target_compile_options(EinsteinTests PUBLIC "/ZI") endif() target_compile_definitions(Einstein PRIVATE TARGET_UI_FLTK=1 TARGET_OS_WIN32=1 WIN32_LEAN_AND_MEAN=1 _CRT_SECURE_NO_WARNINGS=1) + target_compile_definitions(EinsteinTests PRIVATE TARGET_UI_FLTK=1 TARGET_OS_WIN32=1 WIN32_LEAN_AND_MEAN=1 _CRT_SECURE_NO_WARNINGS=1) target_link_libraries(Einstein ${system_libs} # this vvv always includes the debug version, even in release mode @@ -591,35 +632,44 @@ elseif (WIN32) # end of alternative winmm ) - - if ( USE_NEWT64 MATCHES true ) - target_include_directories(Einstein SYSTEM PUBLIC ${newt64_incl_path} ${newt64_incl_path}/win) - target_link_libraries(Einstein - ${newt64_lib} - shlwapi - ) - message(STATUS ${newt64_lib}) - target_compile_definitions(Einstein PRIVATE USE_NEWT64=1) - endif () + target_link_libraries(EinsteinTests + ${system_libs} + fltk + pthread + ) endif () +if ( USE_NEWT64 MATCHES true ) + if (WIN32) + target_include_directories(Einstein SYSTEM PUBLIC ${newt64_incl_path} ${newt64_incl_path}/win) + target_link_libraries(Einstein shlwapi) + else() + # On Linux/macOS, use darwin includes + target_include_directories(Einstein SYSTEM PUBLIC ${newt64_incl_path} ${newt64_incl_path}/darwin) + endif() + target_link_libraries(Einstein ${newt64_lib}) + message(STATUS ${newt64_lib}) + target_compile_definitions(Einstein PRIVATE USE_TOOLKIT=1) +endif () target_include_directories( Einstein PUBLIC ${CMAKE_SOURCE_DIR} ${FLTK_INCLUDE_DIRS} ) +target_include_directories( + EinsteinTests PUBLIC + ${CMAKE_SOURCE_DIR} + ${FLTK_INCLUDE_DIRS} +) target_compile_definitions(Einstein PUBLIC "$<$:_DEBUG>" USE_CMAKE) +target_compile_definitions(EinsteinTests PUBLIC "$<$:_DEBUG>" USE_CMAKE) -# nice code to output every know variable in this CMake session -#get_cmake_property(_variableNames VARIABLES) -#list (SORT _variableNames) -#foreach (_variableName ${_variableNames}) -# message(STATUS "${_variableName}=${${_variableName}}") -#endforeach() +target_link_libraries(EinsteinTests gtest_main) +gtest_discover_tests(EinsteinTests) # # --- MessagePad.org distribution system --------------------------------------- @@ -670,4 +720,3 @@ else () message ("Einstein is not configured to distribute for this platform: " ${CMAKE_SYSTEM_NAME} ".") endif () - diff --git a/Emulator/Network/TUsermodeNetwork.cpp b/Emulator/Network/TUsermodeNetwork.cpp index 9e672ecb9..c2d6463c0 100644 --- a/Emulator/Network/TUsermodeNetwork.cpp +++ b/Emulator/Network/TUsermodeNetwork.cpp @@ -161,9 +161,6 @@ #include #include #include -#if HAVE_BSD_STRING_H -# include -#endif #if TARGET_OS_WIN32 # include diff --git a/Emulator/TNativePrimitives.cpp b/Emulator/TNativePrimitives.cpp index 55b40def4..07bdaf0b8 100644 --- a/Emulator/TNativePrimitives.cpp +++ b/Emulator/TNativePrimitives.cpp @@ -54,7 +54,7 @@ #include "Emulator/NativeCalls/TObjCBridgeCalls.h" #endif -#ifdef TARGET_UI_FLTK +#ifdef USE_TOOLKIT # include "app/TFLApp.h" # include "Toolkit/TToolkit.h" # include @@ -917,7 +917,7 @@ TNativePrimitives::ExecutePlatformDriverNative( KUInt32 inInstruction ) char theLine[512]; KUInt32 amount = sizeof(theLine); (void) mMemory->FastReadString(theAddress, &amount, theLine); -#ifdef TARGET_UI_FLTK +#ifdef USE_TOOLKIT // theLine is encoded in ISO format // if the Toolkit is available, send the text to the monitor if (gToolkit) { diff --git a/_Build_/Xcode/Einstein.xcodeproj/project.pbxproj b/_Build_/Xcode/Einstein.xcodeproj/project.pbxproj index b8e3516ce..1303e1651 100644 --- a/_Build_/Xcode/Einstein.xcodeproj/project.pbxproj +++ b/_Build_/Xcode/Einstein.xcodeproj/project.pbxproj @@ -214,7 +214,6 @@ DA0CD1E124A7848200E8D593 /* TTcpClientSerialPortManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C99656A024258CC900D216A2 /* TTcpClientSerialPortManager.cpp */; }; DA0CD1E224A7885E00E8D593 /* TCocoaPathHelper.mm in Sources */ = {isa = PBXBuildFile; fileRef = F19F1C281E5B574000E8C9BE /* TCocoaPathHelper.mm */; }; DA0D944011B9A12D00835522 /* TTapNetwork.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DA0D943E11B9A12D00835522 /* TTapNetwork.cpp */; }; - DA226EE124C0419800A3DD2D /* master-test-run-code_21 in Resources */ = {isa = PBXBuildFile; fileRef = DA226EE024C0419800A3DD2D /* master-test-run-code_21 */; }; DA4BA40D1A3A0160002BDB80 /* tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DA4FF0B61A35E76400092B5A /* tests.cpp */; }; DA4BA40E1A3A01F7002BDB80 /* UHostInfoTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DA4FF0B81A35E76400092B5A /* UHostInfoTests.cpp */; }; DA4BA40F1A3A01F7002BDB80 /* UMemoryTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DA4FF0BA1A35E76400092B5A /* UMemoryTests.cpp */; }; @@ -399,94 +398,6 @@ DAE9EF251A3CFCC70095BFAF /* TRAMLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DAE9EF221A3CFACC0095BFAF /* TRAMLog.cpp */; }; F115FF131A2EA415001F3D65 /* Einstein.xib in Resources */ = {isa = PBXBuildFile; fileRef = F115FF111A2EA415001F3D65 /* Einstein.xib */; }; F119E9BD1B41FA0D00192514 /* TMacMonitorView.mm in Sources */ = {isa = PBXBuildFile; fileRef = F119E9BC1B41FA0D00192514 /* TMacMonitorView.mm */; }; - F13599D41B2A356B00EFD22D /* master-test-execute-instruction_0A000007 in Resources */ = {isa = PBXBuildFile; fileRef = F13599791B2A356B00EFD22D /* master-test-execute-instruction_0A000007 */; }; - F13599D51B2A356B00EFD22D /* master-test-execute-instruction_1A000007 in Resources */ = {isa = PBXBuildFile; fileRef = F135997A1B2A356B00EFD22D /* master-test-execute-instruction_1A000007 */; }; - F13599D61B2A356B00EFD22D /* master-test-execute-instruction_01F94573 in Resources */ = {isa = PBXBuildFile; fileRef = F135997B1B2A356B00EFD22D /* master-test-execute-instruction_01F94573 */; }; - F13599D71B2A356B00EFD22D /* master-test-execute-instruction_E3A0409C in Resources */ = {isa = PBXBuildFile; fileRef = F135997C1B2A356B00EFD22D /* master-test-execute-instruction_E3A0409C */; }; - F13599D81B2A356B00EFD22D /* master-test-execute-instruction_E3D004FF in Resources */ = {isa = PBXBuildFile; fileRef = F135997D1B2A356B00EFD22D /* master-test-execute-instruction_E3D004FF */; }; - F13599D91B2A356B00EFD22D /* master-test-execute-instruction_E5D00000 in Resources */ = {isa = PBXBuildFile; fileRef = F135997E1B2A356B00EFD22D /* master-test-execute-instruction_E5D00000 */; }; - F13599DA1B2A356B00EFD22D /* master-test-execute-instruction_E5D00001 in Resources */ = {isa = PBXBuildFile; fileRef = F135997F1B2A356B00EFD22D /* master-test-execute-instruction_E5D00001 */; }; - F13599DB1B2A356B00EFD22D /* master-test-execute-instruction_E5D00002 in Resources */ = {isa = PBXBuildFile; fileRef = F13599801B2A356B00EFD22D /* master-test-execute-instruction_E5D00002 */; }; - F13599DC1B2A356B00EFD22D /* master-test-execute-instruction_E5D00003 in Resources */ = {isa = PBXBuildFile; fileRef = F13599811B2A356B00EFD22D /* master-test-execute-instruction_E5D00003 */; }; - F13599DD1B2A356B00EFD22D /* master-test-execute-instruction_E8D00800 in Resources */ = {isa = PBXBuildFile; fileRef = F13599821B2A356B00EFD22D /* master-test-execute-instruction_E8D00800 */; }; - F13599DE1B2A356B00EFD22D /* master-test-execute-instruction_E8DD2000 in Resources */ = {isa = PBXBuildFile; fileRef = F13599831B2A356B00EFD22D /* master-test-execute-instruction_E8DD2000 */; }; - F13599DF1B2A356B00EFD22D /* master-test-execute-instruction_E10F1000 in Resources */ = {isa = PBXBuildFile; fileRef = F13599841B2A356B00EFD22D /* master-test-execute-instruction_E10F1000 */; }; - F13599E01B2A356B00EFD22D /* master-test-execute-instruction_E14F1000 in Resources */ = {isa = PBXBuildFile; fileRef = F13599851B2A356B00EFD22D /* master-test-execute-instruction_E14F1000 */; }; - F13599E11B2A356B00EFD22D /* master-test-execute-instruction_E282F014 in Resources */ = {isa = PBXBuildFile; fileRef = F13599861B2A356B00EFD22D /* master-test-execute-instruction_E282F014 */; }; - F13599E21B2A356B00EFD22D /* master-test-execute-instruction_E321F01B in Resources */ = {isa = PBXBuildFile; fileRef = F13599871B2A356B00EFD22D /* master-test-execute-instruction_E321F01B */; }; - F13599E31B2A356B00EFD22D /* master-test-execute-instruction_E321F010 in Resources */ = {isa = PBXBuildFile; fileRef = F13599881B2A356B00EFD22D /* master-test-execute-instruction_E321F010 */; }; - F13599E41B2A356B00EFD22D /* master-test-execute-instruction_E321F011 in Resources */ = {isa = PBXBuildFile; fileRef = F13599891B2A356B00EFD22D /* master-test-execute-instruction_E321F011 */; }; - F13599E51B2A356B00EFD22D /* master-test-execute-instruction_E321F012 in Resources */ = {isa = PBXBuildFile; fileRef = F135998A1B2A356B00EFD22D /* master-test-execute-instruction_E321F012 */; }; - F13599E61B2A356B00EFD22D /* master-test-execute-instruction_E321F013 in Resources */ = {isa = PBXBuildFile; fileRef = F135998B1B2A356B00EFD22D /* master-test-execute-instruction_E321F013 */; }; - F13599E71B2A356B00EFD22D /* master-test-execute-instruction_E321F017 in Resources */ = {isa = PBXBuildFile; fileRef = F135998C1B2A356B00EFD22D /* master-test-execute-instruction_E321F017 */; }; - F13599E81B2A356B00EFD22D /* master-test-execute-instruction_E2922000 in Resources */ = {isa = PBXBuildFile; fileRef = F135998D1B2A356B00EFD22D /* master-test-execute-instruction_E2922000 */; }; - F13599E91B2A356B00EFD22D /* master-test-execute-instruction_E5900000 in Resources */ = {isa = PBXBuildFile; fileRef = F135998E1B2A356B00EFD22D /* master-test-execute-instruction_E5900000 */; }; - F13599EA1B2A356B00EFD22D /* master-test-execute-instruction_E5900001 in Resources */ = {isa = PBXBuildFile; fileRef = F135998F1B2A356B00EFD22D /* master-test-execute-instruction_E5900001 */; }; - F13599EB1B2A356B00EFD22D /* master-test-execute-instruction_E5900002 in Resources */ = {isa = PBXBuildFile; fileRef = F13599901B2A356B00EFD22D /* master-test-execute-instruction_E5900002 */; }; - F13599EC1B2A356B00EFD22D /* master-test-execute-instruction_E5900003 in Resources */ = {isa = PBXBuildFile; fileRef = F13599911B2A356B00EFD22D /* master-test-execute-instruction_E5900003 */; }; - F13599ED1B2A356B00EFD22D /* master-test-execute-instruction_EA0061A0 in Resources */ = {isa = PBXBuildFile; fileRef = F13599921B2A356B00EFD22D /* master-test-execute-instruction_EA0061A0 */; }; - F13599EE1B2A356B00EFD22D /* master-test-execute-instruction_EAFFFFFE in Resources */ = {isa = PBXBuildFile; fileRef = F13599931B2A356B00EFD22D /* master-test-execute-instruction_EAFFFFFE */; }; - F13599EF1B2A356B00EFD22D /* master-test-execute-instruction_EE010F11 in Resources */ = {isa = PBXBuildFile; fileRef = F13599941B2A356B00EFD22D /* master-test-execute-instruction_EE010F11 */; }; - F13599F01B2A356B00EFD22D /* master-test-execute-instruction-state1_E00B0A99 in Resources */ = {isa = PBXBuildFile; fileRef = F13599951B2A356B00EFD22D /* master-test-execute-instruction-state1_E00B0A99 */; }; - F13599F11B2A356B00EFD22D /* master-test-execute-instruction-state1_E01B0A99 in Resources */ = {isa = PBXBuildFile; fileRef = F13599961B2A356B00EFD22D /* master-test-execute-instruction-state1_E01B0A99 */; }; - F13599F21B2A356B00EFD22D /* master-test-execute-instruction-state1_E02B0A99 in Resources */ = {isa = PBXBuildFile; fileRef = F13599971B2A356B00EFD22D /* master-test-execute-instruction-state1_E02B0A99 */; }; - F13599F31B2A356B00EFD22D /* master-test-execute-instruction-state1_E02BBA99 in Resources */ = {isa = PBXBuildFile; fileRef = F13599981B2A356B00EFD22D /* master-test-execute-instruction-state1_E02BBA99 */; }; - F13599F41B2A356B00EFD22D /* master-test-execute-instruction-state1_E3A060FE in Resources */ = {isa = PBXBuildFile; fileRef = F13599991B2A356B00EFD22D /* master-test-execute-instruction-state1_E3A060FE */; }; - F13599F51B2A356B00EFD22D /* master-test-execute-instruction-state1_E03BAA99 in Resources */ = {isa = PBXBuildFile; fileRef = F135999A1B2A356B00EFD22D /* master-test-execute-instruction-state1_E03BAA99 */; }; - F13599F61B2A356B00EFD22D /* master-test-execute-instruction-state1_E03BBA99 in Resources */ = {isa = PBXBuildFile; fileRef = F135999B1B2A356B00EFD22D /* master-test-execute-instruction-state1_E03BBA99 */; }; - F13599F71B2A356B00EFD22D /* master-test-execute-instruction-state1_E5B40010 in Resources */ = {isa = PBXBuildFile; fileRef = F135999C1B2A356B00EFD22D /* master-test-execute-instruction-state1_E5B40010 */; }; - F13599F81B2A356B00EFD22D /* master-test-execute-instruction-state1_E5BF0010 in Resources */ = {isa = PBXBuildFile; fileRef = F135999D1B2A356B00EFD22D /* master-test-execute-instruction-state1_E5BF0010 */; }; - F13599F91B2A356B00EFD22D /* master-test-execute-instruction-state1_E22C0311 in Resources */ = {isa = PBXBuildFile; fileRef = F135999E1B2A356B00EFD22D /* master-test-execute-instruction-state1_E22C0311 */; }; - F13599FA1B2A356B00EFD22D /* master-test-execute-instruction-state1_E22D0311 in Resources */ = {isa = PBXBuildFile; fileRef = F135999F1B2A356B00EFD22D /* master-test-execute-instruction-state1_E22D0311 */; }; - F13599FB1B2A356B00EFD22D /* master-test-execute-instruction-state1_E24CB004 in Resources */ = {isa = PBXBuildFile; fileRef = F13599A01B2A356B00EFD22D /* master-test-execute-instruction-state1_E24CB004 */; }; - F13599FC1B2A356B00EFD22D /* master-test-execute-instruction-state1_E24DD004 in Resources */ = {isa = PBXBuildFile; fileRef = F13599A11B2A356B00EFD22D /* master-test-execute-instruction-state1_E24DD004 */; }; - F13599FD1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049A22 in Resources */ = {isa = PBXBuildFile; fileRef = F13599A21B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049A22 */; }; - F13599FE1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C20 in Resources */ = {isa = PBXBuildFile; fileRef = F13599A31B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C20 */; }; - F13599FF1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C22 in Resources */ = {isa = PBXBuildFile; fileRef = F13599A41B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C22 */; }; - F1359A001B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C23 in Resources */ = {isa = PBXBuildFile; fileRef = F13599A51B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C23 */; }; - F1359A011B2A356B00EFD22D /* master-test-execute-instruction-state1_E220C311 in Resources */ = {isa = PBXBuildFile; fileRef = F13599A61B2A356B00EFD22D /* master-test-execute-instruction-state1_E220C311 */; }; - F1359A021B2A356B00EFD22D /* master-test-execute-instruction-state1_E2300CA1 in Resources */ = {isa = PBXBuildFile; fileRef = F13599A71B2A356B00EFD22D /* master-test-execute-instruction-state1_E2300CA1 */; }; - F1359A031B2A356B00EFD22D /* master-test-execute-instruction-state1_E2855C0E in Resources */ = {isa = PBXBuildFile; fileRef = F13599A81B2A356B00EFD22D /* master-test-execute-instruction-state1_E2855C0E */; }; - F1359A041B2A356B00EFD22D /* master-test-execute-instruction-state1_E38000E0 in Resources */ = {isa = PBXBuildFile; fileRef = F13599A91B2A356B00EFD22D /* master-test-execute-instruction-state1_E38000E0 */; }; - F1359A051B2A356B00EFD22D /* master-test-execute-instruction-state1_E38000EF in Resources */ = {isa = PBXBuildFile; fileRef = F13599AA1B2A356B00EFD22D /* master-test-execute-instruction-state1_E38000EF */; }; - F1359A061B2A356B00EFD22D /* master-test-execute-instruction-state1_E0205094 in Resources */ = {isa = PBXBuildFile; fileRef = F13599AB1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0205094 */; }; - F1359A071B2A356B00EFD22D /* master-test-execute-instruction-state1_E0620202 in Resources */ = {isa = PBXBuildFile; fileRef = F13599AC1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0620202 */; }; - F1359A081B2A356B00EFD22D /* master-test-execute-instruction-state1_E0800005 in Resources */ = {isa = PBXBuildFile; fileRef = F13599AD1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0800005 */; }; - F1359A091B2A356B00EFD22D /* master-test-execute-instruction-state1_E0841005 in Resources */ = {isa = PBXBuildFile; fileRef = F13599AE1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0841005 */; }; - F1359A0A1B2A356B00EFD22D /* master-test-execute-instruction-state1_E2200311 in Resources */ = {isa = PBXBuildFile; fileRef = F13599AF1B2A356B00EFD22D /* master-test-execute-instruction-state1_E2200311 */; }; - F1359A0B1B2A356B00EFD22D /* master-test-execute-instruction-state1_E2200801 in Resources */ = {isa = PBXBuildFile; fileRef = F13599B01B2A356B00EFD22D /* master-test-execute-instruction-state1_E2200801 */; }; - F1359A0C1B2A356B00EFD22D /* master-test-execute-instruction-state2_E1A0331C in Resources */ = {isa = PBXBuildFile; fileRef = F13599B11B2A356B00EFD22D /* master-test-execute-instruction-state2_E1A0331C */; }; - F1359A0D1B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0C008-E91C0300 in Resources */ = {isa = PBXBuildFile; fileRef = F13599B21B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0C008-E91C0300 */; }; - F1359A0E1B2A356B00EFD22D /* master-test-execute-two-instructions_E3A000D3-E129F000 in Resources */ = {isa = PBXBuildFile; fileRef = F13599B31B2A356B00EFD22D /* master-test-execute-two-instructions_E3A000D3-E129F000 */; }; - F1359A0F1B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0D301-E8CD0100 in Resources */ = {isa = PBXBuildFile; fileRef = F13599B41B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0D301-E8CD0100 */; }; - F1359A101B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0100C-E1A01081 in Resources */ = {isa = PBXBuildFile; fileRef = F13599B51B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0100C-E1A01081 */; }; - F1359A111B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0100C-EA0061A0 in Resources */ = {isa = PBXBuildFile; fileRef = F13599B61B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0100C-EA0061A0 */; }; - F1359A121B2A356B00EFD22D /* master-test-execute-two-instructions_E3E02000-E2922001 in Resources */ = {isa = PBXBuildFile; fileRef = F13599B71B2A356B00EFD22D /* master-test-execute-two-instructions_E3E02000-E2922001 */; }; - F1359A131B2A356B00EFD22D /* master-test-execute-two-instructions_E8D00800-E321F010 in Resources */ = {isa = PBXBuildFile; fileRef = F13599B81B2A356B00EFD22D /* master-test-execute-two-instructions_E8D00800-E321F010 */; }; - F1359A141B2A356B00EFD22D /* master-test-execute-two-instructions_E282F014-E282F014 in Resources */ = {isa = PBXBuildFile; fileRef = F13599B91B2A356B00EFD22D /* master-test-execute-two-instructions_E282F014-E282F014 */; }; - F1359A151B2A356B00EFD22D /* master-test-execute-two-instructions_E5901004-E7902003 in Resources */ = {isa = PBXBuildFile; fileRef = F13599BA1B2A356B00EFD22D /* master-test-execute-two-instructions_E5901004-E7902003 */; }; - F1359A161B2A356B00EFD22D /* master-test-memory-read-rom in Resources */ = {isa = PBXBuildFile; fileRef = F13599BB1B2A356B00EFD22D /* master-test-memory-read-rom */; }; - F1359A171B2A356B00EFD22D /* master-test-memory-read-write-ram in Resources */ = {isa = PBXBuildFile; fileRef = F13599BC1B2A356B00EFD22D /* master-test-memory-read-write-ram */; }; - F1359A181B2A356B00EFD22D /* master-test-run-code_1 in Resources */ = {isa = PBXBuildFile; fileRef = F13599BD1B2A356B00EFD22D /* master-test-run-code_1 */; }; - F1359A191B2A356B00EFD22D /* master-test-run-code_2 in Resources */ = {isa = PBXBuildFile; fileRef = F13599BE1B2A356B00EFD22D /* master-test-run-code_2 */; }; - F1359A1A1B2A356B00EFD22D /* master-test-run-code_3 in Resources */ = {isa = PBXBuildFile; fileRef = F13599BF1B2A356B00EFD22D /* master-test-run-code_3 */; }; - F1359A1B1B2A356B00EFD22D /* master-test-run-code_4 in Resources */ = {isa = PBXBuildFile; fileRef = F13599C01B2A356B00EFD22D /* master-test-run-code_4 */; }; - F1359A1C1B2A356B00EFD22D /* master-test-run-code_5 in Resources */ = {isa = PBXBuildFile; fileRef = F13599C11B2A356B00EFD22D /* master-test-run-code_5 */; }; - F1359A1D1B2A356B00EFD22D /* master-test-run-code_6 in Resources */ = {isa = PBXBuildFile; fileRef = F13599C21B2A356B00EFD22D /* master-test-run-code_6 */; }; - F1359A1E1B2A356B00EFD22D /* master-test-run-code_7 in Resources */ = {isa = PBXBuildFile; fileRef = F13599C31B2A356B00EFD22D /* master-test-run-code_7 */; }; - F1359A1F1B2A356B00EFD22D /* master-test-run-code_8 in Resources */ = {isa = PBXBuildFile; fileRef = F13599C41B2A356B00EFD22D /* master-test-run-code_8 */; }; - F1359A201B2A356B00EFD22D /* master-test-run-code_9 in Resources */ = {isa = PBXBuildFile; fileRef = F13599C51B2A356B00EFD22D /* master-test-run-code_9 */; }; - F1359A211B2A356B00EFD22D /* master-test-run-code_10 in Resources */ = {isa = PBXBuildFile; fileRef = F13599C61B2A356B00EFD22D /* master-test-run-code_10 */; }; - F1359A221B2A356B00EFD22D /* master-test-run-code_11 in Resources */ = {isa = PBXBuildFile; fileRef = F13599C71B2A356B00EFD22D /* master-test-run-code_11 */; }; - F1359A231B2A356B00EFD22D /* master-test-run-code_12 in Resources */ = {isa = PBXBuildFile; fileRef = F13599C81B2A356B00EFD22D /* master-test-run-code_12 */; }; - F1359A241B2A356B00EFD22D /* master-test-run-code_13 in Resources */ = {isa = PBXBuildFile; fileRef = F13599C91B2A356B00EFD22D /* master-test-run-code_13 */; }; - F1359A251B2A356B00EFD22D /* master-test-run-code_14 in Resources */ = {isa = PBXBuildFile; fileRef = F13599CA1B2A356B00EFD22D /* master-test-run-code_14 */; }; - F1359A261B2A356B00EFD22D /* master-test-run-code_15 in Resources */ = {isa = PBXBuildFile; fileRef = F13599CB1B2A356B00EFD22D /* master-test-run-code_15 */; }; - F1359A271B2A356B00EFD22D /* master-test-run-code_16 in Resources */ = {isa = PBXBuildFile; fileRef = F13599CC1B2A356B00EFD22D /* master-test-run-code_16 */; }; - F1359A281B2A356B00EFD22D /* master-test-run-code_17 in Resources */ = {isa = PBXBuildFile; fileRef = F13599CD1B2A356B00EFD22D /* master-test-run-code_17 */; }; - F1359A291B2A356B00EFD22D /* master-test-run-code_18 in Resources */ = {isa = PBXBuildFile; fileRef = F13599CE1B2A356B00EFD22D /* master-test-run-code_18 */; }; - F1359A2A1B2A356B00EFD22D /* master-test-run-code_19 in Resources */ = {isa = PBXBuildFile; fileRef = F13599CF1B2A356B00EFD22D /* master-test-run-code_19 */; }; - F1359A2B1B2A356B00EFD22D /* master-test-run-code_20 in Resources */ = {isa = PBXBuildFile; fileRef = F13599D01B2A356B00EFD22D /* master-test-run-code_20 */; }; F1359A2C1B2A356B00EFD22D /* master-test-step_1 in Resources */ = {isa = PBXBuildFile; fileRef = F13599D11B2A356B00EFD22D /* master-test-step_1 */; }; F1359A2D1B2A356B00EFD22D /* master-test-step_2 in Resources */ = {isa = PBXBuildFile; fileRef = F13599D21B2A356B00EFD22D /* master-test-step_2 */; }; F1359A2E1B2A356B00EFD22D /* master-test-step_3 in Resources */ = {isa = PBXBuildFile; fileRef = F13599D31B2A356B00EFD22D /* master-test-step_3 */; }; @@ -823,7 +734,6 @@ C9D54E1315FA23E700D91131 /* TFiber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TFiber.cpp; sourceTree = ""; }; DA0D943E11B9A12D00835522 /* TTapNetwork.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TTapNetwork.cpp; sourceTree = ""; }; DA0D943F11B9A12D00835522 /* TTapNetwork.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TTapNetwork.h; sourceTree = ""; }; - DA226EE024C0419800A3DD2D /* master-test-run-code_21 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_21"; path = "scripts/master-test-run-code_21"; sourceTree = ""; }; DA4BA4051A3A0153002BDB80 /* CLITest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = CLITest; sourceTree = BUILT_PRODUCTS_DIR; }; DA4BA46E1A3A3B78002BDB80 /* TNullScreenManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TNullScreenManager.cpp; sourceTree = ""; }; DA4BA46F1A3A3B78002BDB80 /* TNullScreenManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TNullScreenManager.h; sourceTree = ""; }; @@ -858,94 +768,6 @@ F119E9BC1B41FA0D00192514 /* TMacMonitorView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TMacMonitorView.mm; sourceTree = ""; }; F12BD09F22838CD6007DC719 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = ../../Resources/Base.lproj/Einstein.xib; sourceTree = ""; }; F12BD0A022838CD6007DC719 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = ../../Resources/Base.lproj/TCocoaListenerWindow.xib; sourceTree = ""; }; - F13599791B2A356B00EFD22D /* master-test-execute-instruction_0A000007 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_0A000007"; path = "scripts/master-test-execute-instruction_0A000007"; sourceTree = ""; }; - F135997A1B2A356B00EFD22D /* master-test-execute-instruction_1A000007 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_1A000007"; path = "scripts/master-test-execute-instruction_1A000007"; sourceTree = ""; }; - F135997B1B2A356B00EFD22D /* master-test-execute-instruction_01F94573 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_01F94573"; path = "scripts/master-test-execute-instruction_01F94573"; sourceTree = ""; }; - F135997C1B2A356B00EFD22D /* master-test-execute-instruction_E3A0409C */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E3A0409C"; path = "scripts/master-test-execute-instruction_E3A0409C"; sourceTree = ""; }; - F135997D1B2A356B00EFD22D /* master-test-execute-instruction_E3D004FF */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E3D004FF"; path = "scripts/master-test-execute-instruction_E3D004FF"; sourceTree = ""; }; - F135997E1B2A356B00EFD22D /* master-test-execute-instruction_E5D00000 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E5D00000"; path = "scripts/master-test-execute-instruction_E5D00000"; sourceTree = ""; }; - F135997F1B2A356B00EFD22D /* master-test-execute-instruction_E5D00001 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E5D00001"; path = "scripts/master-test-execute-instruction_E5D00001"; sourceTree = ""; }; - F13599801B2A356B00EFD22D /* master-test-execute-instruction_E5D00002 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E5D00002"; path = "scripts/master-test-execute-instruction_E5D00002"; sourceTree = ""; }; - F13599811B2A356B00EFD22D /* master-test-execute-instruction_E5D00003 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E5D00003"; path = "scripts/master-test-execute-instruction_E5D00003"; sourceTree = ""; }; - F13599821B2A356B00EFD22D /* master-test-execute-instruction_E8D00800 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E8D00800"; path = "scripts/master-test-execute-instruction_E8D00800"; sourceTree = ""; }; - F13599831B2A356B00EFD22D /* master-test-execute-instruction_E8DD2000 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E8DD2000"; path = "scripts/master-test-execute-instruction_E8DD2000"; sourceTree = ""; }; - F13599841B2A356B00EFD22D /* master-test-execute-instruction_E10F1000 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E10F1000"; path = "scripts/master-test-execute-instruction_E10F1000"; sourceTree = ""; }; - F13599851B2A356B00EFD22D /* master-test-execute-instruction_E14F1000 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E14F1000"; path = "scripts/master-test-execute-instruction_E14F1000"; sourceTree = ""; }; - F13599861B2A356B00EFD22D /* master-test-execute-instruction_E282F014 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E282F014"; path = "scripts/master-test-execute-instruction_E282F014"; sourceTree = ""; }; - F13599871B2A356B00EFD22D /* master-test-execute-instruction_E321F01B */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E321F01B"; path = "scripts/master-test-execute-instruction_E321F01B"; sourceTree = ""; }; - F13599881B2A356B00EFD22D /* master-test-execute-instruction_E321F010 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E321F010"; path = "scripts/master-test-execute-instruction_E321F010"; sourceTree = ""; }; - F13599891B2A356B00EFD22D /* master-test-execute-instruction_E321F011 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E321F011"; path = "scripts/master-test-execute-instruction_E321F011"; sourceTree = ""; }; - F135998A1B2A356B00EFD22D /* master-test-execute-instruction_E321F012 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E321F012"; path = "scripts/master-test-execute-instruction_E321F012"; sourceTree = ""; }; - F135998B1B2A356B00EFD22D /* master-test-execute-instruction_E321F013 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E321F013"; path = "scripts/master-test-execute-instruction_E321F013"; sourceTree = ""; }; - F135998C1B2A356B00EFD22D /* master-test-execute-instruction_E321F017 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E321F017"; path = "scripts/master-test-execute-instruction_E321F017"; sourceTree = ""; }; - F135998D1B2A356B00EFD22D /* master-test-execute-instruction_E2922000 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E2922000"; path = "scripts/master-test-execute-instruction_E2922000"; sourceTree = ""; }; - F135998E1B2A356B00EFD22D /* master-test-execute-instruction_E5900000 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E5900000"; path = "scripts/master-test-execute-instruction_E5900000"; sourceTree = ""; }; - F135998F1B2A356B00EFD22D /* master-test-execute-instruction_E5900001 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E5900001"; path = "scripts/master-test-execute-instruction_E5900001"; sourceTree = ""; }; - F13599901B2A356B00EFD22D /* master-test-execute-instruction_E5900002 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E5900002"; path = "scripts/master-test-execute-instruction_E5900002"; sourceTree = ""; }; - F13599911B2A356B00EFD22D /* master-test-execute-instruction_E5900003 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_E5900003"; path = "scripts/master-test-execute-instruction_E5900003"; sourceTree = ""; }; - F13599921B2A356B00EFD22D /* master-test-execute-instruction_EA0061A0 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_EA0061A0"; path = "scripts/master-test-execute-instruction_EA0061A0"; sourceTree = ""; }; - F13599931B2A356B00EFD22D /* master-test-execute-instruction_EAFFFFFE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_EAFFFFFE"; path = "scripts/master-test-execute-instruction_EAFFFFFE"; sourceTree = ""; }; - F13599941B2A356B00EFD22D /* master-test-execute-instruction_EE010F11 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction_EE010F11"; path = "scripts/master-test-execute-instruction_EE010F11"; sourceTree = ""; }; - F13599951B2A356B00EFD22D /* master-test-execute-instruction-state1_E00B0A99 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E00B0A99"; path = "scripts/master-test-execute-instruction-state1_E00B0A99"; sourceTree = ""; }; - F13599961B2A356B00EFD22D /* master-test-execute-instruction-state1_E01B0A99 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E01B0A99"; path = "scripts/master-test-execute-instruction-state1_E01B0A99"; sourceTree = ""; }; - F13599971B2A356B00EFD22D /* master-test-execute-instruction-state1_E02B0A99 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E02B0A99"; path = "scripts/master-test-execute-instruction-state1_E02B0A99"; sourceTree = ""; }; - F13599981B2A356B00EFD22D /* master-test-execute-instruction-state1_E02BBA99 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E02BBA99"; path = "scripts/master-test-execute-instruction-state1_E02BBA99"; sourceTree = ""; }; - F13599991B2A356B00EFD22D /* master-test-execute-instruction-state1_E3A060FE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E3A060FE"; path = "scripts/master-test-execute-instruction-state1_E3A060FE"; sourceTree = ""; }; - F135999A1B2A356B00EFD22D /* master-test-execute-instruction-state1_E03BAA99 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E03BAA99"; path = "scripts/master-test-execute-instruction-state1_E03BAA99"; sourceTree = ""; }; - F135999B1B2A356B00EFD22D /* master-test-execute-instruction-state1_E03BBA99 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E03BBA99"; path = "scripts/master-test-execute-instruction-state1_E03BBA99"; sourceTree = ""; }; - F135999C1B2A356B00EFD22D /* master-test-execute-instruction-state1_E5B40010 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E5B40010"; path = "scripts/master-test-execute-instruction-state1_E5B40010"; sourceTree = ""; }; - F135999D1B2A356B00EFD22D /* master-test-execute-instruction-state1_E5BF0010 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E5BF0010"; path = "scripts/master-test-execute-instruction-state1_E5BF0010"; sourceTree = ""; }; - F135999E1B2A356B00EFD22D /* master-test-execute-instruction-state1_E22C0311 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E22C0311"; path = "scripts/master-test-execute-instruction-state1_E22C0311"; sourceTree = ""; }; - F135999F1B2A356B00EFD22D /* master-test-execute-instruction-state1_E22D0311 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E22D0311"; path = "scripts/master-test-execute-instruction-state1_E22D0311"; sourceTree = ""; }; - F13599A01B2A356B00EFD22D /* master-test-execute-instruction-state1_E24CB004 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E24CB004"; path = "scripts/master-test-execute-instruction-state1_E24CB004"; sourceTree = ""; }; - F13599A11B2A356B00EFD22D /* master-test-execute-instruction-state1_E24DD004 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E24DD004"; path = "scripts/master-test-execute-instruction-state1_E24DD004"; sourceTree = ""; }; - F13599A21B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049A22 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E0049A22"; path = "scripts/master-test-execute-instruction-state1_E0049A22"; sourceTree = ""; }; - F13599A31B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C20 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E0049C20"; path = "scripts/master-test-execute-instruction-state1_E0049C20"; sourceTree = ""; }; - F13599A41B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C22 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E0049C22"; path = "scripts/master-test-execute-instruction-state1_E0049C22"; sourceTree = ""; }; - F13599A51B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C23 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E0049C23"; path = "scripts/master-test-execute-instruction-state1_E0049C23"; sourceTree = ""; }; - F13599A61B2A356B00EFD22D /* master-test-execute-instruction-state1_E220C311 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E220C311"; path = "scripts/master-test-execute-instruction-state1_E220C311"; sourceTree = ""; }; - F13599A71B2A356B00EFD22D /* master-test-execute-instruction-state1_E2300CA1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E2300CA1"; path = "scripts/master-test-execute-instruction-state1_E2300CA1"; sourceTree = ""; }; - F13599A81B2A356B00EFD22D /* master-test-execute-instruction-state1_E2855C0E */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E2855C0E"; path = "scripts/master-test-execute-instruction-state1_E2855C0E"; sourceTree = ""; }; - F13599A91B2A356B00EFD22D /* master-test-execute-instruction-state1_E38000E0 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E38000E0"; path = "scripts/master-test-execute-instruction-state1_E38000E0"; sourceTree = ""; }; - F13599AA1B2A356B00EFD22D /* master-test-execute-instruction-state1_E38000EF */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E38000EF"; path = "scripts/master-test-execute-instruction-state1_E38000EF"; sourceTree = ""; }; - F13599AB1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0205094 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E0205094"; path = "scripts/master-test-execute-instruction-state1_E0205094"; sourceTree = ""; }; - F13599AC1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0620202 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E0620202"; path = "scripts/master-test-execute-instruction-state1_E0620202"; sourceTree = ""; }; - F13599AD1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0800005 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E0800005"; path = "scripts/master-test-execute-instruction-state1_E0800005"; sourceTree = ""; }; - F13599AE1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0841005 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E0841005"; path = "scripts/master-test-execute-instruction-state1_E0841005"; sourceTree = ""; }; - F13599AF1B2A356B00EFD22D /* master-test-execute-instruction-state1_E2200311 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E2200311"; path = "scripts/master-test-execute-instruction-state1_E2200311"; sourceTree = ""; }; - F13599B01B2A356B00EFD22D /* master-test-execute-instruction-state1_E2200801 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state1_E2200801"; path = "scripts/master-test-execute-instruction-state1_E2200801"; sourceTree = ""; }; - F13599B11B2A356B00EFD22D /* master-test-execute-instruction-state2_E1A0331C */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-instruction-state2_E1A0331C"; path = "scripts/master-test-execute-instruction-state2_E1A0331C"; sourceTree = ""; }; - F13599B21B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0C008-E91C0300 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-two-instructions_E3A0C008-E91C0300"; path = "scripts/master-test-execute-two-instructions_E3A0C008-E91C0300"; sourceTree = ""; }; - F13599B31B2A356B00EFD22D /* master-test-execute-two-instructions_E3A000D3-E129F000 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-two-instructions_E3A000D3-E129F000"; path = "scripts/master-test-execute-two-instructions_E3A000D3-E129F000"; sourceTree = ""; }; - F13599B41B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0D301-E8CD0100 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-two-instructions_E3A0D301-E8CD0100"; path = "scripts/master-test-execute-two-instructions_E3A0D301-E8CD0100"; sourceTree = ""; }; - F13599B51B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0100C-E1A01081 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-two-instructions_E3A0100C-E1A01081"; path = "scripts/master-test-execute-two-instructions_E3A0100C-E1A01081"; sourceTree = ""; }; - F13599B61B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0100C-EA0061A0 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-two-instructions_E3A0100C-EA0061A0"; path = "scripts/master-test-execute-two-instructions_E3A0100C-EA0061A0"; sourceTree = ""; }; - F13599B71B2A356B00EFD22D /* master-test-execute-two-instructions_E3E02000-E2922001 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-two-instructions_E3E02000-E2922001"; path = "scripts/master-test-execute-two-instructions_E3E02000-E2922001"; sourceTree = ""; }; - F13599B81B2A356B00EFD22D /* master-test-execute-two-instructions_E8D00800-E321F010 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-two-instructions_E8D00800-E321F010"; path = "scripts/master-test-execute-two-instructions_E8D00800-E321F010"; sourceTree = ""; }; - F13599B91B2A356B00EFD22D /* master-test-execute-two-instructions_E282F014-E282F014 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-two-instructions_E282F014-E282F014"; path = "scripts/master-test-execute-two-instructions_E282F014-E282F014"; sourceTree = ""; }; - F13599BA1B2A356B00EFD22D /* master-test-execute-two-instructions_E5901004-E7902003 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-execute-two-instructions_E5901004-E7902003"; path = "scripts/master-test-execute-two-instructions_E5901004-E7902003"; sourceTree = ""; }; - F13599BB1B2A356B00EFD22D /* master-test-memory-read-rom */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-memory-read-rom"; path = "scripts/master-test-memory-read-rom"; sourceTree = ""; }; - F13599BC1B2A356B00EFD22D /* master-test-memory-read-write-ram */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-memory-read-write-ram"; path = "scripts/master-test-memory-read-write-ram"; sourceTree = ""; }; - F13599BD1B2A356B00EFD22D /* master-test-run-code_1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_1"; path = "scripts/master-test-run-code_1"; sourceTree = ""; }; - F13599BE1B2A356B00EFD22D /* master-test-run-code_2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_2"; path = "scripts/master-test-run-code_2"; sourceTree = ""; }; - F13599BF1B2A356B00EFD22D /* master-test-run-code_3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_3"; path = "scripts/master-test-run-code_3"; sourceTree = ""; }; - F13599C01B2A356B00EFD22D /* master-test-run-code_4 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_4"; path = "scripts/master-test-run-code_4"; sourceTree = ""; }; - F13599C11B2A356B00EFD22D /* master-test-run-code_5 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_5"; path = "scripts/master-test-run-code_5"; sourceTree = ""; }; - F13599C21B2A356B00EFD22D /* master-test-run-code_6 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_6"; path = "scripts/master-test-run-code_6"; sourceTree = ""; }; - F13599C31B2A356B00EFD22D /* master-test-run-code_7 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_7"; path = "scripts/master-test-run-code_7"; sourceTree = ""; }; - F13599C41B2A356B00EFD22D /* master-test-run-code_8 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_8"; path = "scripts/master-test-run-code_8"; sourceTree = ""; }; - F13599C51B2A356B00EFD22D /* master-test-run-code_9 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_9"; path = "scripts/master-test-run-code_9"; sourceTree = ""; }; - F13599C61B2A356B00EFD22D /* master-test-run-code_10 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_10"; path = "scripts/master-test-run-code_10"; sourceTree = ""; }; - F13599C71B2A356B00EFD22D /* master-test-run-code_11 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_11"; path = "scripts/master-test-run-code_11"; sourceTree = ""; }; - F13599C81B2A356B00EFD22D /* master-test-run-code_12 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_12"; path = "scripts/master-test-run-code_12"; sourceTree = ""; }; - F13599C91B2A356B00EFD22D /* master-test-run-code_13 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_13"; path = "scripts/master-test-run-code_13"; sourceTree = ""; }; - F13599CA1B2A356B00EFD22D /* master-test-run-code_14 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_14"; path = "scripts/master-test-run-code_14"; sourceTree = ""; }; - F13599CB1B2A356B00EFD22D /* master-test-run-code_15 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_15"; path = "scripts/master-test-run-code_15"; sourceTree = ""; }; - F13599CC1B2A356B00EFD22D /* master-test-run-code_16 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_16"; path = "scripts/master-test-run-code_16"; sourceTree = ""; }; - F13599CD1B2A356B00EFD22D /* master-test-run-code_17 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_17"; path = "scripts/master-test-run-code_17"; sourceTree = ""; }; - F13599CE1B2A356B00EFD22D /* master-test-run-code_18 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_18"; path = "scripts/master-test-run-code_18"; sourceTree = ""; }; - F13599CF1B2A356B00EFD22D /* master-test-run-code_19 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_19"; path = "scripts/master-test-run-code_19"; sourceTree = ""; }; - F13599D01B2A356B00EFD22D /* master-test-run-code_20 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-run-code_20"; path = "scripts/master-test-run-code_20"; sourceTree = ""; }; F13599D11B2A356B00EFD22D /* master-test-step_1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-step_1"; path = "scripts/master-test-step_1"; sourceTree = ""; }; F13599D21B2A356B00EFD22D /* master-test-step_2 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-step_2"; path = "scripts/master-test-step_2"; sourceTree = ""; }; F13599D31B2A356B00EFD22D /* master-test-step_3 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "master-test-step_3"; path = "scripts/master-test-step_3"; sourceTree = ""; }; @@ -1696,95 +1518,6 @@ F1359A2F1B2A357400EFD22D /* Expected Results */ = { isa = PBXGroup; children = ( - F13599791B2A356B00EFD22D /* master-test-execute-instruction_0A000007 */, - F135997A1B2A356B00EFD22D /* master-test-execute-instruction_1A000007 */, - F135997B1B2A356B00EFD22D /* master-test-execute-instruction_01F94573 */, - F135997C1B2A356B00EFD22D /* master-test-execute-instruction_E3A0409C */, - F135997D1B2A356B00EFD22D /* master-test-execute-instruction_E3D004FF */, - F135997E1B2A356B00EFD22D /* master-test-execute-instruction_E5D00000 */, - F135997F1B2A356B00EFD22D /* master-test-execute-instruction_E5D00001 */, - F13599801B2A356B00EFD22D /* master-test-execute-instruction_E5D00002 */, - F13599811B2A356B00EFD22D /* master-test-execute-instruction_E5D00003 */, - F13599821B2A356B00EFD22D /* master-test-execute-instruction_E8D00800 */, - F13599831B2A356B00EFD22D /* master-test-execute-instruction_E8DD2000 */, - F13599841B2A356B00EFD22D /* master-test-execute-instruction_E10F1000 */, - F13599851B2A356B00EFD22D /* master-test-execute-instruction_E14F1000 */, - F13599861B2A356B00EFD22D /* master-test-execute-instruction_E282F014 */, - F13599871B2A356B00EFD22D /* master-test-execute-instruction_E321F01B */, - F13599881B2A356B00EFD22D /* master-test-execute-instruction_E321F010 */, - F13599891B2A356B00EFD22D /* master-test-execute-instruction_E321F011 */, - F135998A1B2A356B00EFD22D /* master-test-execute-instruction_E321F012 */, - F135998B1B2A356B00EFD22D /* master-test-execute-instruction_E321F013 */, - F135998C1B2A356B00EFD22D /* master-test-execute-instruction_E321F017 */, - F135998D1B2A356B00EFD22D /* master-test-execute-instruction_E2922000 */, - F135998E1B2A356B00EFD22D /* master-test-execute-instruction_E5900000 */, - F135998F1B2A356B00EFD22D /* master-test-execute-instruction_E5900001 */, - F13599901B2A356B00EFD22D /* master-test-execute-instruction_E5900002 */, - F13599911B2A356B00EFD22D /* master-test-execute-instruction_E5900003 */, - F13599921B2A356B00EFD22D /* master-test-execute-instruction_EA0061A0 */, - F13599931B2A356B00EFD22D /* master-test-execute-instruction_EAFFFFFE */, - F13599941B2A356B00EFD22D /* master-test-execute-instruction_EE010F11 */, - F13599951B2A356B00EFD22D /* master-test-execute-instruction-state1_E00B0A99 */, - F13599961B2A356B00EFD22D /* master-test-execute-instruction-state1_E01B0A99 */, - F13599971B2A356B00EFD22D /* master-test-execute-instruction-state1_E02B0A99 */, - F13599981B2A356B00EFD22D /* master-test-execute-instruction-state1_E02BBA99 */, - F13599991B2A356B00EFD22D /* master-test-execute-instruction-state1_E3A060FE */, - F135999A1B2A356B00EFD22D /* master-test-execute-instruction-state1_E03BAA99 */, - F135999B1B2A356B00EFD22D /* master-test-execute-instruction-state1_E03BBA99 */, - F135999C1B2A356B00EFD22D /* master-test-execute-instruction-state1_E5B40010 */, - F135999D1B2A356B00EFD22D /* master-test-execute-instruction-state1_E5BF0010 */, - F135999E1B2A356B00EFD22D /* master-test-execute-instruction-state1_E22C0311 */, - F135999F1B2A356B00EFD22D /* master-test-execute-instruction-state1_E22D0311 */, - F13599A01B2A356B00EFD22D /* master-test-execute-instruction-state1_E24CB004 */, - F13599A11B2A356B00EFD22D /* master-test-execute-instruction-state1_E24DD004 */, - F13599A21B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049A22 */, - F13599A31B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C20 */, - F13599A41B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C22 */, - F13599A51B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C23 */, - F13599A61B2A356B00EFD22D /* master-test-execute-instruction-state1_E220C311 */, - F13599A71B2A356B00EFD22D /* master-test-execute-instruction-state1_E2300CA1 */, - F13599A81B2A356B00EFD22D /* master-test-execute-instruction-state1_E2855C0E */, - F13599A91B2A356B00EFD22D /* master-test-execute-instruction-state1_E38000E0 */, - F13599AA1B2A356B00EFD22D /* master-test-execute-instruction-state1_E38000EF */, - F13599AB1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0205094 */, - F13599AC1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0620202 */, - F13599AD1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0800005 */, - F13599AE1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0841005 */, - F13599AF1B2A356B00EFD22D /* master-test-execute-instruction-state1_E2200311 */, - F13599B01B2A356B00EFD22D /* master-test-execute-instruction-state1_E2200801 */, - F13599B11B2A356B00EFD22D /* master-test-execute-instruction-state2_E1A0331C */, - F13599B21B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0C008-E91C0300 */, - F13599B31B2A356B00EFD22D /* master-test-execute-two-instructions_E3A000D3-E129F000 */, - F13599B41B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0D301-E8CD0100 */, - F13599B51B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0100C-E1A01081 */, - F13599B61B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0100C-EA0061A0 */, - F13599B71B2A356B00EFD22D /* master-test-execute-two-instructions_E3E02000-E2922001 */, - F13599B81B2A356B00EFD22D /* master-test-execute-two-instructions_E8D00800-E321F010 */, - F13599B91B2A356B00EFD22D /* master-test-execute-two-instructions_E282F014-E282F014 */, - F13599BA1B2A356B00EFD22D /* master-test-execute-two-instructions_E5901004-E7902003 */, - F13599BB1B2A356B00EFD22D /* master-test-memory-read-rom */, - F13599BC1B2A356B00EFD22D /* master-test-memory-read-write-ram */, - F13599BD1B2A356B00EFD22D /* master-test-run-code_1 */, - F13599BE1B2A356B00EFD22D /* master-test-run-code_2 */, - F13599BF1B2A356B00EFD22D /* master-test-run-code_3 */, - F13599C01B2A356B00EFD22D /* master-test-run-code_4 */, - F13599C11B2A356B00EFD22D /* master-test-run-code_5 */, - F13599C21B2A356B00EFD22D /* master-test-run-code_6 */, - F13599C31B2A356B00EFD22D /* master-test-run-code_7 */, - F13599C41B2A356B00EFD22D /* master-test-run-code_8 */, - F13599C51B2A356B00EFD22D /* master-test-run-code_9 */, - F13599C61B2A356B00EFD22D /* master-test-run-code_10 */, - F13599C71B2A356B00EFD22D /* master-test-run-code_11 */, - F13599C81B2A356B00EFD22D /* master-test-run-code_12 */, - F13599C91B2A356B00EFD22D /* master-test-run-code_13 */, - F13599CA1B2A356B00EFD22D /* master-test-run-code_14 */, - F13599CB1B2A356B00EFD22D /* master-test-run-code_15 */, - F13599CC1B2A356B00EFD22D /* master-test-run-code_16 */, - F13599CD1B2A356B00EFD22D /* master-test-run-code_17 */, - F13599CE1B2A356B00EFD22D /* master-test-run-code_18 */, - F13599CF1B2A356B00EFD22D /* master-test-run-code_19 */, - F13599D01B2A356B00EFD22D /* master-test-run-code_20 */, - DA226EE024C0419800A3DD2D /* master-test-run-code_21 */, F13599D11B2A356B00EFD22D /* master-test-step_1 */, F13599D21B2A356B00EFD22D /* master-test-step_2 */, F13599D31B2A356B00EFD22D /* master-test-step_3 */, @@ -2003,98 +1736,9 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - F13599E91B2A356B00EFD22D /* master-test-execute-instruction_E5900000 in Resources */, - F13599F51B2A356B00EFD22D /* master-test-execute-instruction-state1_E03BAA99 in Resources */, - F13599DD1B2A356B00EFD22D /* master-test-execute-instruction_E8D00800 in Resources */, - F13599F11B2A356B00EFD22D /* master-test-execute-instruction-state1_E01B0A99 in Resources */, - F13599E41B2A356B00EFD22D /* master-test-execute-instruction_E321F011 in Resources */, - F1359A221B2A356B00EFD22D /* master-test-run-code_11 in Resources */, - F13599E61B2A356B00EFD22D /* master-test-execute-instruction_E321F013 in Resources */, - F13599FF1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C22 in Resources */, - F1359A271B2A356B00EFD22D /* master-test-run-code_16 in Resources */, - F1359A0B1B2A356B00EFD22D /* master-test-execute-instruction-state1_E2200801 in Resources */, - F13599E81B2A356B00EFD22D /* master-test-execute-instruction_E2922000 in Resources */, - F1359A2B1B2A356B00EFD22D /* master-test-run-code_20 in Resources */, F1359A2E1B2A356B00EFD22D /* master-test-step_3 in Resources */, - F13599FA1B2A356B00EFD22D /* master-test-execute-instruction-state1_E22D0311 in Resources */, - F1359A171B2A356B00EFD22D /* master-test-memory-read-write-ram in Resources */, - F1359A251B2A356B00EFD22D /* master-test-run-code_14 in Resources */, - DA226EE124C0419800A3DD2D /* master-test-run-code_21 in Resources */, - F1359A0F1B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0D301-E8CD0100 in Resources */, - F13599FD1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049A22 in Resources */, - F13599E31B2A356B00EFD22D /* master-test-execute-instruction_E321F010 in Resources */, - F13599D81B2A356B00EFD22D /* master-test-execute-instruction_E3D004FF in Resources */, - F13599F01B2A356B00EFD22D /* master-test-execute-instruction-state1_E00B0A99 in Resources */, - F13599EC1B2A356B00EFD22D /* master-test-execute-instruction_E5900003 in Resources */, - F1359A141B2A356B00EFD22D /* master-test-execute-two-instructions_E282F014-E282F014 in Resources */, - F13599FC1B2A356B00EFD22D /* master-test-execute-instruction-state1_E24DD004 in Resources */, - F13599EE1B2A356B00EFD22D /* master-test-execute-instruction_EAFFFFFE in Resources */, - F1359A011B2A356B00EFD22D /* master-test-execute-instruction-state1_E220C311 in Resources */, - F13599D91B2A356B00EFD22D /* master-test-execute-instruction_E5D00000 in Resources */, - F1359A101B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0100C-E1A01081 in Resources */, - F1359A051B2A356B00EFD22D /* master-test-execute-instruction-state1_E38000EF in Resources */, - F1359A021B2A356B00EFD22D /* master-test-execute-instruction-state1_E2300CA1 in Resources */, F1359A2C1B2A356B00EFD22D /* master-test-step_1 in Resources */, - F1359A261B2A356B00EFD22D /* master-test-run-code_15 in Resources */, - F1359A091B2A356B00EFD22D /* master-test-execute-instruction-state1_E0841005 in Resources */, - F1359A1A1B2A356B00EFD22D /* master-test-run-code_3 in Resources */, - F13599E21B2A356B00EFD22D /* master-test-execute-instruction_E321F01B in Resources */, - F1359A1B1B2A356B00EFD22D /* master-test-run-code_4 in Resources */, - F13599D71B2A356B00EFD22D /* master-test-execute-instruction_E3A0409C in Resources */, - F1359A081B2A356B00EFD22D /* master-test-execute-instruction-state1_E0800005 in Resources */, - F13599ED1B2A356B00EFD22D /* master-test-execute-instruction_EA0061A0 in Resources */, - F1359A1F1B2A356B00EFD22D /* master-test-run-code_8 in Resources */, - F1359A191B2A356B00EFD22D /* master-test-run-code_2 in Resources */, - F1359A031B2A356B00EFD22D /* master-test-execute-instruction-state1_E2855C0E in Resources */, - F13599D51B2A356B00EFD22D /* master-test-execute-instruction_1A000007 in Resources */, - F13599E11B2A356B00EFD22D /* master-test-execute-instruction_E282F014 in Resources */, - F1359A2A1B2A356B00EFD22D /* master-test-run-code_19 in Resources */, - F1359A201B2A356B00EFD22D /* master-test-run-code_9 in Resources */, - F13599DC1B2A356B00EFD22D /* master-test-execute-instruction_E5D00003 in Resources */, - F13599F41B2A356B00EFD22D /* master-test-execute-instruction-state1_E3A060FE in Resources */, - F1359A291B2A356B00EFD22D /* master-test-run-code_18 in Resources */, - F13599E01B2A356B00EFD22D /* master-test-execute-instruction_E14F1000 in Resources */, F1359A2D1B2A356B00EFD22D /* master-test-step_2 in Resources */, - F13599F31B2A356B00EFD22D /* master-test-execute-instruction-state1_E02BBA99 in Resources */, - F1359A181B2A356B00EFD22D /* master-test-run-code_1 in Resources */, - F13599D41B2A356B00EFD22D /* master-test-execute-instruction_0A000007 in Resources */, - F1359A0E1B2A356B00EFD22D /* master-test-execute-two-instructions_E3A000D3-E129F000 in Resources */, - F1359A1C1B2A356B00EFD22D /* master-test-run-code_5 in Resources */, - F1359A121B2A356B00EFD22D /* master-test-execute-two-instructions_E3E02000-E2922001 in Resources */, - F13599F21B2A356B00EFD22D /* master-test-execute-instruction-state1_E02B0A99 in Resources */, - F1359A0A1B2A356B00EFD22D /* master-test-execute-instruction-state1_E2200311 in Resources */, - F13599F91B2A356B00EFD22D /* master-test-execute-instruction-state1_E22C0311 in Resources */, - F13599DA1B2A356B00EFD22D /* master-test-execute-instruction_E5D00001 in Resources */, - F1359A071B2A356B00EFD22D /* master-test-execute-instruction-state1_E0620202 in Resources */, - F13599E51B2A356B00EFD22D /* master-test-execute-instruction_E321F012 in Resources */, - F13599F71B2A356B00EFD22D /* master-test-execute-instruction-state1_E5B40010 in Resources */, - F1359A0D1B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0C008-E91C0300 in Resources */, - F1359A0C1B2A356B00EFD22D /* master-test-execute-instruction-state2_E1A0331C in Resources */, - F1359A131B2A356B00EFD22D /* master-test-execute-two-instructions_E8D00800-E321F010 in Resources */, - F1359A281B2A356B00EFD22D /* master-test-run-code_17 in Resources */, - F13599DF1B2A356B00EFD22D /* master-test-execute-instruction_E10F1000 in Resources */, - F13599E71B2A356B00EFD22D /* master-test-execute-instruction_E321F017 in Resources */, - F13599EF1B2A356B00EFD22D /* master-test-execute-instruction_EE010F11 in Resources */, - F13599F61B2A356B00EFD22D /* master-test-execute-instruction-state1_E03BBA99 in Resources */, - F13599FB1B2A356B00EFD22D /* master-test-execute-instruction-state1_E24CB004 in Resources */, - F1359A151B2A356B00EFD22D /* master-test-execute-two-instructions_E5901004-E7902003 in Resources */, - F1359A111B2A356B00EFD22D /* master-test-execute-two-instructions_E3A0100C-EA0061A0 in Resources */, - F1359A241B2A356B00EFD22D /* master-test-run-code_13 in Resources */, - F1359A1D1B2A356B00EFD22D /* master-test-run-code_6 in Resources */, - F1359A061B2A356B00EFD22D /* master-test-execute-instruction-state1_E0205094 in Resources */, - F13599F81B2A356B00EFD22D /* master-test-execute-instruction-state1_E5BF0010 in Resources */, - F1359A161B2A356B00EFD22D /* master-test-memory-read-rom in Resources */, - F1359A001B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C23 in Resources */, - F13599D61B2A356B00EFD22D /* master-test-execute-instruction_01F94573 in Resources */, - F13599FE1B2A356B00EFD22D /* master-test-execute-instruction-state1_E0049C20 in Resources */, - F13599EB1B2A356B00EFD22D /* master-test-execute-instruction_E5900002 in Resources */, - F1359A1E1B2A356B00EFD22D /* master-test-run-code_7 in Resources */, - F13599EA1B2A356B00EFD22D /* master-test-execute-instruction_E5900001 in Resources */, - F1359A211B2A356B00EFD22D /* master-test-run-code_10 in Resources */, - F1359A231B2A356B00EFD22D /* master-test-run-code_12 in Resources */, - F13599DE1B2A356B00EFD22D /* master-test-execute-instruction_E8DD2000 in Resources */, - F1359A041B2A356B00EFD22D /* master-test-execute-instruction-state1_E38000E0 in Resources */, - F13599DB1B2A356B00EFD22D /* master-test-execute-instruction_E5D00002 in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/_Tests_/EinsteinTests.cpp b/_Tests_/EinsteinTests.cpp new file mode 100644 index 000000000..3bb9b7687 --- /dev/null +++ b/_Tests_/EinsteinTests.cpp @@ -0,0 +1,10 @@ +#include +#include "UProcessorTests.h" +#include "Emulator/TARMProcessor.h" + +#include "_Tests_/ExecuteInstructionTests.t" +#include "_Tests_/ExecuteInstructionState1Tests.t" +#include "_Tests_/ExecuteInstructionState2Tests.t" +#include "_Tests_/ExecuteTwoInstructionsTests.t" +#include "_Tests_/RunCodeTests.t" +#include "_Tests_/MemoryTests.t" diff --git a/_Tests_/EinsteinTests.mm b/_Tests_/EinsteinTests.mm index d16ef50aa..92428ee52 100644 --- a/_Tests_/EinsteinTests.mm +++ b/_Tests_/EinsteinTests.mm @@ -9,6 +9,7 @@ #import #import +#include #include "UProcessorTests.h" #include "UMemoryTests.h" #include "Emulator/Log/TRAMLog.h" @@ -16,25 +17,8 @@ @interface EinsteinTests : XCTestCase @end -typedef void (^LogBlock)(TLog* log); - @implementation EinsteinTests -- (void)doTest: (LogBlock)block withOutputFile:(NSString*)path { - BOOL fileExistsAtPath = [[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:nil]; - - XCTAssertTrue(fileExistsAtPath, @"Expected test result file is missing: %@", path); - - if ( fileExistsAtPath == NO ) - return; - - NSString* master = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; - TRAMLog log; - block(&log); - NSString* output = [NSString stringWithUTF8String:log.GetContent().c_str()]; - XCTAssertEqualObjects(output, master, @"master = %@", path); -} - - (void)setUp { [super setUp]; } @@ -43,572 +27,16 @@ - (void)tearDown { [super tearDown]; } -- (void)doTestProcessorExecuteInstruction:(NSString*) instruction { - NSString *outputFilePath = [[NSBundle bundleForClass:[self class]] pathForResource:[NSString stringWithFormat:@"master-test-execute-instruction_%@", instruction] ofType:@""]; - - [self doTest: ^(TLog* log){ - UProcessorTests::ExecuteInstruction([instruction cStringUsingEncoding:NSUTF8StringEncoding], log); - } withOutputFile:outputFilePath]; -} - -- (void)doTestProcessorExecuteInstructionState1:(NSString*) instruction { - NSString *outputFilePath = [[NSBundle bundleForClass:[self class]] pathForResource:[NSString stringWithFormat:@"master-test-execute-instruction-state1_%@", instruction] ofType:@""]; - - [self doTest: ^(TLog* log){ - UProcessorTests::ExecuteInstructionState1([instruction cStringUsingEncoding:NSUTF8StringEncoding], log); - } withOutputFile:outputFilePath]; -} -- (void)doTestProcessorExecuteInstructionState2:(NSString*) instruction { - NSString *outputFilePath = [[NSBundle bundleForClass:[self class]] pathForResource:[NSString stringWithFormat:@"master-test-execute-instruction-state2_%@", instruction] ofType:@""]; - - [self doTest: ^(TLog* log){ - UProcessorTests::ExecuteInstructionState2([instruction cStringUsingEncoding:NSUTF8StringEncoding], log); - } withOutputFile:outputFilePath]; -} -- (void)doTestProcessorExecuteTwoInstructions:(NSString*) instructions { - NSString *outputFilePath = [[NSBundle bundleForClass:[self class]] pathForResource:[NSString stringWithFormat:@"master-test-execute-two-instructions_%@", instructions] ofType:@""]; - - [self doTest: ^(TLog* log){ - UProcessorTests::ExecuteTwoInstructions([instructions cStringUsingEncoding:NSUTF8StringEncoding], log); - } withOutputFile:outputFilePath]; -} -- (void)doTestProcessorRunCode:(NSString*) code master: (NSString*) suffix { - NSString *outputFilePath = [[NSBundle bundleForClass:[self class]] pathForResource:[NSString stringWithFormat:@"master-test-run-code_%@", suffix] ofType:@""]; - - [self doTest: ^(TLog* log){ - UProcessorTests::RunCode([code cStringUsingEncoding:NSUTF8StringEncoding], log); - } withOutputFile:outputFilePath]; -} - -- (void)testProcessorExecuteInstruction_0A000007 { - [self doTestProcessorExecuteInstruction:@"0A000007"]; -} -- (void)testProcessorExecuteInstruction_1A000007 { - [self doTestProcessorExecuteInstruction:@"1A000007"]; -} -- (void)testProcessorExecuteInstruction_E10F1000 { - [self doTestProcessorExecuteInstruction:@"E10F1000"]; -} -- (void)testProcessorExecuteInstruction_E14F1000 { - [self doTestProcessorExecuteInstruction:@"E14F1000"]; -} -- (void)testProcessorExecuteInstruction_E282F014 { - [self doTestProcessorExecuteInstruction:@"E282F014"]; -} -- (void)testProcessorExecuteInstruction_E2922000 { - [self doTestProcessorExecuteInstruction:@"E2922000"]; -} -- (void)testProcessorExecuteInstruction_E3A0409C { - [self doTestProcessorExecuteInstruction:@"E3A0409C"]; -} -- (void)testProcessorExecuteInstruction_E5900000 { - [self doTestProcessorExecuteInstruction:@"E5900000"]; -} -- (void)testProcessorExecuteInstruction_E5900001 { - [self doTestProcessorExecuteInstruction:@"E5900001"]; -} -- (void)testProcessorExecuteInstruction_E5900002 { - [self doTestProcessorExecuteInstruction:@"E5900002"]; -} -- (void)testProcessorExecuteInstruction_E5900003 { - [self doTestProcessorExecuteInstruction:@"E5900003"]; -} -- (void)testProcessorExecuteInstruction_E5D00000 { - [self doTestProcessorExecuteInstruction:@"E5D00000"]; -} -- (void)testProcessorExecuteInstruction_E5D00001 { - [self doTestProcessorExecuteInstruction:@"E5D00001"]; -} -- (void)testProcessorExecuteInstruction_E5D00002 { - [self doTestProcessorExecuteInstruction:@"E5D00002"]; -} -- (void)testProcessorExecuteInstruction_E5D00003 { - [self doTestProcessorExecuteInstruction:@"E5D00003"]; -} -- (void)testProcessorExecuteInstruction_EA0061A0 { - [self doTestProcessorExecuteInstruction:@"EA0061A0"]; -} -- (void)testProcessorExecuteInstruction_EAFFFFFE { - [self doTestProcessorExecuteInstruction:@"EAFFFFFE"]; -} -- (void)testProcessorExecuteInstruction_EE010F11 { - [self doTestProcessorExecuteInstruction:@"EE010F11"]; -} -// 01F94573 mvneqs r4, r3, ror r5 -- (void)testProcessorExecuteInstruction_01F94573 { - [self doTestProcessorExecuteInstruction:@"01F94573"]; -} -// E3D004FF bics r0, r0, #-16777216 -- (void)testProcessorExecuteInstruction_E3D004FF { - [self doTestProcessorExecuteInstruction:@"E3D004FF"]; -} -// E8DD2000 ldmia sp, {sp}^ -- (void)testProcessorExecuteInstruction_E8DD2000 { - [self doTestProcessorExecuteInstruction:@"E8DD2000"]; -} - -// E321F010 msr CPSR_c, #0x10 -- (void)testProcessorExecuteInstruction_E321F010 { - [self doTestProcessorExecuteInstruction:@"E321F010"]; -} -// E321F011 msr CPSR_c, #0x11 -- (void)testProcessorExecuteInstruction_E321F011 { - [self doTestProcessorExecuteInstruction:@"E321F011"]; -} -// E321F012 msr CPSR_c, #0x12 -- (void)testProcessorExecuteInstruction_E321F012 { - [self doTestProcessorExecuteInstruction:@"E321F012"]; -} -// E321F013 msr CPSR_c, #0x13 -- (void)testProcessorExecuteInstruction_E321F013 { - [self doTestProcessorExecuteInstruction:@"E321F013"]; -} -// E321F017 msr CPSR_c, #0x17 -- (void)testProcessorExecuteInstruction_E321F017 { - [self doTestProcessorExecuteInstruction:@"E321F017"]; -} -// E321F01B msr CPSR_c, #0x1B -- (void)testProcessorExecuteInstruction_E321F01B { - [self doTestProcessorExecuteInstruction:@"E321F01B"]; -} -// E8D00800 ldm r0, {r11}^ -- (void)testProcessorExecuteInstruction_E8D00800 { - [self doTestProcessorExecuteInstruction:@"E8D00800"]; -} - -- (void)testProcessorExecuteInstructionState1_E0049A22 { - [self doTestProcessorExecuteInstructionState1:@"E0049A22"]; -} -- (void)testProcessorExecuteInstructionState1_E0049C20 { - [self doTestProcessorExecuteInstructionState1:@"E0049C20"]; -} -- (void)testProcessorExecuteInstructionState1_E0049C22 { - [self doTestProcessorExecuteInstructionState1:@"E0049C22"]; -} -- (void)testProcessorExecuteInstructionState1_E0049C23 { - [self doTestProcessorExecuteInstructionState1:@"E0049C23"]; -} -- (void)testProcessorExecuteInstructionState1_E00B0A99 { - [self doTestProcessorExecuteInstructionState1:@"E00B0A99"]; -} -- (void)testProcessorExecuteInstructionState1_E01B0A99 { - [self doTestProcessorExecuteInstructionState1:@"E01B0A99"]; -} -- (void)testProcessorExecuteInstructionState1_E0205094 { - [self doTestProcessorExecuteInstructionState1:@"E0205094"]; -} -- (void)testProcessorExecuteInstructionState1_E02B0A99 { - [self doTestProcessorExecuteInstructionState1:@"E02B0A99"]; -} -- (void)testProcessorExecuteInstructionState1_E02BBA99 { - [self doTestProcessorExecuteInstructionState1:@"E02BBA99"]; -} -- (void)testProcessorExecuteInstructionState1_E03BAA99 { - [self doTestProcessorExecuteInstructionState1:@"E03BAA99"]; -} -- (void)testProcessorExecuteInstructionState1_E03BBA99 { - [self doTestProcessorExecuteInstructionState1:@"E03BBA99"]; -} -- (void)testProcessorExecuteInstructionState1_E0620202 { - [self doTestProcessorExecuteInstructionState1:@"E0620202"]; -} -- (void)testProcessorExecuteInstructionState1_E0800005 { - [self doTestProcessorExecuteInstructionState1:@"E0800005"]; -} -- (void)testProcessorExecuteInstructionState1_E0841005 { - [self doTestProcessorExecuteInstructionState1:@"E0841005"]; -} -- (void)testProcessorExecuteInstructionState1_E2200311 { - [self doTestProcessorExecuteInstructionState1:@"E2200311"]; -} -- (void)testProcessorExecuteInstructionState1_E2200801 { - [self doTestProcessorExecuteInstructionState1:@"E2200801"]; -} -- (void)testProcessorExecuteInstructionState1_E220C311 { - [self doTestProcessorExecuteInstructionState1:@"E220C311"]; -} -- (void)testProcessorExecuteInstructionState1_E22C0311 { - [self doTestProcessorExecuteInstructionState1:@"E22C0311"]; -} -- (void)testProcessorExecuteInstructionState1_E22D0311 { - [self doTestProcessorExecuteInstructionState1:@"E22D0311"]; -} -- (void)testProcessorExecuteInstructionState1_E2300CA1 { - [self doTestProcessorExecuteInstructionState1:@"E2300CA1"]; -} -- (void)testProcessorExecuteInstructionState1_E24CB004 { - [self doTestProcessorExecuteInstructionState1:@"E24CB004"]; -} -- (void)testProcessorExecuteInstructionState1_E24DD004 { - [self doTestProcessorExecuteInstructionState1:@"E24DD004"]; -} -- (void)testProcessorExecuteInstructionState1_E2855C0E { - [self doTestProcessorExecuteInstructionState1:@"E2855C0E"]; -} -- (void)testProcessorExecuteInstructionState1_E38000E0 { - [self doTestProcessorExecuteInstructionState1:@"E38000E0"]; -} -- (void)testProcessorExecuteInstructionState1_E38000EF { - [self doTestProcessorExecuteInstructionState1:@"E38000EF"]; -} -- (void)testProcessorExecuteInstructionState1_E3A060FE { - [self doTestProcessorExecuteInstructionState1:@"E3A060FE"]; -} -- (void)testProcessorExecuteInstructionState1_E5B40010 { - [self doTestProcessorExecuteInstructionState1:@"E5B40010"]; -} -- (void)testProcessorExecuteInstructionState1_E5BF0010 { - [self doTestProcessorExecuteInstructionState1:@"E5BF0010"]; -} - -- (void)testProcessorExecuteInstructionState2_E1A0331C { - [self doTestProcessorExecuteInstructionState2:@"E1A0331C"]; -} - -- (void)testProcessorExecuteTwoInstructions_E282F014_E282F014 { - [self doTestProcessorExecuteTwoInstructions:@"E282F014-E282F014"]; -} -- (void)testProcessorExecuteTwoInstructions_E3A000D3_E129F000 { - [self doTestProcessorExecuteTwoInstructions:@"E3A000D3-E129F000"]; -} -- (void)testProcessorExecuteTwoInstructions_E3A0100C_E1A01081 { - [self doTestProcessorExecuteTwoInstructions:@"E3A0100C-E1A01081"]; -} -// Test branches when they are not at address 0 -// mov r1, #12 (C) -// b 0x0001868C -- (void)testProcessorExecuteTwoInstructions_E3A0100C_EA0061A0 { - [self doTestProcessorExecuteTwoInstructions:@"E3A0100C-EA0061A0"]; -} -- (void)testProcessorExecuteTwoInstructions_E3A0C008_E91C0300 { - [self doTestProcessorExecuteTwoInstructions:@"E3A0C008-E91C0300"]; -} -- (void)testProcessorExecuteTwoInstructions_E3E02000_E2922001 { - [self doTestProcessorExecuteTwoInstructions:@"E3E02000-E2922001"]; -} -// e5901004 ldr r1, [r0, #4] -// e7902003 ldr r2, [r0, r3] -- (void)testProcessorExecuteTwoInstructions_E5901004_E7902003 { - [self doTestProcessorExecuteTwoInstructions:@"E5901004-E7902003"]; -} - -// mov sp, #0x4000000 -// stmia sp, {r8}^ -- (void)testProcessorExecuteTwoInstructions_E3A0D301_E8CD0100 { - [self doTestProcessorExecuteTwoInstructions:@"E3A0D301-E8CD0100"]; -} -// E8D00800 ldm r0, {r11}^ -// E321F010 msr CPSR_c, #0x10 -- (void)testProcessorExecuteTwoInstructions_E8D00800_E321F010 { - [self doTestProcessorExecuteTwoInstructions:@"E8D00800-E321F010"]; -} - -// e1200070 bkpt #0x0 -- (void)testProcessorRunCode_1 { - [self doTestProcessorRunCode:@"E1200070" master: @"1"]; -} - -// e3a01001 mov r1, #0x1 -// e3310000 teq r1, #0x0 -// 03a02002 moveq r2, #0x2 -// e1200070 bkpt #0x0 -- (void)testProcessorRunCode_2 { - [self doTestProcessorRunCode:@"E3A01001 E3310000 03A02002 E1200070" master: @"2"]; -} - -// e3a01001 mov r1, #0x1 -// e3310000 teq r1, #0x0 -// 03a02002 movne r2, #0x2 -// e1200070 bkpt #0x0 -- (void)testProcessorRunCode_3 { - [self doTestProcessorRunCode:@"E3A01001 E3310000 13A02002 E1200070" master: @"3"]; -} - -// e3a01001 movs r1, #0x1 -// 03a02002 moveq r2, #0x2 -// e1200070 bkpt #0x0 -- (void)testProcessorRunCode_4 { - [self doTestProcessorRunCode:@"E3B01001 03A02002 E1200070" master: @"4"]; -} - -// e3b01001 movs r1, #0x1 -// 03a02002 movne r2, #0x2 -// e1200070 bkpt #0x0 -- (void)testProcessorRunCode_5 { - [self doTestProcessorRunCode:@"E3B01001 13A02002 E1200070" master: @"5"]; -} - -// E3A00301 mov r0, #0x4000000 -// E3A01001 mov r1, #0x1 -// E3A02002 mov r2, #0x2 -// E3A03003 mov r3, #0x3 -// E3A04004 mov r4, #0x4 -// E3A05005 mov r5, #0x5 -// E3A06006 mov r6, #0x6 -// E8A0007F stm r0!, {r0, r1, r2, r3, r4, r5, r6} -// E9101F80 ldmdb r0, {r7, r8, r9, r10, r11, r12} -// E0400106 sub r0, r0, r6, lsl #2 -// E590D004 ldr sp, [r0, #4] -// E790E004 ldr lr, [r0, r4] -// E1200070 bkpt #0x0 -- (void)testProcessorRunCode_6 { - [self doTestProcessorRunCode:@"E3A00301 E3A01001 E3A02002 E3A03003 E3A04004 E3A05005 E3A06006 E8A0007F E9101F80 E0400106 E590D004 E790E004 E1200070" master: @"6"]; -} - -// e361f017 msr SPSR_c, #0x17 -// e1a0e00f mov lr, pc -// e1b0f00e movs pc, lr -// e1200070 bkpt #0x0 -- (void)testProcessorRunCode_7 { - [self doTestProcessorRunCode:@"e361f017 e1a0e00f e1b0f00e e1200070" master: @"7"]; -} - -// e361f010 msr SPSR_c, #0x10 -// e321f017 msr CPSR_c, #0x17 -// e361f011 msr SPSR_c, #0x11 -// e1a0e00f mov lr, pc -// e1b0f00e movs pc, lr -// e1200070 bkpt #0x0 -- (void)testProcessorRunCode_8 { - [self doTestProcessorRunCode:@"e361f010 e321f017 e361f011 e1a0e00f e1b0f00e e1200070" master: @"8"]; -} - -// e361f010 msr SPSR_c, #0x10 -// e321f017 msr CPSR_c, #0x17 -// e3a00011 mov r0, #0x11 -// e2800206 add r0, r0, #0x60000000 -// e169f000 msr SPSR_fc, r0 -// e1a0e00f mov lr, pc -// e1b0f00e movs pc, lr -// e1200070 bkpt #0x0 -- (void)testProcessorRunCode_9 { - [self doTestProcessorRunCode:@"e361f010 e321f017 e3a00011 e2800206 e169f000 e1a0e00f e1b0f00e e1200070" master: @"9"]; -} - -// e3a00017 mov r0, #0x17 -// e2800206 add r0, r0, #0x60000000 -// e129f000 msr CPSR_fc, r0 -// e1200070 bkpt #0x0 -- (void)testProcessorRunCode_10 { - [self doTestProcessorRunCode:@"e3a00017 e2800206 e129f000 e1200070" master: @"10"]; -} - -// e3a00017 mov r0, #0x17 -// e2800206 add r0, r0, #0x60000000 -// e121f000 msr CPSR_c, r0 -// e1200070 bkpt #0x0 -- (void)testProcessorRunCode_11 { - [self doTestProcessorRunCode:@"e3a00017 e2800206 e121f000 e1200070" master: @"11"]; -} - -// e3a00017 mov r0, #0x17 -// e2800206 add r0, r0, #0x60000000 -// e128f000 msr CPSR_f, r0 -// e1200070 bkpt #0x0 -- (void)testProcessorRunCode_12 { - [self doTestProcessorRunCode:@"e3a00017 e2800206 e128f000 e1200070" master: @"12"]; -} - -// e3a00017 mov r0, #0x17 -// e2800206 add r0, r0, #0x60000000 -// e169f000 msr SPSR_fc, r0 -// e14f1000 mrs r1, SPSR -// e10f2000 mrs r2, CPSR -// e1a0e00f mov lr, pc -// e1b0f00e movs pc, lr -// e10f3000 mrs r3, CPSR -// e1200070 bkpt #0x0 -- (void)testProcessorRunCode_13 { - [self doTestProcessorRunCode:@"e3a00017 e2800206 e169f000 e14f1000 e10f2000 e1a0e00f e1b0f00e e10f3000 e1200070" master: @"13"]; -} - -// e3a00017 mov r0, #0x17 -// e2800206 add r0, r0, #0x60000000 -// e161f000 msr SPSR_c, r0 -// e14f1000 mrs r1, SPSR -// e10f2000 mrs r2, CPSR -// e1a0e00f mov lr, pc -// e1b0f00e movs pc, lr -// e10f3000 mrs r3, CPSR -// e1200070 bkpt #0x0 -- (void)testProcessorRunCode_14 { - [self doTestProcessorRunCode:@"e3a00017 e2800206 e161f000 e14f1000 e10f2000 e1a0e00f e1b0f00e e10f3000 e1200070" master: @"14"]; -} - -// e10f0000 mrs r0, CPSR -// e169f000 msr SPSR_fc, r0 -// e3a00017 mov r0, #0x17 -// e2800206 add r0, r0, #0x60000000 -// e168f000 msr SPSR_f, r0 -// e14f1000 mrs r1, SPSR -// e10f2000 mrs r2, CPSR -// e1a0e00f mov lr, pc -// e1b0f00e movs pc, lr -// e10f3000 mrs r3, CPSR -// e1200070 bkpt #0x0 -- (void)testProcessorRunCode_15 { - [self doTestProcessorRunCode:@"e10f0000 e169f000 e3a00017 e2800206 e168f000 e14f1000 e10f2000 e1a0e00f e1b0f00e e10f3000 e1200070" master: @"15"]; -} - -// -- large block with a subroutine doing 64bits additions. -/* - ldr r0, =w1 - ldm r0, {r0-r3} - bl sub - mov r2, r4 - mov r3, r5 - mov r10, r4 - bl sub - mov r2, r4 - mov r3, r5 - mov r11, r4 - bl sub - mov r2, r4 - mov r3, r5 - mov r12, r4 - bl sub - mov r2, r4 - mov r3, r5 - mov r13, r4 - bl sub - sub r2, r4 - mov r3, r5 - bl sub - bkpt 0 - w1: - .long 0x46474849 - w2: - .long 0x41424344 - w3: - .long 0x16171819 - w4: - .long 0x11121314 - sub: - adds r4,r0,r2 - adcs r5,r1,r3 - mov r6, r6, LSL #4 - addeq r6, #0x1 - addcs r6, #0x2 - addmi r6, #0x4 - addvs r6, #0x8 - mov r7, r7, ROR #4 - subne r7, #0x1 - subcc r7, #0x2 - subpl r7, #0x4 - subvc r7, #0x8 - orrhi r8, #0x80000000 - orrge r8, #0x40000000 - orrgt r8, #0x20000000 - mov r8, r8, LSR #3 - eorhi r9, #0x80000000 - eorge r9, #0x40000000 - eorgt r9, #0x20000000 - mov r9, r9, ASR #3 - mov pc, lr -*/ -- (void)testProcessorRunCode_16 { - [self doTestProcessorRunCode:@"e59f00b8 e890000f eb000017 e1a02004 e1a03005 e1a0a004 eb000013 e1a02004 e1a03005 e1a0b004 eb00000f e1a02004 e1a03005 e1a0c004 eb00000b e1a02004 e1a03005 e1a0d004 eb000007 e0422004 e1a03005 eb000004 e1200070 46474849 41424344 16171819 11121314 e0904002 e0b15003 e1a06206 02866001 22866002 42866004 62866008 e1a07267 12477001 32477002 52477004 72477008 83888102 a3888101 c3888202 e1a081a8 82299102 a2299101 c2299202 e1a091c9 e1a0f00e 0000005c" master: @"16"]; -} - -/* -mov r0, #0x04000000 -sub r1, pc, #0x0304 -sub r1, r1, #0x00020000 -sub r1, r1, #0x01000000 -str r1, [r0] -mov r2, #0x05 -swp r3, r1, [r0] -swpb r4, r2, [r0] -ldr r5, [r0] -bkpt 0 -*/ -- (void)testProcessorRunCode_17 { - [self doTestProcessorRunCode:@"e3a00301 e24f1fc1 e2411802 e2411401 e5801000 e3a02005 e1003091 e1404092 e5905000 e1200070" master: @"17"]; -} - -/* - Test with page jumps using RAM (we copy code there). - - 00000000 e3a00301 mov r0, #0x4000000 - 00000004 e28f1008 add r1, pc, #0x8 - 00000008 e8b103f0 ldm r1!, {r4, r5, r6, r7, r8, r9} - 0000000c e88003f0 stm r0, {r4, r5, r6, r7, r8, r9} - 00000010 e280f004 add pc, r0, #0x4 - 04000000 e2833001 add r3, r3, #0x1 # not executed - 04000004 e2833002 add r3, r3, #0x2 # executed - 04000008 e2800601 add r0, r0, #0x100000 - 0400000c e8b13c00 ldm r1!, {r10, r11, r12, sp} - 04000010 e8803c00 stm r0, {r10, r11, r12, sp} - 04000014 ea03fffa b 0x4100004 - 04100000 e2833004 add r3, r3, #0x4 # not executed - 04100004 e2833008 add r3, r3, #0x8 # executed - 04100008 e1200070 bkpt #0x0 - */ -- (void)testProcessorRunCode_18 { - [self doTestProcessorRunCode:@"e3a00301 e28f1008 e8b103f0 e88003f0 e280f004 e2833001 e2833002 e2800601 e8b13c00 e8803c00 ea03fffa e2833004 e2833008 e1200070" master: @"18"]; -} - -/* - LDMDB with PC. - - add r11, pc, #40 r11 = 48 - ldmdb r11, {r4-r11, r13, pc} - bkpt 0 - .long 0x00000010 - .long 0x0000000F - .long 0x0000000E - .long 0x0000000D - .long 0x0000000C - .long 0x0000000B - .long 0x0000000A - .long 0x00000009 - .long 0x00000008 - */ -- (void)testProcessorRunCode_19 { - [self doTestProcessorRunCode:@"e28fb028 e91baff0 e1200070 00000010 0000000F 0000000E 0000000D 0000000C 0000000B 0000000A 00000009 00000008" master: @"19"]; -} - -/* - mov r1, #3 - mov r0, #0x200 - add r0, #0x57 - mov r2, r0, lsr r1 - mov r3, r0, lsr #3 - mov r4, r0, asr r1 - mov r5, r0, asr #3 - bkpt 0 -*/ -- (void)testProcessorRunCode_20 { - [self doTestProcessorRunCode:@"e3a01003 e3a00c02 e2800057 e1a02130 e1a031a0 e1a04150 e1a051c0 e1200070" master: @"20"]; -} - -/* - * half-word store - 0: e3a00301 mov r0, #67108864 ; 0x4000000 - 4: e28f1b01 add r1, pc, #1024 ; 0x400 - 8: e1c010b0 strh r1, [r0] - c: e5902000 ldr r2, [r0] - 10: e1200070 bkpt 0 -**/ -- (void)testProcessorRunCode_21 { - [self doTestProcessorRunCode:@"e3a00301 e28f1b01 e1c010b0 e1c010b0 e5902000 e1200070" master: @"21"]; -} - // Step tests require a ROM image -- (void)testMemoryReadROM { - NSString *outputFilePath = [[NSBundle bundleForClass:[self class]] pathForResource:@"master-test-memory-read-rom" ofType:@""]; - [self doTest: ^(TLog* log){ - UMemoryTests::ReadROMTest(log); - } withOutputFile:outputFilePath]; -} - -- (void)testMemoryReadWriteRAM { - NSString *outputFilePath = [[NSBundle bundleForClass:[self class]] pathForResource:@"master-test-memory-read-write-ram" ofType:@""]; - [self doTest: ^(TLog* log){ - UMemoryTests::ReadWriteRAMTest(log); - } withOutputFile:outputFilePath]; -} +#define TEST(TestSuiteName, TestName) - (void)test ## TestSuiteName ## _ ## TestName +#define EXPECT_EQ(val1, val2) XCTAssertEqual(val1, val2) +#include "_Tests_/ExecuteInstructionTests.t" +#include "_Tests_/ExecuteInstructionState1Tests.t" +#include "_Tests_/ExecuteInstructionState2Tests.t" +#include "_Tests_/ExecuteTwoInstructionsTests.t" +#include "_Tests_/RunCodeTests.t" +#include "_Tests_/MemoryTests.t" @end diff --git a/_Tests_/ExecuteInstructionState1Tests.t b/_Tests_/ExecuteInstructionState1Tests.t new file mode 100644 index 000000000..67bef09e5 --- /dev/null +++ b/_Tests_/ExecuteInstructionState1Tests.t @@ -0,0 +1,616 @@ +// 00000000 rsb r0, r2, r2, lsl #32 |Ā E0620202 - .b.. +TEST(ExecuteInstructionState1, E0620202) { + UProcessorTests::ExecuteInstructionState1(0xE0620202, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x8796A5B4); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 eor r0, ip, #1140850688 |Ā E22C0311 - .,.. +TEST(ExecuteInstructionState1, E22C0311) { + UProcessorTests::ExecuteInstructionState1(0xE22C0311, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x75323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 eor r0, r0, #65536 |Ā E2200801 - .... +TEST(ExecuteInstructionState1, E2200801) { + UProcessorTests::ExecuteInstructionState1(0xE2200801, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01030304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 eor r0, r0, #1140850688 |Ā E2200311 - .... +TEST(ExecuteInstructionState1, E2200311) { + UProcessorTests::ExecuteInstructionState1(0xE2200311, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x45020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 mla r0, r4, r0, r5 |Ā E0205094 - ..P. +TEST(ExecuteInstructionState1, E0205094) { + UProcessorTests::ExecuteInstructionState1(0xE0205094, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0xC9BF9F68); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 eor ip, r0, #1140850688 |Ā E220C311 - .... +TEST(ExecuteInstructionState1, E220C311) { + UProcessorTests::ExecuteInstructionState1(0xE220C311, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x45020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 add r5, r5, #3584 |Ā E2855C0E - ..\. +TEST(ExecuteInstructionState1, E2855C0E) { + UProcessorTests::ExecuteInstructionState1(0xE2855C0E, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15162518); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 eor r0, sp, #1140850688 |Ā E22D0311 - .-.. +TEST(ExecuteInstructionState1, E22D0311) { + UProcessorTests::ExecuteInstructionState1(0xE22D0311, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x71363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 add r1, r4, r5 |Ā E0841005 - .... +TEST(ExecuteInstructionState1, E0841005) { + UProcessorTests::ExecuteInstructionState1(0xE0841005, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x26282A2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 and r9, r4, r2, lsr #32 |Ā E0049A22 - ..." +TEST(ExecuteInstructionState1, E0049A22) { + UProcessorTests::ExecuteInstructionState1(0xE0049A22, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000010); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 mla fp, r9, sl, r0 |Ā E02B0A99 - .+.. +TEST(ExecuteInstructionState1, E02B0A99) { + UProcessorTests::ExecuteInstructionState1(0xE02B0A99, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0xA0B475E4); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 add r0, r0, r5 |Ā E0800005 - .... +TEST(ExecuteInstructionState1, E0800005) { + UProcessorTests::ExecuteInstructionState1(0xE0800005, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x16181A1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 sub fp, ip, #4 |Ā E24CB004 - .L.. +TEST(ExecuteInstructionState1, E24CB004) { + UProcessorTests::ExecuteInstructionState1(0xE24CB004, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x31323330); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 mov r6, #254 |Ā E3A060FE - ..`. +TEST(ExecuteInstructionState1, E3A060FE) { + UProcessorTests::ExecuteInstructionState1(0xE3A060FE, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x000000FE); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 ldr r0, [r4, #16]! |Ā E5B40010 - .... +TEST(ExecuteInstructionState1, E5B40010) { + UProcessorTests::ExecuteInstructionState1(0xE5B40010, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 and r9, r4, r0, lsr #32 |Ā E0049C20 - .... +TEST(ExecuteInstructionState1, E0049C20) { + UProcessorTests::ExecuteInstructionState1(0xE0049C20, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 mlas fp, r9, sl, fp |Ā E03BBA99 - .;.. +TEST(ExecuteInstructionState1, E03BBA99) { + UProcessorTests::ExecuteInstructionState1(0xE03BBA99, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0xCCE0A210); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x80000013); + }); +} +// 00000000 mla fp, r9, sl, fp |Ā E02BBA99 - .+.. +TEST(ExecuteInstructionState1, E02BBA99) { + UProcessorTests::ExecuteInstructionState1(0xE02BBA99, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0xCCE0A210); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 ldr r0, 0x00000018 |Ā E5BF0010 - .... +TEST(ExecuteInstructionState1, E5BF0010) { + UProcessorTests::ExecuteInstructionState1(0xE5BF0010, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 mul fp, r9, sl |Ā E00B0A99 - .... +TEST(ExecuteInstructionState1, E00B0A99) { + UProcessorTests::ExecuteInstructionState1(0xE00B0A99, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x9FB272E0); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 sub sp, sp, #4 |Ā E24DD004 - .M.. +TEST(ExecuteInstructionState1, E24DD004) { + UProcessorTests::ExecuteInstructionState1(0xE24DD004, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363734); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 muls fp, r9, sl |Ā E01B0A99 - .... +TEST(ExecuteInstructionState1, E01B0A99) { + UProcessorTests::ExecuteInstructionState1(0xE01B0A99, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x9FB272E0); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x80000013); + }); +} +// 00000000 mlas fp, r9, sl, sl |Ā E03BAA99 - .;.. +TEST(ExecuteInstructionState1, E03BAA99) { + UProcessorTests::ExecuteInstructionState1(0xE03BAA99, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0xC8DC9E0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x80000013); + }); +} +// 00000000 orr r0, r0, #224 |Ā E38000E0 - .... +TEST(ExecuteInstructionState1, E38000E0) { + UProcessorTests::ExecuteInstructionState1(0xE38000E0, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x010203E4); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 and r9, r4, r2, lsr #32 |Ā E0049C22 - ..." +TEST(ExecuteInstructionState1, E0049C22) { + UProcessorTests::ExecuteInstructionState1(0xE0049C22, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 orr r0, r0, #239 |Ā E38000EF - .... +TEST(ExecuteInstructionState1, E38000EF) { + UProcessorTests::ExecuteInstructionState1(0xE38000EF, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x010203EF); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 and r9, r4, r3, lsr #32 |Ā E0049C23 - ...# +TEST(ExecuteInstructionState1, E0049C23) { + UProcessorTests::ExecuteInstructionState1(0xE0049C23, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x01020304); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000004); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 eors r0, r0, #41216 |Ā E2300CA1 - .0.. +TEST(ExecuteInstructionState1, E2300CA1) { + UProcessorTests::ExecuteInstructionState1(0xE2300CA1, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x0102A204); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x05060708); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x090A0B0C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0D0E0F10); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x11121314); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x15161718); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x191A1B1C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x1D1E1F20); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x21222324); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x25262728); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x292A2B2C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x2D2E2F30); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x31323334); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x35363738); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x393A3B3C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} diff --git a/_Tests_/ExecuteInstructionState2Tests.t b/_Tests_/ExecuteInstructionState2Tests.t new file mode 100644 index 000000000..1d0b46eff --- /dev/null +++ b/_Tests_/ExecuteInstructionState2Tests.t @@ -0,0 +1,22 @@ +// 00000000 mov r3, ip, lsl r3 |Ā E1A0331C - ..3. +TEST(ExecuteInstructionState2, E1A0331C) { + UProcessorTests::ExecuteInstructionState2(0xE1A0331C, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0xFFFFFFFF); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} diff --git a/_Tests_/ExecuteInstructionTests.t b/_Tests_/ExecuteInstructionTests.t new file mode 100644 index 000000000..bf840309e --- /dev/null +++ b/_Tests_/ExecuteInstructionTests.t @@ -0,0 +1,661 @@ +// 00000000 beq 0x00000024 (will not branch) +TEST(ExecuteInstruction, 0A000007) { + UProcessorTests::ExecuteInstruction(0x0A000007, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +// 00000000 bne 0x00000024 (will branch) +TEST(ExecuteInstruction, 1A000007) { + UProcessorTests::ExecuteInstruction(0x1A000007, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000028); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +// mrs r1, cpsr +// Note: CPSR is 00000013 (user mode) now. +TEST(ExecuteInstruction, E10F1000) { + UProcessorTests::ExecuteInstruction(0xE10F1000, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000013); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + EXPECT_EQ(proc.GetSPSR(), 0x00000000); + }); +} + + +// 00000000 mrs r1, spsr |Ā E14F1000 - .O.. +// Note: SPSR is 0 now. +TEST(ExecuteInstruction, E14F1000) { + UProcessorTests::ExecuteInstruction(0xE14F1000, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + EXPECT_EQ(proc.GetSPSR(), 0x00000000); + }); +} + + +// 00000000 msr cpsr_ctl, #18 |Ā E321F012 - .!.. +TEST(ExecuteInstruction, E321F012) { + UProcessorTests::ExecuteInstruction(0xE321F012, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000012); + }); +} +// 00000000 ldr r0, [r0] |Ā E5900000 - .... +TEST(ExecuteInstruction, E5900000) { + UProcessorTests::ExecuteInstruction(0xE5900000, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0xE5900000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 msr cpsr_ctl, #27 |Ā E321F01B - .!.. +TEST(ExecuteInstruction, E321F01B) { + UProcessorTests::ExecuteInstruction(0xE321F01B, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x0000001B); + }); +} +// 00000000 add pc, r2, #20 |Ā E282F014 - .... +TEST(ExecuteInstruction, E282F014) { + UProcessorTests::ExecuteInstruction(0xE282F014, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000018); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 ldr r0, [r0, #1] |Ā E5900001 - .... +TEST(ExecuteInstruction, E5900001) { + UProcessorTests::ExecuteInstruction(0xE5900001, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x900001E5); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 b 0x00018688 |Ā EA0061A0 - ..a. +TEST(ExecuteInstruction, EA0061A0) { + UProcessorTests::ExecuteInstruction(0xEA0061A0, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0001868C); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 msr cpsr_ctl, #19 |Ā E321F013 - .!.. +TEST(ExecuteInstruction, E321F013) { + UProcessorTests::ExecuteInstruction(0xE321F013, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +// 00000000 ldrh r7, [r1, #2] |Ā E1D170B2 - ..p. +TEST(ExecuteInstruction, E1D170B2) { + UProcessorTests::ExecuteInstruction(0xE1D170B2, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x000070B2); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 ldmia sp, {sp}^ |Ā E8DD2000 - .... +TEST(ExecuteInstruction, E8DD2000) { + UProcessorTests::ExecuteInstruction(0xE8DD2000, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 bics r0, r0, #-16777216 |Ā E3D004FF - .... +TEST(ExecuteInstruction, E3D004FF) { + UProcessorTests::ExecuteInstruction(0xE3D004FF, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x60000013); + }); +} +// 00000000 mcr 15, 0, r0, cr1, cr1, {0} |Ā EE010F11 - .... +TEST(ExecuteInstruction, EE010F11) { + UProcessorTests::ExecuteInstruction(0xEE010F11, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 ldrb r0, [r0, #1] |Ā E5D00001 - .... +TEST(ExecuteInstruction, E5D00001) { + UProcessorTests::ExecuteInstruction(0xE5D00001, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x000000D0); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 ldrb r0, [r0] |Ā E5D00000 - .... +TEST(ExecuteInstruction, E5D00000) { + UProcessorTests::ExecuteInstruction(0xE5D00000, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x000000E5); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 mov r4, #156 |Ā E3A0409C - ..@. +TEST(ExecuteInstruction, E3A0409C) { + UProcessorTests::ExecuteInstruction(0xE3A0409C, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x0000009C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 b 0x00000000 |Ā EAFFFFFE - .... +TEST(ExecuteInstruction, EAFFFFFE) { + UProcessorTests::ExecuteInstruction(0xEAFFFFFE, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000004); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 ldmia r0, {fp}^ |Ā E8D00800 - .... +TEST(ExecuteInstruction, E8D00800) { + UProcessorTests::ExecuteInstruction(0xE8D00800, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0xE8D00800); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 ldr r0, [r0, #3] |Ā E5900003 - .... +TEST(ExecuteInstruction, E5900003) { + UProcessorTests::ExecuteInstruction(0xE5900003, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x03E59000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 msr cpsr_ctl, #17 |Ā E321F011 - .!.. +TEST(ExecuteInstruction, E321F011) { + UProcessorTests::ExecuteInstruction(0xE321F011, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000011); + }); +} +// 00000000 mvneqs r4, r3, ror r5 |Ā 01F94573 - ..Es +TEST(ExecuteInstruction, 01F94573) { + UProcessorTests::ExecuteInstruction(0x01F94573, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 msr cpsr_ctl, #16 |Ā E321F010 - .!.. +TEST(ExecuteInstruction, E321F010) { + UProcessorTests::ExecuteInstruction(0xE321F010, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000010); + }); +} +// 00000000 ldr r0, [r0, #2] |Ā E5900002 - .... +TEST(ExecuteInstruction, E5900002) { + UProcessorTests::ExecuteInstruction(0xE5900002, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x0002E590); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 msr cpsr_ctl, #23 |Ā E321F017 - .!.. +TEST(ExecuteInstruction, E321F017) { + UProcessorTests::ExecuteInstruction(0xE321F017, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000017); + }); +} +// 00000000 ldrh r7, [r1] |Ā E1D170B0 - ..p. +TEST(ExecuteInstruction, E1D170B0) { + UProcessorTests::ExecuteInstruction(0xE1D170B0, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x0000E1D1); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 adds r2, r2, #0 |Ā E2922000 - .... +TEST(ExecuteInstruction, E2922000) { + UProcessorTests::ExecuteInstruction(0xE2922000, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x40000013); + }); +} +// 00000000 ldrb r0, [r0, #2] |Ā E5D00002 - .... +TEST(ExecuteInstruction, E5D00002) { + UProcessorTests::ExecuteInstruction(0xE5D00002, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 ldrb r0, [r0, #3] |Ā E5D00003 - .... +TEST(ExecuteInstruction, E5D00003) { + UProcessorTests::ExecuteInstruction(0xE5D00003, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000003); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 ldrh r7, 0x00000000 |Ā E15F70B8 - ._p. +TEST(ExecuteInstruction, E15F70B8) { + UProcessorTests::ExecuteInstruction(0xE15F70B8, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x0000E15F); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 ldrh r7, 0x00000002 |Ā E15F70B6 - ._p. +TEST(ExecuteInstruction, E15F70B6) { + UProcessorTests::ExecuteInstruction(0xE15F70B6, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x000070B6); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} diff --git a/_Tests_/ExecuteTwoInstructionsTests.t b/_Tests_/ExecuteTwoInstructionsTests.t new file mode 100644 index 000000000..2e4ac5789 --- /dev/null +++ b/_Tests_/ExecuteTwoInstructionsTests.t @@ -0,0 +1,361 @@ +// Make sure we don't crash. +// 00000000 add pc, r2, #20 |Ā E282F014 - .... +// 00000008 add pc, r2, #20 |Ā E282F014 - .... +TEST(ExecuteTwoInstructions, E282F014_E282F014) { + UProcessorTests::ExecuteTwoInstructions(0xE282F014, 0xE282F014, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000001C); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +// Test adds +// 00000000 mvn r2, #0 |Ā E3E02000 - .... +// 00000008 adds r2, r2, #1 |Ā E2922001 - .... +TEST(ExecuteTwoInstructions, E3E02000_E2922001) { + UProcessorTests::ExecuteTwoInstructions(0xE3E02000, 0xE2922001, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000000C); + EXPECT_EQ(proc.GetCPSR(), 0x60000013); + }); +} +// 00000000 mov ip, #8 |Ā E3A0C008 - .... +// 00000008 ldmdb ip, {r8, r9} |Ā E91C0300 - .... +TEST(ExecuteTwoInstructions, E3A0C008_E91C0300) { + UProcessorTests::ExecuteTwoInstructions(0xE3A0C008, 0xE91C0300, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0xE3A0C008); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0xE91C0300); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000008); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000000C); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 ldmia r0, {fp}^ |Ā E8D00800 - .... +// 00000008 msr cpsr_ctl, #16 |Ā E321F010 - .!.. +TEST(ExecuteTwoInstructions, E8D00800_E321F010) { + UProcessorTests::ExecuteTwoInstructions(0xE8D00800, 0xE321F010, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0xE8D00800); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000000C); + EXPECT_EQ(proc.GetCPSR(), 0x00000010); + }); +} +// 00000000 ldr r1, [r0, #4] |Ā E5901004 - .... +// 00000008 ldr r2, [r0, r3] |Ā E7902003 - .... +TEST(ExecuteTwoInstructions, E5901004_E7902003) { + UProcessorTests::ExecuteTwoInstructions(0xE5901004, 0xE7902003, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0xE7902003); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0xE5901004); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000000C); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 mov r0, #128 |Ā E3A00080 - .... +// 00000008 ldrh r7, [r0, -#124] |Ā E15077BC - .Pw. +TEST(ExecuteTwoInstructions, E3A00080_E15077BC) { + UProcessorTests::ExecuteTwoInstructions(0xE3A00080, 0xE15077BC, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000080); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x0000E150); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000000C); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +// Test branches when they are not at address 0 +// 00000000 mov r1, #12 |Ā E3A0100C - .... +// 00000008 b 0x00018690 |Ā EA0061A0 - ..a. +TEST(ExecuteTwoInstructions, E3A0100C_EA0061A0) { + UProcessorTests::ExecuteTwoInstructions(0xE3A0100C, 0xEA0061A0, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x0000000C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00018690); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 mov r1, #12 |Ā E3A0100C - .... +// 00000008 mov r1, r1, lsl #32 |Ā E1A01081 - .... +TEST(ExecuteTwoInstructions, E3A0100C_E1A01081) { + UProcessorTests::ExecuteTwoInstructions(0xE3A0100C, 0xE1A01081, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000018); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000000C); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 mov r0, #128 |Ā E3A00080 - .... +// 00000008 ldrh r7, [r0, -#126] |Ā E15077BE - .Pw. +TEST(ExecuteTwoInstructions, E3A00080_E15077BE) { + UProcessorTests::ExecuteTwoInstructions(0xE3A00080, 0xE15077BE, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000080); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000080); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000000C); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +// Make sure we don't crash. +// 00000000 mov r0, #211 |Ā E3A000D3 - .... +// 00000008 msr cpsr, r0 |Ā E129F000 - .).. +TEST(ExecuteTwoInstructions, E3A000D3_E129F000) { + UProcessorTests::ExecuteTwoInstructions(0xE3A000D3, 0xE129F000, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x000000D3); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000000C); + EXPECT_EQ(proc.GetCPSR(), 0x000000D3); + }); +} +// 00000000 mov sp, #67108864 |Ā E3A0D301 - .... +// 00000008 stmia sp, {r8}^ |Ā E8CD0100 - .... +TEST(ExecuteTwoInstructions, E3A0D301_E8CD0100) { + UProcessorTests::ExecuteTwoInstructions(0xE3A0D301, 0xE8CD0100, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x04000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000000C); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} +// 00000000 mov r0, #128 |Ā E3A00080 - .... +// 00000008 ldrh r7, [r0, -#128] |Ā E15078B0 - .Px. +TEST(ExecuteTwoInstructions, E3A00080_E15078B0) { + UProcessorTests::ExecuteTwoInstructions(0xE3A00080, 0xE15078B0, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000080); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x0000E3A0); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000000C); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +// Test that ldr pc, [rx] puts the value + 4. +// 00000000 ldr pc, [r0, #8] |Ā E590F008 - .... +// 00000008 mov r1, #128 |Ā E3A01080 - .... +// 00000010 andeq r0, r0, r0 |Ā 00000000 - .... +TEST(ExecuteTwoInstructions, E590F008_E3A01080) { + UProcessorTests::ExecuteTwoInstructions(0xE590F008, 0xE3A01080, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000004); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + EXPECT_EQ(proc.GetSPSR(), 0x00000000); + }); +} + +// 00000000 mov r1, #128 |Ā E3A01080 - .... +// 00000008 ldr pc, [r0] |Ā E590F000 - .... +TEST(ExecuteTwoInstructions, E3A01080_E590F000) { + UProcessorTests::ExecuteTwoInstructions(0xE3A01080, 0xE590F000, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000080); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000010); // Prefetch Abort + 4 + EXPECT_EQ(proc.GetCPSR(), 0x00000097); + EXPECT_EQ(proc.GetSPSR(), 0x00000013); + }); +} + +// 00000000 mov r1, #128 |Ā E3A01080 - .... +// 00000008 ldr r2, [r0] |Ā E5902000 - .... +TEST(ExecuteTwoInstructions, E3A01080_E5902000) { + UProcessorTests::ExecuteTwoInstructions(0xE3A01080, 0xE5902000, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000080); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0xE3A01080); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000000C); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + EXPECT_EQ(proc.GetSPSR(), 0x00000000); + }); +} + +// 00000000 mov r1, #128 |Ā E3A01080 - .... +// 00000000 ldr r2, [r0, -#4] |Ā E5102004 - .... +TEST(ExecuteTwoInstructions, E3A01080_E5102004) { + UProcessorTests::ExecuteTwoInstructions(0xE3A01080, 0xE5102004, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000080); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000014); // Data Abort + 4 + EXPECT_EQ(proc.GetCPSR(), 0x00000097); + EXPECT_EQ(proc.GetSPSR(), 0x00000013); + }); +} + +// 00000000 mov r1, #128 |Ā E3A01080 - .... +// 00000000 ldr pc, [r0, -#4] |Ā E510F004 - .... +TEST(ExecuteTwoInstructions, E3A01080_E510F004) { + UProcessorTests::ExecuteTwoInstructions(0xE3A01080, 0xE510F004, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000080); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000014); // Data Abort + 4 + EXPECT_EQ(proc.GetCPSR(), 0x00000097); + EXPECT_EQ(proc.GetSPSR(), 0x00000013); + }); +} + +// 00000000 andeq r0, r0, r0, ror r0 |Ā 00000070 - ...p +// 00000000 ldr pc, [r0] |Ā E590F000 - .... +TEST(ExecuteTwoInstructions, 00000070_E590F000) { + UProcessorTests::ExecuteTwoInstructions(0x00000070, 0xE590F000, [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000074); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + EXPECT_EQ(proc.GetSPSR(), 0x00000000); + }); +} + +// TODO: test that swp instructions can be followed by another instruction. diff --git a/_Tests_/MemoryTests.t b/_Tests_/MemoryTests.t new file mode 100644 index 000000000..a9ef26339 --- /dev/null +++ b/_Tests_/MemoryTests.t @@ -0,0 +1,133 @@ +#include +#include "Emulator/TMemory.h" +#if TARGET_OS_WIN32 + #define kTempFlashPath "c:/EinsteinTests.flash" +#else + #define kTempFlashPath "/tmp/EinsteinTests.flash" +#endif + +TEST(MemoryTests, ReadROMTest) { + KUInt8* romBuffer = (KUInt8*) malloc(TMemoryConsts::kLowROMEnd); + TMemory theMem(nullptr, romBuffer, kTempFlashPath); + int index; + for (index = 0; index < 8; index++) + { + romBuffer[index] = (index * 16) + index; + } + +#if TARGET_RT_LITTLE_ENDIAN + // Swap the ROM the way it is swapped + KUInt32* theROM = (KUInt32*) romBuffer; + theROM[0] = UByteSex::Swap(theROM[0]); + theROM[1] = UByteSex::Swap(theROM[1]); +#endif + + Boolean fault = false; + KUInt32 theWord = theMem.ReadP(0, fault); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0x00112233); + theWord = theMem.ReadP(1, fault); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0x11223300); + theWord = theMem.ReadP(2, fault); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0x22330011); + theWord = theMem.ReadP(3, fault); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0x33001122); + theWord = theMem.ReadP(4, fault); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0x44556677); + + KUInt8 theByte; + fault = theMem.ReadBP(0, theByte); + EXPECT_EQ(fault, false); + EXPECT_EQ(theByte, 0x00); + fault = theMem.ReadBP(1, theByte); + EXPECT_EQ(fault, false); + EXPECT_EQ(theByte, 0x11); + fault = theMem.ReadBP(2, theByte); + EXPECT_EQ(fault, false); + EXPECT_EQ(theByte, 0x22); + fault = theMem.ReadBP(3, theByte); + EXPECT_EQ(fault, false); + EXPECT_EQ(theByte, 0x33); + fault = theMem.ReadBP(4, theByte); + EXPECT_EQ(fault, false); + EXPECT_EQ(theByte, 0x44); + fault = theMem.ReadBP(5, theByte); + EXPECT_EQ(fault, false); + EXPECT_EQ(theByte, 0x55); + fault = theMem.ReadBP(6, theByte); + EXPECT_EQ(fault, false); + EXPECT_EQ(theByte, 0x66); + fault = theMem.ReadBP(7, theByte); + EXPECT_EQ(fault, false); + EXPECT_EQ(theByte, 0x77); + + (void) ::unlink(kTempFlashPath); + ::free(romBuffer); +} + + +TEST(MemoryTests, ReadWriteRAMTest) { + KUInt8* romBuffer = (KUInt8*) malloc(TMemoryConsts::kLowROMEnd); + TMemory theMem(nullptr, (KUInt8*) romBuffer, kTempFlashPath); + int index; + Boolean fault; + KUInt32 theWord; + KUInt8 theByte; + + fault = theMem.WriteP(0x04000000, 0x00112233); + EXPECT_EQ(fault, false); + fault = theMem.WriteP(0x04000004, 0x44556677); + EXPECT_EQ(fault, false); + + theWord = theMem.ReadP( 0x04000000 + 0, fault ); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0x00112233); + theWord = theMem.ReadP( 0x04000000 + 1, fault ); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0x11223300); + theWord = theMem.ReadP( 0x04000000 + 2, fault ); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0x22330011); + theWord = theMem.ReadP( 0x04000000 + 3, fault ); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0x33001122); + theWord = theMem.ReadP( 0x04000000 + 4, fault ); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0x44556677); + + for (index = 0; index < 8; index++) + { + fault = theMem.ReadBP(0x04000000 + index, theByte); + EXPECT_EQ(fault, false); + EXPECT_EQ(theByte, (KUInt8) index * 0x11); + } + + for (index = 0; index < 8; index++) + { + fault = theMem.WriteBP( 0x04000000 + index, ((index + 8) * 16) + index + 8); + EXPECT_EQ(fault, false); + } + + theWord = theMem.ReadP( 0x04000000 + 0, fault ); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0x8899AABB); + theWord = theMem.ReadP( 0x04000000 + 1, fault ); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0x99AABB88); + theWord = theMem.ReadP( 0x04000000 + 2, fault ); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0xAABB8899); + theWord = theMem.ReadP( 0x04000000 + 3, fault ); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0xBB8899AA); + theWord = theMem.ReadP( 0x04000000 + 4, fault ); + EXPECT_EQ(fault, false); + EXPECT_EQ(theWord, 0xCCDDEEFF); + + (void) ::unlink( kTempFlashPath ); + ::free( romBuffer ); +} diff --git a/_Tests_/RunCodeTests.t b/_Tests_/RunCodeTests.t new file mode 100644 index 000000000..7b7b71b9f --- /dev/null +++ b/_Tests_/RunCodeTests.t @@ -0,0 +1,607 @@ +// Make sure breakpoint ends test. +// e1200070 bkpt #0x0 +TEST(RunCode, 1) { + UProcessorTests::RunCode("E1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000008); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +// e3a01001 mov r1, #0x1 +// e3310000 teq r1, #0x0 +// 03a02002 moveq r2, #0x2 +// e1200070 bkpt #0x0 +TEST(RunCode, 2) { + UProcessorTests::RunCode("E3A01001 E3310000 03A02002 E1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000001); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000014); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +// e3a01001 mov r1, #0x1 +// e3310000 teq r1, #0x0 +// 03a02002 movne r2, #0x2 +// e1200070 bkpt #0x0 +TEST(RunCode, 3) { + UProcessorTests::RunCode("E3A01001 E3310000 13A02002 E1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000001); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000002); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000014); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +// e3a01001 movs r1, #0x1 +// 03a02002 moveq r2, #0x2 +// e1200070 bkpt #0x0 +TEST(RunCode, 4) { + UProcessorTests::RunCode("E3B01001 03A02002 E1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000001); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000010); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +// e3b01001 movs r1, #0x1 +// 03a02002 movne r2, #0x2 +// e1200070 bkpt #0x0 +TEST(RunCode, 5) { + UProcessorTests::RunCode("E3B01001 13A02002 E1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000001); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000002); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000010); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +// E3A00301 mov r0, #0x4000000 +// E3A01001 mov r1, #0x1 +// E3A02002 mov r2, #0x2 +// E3A03003 mov r3, #0x3 +// E3A04004 mov r4, #0x4 +// E3A05005 mov r5, #0x5 +// E3A06006 mov r6, #0x6 +// E8A0007F stm r0!, {r0, r1, r2, r3, r4, r5, r6} +// E9101F80 ldmdb r0, {r7, r8, r9, r10, r11, r12} +// E0400106 sub r0, r0, r6, lsl #2 +// E590D004 ldr sp, [r0, #4] +// E790E004 ldr lr, [r0, r4] +// E1200070 bkpt #0x0 +TEST(RunCode, 6) { + UProcessorTests::RunCode("E3A00301 E3A01001 E3A02002 E3A03003 E3A04004 E3A05005 E3A06006 E8A0007F E9101F80 E0400106 E590D004 E790E004 E1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x04000004); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000001); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000002); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000003); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000004); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000005); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000006); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000001); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000002); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000003); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000004); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000005); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000006); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000002); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000002); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000038); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +// e361f017 msr SPSR_c, #0x17 +// e1a0e00f mov lr, pc +// e1b0f00e movs pc, lr +// e1200070 bkpt #0x0 +TEST(RunCode, 7) { + UProcessorTests::RunCode("e361f017 e1a0e00f e1b0f00e e1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000014); + EXPECT_EQ(proc.GetCPSR(), 0x00000017); + }); +} + +// e361f010 msr SPSR_c, #0x10 +// e321f017 msr CPSR_c, #0x17 +// e361f011 msr SPSR_c, #0x11 +// e1a0e00f mov lr, pc +// e1b0f00e movs pc, lr +// e1200070 bkpt #0x0 +TEST(RunCode, 8) { + UProcessorTests::RunCode("e361f010 e321f017 e361f011 e1a0e00f e1b0f00e e1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000001C); + EXPECT_EQ(proc.GetCPSR(), 0x00000011); + }); +} + +// e361f010 msr SPSR_c, #0x10 +// e321f017 msr CPSR_c, #0x17 +// e3a00011 mov r0, #0x11 +// e2800206 add r0, r0, #0x60000000 +// e169f000 msr SPSR_fc, r0 +// e1a0e00f mov lr, pc +// e1b0f00e movs pc, lr +// e1200070 bkpt #0x0 +TEST(RunCode, 9) { + UProcessorTests::RunCode("e361f010 e321f017 e3a00011 e2800206 e169f000 e1a0e00f e1b0f00e e1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x60000011); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000024); + EXPECT_EQ(proc.GetCPSR(), 0x60000011); + }); +} + +// e3a00017 mov r0, #0x17 +// e2800206 add r0, r0, #0x60000000 +// e129f000 msr CPSR_fc, r0 +// e1200070 bkpt #0x0 +TEST(RunCode, 10) { + UProcessorTests::RunCode("e3a00017 e2800206 e129f000 e1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x60000017); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000014); + EXPECT_EQ(proc.GetCPSR(), 0x60000017); + }); +} + +// e3a00017 mov r0, #0x17 +// e2800206 add r0, r0, #0x60000000 +// e121f000 msr CPSR_c, r0 +// e1200070 bkpt #0x0 +TEST(RunCode, 11) { + UProcessorTests::RunCode("e3a00017 e2800206 e121f000 e1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x60000017); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000014); + EXPECT_EQ(proc.GetCPSR(), 0x00000017); + }); +} + +// e3a00017 mov r0, #0x17 +// e2800206 add r0, r0, #0x60000000 +// e128f000 msr CPSR_f, r0 +// e1200070 bkpt #0x0 +TEST(RunCode, 12) { + UProcessorTests::RunCode("e3a00017 e2800206 e128f000 e1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x60000017); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000014); + EXPECT_EQ(proc.GetCPSR(), 0x60000013); + }); +} + +// e3a00017 mov r0, #0x17 +// e2800206 add r0, r0, #0x60000000 +// e169f000 msr SPSR_fc, r0 +// e14f1000 mrs r1, SPSR +// e10f2000 mrs r2, CPSR +// e1a0e00f mov lr, pc +// e1b0f00e movs pc, lr +// e10f3000 mrs r3, CPSR +// e1200070 bkpt #0x0 +TEST(RunCode, 13) { + UProcessorTests::RunCode("e3a00017 e2800206 e169f000 e14f1000 e10f2000 e1a0e00f e1b0f00e e10f3000 e1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x60000017); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x60000017); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000013); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x60000017); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000028); + EXPECT_EQ(proc.GetCPSR(), 0x60000017); + }); +} + +// e3a00017 mov r0, #0x17 +// e2800206 add r0, r0, #0x60000000 +// e161f000 msr SPSR_c, r0 +// e14f1000 mrs r1, SPSR +// e10f2000 mrs r2, CPSR +// e1a0e00f mov lr, pc +// e1b0f00e movs pc, lr +// e10f3000 mrs r3, CPSR +// e1200070 bkpt #0x0 +TEST(RunCode, 14) { + UProcessorTests::RunCode("e3a00017 e2800206 e161f000 e14f1000 e10f2000 e1a0e00f e1b0f00e e10f3000 e1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x60000017); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000017); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000013); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000017); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000028); + EXPECT_EQ(proc.GetCPSR(), 0x00000017); + }); +} + +// e10f0000 mrs r0, CPSR +// e169f000 msr SPSR_fc, r0 +// e3a00017 mov r0, #0x17 +// e2800206 add r0, r0, #0x60000000 +// e168f000 msr SPSR_f, r0 +// e14f1000 mrs r1, SPSR +// e10f2000 mrs r2, CPSR +// e1a0e00f mov lr, pc +// e1b0f00e movs pc, lr +// e10f3000 mrs r3, CPSR +// e1200070 bkpt #0x0 +TEST(RunCode, 15) { + UProcessorTests::RunCode("e10f0000 e169f000 e3a00017 e2800206 e168f000 e14f1000 e10f2000 e1a0e00f e1b0f00e e10f3000 e1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x60000017); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x60000013); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000013); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x60000013); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000024); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000030); + EXPECT_EQ(proc.GetCPSR(), 0x60000013); + }); +} + +// -- large block with a subroutine doing 64bits additions. +/* + ldr r0, =w1 + ldm r0, {r0-r3} + bl sub + mov r2, r4 + mov r3, r5 + mov r10, r4 + bl sub + mov r2, r4 + mov r3, r5 + mov r11, r4 + bl sub + mov r2, r4 + mov r3, r5 + mov r12, r4 + bl sub + mov r2, r4 + mov r3, r5 + mov r13, r4 + bl sub + sub r2, r4 + mov r3, r5 + bl sub + bkpt 0 + w1: + .long 0x46474849 + w2: + .long 0x41424344 + w3: + .long 0x16171819 + w4: + .long 0x11121314 + sub: + adds r4,r0,r2 + adcs r5,r1,r3 + mov r6, r6, LSL #4 + addeq r6, #0x1 + addcs r6, #0x2 + addmi r6, #0x4 + addvs r6, #0x8 + mov r7, r7, ROR #4 + subne r7, #0x1 + subcc r7, #0x2 + subpl r7, #0x4 + subvc r7, #0x8 + orrhi r8, #0x80000000 + orrge r8, #0x40000000 + orrgt r8, #0x20000000 + mov r8, r8, LSR #3 + eorhi r9, #0x80000000 + eorge r9, #0x40000000 + eorgt r9, #0x20000000 + mov r9, r9, ASR #3 + mov pc, lr +*/ +TEST(RunCode, 16) { + UProcessorTests::RunCode("e59f00b8 e890000f eb000017 e1a02004 e1a03005 e1a0a004 eb000013 e1a02004 e1a03005 e1a0b004 eb00000f e1a02004 e1a03005 e1a0c004 eb00000b e1a02004 e1a03005 e1a0d004 eb000007 e0422004 e1a03005 eb000004 e1200070 46474849 41424344 16171819 11121314 e0904002 e0b15003 e1a06206 02866001 22866002 42866004 62866008 e1a07267 12477001 32477002 52477004 72477008 83888102 a3888101 c3888202 e1a081a8 82299102 a2299101 c2299202 e1a091c9 e1a0f00e 0000005c", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x46474849); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x41424344); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0xB9B8B7B7); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x575D6369); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x989FA6AE); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x000C420C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x024C1FFC); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x0DF0D800); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0xF270D800); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x5C5E6062); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0xA2A5A8AB); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0xE8ECF0F4); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x2F34393D); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000058); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000060); + EXPECT_EQ(proc.GetCPSR(), 0x90000013); + }); +} + +/* +mov r0, #0x04000000 +sub r1, pc, #0x0304 +sub r1, r1, #0x00020000 +sub r1, r1, #0x01000000 +str r1, [r0] +mov r2, #0x05 +swp r3, r1, [r0] +swpb r4, r2, [r0] +ldr r5, [r0] +bkpt 0 +*/ +TEST(RunCode, 17) { + UProcessorTests::RunCode("e3a00301 e24f1fc1 e2411802 e2411401 e5801000 e3a02005 e1003091 e1404092 e5905000 e1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x04000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0xFEFDFD08); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000005); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0xFEFDFD08); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x000000FE); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x05FDFD08); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000002C); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +/* + Test with page jumps using RAM (we copy code there). + + 00000000 e3a00301 mov r0, #0x4000000 + 00000004 e28f1008 add r1, pc, #0x8 + 00000008 e8b103f0 ldm r1!, {r4, r5, r6, r7, r8, r9} + 0000000c e88003f0 stm r0, {r4, r5, r6, r7, r8, r9} + 00000010 e280f004 add pc, r0, #0x4 + 04000000 e2833001 add r3, r3, #0x1 # not executed + 04000004 e2833002 add r3, r3, #0x2 # executed + 04000008 e2800601 add r0, r0, #0x100000 + 0400000c e8b13c00 ldm r1!, {r10, r11, r12, sp} + 04000010 e8803c00 stm r0, {r10, r11, r12, sp} + 04000014 ea03fffa b 0x4100004 + 04100000 e2833004 add r3, r3, #0x4 # not executed + 04100004 e2833008 add r3, r3, #0x8 # executed + 04100008 e1200070 bkpt #0x0 + */ +TEST(RunCode, 18) { + UProcessorTests::RunCode("e3a00301 e28f1008 e8b103f0 e88003f0 e280f004 e2833001 e2833002 e2800601 e8b13c00 e8803c00 ea03fffa e2833004 e2833008 e1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x04100000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x0000003C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0000000A); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0xE2833001); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0xE2833002); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0xE2800601); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0xE8B13C00); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0xE8803C00); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0xEA03FFFA); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0xE2833004); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0xE2833008); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0xE1200070); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x04100010); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +/* + LDMDB with PC. + + add r11, pc, #40 r11 = 48 + ldmdb r11, {r4-r11, r13, pc} + bkpt 0 + .long 0x00000010 + .long 0x0000000F + .long 0x0000000E + .long 0x0000000D + .long 0x0000000C + .long 0x0000000B + .long 0x0000000A + .long 0x00000009 + .long 0x00000008 + */ +TEST(RunCode, 19) { + UProcessorTests::RunCode("e28fb028 e91baff0 e1200070 00000010 0000000F 0000000E 0000000D 0000000C 0000000B 0000000A 00000009 00000008", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0xE1200070); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000010); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x0000000F); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x0000000E); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x0000000D); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x0000000C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x0000000B); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x0000000A); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000009); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000010); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +/* + mov r1, #3 + mov r0, #0x200 + add r0, #0x57 + mov r2, r0, lsr r1 + mov r3, r0, lsr #3 + mov r4, r0, asr r1 + mov r5, r0, asr #3 + bkpt 0 +*/ +TEST(RunCode, 20) { + UProcessorTests::RunCode("e3a01003 e3a00c02 e2800057 e1a02130 e1a031a0 e1a04150 e1a051c0 e1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x00000257); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x00000003); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x0000004A); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x0000004A); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x0000004A); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x0000004A); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x00000024); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + +/* + * half-word store + 0: e3a00301 mov r0, #67108864 ; 0x4000000 + 4: e28f1b01 add r1, pc, #1024 ; 0x400 + 8: e1c010b0 strh r1, [r0] + c: e5902000 ldr r2, [r0] + 10: e1200070 bkpt 0 +**/ +TEST(RunCode, 21) { + UProcessorTests::RunCode("e3a00301 e28f1b01 e1c010b0 e1c010b0 e5902000 e1200070", [] (TARMProcessor& proc) { + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR0), 0x04000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR1), 0x0000040C); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR2), 0x040C0000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR3), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR4), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR5), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR6), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR7), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR8), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR9), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR10), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR11), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR12), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR13), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR14), 0x00000000); + EXPECT_EQ(proc.GetRegister(TARMProcessor::kR15), 0x0000001C); + EXPECT_EQ(proc.GetCPSR(), 0x00000013); + }); +} + diff --git a/_Tests_/UMemoryTests.cpp b/_Tests_/UMemoryTests.cpp index 0f01dd4d2..f11ed9a69 100644 --- a/_Tests_/UMemoryTests.cpp +++ b/_Tests_/UMemoryTests.cpp @@ -36,114 +36,6 @@ #define kTempFlashPath "/tmp/EinsteinTests.flash" #endif -// -------------------------------------------------------------------------- // -// * ReadROMTest( TLog* ) -// -------------------------------------------------------------------------- // -void -UMemoryTests::ReadROMTest( TLog* inLog ) -{ - KUInt8* romBuffer = (KUInt8*) malloc(TMemoryConsts::kLowROMEnd); - TMemory theMem( inLog, romBuffer, kTempFlashPath ); - int index; - for (index = 0; index < 8; index++) - { - romBuffer[index] = (index * 16) + index; - } - -#if TARGET_RT_LITTLE_ENDIAN - // Swap the ROM the way it is swapped - KUInt32* theROM = (KUInt32*) romBuffer; - theROM[0] = UByteSex::Swap( theROM[0] ); - theROM[1] = UByteSex::Swap( theROM[1] ); -#endif - - Boolean fault = false; - for (index = 0; index <= 4; index++) - { - KUInt32 theWord = theMem.ReadP( index, fault ); - if (fault) - { - inLog->FLogLine( "A fault occurred at %i", index ); - } - inLog->FLogLine( "%i: %.8X", index, (unsigned int) theWord ); - } - - KUInt8 theByte; - for (index = 0; index < 8; index++) - { - if (theMem.ReadBP( index, theByte )) - { - inLog->FLogLine( "A fault occurred at %i", index ); - } - inLog->FLogLine( "%i: %.2X", index, (unsigned int) theByte ); - } - - (void) ::unlink( kTempFlashPath ); - ::free( romBuffer ); -} - -// -------------------------------------------------------------------------- // -// * ReadWriteRAMTest( TLog* ) -// -------------------------------------------------------------------------- // -void -UMemoryTests::ReadWriteRAMTest( TLog* inLog ) -{ - KUInt8* romBuffer = (KUInt8*) malloc(TMemoryConsts::kLowROMEnd); - TMemory theMem( inLog, (KUInt8*) romBuffer, kTempFlashPath ); - int index; - - if (theMem.WriteP( 0x04000000, 0x00112233 )) - { - inLog->LogLine("A fault occurred writing at 0x04000000"); - } - if (theMem.WriteP( 0x04000004, 0x44556677 )) - { - inLog->LogLine("A fault occurred writing at 0x04000004"); - } - - Boolean fault = false; - for (index = 0; index <= 4; index++) - { - KUInt32 theWord = theMem.ReadP( 0x04000000 + index, fault ); - if (fault) - { - inLog->FLogLine("A fault occurred reading at %i", index); - } - inLog->FLogLine("%i: %.8X", index, (unsigned int) theWord); - } - - KUInt8 theByte; - for (index = 0; index < 8; index++) - { - if (theMem.ReadBP( 0x04000000 + index, theByte )) - { - inLog->FLogLine("A fault occurred reading at %i", index); - } - inLog->FLogLine("%i: %.2X", index, (unsigned int) theByte); - } - - for (index = 0; index < 8; index++) - { - if (theMem.WriteBP( 0x04000000 + index, ((index + 8) * 16) + index + 8 )) - { - inLog->FLogLine("A fault occurred writing at %i", index); - } - } - - for (index = 0; index <= 4; index++) - { - KUInt32 theWord = theMem.ReadP( 0x04000000 + index, fault ); - if (fault) - { - inLog->FLogLine("A fault occurred reading at %i", index); - } - inLog->FLogLine("%i: %.8X", index, (unsigned int) theWord); - } - - (void) ::unlink( kTempFlashPath ); - ::free( romBuffer ); -} - // -------------------------------------------------------------------------- // // * FlashTest( TLog* ) // -------------------------------------------------------------------------- // diff --git a/_Tests_/UProcessorTests.cpp b/_Tests_/UProcessorTests.cpp index 5f655b9c5..c66aef9fb 100644 --- a/_Tests_/UProcessorTests.cpp +++ b/_Tests_/UProcessorTests.cpp @@ -38,6 +38,7 @@ #include "Emulator/Network/TUsermodeNetwork.h" #include "Emulator/Screen/TNullScreenManager.h" + // -------------------------------------------------------------------------- // // Constantes // -------------------------------------------------------------------------- // @@ -47,6 +48,23 @@ #define kTempFlashPath "/tmp/EinsteinTests.flash" #endif +// -------------------------------------------------------------------------- // +// * ExecuteInstruction( KUInt32, std::function ) +// -------------------------------------------------------------------------- // +void +UProcessorTests::ExecuteInstruction( KUInt32 inInstruction, std::function inTestFunction, TLog* inLog ) +{ + KUInt8* rom = (KUInt8*) ::calloc( 8 * 1024 * 1024, 1 ); + ((KUInt32*) rom)[0] = inInstruction; + TMemory theMem( inLog, rom, kTempFlashPath ); + TARMProcessor theProcessor( inLog, &theMem ); + theMem.GetJITObject()->Step( &theProcessor, 1 ); + (void) ::unlink( kTempFlashPath ); + ::free( rom ); + + inTestFunction(theProcessor); +} + // -------------------------------------------------------------------------- // // * ExecuteInstruction( const char* ) // -------------------------------------------------------------------------- // @@ -63,17 +81,45 @@ UProcessorTests::ExecuteInstruction( const char* inHexWord, TLog* inLog ) (unsigned int*) &theInstruction ) != 1) { (void) ::printf( "Can't parse instruction (%s).\n", inHexWord ); } else { - KUInt8* rom = (KUInt8*) ::calloc( 8 * 1024 * 1024, 1 ); - ((KUInt32*) rom)[0] = theInstruction; - TMemory theMem( inLog, rom, kTempFlashPath ); - TARMProcessor theProcessor( inLog, &theMem ); - theMem.GetJITObject()->Step( &theProcessor, 1 ); - theProcessor.PrintRegisters(); - (void) ::unlink( kTempFlashPath ); - ::free( rom ); + ExecuteInstruction(theInstruction, [] (TARMProcessor& proc) { + proc.PrintRegisters(); + }, inLog); } } +// -------------------------------------------------------------------------- // +// * ExecuteInstructionState1( const char* ) +// -------------------------------------------------------------------------- // +void +UProcessorTests::ExecuteInstructionState1( KUInt32 inInstruction, std::function inTestFunction, TLog* inLog ) +{ + KUInt8* rom = (KUInt8*) ::calloc( 8 * 1024 * 1024, 1 ); + ((KUInt32*) rom)[0] = inInstruction; + TMemory theMem( inLog, rom, kTempFlashPath ); + TARMProcessor theProcessor( inLog, &theMem ); + theProcessor.SetRegister( 0, 0x01020304 ); + theProcessor.SetRegister( 1, 0x05060708 ); + theProcessor.SetRegister( 2, 0x090A0B0C ); + theProcessor.SetRegister( 3, 0x0D0E0F10 ); + theProcessor.SetRegister( 4, 0x11121314 ); + theProcessor.SetRegister( 5, 0x15161718 ); + theProcessor.SetRegister( 6, 0x191A1B1C ); + theProcessor.SetRegister( 7, 0x1D1E1F20 ); + theProcessor.SetRegister( 8, 0x21222324 ); + theProcessor.SetRegister( 9, 0x25262728 ); + theProcessor.SetRegister( 10, 0x292A2B2C ); + theProcessor.SetRegister( 11, 0x2D2E2F30 ); + theProcessor.SetRegister( 12, 0x31323334 ); + theProcessor.SetRegister( 13, 0x35363738 ); + theProcessor.SetRegister( 14, 0x393A3B3C ); +// theProcessor.SetRegister( 15, 0x00000004 ); + theMem.GetJITObject()->Step( &theProcessor, 1 ); + (void) ::unlink( kTempFlashPath ); + ::free( rom ); + + inTestFunction(theProcessor); +} + // -------------------------------------------------------------------------- // // * ExecuteInstructionState1( const char* ) // -------------------------------------------------------------------------- // @@ -90,33 +136,33 @@ UProcessorTests::ExecuteInstructionState1( const char* inHexWord, TLog* inLog ) (unsigned int*) &theInstruction ) != 1) { (void) ::printf( "Can't parse instruction (%s).\n", inHexWord ); } else { - KUInt8* rom = (KUInt8*) ::calloc( 8 * 1024 * 1024, 1 ); - ((KUInt32*) rom)[0] = theInstruction; - TMemory theMem( inLog, rom, kTempFlashPath ); - TARMProcessor theProcessor( inLog, &theMem ); - theProcessor.SetRegister( 0, 0x01020304 ); - theProcessor.SetRegister( 1, 0x05060708 ); - theProcessor.SetRegister( 2, 0x090A0B0C ); - theProcessor.SetRegister( 3, 0x0D0E0F10 ); - theProcessor.SetRegister( 4, 0x11121314 ); - theProcessor.SetRegister( 5, 0x15161718 ); - theProcessor.SetRegister( 6, 0x191A1B1C ); - theProcessor.SetRegister( 7, 0x1D1E1F20 ); - theProcessor.SetRegister( 8, 0x21222324 ); - theProcessor.SetRegister( 9, 0x25262728 ); - theProcessor.SetRegister( 10, 0x292A2B2C ); - theProcessor.SetRegister( 11, 0x2D2E2F30 ); - theProcessor.SetRegister( 12, 0x31323334 ); - theProcessor.SetRegister( 13, 0x35363738 ); - theProcessor.SetRegister( 14, 0x393A3B3C ); -// theProcessor.SetRegister( 15, 0x00000004 ); - theMem.GetJITObject()->Step( &theProcessor, 1 ); - theProcessor.PrintRegisters(); - (void) ::unlink( kTempFlashPath ); - ::free( rom ); + ExecuteInstructionState1(theInstruction, [] (TARMProcessor& proc) { + proc.PrintRegisters(); + }, inLog); } } +// -------------------------------------------------------------------------- // +// * ExecuteInstructionState2( const char* ) +// -------------------------------------------------------------------------- // +void +UProcessorTests::ExecuteInstructionState2( KUInt32 inInstruction, std::function inTestFunction, TLog* inLog ) +{ + KUInt8* rom = (KUInt8*) ::calloc( 8 * 1024 * 1024, 1 ); + ((KUInt32*) rom)[0] = inInstruction; + TMemory theMem( inLog, rom, kTempFlashPath ); + TARMProcessor theProcessor( inLog, &theMem ); + theProcessor.SetRegister( 3, 0x00000020 ); + theProcessor.SetRegister( 12, 0xFFFFFFFF ); +// theProcessor.SetRegister( 15, 0x00000004 ); + theMem.GetJITObject()->Step( &theProcessor, 1 ); + theProcessor.PrintRegisters(); + (void) ::unlink( kTempFlashPath ); + ::free( rom ); + + inTestFunction(theProcessor); +} + // -------------------------------------------------------------------------- // // * ExecuteInstructionState2( const char* ) // -------------------------------------------------------------------------- // @@ -133,17 +179,9 @@ UProcessorTests::ExecuteInstructionState2( const char* inHexWord, TLog* inLog ) (unsigned int*) &theInstruction ) != 1) { (void) ::printf( "Can't parse instruction (%s).\n", inHexWord ); } else { - KUInt8* rom = (KUInt8*) ::calloc( 8 * 1024 * 1024, 1 ); - ((KUInt32*) rom)[0] = theInstruction; - TMemory theMem( inLog, rom, kTempFlashPath ); - TARMProcessor theProcessor( inLog, &theMem ); - theProcessor.SetRegister( 3, 0x00000020 ); - theProcessor.SetRegister( 12, 0xFFFFFFFF ); -// theProcessor.SetRegister( 15, 0x00000004 ); - theMem.GetJITObject()->Step( &theProcessor, 1 ); - theProcessor.PrintRegisters(); - (void) ::unlink( kTempFlashPath ); - ::free( rom ); + ExecuteInstructionState2(theInstruction, [] (TARMProcessor& proc) { + proc.PrintRegisters(); + }, inLog); } } @@ -164,47 +202,68 @@ UProcessorTests::ExecuteTwoInstructions( const char* inHexWords, TLog* inLog ) (unsigned int*) &theInstructions[1] ) != 2) { (void) ::printf( "Can't parse instructions (%s).\n", inHexWords ); } else { - KUInt8* rom = (KUInt8*) ::calloc( 8 * 1024 * 1024, 1 ); - ((KUInt32*) rom)[0] = theInstructions[0]; - ((KUInt32*) rom)[1] = theInstructions[1]; - TMemory theMem( inLog, rom, kTempFlashPath ); - TARMProcessor theProcessor( inLog, &theMem ); - theMem.GetJITObject()->Step( &theProcessor, 2 ); - theProcessor.PrintRegisters(); - (void) ::unlink( kTempFlashPath ); - ::free( rom ); + ExecuteTwoInstructions(theInstructions[0], theInstructions[1], [] (TARMProcessor& proc) { + proc.PrintRegisters(); + }, inLog); } } // -------------------------------------------------------------------------- // -// * RunCode( const char* ) +// * ExecuteTwoInstructions( KUInt32, KUInt32, std::function inTestFunction, TLog* inLog ) +{ + KUInt8* rom = (KUInt8*) ::calloc( 8 * 1024 * 1024, 1 ); + ((KUInt32*) rom)[0] = inInstruction1; + ((KUInt32*) rom)[1] = inInstruction2; + TMemory theMem( inLog, rom, kTempFlashPath ); + TARMProcessor theProcessor( inLog, &theMem ); + theMem.GetJITObject()->Step( &theProcessor, 2 ); + (void) ::unlink( kTempFlashPath ); + ::free( rom ); + + inTestFunction(theProcessor); +} + +// -------------------------------------------------------------------------- // +// * RunCode( const char*, TLog* ) // -------------------------------------------------------------------------- // void UProcessorTests::RunCode( const char* inHexWords, TLog* inLog ) { - if (inHexWords == nil) - { - (void) ::printf( "This test requires code in hexa\n" ); - } else { - KUInt8* rom = (KUInt8*) ::calloc( 8 * 1024 * 1024, 1 ); - KUInt32* theCodePtr = (KUInt32*) rom; - int nbBytes; - while (::sscanf(inHexWords, "%X %n", theCodePtr, &nbBytes) == 1) { - inHexWords += nbBytes; - theCodePtr++; - } - if (inLog) { - inLog->FLogLine("Parsed %d instruction(s).", (int) ((theCodePtr - (KUInt32*)rom))); - } - - TEmulator theEmulator(inLog, rom, kTempFlashPath); - theEmulator.Run(); - theEmulator.GetProcessor()->PrintRegisters(); - (void) ::unlink( kTempFlashPath ); - ::free( rom ); - } + RunCode(inHexWords, [] (TARMProcessor& proc) { + proc.PrintRegisters(); + }, inLog); } +// -------------------------------------------------------------------------- // +// * RunCode( const char* ) +// -------------------------------------------------------------------------- // +void +UProcessorTests::RunCode( const char* inHexWords, std::function inTestFunction, TLog* inLog ) { + KUInt8* rom = (KUInt8*) ::calloc( 8 * 1024 * 1024, 1 ); + KUInt32* theCodePtr = (KUInt32*) rom; + int nbBytes; + while (::sscanf(inHexWords, "%X %n", theCodePtr, &nbBytes) == 1) { + inHexWords += nbBytes; + theCodePtr++; + } + if (inLog) { + inLog->FLogLine("Parsed %d instruction(s).", (int) ((theCodePtr - (KUInt32*)rom))); + } + + TEmulator theEmulator(inLog, rom, kTempFlashPath); + theEmulator.Run(); + theEmulator.GetProcessor()->PrintRegisters(); + (void) ::unlink( kTempFlashPath ); + ::free( rom ); + + inTestFunction(*theEmulator.GetProcessor()); +} + + + // -------------------------------------------------------------------------- // // * Step( const char* ) // -------------------------------------------------------------------------- // diff --git a/_Tests_/UProcessorTests.h b/_Tests_/UProcessorTests.h index 85c4aa71c..93adc9b0d 100644 --- a/_Tests_/UProcessorTests.h +++ b/_Tests_/UProcessorTests.h @@ -19,6 +19,11 @@ #include #include +// C++ +#include + +class TARMProcessor; + /// /// Class for tests relative to the processor. /// @@ -38,6 +43,15 @@ class UProcessorTests /// static void ExecuteInstruction( const char* inHexWord, TLog* inLog ); + /// + /// Execute an instruction and run a test handler with the processor afterwards. + /// The processor is set in boot state. + /// + /// \param inInstruction instruction to execute. + /// \param inTestFunction function to assert results. + /// + static void ExecuteInstruction( KUInt32 inInstruction, std::function inTestFunction, TLog* inLog = nullptr ); + /// /// Execute an instruction and print the registers afterwards. /// The processor is set in some random (actually fixed) state. @@ -46,6 +60,15 @@ class UProcessorTests /// static void ExecuteInstructionState1( const char* inHexWord, TLog* inLog ); + /// + /// Execute an instruction and run a test handler with the processor afterwards. + /// The processor is set in some random (actually fixed) state. + /// + /// \param inInstruction instruction to execute. + /// \param inTestFunction function to assert results. + /// + static void ExecuteInstructionState1( KUInt32 inInstruction, std::function inTestFunction, TLog* inLog = nullptr ); + /// /// Execute an instruction and print the registers afterwards. /// The processor is set in some random (actually fixed) state. @@ -54,12 +77,33 @@ class UProcessorTests /// static void ExecuteInstructionState2( const char* inHexWord, TLog* inLog ); + /// + /// Execute an instruction and print the registers afterwards. + /// The processor is set in some random (actually fixed) state. + /// + /// \param inInstruction instruction to execute. + /// \param inTestFunction function to assert results. + /// \param inLog log to initialize memory and processor. + /// + static void ExecuteInstructionState2( KUInt32 inInstruction, std::function inTestFunction, TLog* inLog = nullptr ); + /// /// Execute two instructions and print the registers afterwards. /// /// \param inHexWord instructions (as hexa) to execute. + /// \param inLog log to print registers to. /// static void ExecuteTwoInstructions( const char* inHexWords, TLog* inLog ); + + /// + /// Execute two instructions and print the registers afterwards. + /// + /// \param inInstruction1 first instruction to execute. + /// \param inInstruction2 second instruction to execute. + /// \param inTestFunction function to assert results. + /// \param inLog log to initialize memory and processor. + /// + static void ExecuteTwoInstructions( KUInt32 inInstruction1, KUInt32 inInstruction2, std::function inTestFunction, TLog* inLog = nullptr ); /// /// Run code (until TEmulator::Run() returns, typically after a breakpoint) @@ -68,6 +112,13 @@ class UProcessorTests /// static void RunCode( const char* inHexWords, TLog* inLog ); + /// + /// Run code (until TEmulator::Run() returns, typically after a breakpoint) + /// + /// \param inHexWord instructions (as hexa) to execute. + /// + static void RunCode( const char* inHexWords, std::function inTestFunction, TLog* inLog = nullptr ); + /// /// Step into the ROM (found at ../../_Data_/717006) /// diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E0049A22 b/_Tests_/scripts/master-test-execute-instruction-state1_E0049A22 deleted file mode 100644 index 1785be528..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E0049A22 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 00000010 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E0049C20 b/_Tests_/scripts/master-test-execute-instruction-state1_E0049C20 deleted file mode 100644 index 486453a40..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E0049C20 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 00000000 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E0049C22 b/_Tests_/scripts/master-test-execute-instruction-state1_E0049C22 deleted file mode 100644 index 486453a40..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E0049C22 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 00000000 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E0049C23 b/_Tests_/scripts/master-test-execute-instruction-state1_E0049C23 deleted file mode 100644 index 55235f409..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E0049C23 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 00000004 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E00B0A99 b/_Tests_/scripts/master-test-execute-instruction-state1_E00B0A99 deleted file mode 100644 index 9e79905d8..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E00B0A99 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 9FB272E0 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E01B0A99 b/_Tests_/scripts/master-test-execute-instruction-state1_E01B0A99 deleted file mode 100644 index f78ee8047..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E01B0A99 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 9FB272E0 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 80000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E0205094 b/_Tests_/scripts/master-test-execute-instruction-state1_E0205094 deleted file mode 100644 index 5da02005c..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E0205094 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = C9BF9F68 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E02B0A99 b/_Tests_/scripts/master-test-execute-instruction-state1_E02B0A99 deleted file mode 100644 index 9b9003e69..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E02B0A99 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = A0B475E4 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E02BBA99 b/_Tests_/scripts/master-test-execute-instruction-state1_E02BBA99 deleted file mode 100644 index 53f869ec1..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E02BBA99 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = CCE0A210 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E03BAA99 b/_Tests_/scripts/master-test-execute-instruction-state1_E03BAA99 deleted file mode 100644 index fb5d02ae4..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E03BAA99 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = C8DC9E0C -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 80000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E03BBA99 b/_Tests_/scripts/master-test-execute-instruction-state1_E03BBA99 deleted file mode 100644 index 7ea1571d3..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E03BBA99 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = CCE0A210 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 80000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E0620202 b/_Tests_/scripts/master-test-execute-instruction-state1_E0620202 deleted file mode 100644 index f11616b38..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E0620202 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 8796A5B4 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E0800005 b/_Tests_/scripts/master-test-execute-instruction-state1_E0800005 deleted file mode 100644 index 0351da7e0..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E0800005 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 16181A1C -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E0841005 b/_Tests_/scripts/master-test-execute-instruction-state1_E0841005 deleted file mode 100644 index f3b9e979c..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E0841005 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 26282A2C -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E2200311 b/_Tests_/scripts/master-test-execute-instruction-state1_E2200311 deleted file mode 100644 index 05b8eb783..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E2200311 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 45020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E2200801 b/_Tests_/scripts/master-test-execute-instruction-state1_E2200801 deleted file mode 100644 index 28d6d425b..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E2200801 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01030304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E220C311 b/_Tests_/scripts/master-test-execute-instruction-state1_E220C311 deleted file mode 100644 index d97f5105b..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E220C311 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 45020304 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E22C0311 b/_Tests_/scripts/master-test-execute-instruction-state1_E22C0311 deleted file mode 100644 index 3f839243d..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E22C0311 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 75323334 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E22D0311 b/_Tests_/scripts/master-test-execute-instruction-state1_E22D0311 deleted file mode 100644 index c1af48e11..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E22D0311 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 71363738 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E2300CA1 b/_Tests_/scripts/master-test-execute-instruction-state1_E2300CA1 deleted file mode 100644 index 3df127da8..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E2300CA1 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 0102A204 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E24CB004 b/_Tests_/scripts/master-test-execute-instruction-state1_E24CB004 deleted file mode 100644 index e9e4898d1..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E24CB004 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 31323330 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E24DD004 b/_Tests_/scripts/master-test-execute-instruction-state1_E24DD004 deleted file mode 100644 index 99a84bcb7..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E24DD004 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363734 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E2855C0E b/_Tests_/scripts/master-test-execute-instruction-state1_E2855C0E deleted file mode 100644 index 1058e51d1..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E2855C0E +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15162518 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E38000E0 b/_Tests_/scripts/master-test-execute-instruction-state1_E38000E0 deleted file mode 100644 index 527046124..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E38000E0 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 010203E4 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E38000EF b/_Tests_/scripts/master-test-execute-instruction-state1_E38000EF deleted file mode 100644 index 4284f6198..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E38000EF +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 010203EF -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E3A060FE b/_Tests_/scripts/master-test-execute-instruction-state1_E3A060FE deleted file mode 100644 index 87e5f9a38..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E3A060FE +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 01020304 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 000000FE -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E5B40010 b/_Tests_/scripts/master-test-execute-instruction-state1_E5B40010 deleted file mode 100644 index 47af0884e..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E5B40010 +++ /dev/null @@ -1,19 +0,0 @@ -Starting from an empty flash -Read word access to unknown bank #5 at P0x11121324 -R0 = 00000000 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121324 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state1_E5BF0010 b/_Tests_/scripts/master-test-execute-instruction-state1_E5BF0010 deleted file mode 100644 index 4ea6c2896..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state1_E5BF0010 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 05060708 -R2 = 090A0B0C -R3 = 0D0E0F10 -R4 = 11121314 -R5 = 15161718 -R6 = 191A1B1C -R7 = 1D1E1F20 -R8 = 21222324 -R9 = 25262728 -R10 = 292A2B2C -R11 = 2D2E2F30 -R12 = 31323334 -R13 = 35363738 -R14 = 393A3B3C -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction-state2_E1A0331C b/_Tests_/scripts/master-test-execute-instruction-state2_E1A0331C deleted file mode 100644 index c04d3c9ee..000000000 --- a/_Tests_/scripts/master-test-execute-instruction-state2_E1A0331C +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = FFFFFFFF -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_01F94573 b/_Tests_/scripts/master-test-execute-instruction_01F94573 deleted file mode 100644 index fd74ad631..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_01F94573 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_0A000007 b/_Tests_/scripts/master-test-execute-instruction_0A000007 deleted file mode 100644 index fd74ad631..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_0A000007 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_1A000007 b/_Tests_/scripts/master-test-execute-instruction_1A000007 deleted file mode 100644 index b3a9f1620..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_1A000007 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000028 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E10F1000 b/_Tests_/scripts/master-test-execute-instruction_E10F1000 deleted file mode 100644 index c908282e5..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E10F1000 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000013 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E14F1000 b/_Tests_/scripts/master-test-execute-instruction_E14F1000 deleted file mode 100644 index fd74ad631..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E14F1000 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E15F70B6 b/_Tests_/scripts/master-test-execute-instruction_E15F70B6 deleted file mode 100644 index 3f088beb8..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E15F70B6 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 000070B6 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E15F70B8 b/_Tests_/scripts/master-test-execute-instruction_E15F70B8 deleted file mode 100644 index c8747c908..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E15F70B8 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 0000E15F -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E1D170B0 b/_Tests_/scripts/master-test-execute-instruction_E1D170B0 deleted file mode 100644 index e6f0bf5b1..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E1D170B0 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 0000E1D1 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E1D170B2 b/_Tests_/scripts/master-test-execute-instruction_E1D170B2 deleted file mode 100644 index d85b5b848..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E1D170B2 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 000070B2 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E282F014 b/_Tests_/scripts/master-test-execute-instruction_E282F014 deleted file mode 100644 index 7a3849042..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E282F014 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000018 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E2922000 b/_Tests_/scripts/master-test-execute-instruction_E2922000 deleted file mode 100644 index e034242f2..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E2922000 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 40000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E321F010 b/_Tests_/scripts/master-test-execute-instruction_E321F010 deleted file mode 100644 index 6b47b2f97..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E321F010 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000010 diff --git a/_Tests_/scripts/master-test-execute-instruction_E321F011 b/_Tests_/scripts/master-test-execute-instruction_E321F011 deleted file mode 100644 index e810a2c1c..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E321F011 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000011 diff --git a/_Tests_/scripts/master-test-execute-instruction_E321F012 b/_Tests_/scripts/master-test-execute-instruction_E321F012 deleted file mode 100644 index 4a0cbf260..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E321F012 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000012 diff --git a/_Tests_/scripts/master-test-execute-instruction_E321F013 b/_Tests_/scripts/master-test-execute-instruction_E321F013 deleted file mode 100644 index fd74ad631..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E321F013 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E321F017 b/_Tests_/scripts/master-test-execute-instruction_E321F017 deleted file mode 100644 index 591cf996a..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E321F017 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000017 diff --git a/_Tests_/scripts/master-test-execute-instruction_E321F01B b/_Tests_/scripts/master-test-execute-instruction_E321F01B deleted file mode 100644 index aea81a6cb..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E321F01B +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 0000001B diff --git a/_Tests_/scripts/master-test-execute-instruction_E3A0409C b/_Tests_/scripts/master-test-execute-instruction_E3A0409C deleted file mode 100644 index 198a75561..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E3A0409C +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 0000009C -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E3D004FF b/_Tests_/scripts/master-test-execute-instruction_E3D004FF deleted file mode 100644 index dbe1a6a49..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E3D004FF +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 60000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E5900000 b/_Tests_/scripts/master-test-execute-instruction_E5900000 deleted file mode 100644 index 380034f6f..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E5900000 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = E5900000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E5900001 b/_Tests_/scripts/master-test-execute-instruction_E5900001 deleted file mode 100644 index b9a2cd1c4..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E5900001 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 900001E5 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E5900002 b/_Tests_/scripts/master-test-execute-instruction_E5900002 deleted file mode 100644 index fd31aae1a..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E5900002 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 0002E590 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E5900003 b/_Tests_/scripts/master-test-execute-instruction_E5900003 deleted file mode 100644 index d174d2626..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E5900003 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 03E59000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E5D00000 b/_Tests_/scripts/master-test-execute-instruction_E5D00000 deleted file mode 100644 index 4cd8fd50e..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E5D00000 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 000000E5 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E5D00001 b/_Tests_/scripts/master-test-execute-instruction_E5D00001 deleted file mode 100644 index 6edce6bb6..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E5D00001 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 000000D0 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E5D00002 b/_Tests_/scripts/master-test-execute-instruction_E5D00002 deleted file mode 100644 index fd74ad631..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E5D00002 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E5D00003 b/_Tests_/scripts/master-test-execute-instruction_E5D00003 deleted file mode 100644 index 78aea3ea3..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E5D00003 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000003 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E8D00800 b/_Tests_/scripts/master-test-execute-instruction_E8D00800 deleted file mode 100644 index fb8921de3..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E8D00800 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = E8D00800 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_E8DD2000 b/_Tests_/scripts/master-test-execute-instruction_E8DD2000 deleted file mode 100644 index fd74ad631..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_E8DD2000 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_EA0061A0 b/_Tests_/scripts/master-test-execute-instruction_EA0061A0 deleted file mode 100644 index 0433f668d..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_EA0061A0 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 0001868C -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_EAFFFFFE b/_Tests_/scripts/master-test-execute-instruction_EAFFFFFE deleted file mode 100644 index 81e33574c..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_EAFFFFFE +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000004 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-instruction_EE010F11 b/_Tests_/scripts/master-test-execute-instruction_EE010F11 deleted file mode 100644 index fd74ad631..000000000 --- a/_Tests_/scripts/master-test-execute-instruction_EE010F11 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-two-instructions_E282F014-E282F014 b/_Tests_/scripts/master-test-execute-two-instructions_E282F014-E282F014 deleted file mode 100644 index c16098fd2..000000000 --- a/_Tests_/scripts/master-test-execute-two-instructions_E282F014-E282F014 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 0000001C -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-two-instructions_E3A00080-E15077BC b/_Tests_/scripts/master-test-execute-two-instructions_E3A00080-E15077BC deleted file mode 100644 index bb84d4ca2..000000000 --- a/_Tests_/scripts/master-test-execute-two-instructions_E3A00080-E15077BC +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000080 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 0000E150 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 0000000C -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-two-instructions_E3A00080-E15077BE b/_Tests_/scripts/master-test-execute-two-instructions_E3A00080-E15077BE deleted file mode 100644 index 47ff49dfd..000000000 --- a/_Tests_/scripts/master-test-execute-two-instructions_E3A00080-E15077BE +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000080 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000080 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 0000000C -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-two-instructions_E3A00080-E15078B0 b/_Tests_/scripts/master-test-execute-two-instructions_E3A00080-E15078B0 deleted file mode 100644 index 959927ff6..000000000 --- a/_Tests_/scripts/master-test-execute-two-instructions_E3A00080-E15078B0 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000080 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 0000E3A0 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 0000000C -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-two-instructions_E3A000D3-E129F000 b/_Tests_/scripts/master-test-execute-two-instructions_E3A000D3-E129F000 deleted file mode 100644 index 1fd8d65f8..000000000 --- a/_Tests_/scripts/master-test-execute-two-instructions_E3A000D3-E129F000 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 000000D3 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 0000000C -CPSR = 000000D3 diff --git a/_Tests_/scripts/master-test-execute-two-instructions_E3A0100C-E1A01081 b/_Tests_/scripts/master-test-execute-two-instructions_E3A0100C-E1A01081 deleted file mode 100644 index 15511df8a..000000000 --- a/_Tests_/scripts/master-test-execute-two-instructions_E3A0100C-E1A01081 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000018 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 0000000C -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-two-instructions_E3A0100C-EA0061A0 b/_Tests_/scripts/master-test-execute-two-instructions_E3A0100C-EA0061A0 deleted file mode 100644 index e70611ab4..000000000 --- a/_Tests_/scripts/master-test-execute-two-instructions_E3A0100C-EA0061A0 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 0000000C -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00018690 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-two-instructions_E3A0C008-E91C0300 b/_Tests_/scripts/master-test-execute-two-instructions_E3A0C008-E91C0300 deleted file mode 100644 index 95d79d771..000000000 --- a/_Tests_/scripts/master-test-execute-two-instructions_E3A0C008-E91C0300 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = E3A0C008 -R9 = E91C0300 -R10 = 00000000 -R11 = 00000000 -R12 = 00000008 -R13 = 00000000 -R14 = 00000000 -R15 = 0000000C -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-two-instructions_E3A0D301-E8CD0100 b/_Tests_/scripts/master-test-execute-two-instructions_E3A0D301-E8CD0100 deleted file mode 100644 index 2c1b935fb..000000000 --- a/_Tests_/scripts/master-test-execute-two-instructions_E3A0D301-E8CD0100 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 04000000 -R14 = 00000000 -R15 = 0000000C -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-two-instructions_E3E02000-E2922001 b/_Tests_/scripts/master-test-execute-two-instructions_E3E02000-E2922001 deleted file mode 100644 index ae7752be1..000000000 --- a/_Tests_/scripts/master-test-execute-two-instructions_E3E02000-E2922001 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 0000000C -CPSR = 60000013 diff --git a/_Tests_/scripts/master-test-execute-two-instructions_E5901004-E7902003 b/_Tests_/scripts/master-test-execute-two-instructions_E5901004-E7902003 deleted file mode 100644 index 2467f76a9..000000000 --- a/_Tests_/scripts/master-test-execute-two-instructions_E5901004-E7902003 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = E7902003 -R2 = E5901004 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 0000000C -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-execute-two-instructions_E8D00800-E321F010 b/_Tests_/scripts/master-test-execute-two-instructions_E8D00800-E321F010 deleted file mode 100644 index 3135ceb0c..000000000 --- a/_Tests_/scripts/master-test-execute-two-instructions_E8D00800-E321F010 +++ /dev/null @@ -1,18 +0,0 @@ -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = E8D00800 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 0000000C -CPSR = 00000010 diff --git a/_Tests_/scripts/master-test-memory-read-rom b/_Tests_/scripts/master-test-memory-read-rom deleted file mode 100644 index a62a3ba7c..000000000 --- a/_Tests_/scripts/master-test-memory-read-rom +++ /dev/null @@ -1,14 +0,0 @@ -Starting from an empty flash -0: 00112233 -1: 11223300 -2: 22330011 -3: 33001122 -4: 44556677 -0: 00 -1: 11 -2: 22 -3: 33 -4: 44 -5: 55 -6: 66 -7: 77 diff --git a/_Tests_/scripts/master-test-memory-read-write-ram b/_Tests_/scripts/master-test-memory-read-write-ram deleted file mode 100644 index a639b27a3..000000000 --- a/_Tests_/scripts/master-test-memory-read-write-ram +++ /dev/null @@ -1,19 +0,0 @@ -Starting from an empty flash -0: 00112233 -1: 11223300 -2: 22330011 -3: 33001122 -4: 44556677 -0: 00 -1: 11 -2: 22 -3: 33 -4: 44 -5: 55 -6: 66 -7: 77 -0: 8899AABB -1: 99AABB88 -2: AABB8899 -3: BB8899AA -4: CCDDEEFF diff --git a/_Tests_/scripts/master-test-run-code_1 b/_Tests_/scripts/master-test-run-code_1 deleted file mode 100644 index 707f84312..000000000 --- a/_Tests_/scripts/master-test-run-code_1 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 1 instruction(s). -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000008 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-run-code_10 b/_Tests_/scripts/master-test-run-code_10 deleted file mode 100644 index 717373646..000000000 --- a/_Tests_/scripts/master-test-run-code_10 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 4 instruction(s). -Starting from an empty flash -R0 = 60000017 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000014 -CPSR = 60000017 diff --git a/_Tests_/scripts/master-test-run-code_11 b/_Tests_/scripts/master-test-run-code_11 deleted file mode 100644 index 5a37d8802..000000000 --- a/_Tests_/scripts/master-test-run-code_11 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 4 instruction(s). -Starting from an empty flash -R0 = 60000017 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000014 -CPSR = 00000017 diff --git a/_Tests_/scripts/master-test-run-code_12 b/_Tests_/scripts/master-test-run-code_12 deleted file mode 100644 index 6dd2d3046..000000000 --- a/_Tests_/scripts/master-test-run-code_12 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 4 instruction(s). -Starting from an empty flash -R0 = 60000017 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000014 -CPSR = 60000013 diff --git a/_Tests_/scripts/master-test-run-code_13 b/_Tests_/scripts/master-test-run-code_13 deleted file mode 100644 index ca252f12f..000000000 --- a/_Tests_/scripts/master-test-run-code_13 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 9 instruction(s). -Starting from an empty flash -R0 = 60000017 -R1 = 60000017 -R2 = 00000013 -R3 = 60000017 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000028 -CPSR = 60000017 diff --git a/_Tests_/scripts/master-test-run-code_14 b/_Tests_/scripts/master-test-run-code_14 deleted file mode 100644 index 9b5af3fbb..000000000 --- a/_Tests_/scripts/master-test-run-code_14 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 9 instruction(s). -Starting from an empty flash -R0 = 60000017 -R1 = 00000017 -R2 = 00000013 -R3 = 00000017 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000028 -CPSR = 00000017 diff --git a/_Tests_/scripts/master-test-run-code_15 b/_Tests_/scripts/master-test-run-code_15 deleted file mode 100644 index 74f854428..000000000 --- a/_Tests_/scripts/master-test-run-code_15 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 11 instruction(s). -Starting from an empty flash -R0 = 60000017 -R1 = 60000013 -R2 = 00000013 -R3 = 60000013 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000024 -R15 = 00000030 -CPSR = 60000013 diff --git a/_Tests_/scripts/master-test-run-code_16 b/_Tests_/scripts/master-test-run-code_16 deleted file mode 100644 index 1e12bdb96..000000000 --- a/_Tests_/scripts/master-test-run-code_16 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 49 instruction(s). -Starting from an empty flash -R0 = 46474849 -R1 = 41424344 -R2 = B9B8B7B7 -R3 = 575D6369 -R4 = 00000000 -R5 = 989FA6AE -R6 = 000C420C -R7 = 024C1FFC -R8 = 0DF0D800 -R9 = F270D800 -R10 = 5C5E6062 -R11 = A2A5A8AB -R12 = E8ECF0F4 -R13 = 2F34393D -R14 = 00000058 -R15 = 00000060 -CPSR = 90000013 diff --git a/_Tests_/scripts/master-test-run-code_17 b/_Tests_/scripts/master-test-run-code_17 deleted file mode 100644 index 45ca20c92..000000000 --- a/_Tests_/scripts/master-test-run-code_17 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 10 instruction(s). -Starting from an empty flash -R0 = 04000000 -R1 = FEFDFD08 -R2 = 00000005 -R3 = FEFDFD08 -R4 = 000000FE -R5 = 05FDFD08 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 0000002C -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-run-code_18 b/_Tests_/scripts/master-test-run-code_18 deleted file mode 100644 index ce8219763..000000000 --- a/_Tests_/scripts/master-test-run-code_18 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 14 instruction(s). -Starting from an empty flash -R0 = 04100000 -R1 = 0000003C -R2 = 00000000 -R3 = 0000000A -R4 = E2833001 -R5 = E2833002 -R6 = E2800601 -R7 = E8B13C00 -R8 = E8803C00 -R9 = EA03FFFA -R10 = E2833004 -R11 = E2833008 -R12 = E1200070 -R13 = 00000000 -R14 = 00000000 -R15 = 04100010 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-run-code_19 b/_Tests_/scripts/master-test-run-code_19 deleted file mode 100644 index 13c3037d4..000000000 --- a/_Tests_/scripts/master-test-run-code_19 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 12 instruction(s). -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = E1200070 -R5 = 00000010 -R6 = 0000000F -R7 = 0000000E -R8 = 0000000D -R9 = 0000000C -R10 = 0000000B -R11 = 0000000A -R12 = 00000000 -R13 = 00000009 -R14 = 00000000 -R15 = 00000010 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-run-code_2 b/_Tests_/scripts/master-test-run-code_2 deleted file mode 100644 index 4d8b6141b..000000000 --- a/_Tests_/scripts/master-test-run-code_2 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 4 instruction(s). -Starting from an empty flash -R0 = 00000000 -R1 = 00000001 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000014 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-run-code_20 b/_Tests_/scripts/master-test-run-code_20 deleted file mode 100644 index bdf00b492..000000000 --- a/_Tests_/scripts/master-test-run-code_20 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 8 instruction(s). -Starting from an empty flash -R0 = 00000257 -R1 = 00000003 -R2 = 0000004A -R3 = 0000004A -R4 = 0000004A -R5 = 0000004A -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000024 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-run-code_21 b/_Tests_/scripts/master-test-run-code_21 deleted file mode 100644 index af0b29c15..000000000 --- a/_Tests_/scripts/master-test-run-code_21 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 6 instruction(s). -Starting from an empty flash -R0 = 04000000 -R1 = 0000040C -R2 = 040C0000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 0000001C -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-run-code_3 b/_Tests_/scripts/master-test-run-code_3 deleted file mode 100644 index a559b736c..000000000 --- a/_Tests_/scripts/master-test-run-code_3 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 4 instruction(s). -Starting from an empty flash -R0 = 00000000 -R1 = 00000001 -R2 = 00000002 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000014 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-run-code_4 b/_Tests_/scripts/master-test-run-code_4 deleted file mode 100644 index f7d7f4ebe..000000000 --- a/_Tests_/scripts/master-test-run-code_4 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 3 instruction(s). -Starting from an empty flash -R0 = 00000000 -R1 = 00000001 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000010 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-run-code_5 b/_Tests_/scripts/master-test-run-code_5 deleted file mode 100644 index 70e2d0509..000000000 --- a/_Tests_/scripts/master-test-run-code_5 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 3 instruction(s). -Starting from an empty flash -R0 = 00000000 -R1 = 00000001 -R2 = 00000002 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000010 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-run-code_6 b/_Tests_/scripts/master-test-run-code_6 deleted file mode 100644 index d521b86da..000000000 --- a/_Tests_/scripts/master-test-run-code_6 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 13 instruction(s). -Starting from an empty flash -R0 = 04000004 -R1 = 00000001 -R2 = 00000002 -R3 = 00000003 -R4 = 00000004 -R5 = 00000005 -R6 = 00000006 -R7 = 00000001 -R8 = 00000002 -R9 = 00000003 -R10 = 00000004 -R11 = 00000005 -R12 = 00000006 -R13 = 00000002 -R14 = 00000002 -R15 = 00000038 -CPSR = 00000013 diff --git a/_Tests_/scripts/master-test-run-code_7 b/_Tests_/scripts/master-test-run-code_7 deleted file mode 100644 index 576562dbf..000000000 --- a/_Tests_/scripts/master-test-run-code_7 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 4 instruction(s). -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000014 -CPSR = 00000017 diff --git a/_Tests_/scripts/master-test-run-code_8 b/_Tests_/scripts/master-test-run-code_8 deleted file mode 100644 index a7601f41a..000000000 --- a/_Tests_/scripts/master-test-run-code_8 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 6 instruction(s). -Starting from an empty flash -R0 = 00000000 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 0000001C -CPSR = 00000011 diff --git a/_Tests_/scripts/master-test-run-code_9 b/_Tests_/scripts/master-test-run-code_9 deleted file mode 100644 index 3ae7a679a..000000000 --- a/_Tests_/scripts/master-test-run-code_9 +++ /dev/null @@ -1,19 +0,0 @@ -Parsed 8 instruction(s). -Starting from an empty flash -R0 = 60000011 -R1 = 00000000 -R2 = 00000000 -R3 = 00000000 -R4 = 00000000 -R5 = 00000000 -R6 = 00000000 -R7 = 00000000 -R8 = 00000000 -R9 = 00000000 -R10 = 00000000 -R11 = 00000000 -R12 = 00000000 -R13 = 00000000 -R14 = 00000000 -R15 = 00000024 -CPSR = 60000011 diff --git a/_Tests_/scripts/test-instructions.sh b/_Tests_/scripts/test-instructions.sh deleted file mode 100644 index 0e62f00aa..000000000 --- a/_Tests_/scripts/test-instructions.sh +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/sh -. common.sh $* -# 00000000 b 0x00000000 -perl tests.pl "$TESTSPATH" execute-instruction EAFFFFFE - -# 00000000 b 0x00018688 -#perl tests.pl "$TESTSPATH" execute-instruction EA0061A0 - -# 00000000 add pc, r2, #20 (14) -perl tests.pl "$TESTSPATH" execute-instruction E282F014 - -# 00000000 mov r4, #156 (9C) -perl tests.pl "$TESTSPATH" execute-instruction E3A0409C - -# 00000000 ldr r0, [r0] -perl tests.pl "$TESTSPATH" execute-instruction E5900000 - -# 00000000 ldr r0, [r0, #1] -perl tests.pl "$TESTSPATH" execute-instruction E5900001 - -# 00000000 ldr r0, [r0, #2] -perl tests.pl "$TESTSPATH" execute-instruction E5900002 - -# 00000000 ldr r0, [r0, #3] -perl tests.pl "$TESTSPATH" execute-instruction E5900003 - -# 00000000 ldrb r0, [r0] -perl tests.pl "$TESTSPATH" execute-instruction E5D00000 - -# 00000000 ldrb r0, [r0, #1] -perl tests.pl "$TESTSPATH" execute-instruction E5D00001 - -# 00000000 ldrb r0, [r0, #2] -perl tests.pl "$TESTSPATH" execute-instruction E5D00002 - -# 00000000 ldrb r0, [r0, #3] -perl tests.pl "$TESTSPATH" execute-instruction E5D00003 - -# 00000000 beq 0x00000024 (will not branch) -perl tests.pl "$TESTSPATH" execute-instruction 0A000007 - -# 00000000 bne 0x00000024 (will branch) -perl tests.pl "$TESTSPATH" execute-instruction 1A000007 - -# ldrh r7, [r1] -perl tests.pl "$TESTSPATH" execute-instruction E1D170B0 - -# ldrh r7, [r1, #2] -perl tests.pl "$TESTSPATH" execute-instruction E1D170B2 - -# ldrh r7, 0x00000000 -# ldrh r7, [r15, -#8] -perl tests.pl "$TESTSPATH" execute-instruction E15F70B8 - -# ldrh r7, 0x00000002 -# ldrh r7, [r15, -#6] -perl tests.pl "$TESTSPATH" execute-instruction E15F70B6 - -# 00000000 mov r0, #128 -# 00000004 ldrh r7, [r0, -#128] -perl tests.pl "$TESTSPATH" execute-two-instructions E3A00080-E15078B0 - -# 00000000 mov r0, #128 -# 00000004 ldrh r7, [r0, -#124] -perl tests.pl "$TESTSPATH" execute-two-instructions E3A00080-E15077BC - -# 00000000 mov r0, #128 -# 00000004 ldrh r7, [r0, -#126] -perl tests.pl "$TESTSPATH" execute-two-instructions E3A00080-E15077BE - -# 00000000 mov r1, #12 (C) -# 00000004 mov r1, r1, lsl #1 (1) -perl tests.pl "$TESTSPATH" execute-two-instructions E3A0100C-E1A01081 - -# 00000000 and r9, r4, r2, lsr #20 (14) -perl tests.pl "$TESTSPATH" execute-instruction-state1 E0049A22 - -# 00000000 and r9, r4, r0, lsr #24 (18) -perl tests.pl "$TESTSPATH" execute-instruction-state1 E0049C20 - -# 00000000 and r9, r4, r2, lsr #24 (18) -perl tests.pl "$TESTSPATH" execute-instruction-state1 E0049C22 - -# 00000000 and r9, r4, r3, lsr #24 (18) -perl tests.pl "$TESTSPATH" execute-instruction-state1 E0049C23 - -# 00000000 mul r11, r9, r10 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E00B0A99 - -# 00000000 muls r11, r9, r10 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E01B0A99 - -# 00000000 mla r11, r9, r10, r0 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E02B0A99 - -# 00000000 mla r11, r9, r10, r11 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E02BBA99 - -# 00000000 mlas r11, r9, r10, r10 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E03BAA99 - -# 00000000 mlas r11, r9, r10, r11 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E03BBA99 - -# 00000000 add r0, r0, r5 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E0800005 - -# 00000000 add r1, r4, r5 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E0841005 - -# eor r0, r0, 0x44000000 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E2200311 - -# eor r12, r0, 0x44000000 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E220C311 - -# eor r0, r12, 0x44000000 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E22C0311 - -# eor r0, r13, 0x44000000 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E22D0311 - -# eor r0, r0, 0x10000 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E2200801 - -# eor r0, r0, 0xA100 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E2300CA1 - -# rsb r0, r2, r2, lsl #4 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E0620202 - -# orr r0, r0, 0xE0 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E38000E0 - -# orr r0, r0, 0xEF -perl tests.pl "$TESTSPATH" execute-instruction-state1 E38000EF - -# 00000000 sub r11, r12, #4 (4) -perl tests.pl "$TESTSPATH" execute-instruction-state1 E24CB004 - -# 00000000 sub r13, r13, #4 (4) -perl tests.pl "$TESTSPATH" execute-instruction-state1 E24DD004 - -# 00000000 add r5, r5, #3584 (E00) -perl tests.pl "$TESTSPATH" execute-instruction-state1 E2855C0E - -# 00000000 mov r6, #254 (FE) -perl tests.pl "$TESTSPATH" execute-instruction-state1 E3A060FE - -# ldr r0, [r4, #0x010]! -perl tests.pl "$TESTSPATH" execute-instruction-state1 E5B40010 - -# ldr r0, [pc, #0x010]! -perl tests.pl "$TESTSPATH" execute-instruction-state1 E5BF0010 - -# mov r3, r12, lsl r3 -perl tests.pl "$TESTSPATH" execute-instruction-state2 E1A0331C - -# Make sure we don't crash. -# 00000000 add pc, r2, #20 (14) -# 00000004 add pc, r2, #20 (14) -perl tests.pl "$TESTSPATH" execute-two-instructions E282F014-E282F014 - -# Make sure we don't crash. -# 00000000 mov r0, #211 (D3) -# 00000004 msr cpsr, r0 -perl tests.pl "$TESTSPATH" execute-two-instructions E3A000D3-E129F000 - -# Test adds -# 00000000 adds r2, r2, #0 -perl tests.pl "$TESTSPATH" execute-instruction E2922000 - -# Test adds -# 00000000 mvn r2, #0 (0) -# 00000000 adds r2, r2, #1 -perl tests.pl "$TESTSPATH" execute-two-instructions E3E02000-E2922001 - -# TODO: test that ldr pc, [rx] puts the value + 4. - -# Test mrs -# 00000000 mrs r1, spsr -# Note: SPSR is 0 now. -perl tests.pl "$TESTSPATH" execute-instruction E14F1000 - -# Test mrs -# 00000000 mrs r1, cpsr -# Note: CPSR is 00000013 (user mode) now. -perl tests.pl "$TESTSPATH" execute-instruction E10F1000 - -# TODO: test that swp instructions can be followed by another instruction. - -# 00000000 mov r12, #8 -# 00000004 ldmdb r12, {r8, r9} -perl tests.pl "$TESTSPATH" execute-two-instructions E3A0C008-E91C0300 - -# 00000000 mcr 15, 0, r0, cr1, cr1, {0} -perl tests.pl "$TESTSPATH" execute-instruction EE010F11 - -# 00000000 mla r0, r4, r0, r5 -perl tests.pl "$TESTSPATH" execute-instruction-state1 E0205094 diff --git a/_Tests_/scripts/test-memory.sh b/_Tests_/scripts/test-memory.sh deleted file mode 100755 index 35e34be88..000000000 --- a/_Tests_/scripts/test-memory.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -. common.sh $* -perl tests.pl "$TESTSPATH" memory-read-rom -perl tests.pl "$TESTSPATH" memory-read-write-ram diff --git a/_Tests_/scripts/testall.sh b/_Tests_/scripts/testall.sh deleted file mode 100755 index 4df63f089..000000000 --- a/_Tests_/scripts/testall.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# ============================== -# Fichier: testall.sh -# Projet: Einstein -# Ecrit par: Paul Guyot (pguyot@kallisys.net) -# -# Crˇˇ le: 2/5/2003 -# Tabulation: 4 espaces -# -# Copyright: © 2003 by Paul Guyot. -# Tous droits rˇservˇs pour tous pays. -# =========== -# $Id: testall.sh 14 2004-07-27 11:52:09Z paul $ -# =========== - -# Script pour appeler tous les tests non manuels. -for test in test-*.sh -do - sh $test $* -done - -## ================================================== ## -## Row, row, row your bits, gently down the stream... ## -## ================================================== ## diff --git a/_Tests_/tests.cpp b/_Tests_/tests.cpp index c2ea74aa8..5b8ce30f3 100644 --- a/_Tests_/tests.cpp +++ b/_Tests_/tests.cpp @@ -80,10 +80,6 @@ test( const char* inTestName, const char* inArgument ) } else if (::strcmp(inTestName, "screen-x11") == 0) { UScreenTests::TestX11(); #endif - } else if (::strcmp(inTestName, "memory-read-rom") == 0) { - UMemoryTests::ReadROMTest(&theLog); - } else if (::strcmp(inTestName, "memory-read-write-ram") == 0) { - UMemoryTests::ReadWriteRAMTest(&theLog); } else if (::strcmp(inTestName, "flash") == 0) { UMemoryTests::FlashTest(&theLog); } else if (::strcmp(inTestName, "host-info") == 0) { diff --git a/app/TFLApp.cpp b/app/TFLApp.cpp index 92ef49091..a45d05160 100644 --- a/app/TFLApp.cpp +++ b/app/TFLApp.cpp @@ -192,7 +192,7 @@ Developer's Documentation: Basic Ideas, Basic Features, Detailed Class Reference #include "TFLAppUI.h" #include "TFLAppWindow.h" #include "TFLSettingsUI.h" -#if USE_NEWT64 +#if USE_TOOLKIT #include "Toolkit/TToolkit.h" #endif @@ -462,7 +462,7 @@ TFLApp::Run( int argc, char* argv[] ) */ void TFLApp::UserActionQuit() { -#if USE_NEWT64 +#if USE_TOOLKIT // Close the Toolkit window, so it can save its coordinates in the prefrences if ( mToolkit ) mToolkit->Hide(); @@ -717,7 +717,7 @@ void TFLApp::UserActionToggleMonitor() void TFLApp::UserActionShowToolkit() { -#if USE_NEWT64 +#if USE_TOOLKIT if (!mToolkit) mToolkit = new TToolkit(this); mToolkit->Show(); diff --git a/app/TFLApp.h b/app/TFLApp.h index d6102bf26..3af8b9b3d 100644 --- a/app/TFLApp.h +++ b/app/TFLApp.h @@ -49,7 +49,9 @@ class TPlatformManager; class TNetworkManager; class TMonitor; class TSymbolList; +#if USE_TOOLKIT class TToolkit; +#endif class Fl_Widget; class TFLApp; @@ -214,7 +216,9 @@ class TFLApp TMonitor* mMonitor = nullptr; TSymbolList* mSymbolList = nullptr; TFLSettingsUI* mFLSettings = nullptr; +#if USE_TOOLKIT TToolkit* mToolkit = nullptr; +#endif Fl_Widget* mNewtonScreen = nullptr; int mWindowedX = 150; int mWindowedY = 150; diff --git a/app/TFLSettingsUI.fl b/app/TFLSettingsUI.fl index 7f339af54..b44e0354b 100644 --- a/app/TFLSettingsUI.fl +++ b/app/TFLSettingsUI.fl @@ -57,17 +57,6 @@ declblock {\#if TARGET_OS_WIN32} {open after {\#endif} decl {\#include } {private local } -declblock {\#if HAVE_BSD_STRING_H} {open after {\#endif} -} { - decl {\#include } {private local - } -} - -declblock {\#if HAVE_BSD_STRING_H} {open after {\#endif} -} { - decl {\#include } {private local - } -} decl {\#include } {private local }